mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-14 17:14:50 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
749ea96c62 | ||
|
|
f4dfa9e6cf | ||
|
|
30958c201a |
No files matched your search
@@ -3,9 +3,9 @@ name: Build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
branches: [ master, main, release/** ]
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
branches: [ master, main, release/** ]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
|
||||
@@ -145,6 +145,7 @@ public final class Config {
|
||||
public static int travelAnchorCooldown = 0;
|
||||
public static boolean travelAnchorSneak = true;
|
||||
public static boolean travelAnchorSkipWarning = true;
|
||||
public static double travelAnchorSnapAngle = 0.175;
|
||||
|
||||
public static int travelStaffMaxDistance = 128;
|
||||
public static float travelStaffPowerPerBlockRF = 250;
|
||||
@@ -1167,6 +1168,14 @@ public final class Config {
|
||||
"Travel Anchors send a chat warning when skipping inaccessible anchors")
|
||||
.getBoolean(travelAnchorSkipWarning);
|
||||
|
||||
travelAnchorSnapAngle = Math.toRadians(
|
||||
config.get(
|
||||
sectionAnchor.name,
|
||||
"travelAnchorSnapAngle",
|
||||
Math.round(Math.toDegrees(travelAnchorSnapAngle)),
|
||||
"The maximum angle to snap to an anchor when selecting target")
|
||||
.getDouble(Math.toDegrees(travelAnchorSnapAngle)));
|
||||
|
||||
travelStaffMaxDistance = config
|
||||
.get(
|
||||
sectionStaff.name,
|
||||
|
||||
@@ -41,7 +41,7 @@ public class TileAlloySmelter extends AbstractPoweredTaskEntity {
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "Alloy Smelter";
|
||||
return "tile.blockAlloySmelter.name";
|
||||
}
|
||||
|
||||
public Mode getMode() {
|
||||
|
||||
@@ -33,6 +33,12 @@ public class TileBuffer extends AbstractPowerConsumerEntity implements IPaintabl
|
||||
super(new SlotDefinition(9, 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
// getMachineName will return the key without the suffix ".name"
|
||||
return getMachineName() + ".name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return BlockItemBuffer.Type.get(this).getUnlocalizedName();
|
||||
|
||||
@@ -54,6 +54,11 @@ public class TileCrafter extends AbstractPowerConsumerEntity implements IItemBuf
|
||||
setCapacitor(new BasicCapacitor(0, io * 4, refCap.getMaxEnergyStored(), io));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockCrafter.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockCrafter.unlocalisedName;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class TileCrusher extends AbstractPoweredTaskEntity {
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return ModObject.blockSagMill.unlocalisedName;
|
||||
return "tile.blockSagMill.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,6 @@ import com.gtnewhorizon.gtnhlib.geometry.CubeIterator;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import crazypants.enderio.Log;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.TileEntityEio;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.machine.obelisk.xp.TileExperienceObelisk;
|
||||
@@ -300,7 +299,7 @@ public class TileEnchanter extends TileEntityEio implements ISidedInventory {
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return ModObject.blockEnchanter.unlocalisedName;
|
||||
return "tile.blockEnchanter.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -822,7 +822,7 @@ public class TileFarmStation extends AbstractPoweredTaskEntity implements IRange
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return EnderIO.blockFarmStation.getLocalizedName();
|
||||
return "tile.blockFarmStation.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
@@ -90,6 +90,11 @@ public class TileCombustionGenerator extends AbstractGeneratorEntity implements
|
||||
return mode != IoMode.PUSH && mode != IoMode.PUSH_PULL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockCombustionGenerator.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockCombustionGenerator.unlocalisedName;
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public class TileEntityStirlingGenerator extends AbstractGeneratorEntity impleme
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "Stirling Generator";
|
||||
return "tile.blockStirlingGenerator.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -93,6 +93,11 @@ public class TileZombieGenerator extends AbstractGeneratorEntity
|
||||
minimumTankLevel = (int) (fuelTank.getCapacity() * 0.7F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockZombieGenerator.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockZombieGenerator.unlocalisedName;
|
||||
|
||||
@@ -11,8 +11,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.enderio.core.common.util.InventoryWrapper;
|
||||
|
||||
import crazypants.enderio.ModObject;
|
||||
|
||||
public class CompositeInventory implements ISidedInventory {
|
||||
|
||||
private final List<InvEntry> inventories = new ArrayList<>();
|
||||
@@ -157,7 +155,7 @@ public class CompositeInventory implements ISidedInventory {
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return ModObject.blockHyperCube.unlocalisedName;
|
||||
return "tile.blockHyperCube.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,6 @@ import com.enderio.core.common.util.PlayerUtil;
|
||||
import com.enderio.core.common.vecmath.VecmathUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.TileEntityEio;
|
||||
import crazypants.enderio.config.Config;
|
||||
import crazypants.enderio.machine.IRedstoneModeControlable;
|
||||
@@ -769,7 +768,7 @@ public class TileHyperCube extends TileEntityEio
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return ModObject.blockHyperCube.unlocalisedName;
|
||||
return "tile.blockHyperCube.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -369,6 +369,11 @@ public class TileInventoryPanel extends AbstractMachineEntity implements IFluidH
|
||||
nbtRoot.setBoolean("active", active);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockInventoryPanel.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockInventoryPanel.unlocalisedName;
|
||||
|
||||
@@ -157,6 +157,11 @@ public class TileKillerJoe extends AbstractMachineEntity
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockKillerJoe.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockKillerJoe.unlocalisedName;
|
||||
|
||||
@@ -101,7 +101,7 @@ public class TilePowerMonitor extends AbstractPowerConsumerEntity implements IIn
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return EnderIO.blockPowerMonitor.getUnlocalizedName();
|
||||
return "tile.blockPowerMonitor.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -126,6 +126,11 @@ public class TileAttractor extends AbstractPowerConsumerEntity implements IRange
|
||||
setCapacitor(new BasicCapacitor(powerPerTick * 8, getCapacitor().getMaxEnergyStored(), powerPerTick));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockAttractor.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockAttractor.unlocalisedName;
|
||||
|
||||
@@ -106,6 +106,11 @@ public class TileAversionObelisk extends AbstractPowerConsumerEntity implements
|
||||
bounds = AxisAlignedBB.getBoundingBox(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockSpawnGuard.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockSpawnGuard.unlocalisedName;
|
||||
|
||||
@@ -19,6 +19,11 @@ public class TileInhibitorObelisk extends AbstractPowerConsumerEntity implements
|
||||
super(new SlotDefinition(0, 0, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockInhibitorObelisk.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockInhibitorObelisk.unlocalisedName;
|
||||
|
||||
@@ -121,6 +121,11 @@ public class TileWeatherObelisk extends AbstractPowerConsumerEntity
|
||||
setCapacitor(Capacitors.ACTIVATED_CAPACITOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockWeatherObelisk.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockWeatherObelisk.unlocalisedName;
|
||||
|
||||
@@ -32,6 +32,11 @@ public class TileExperienceObelisk extends AbstractMachineEntity
|
||||
super(new SlotDefinition(0, 0, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockExperienceObelisk.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockExperienceObelisk.unlocalisedName;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TileEntityPainter extends AbstractPoweredTaskEntity implements ISid
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "Auto Painter";
|
||||
return "tile.blockPainter.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -100,6 +100,11 @@ public class TileSliceAndSplice extends AbstractPoweredTaskEntity {
|
||||
super(new SlotDefinition(8, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockSliceAndSplice.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockSliceAndSplice.unlocalisedName;
|
||||
|
||||
@@ -113,6 +113,11 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
|
||||
return xpCont;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockSoulBinder.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockSoulBinder.unlocalisedName;
|
||||
|
||||
@@ -197,6 +197,11 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity implements IRa
|
||||
forceClientUpdate = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockPoweredSpawner.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockPoweredSpawner.unlocalisedName;
|
||||
|
||||
@@ -225,6 +225,11 @@ public class TileTank extends AbstractMachineEntity implements IFluidHandler, IT
|
||||
this.voidMode = mode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockTank.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return "tank";
|
||||
|
||||
@@ -157,6 +157,11 @@ public class TileTransceiver extends AbstractPoweredTaskEntity
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return "tile.blockTransceiver.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMachineName() {
|
||||
return ModObject.blockTransceiver.unlocalisedName;
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.enderio.core.common.vecmath.Vector3d;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.ModObject;
|
||||
import crazypants.enderio.TileEntityEio;
|
||||
import crazypants.enderio.conduit.item.FilterRegister;
|
||||
import crazypants.enderio.conduit.item.filter.IItemFilter;
|
||||
@@ -212,7 +211,7 @@ public class TileVacuumChest extends TileEntityEio
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return ModObject.blockVacuumChest.unlocalisedName;
|
||||
return "tile.blockVacuumChest.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class TileVat extends AbstractPoweredTaskEntity implements IFluidHandler,
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
return ModObject.blockVat.unlocalisedName;
|
||||
return "tile.blockVat.name";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -741,7 +741,10 @@ public class TravelController {
|
||||
|
||||
for (Table.Cell<Double, Double, BlockCoord> cell : possibleDestinations.cellSet()) {
|
||||
if (cell.getColumnKey() <= maxDistance) {
|
||||
return Optional.of(cell.getValue());
|
||||
// If the client hasn't selected a target, the server shouldn't try to force one,
|
||||
// but checking if there is one just outside of range (below message) might still
|
||||
// be useful.
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1066,9 +1069,12 @@ public class TravelController {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find the nearest travel anchor within roughly 10 degrees.
|
||||
Optional<BlockCoord> selectedBlock = findBlocksWithinAngle(player, candidates.keySet(), 0.175, Double.MAX_VALUE)
|
||||
.values().stream().findFirst();
|
||||
// Find the nearest travel anchor within the configured angle (default ~10 degrees).
|
||||
Optional<BlockCoord> selectedBlock = findBlocksWithinAngle(
|
||||
player,
|
||||
candidates.keySet(),
|
||||
Config.travelAnchorSnapAngle,
|
||||
Double.MAX_VALUE).values().stream().findFirst();
|
||||
selectedCoord = selectedBlock.orElse(null);
|
||||
}
|
||||
|
||||
|
||||
@@ -651,6 +651,8 @@ tile.blockWeatherObelisk.tooltip.detailed.line4=Liquid Sunshine: Sun
|
||||
tile.blockWeatherObelisk.tooltip.detailed.line5=Cloud Seed: Rain
|
||||
tile.blockWeatherObelisk.tooltip.detailed.line6=Concentrated Cloud Seed: Thunder
|
||||
|
||||
tile.blockInhibitorObelisk.name=Inhibitor Obelisk
|
||||
|
||||
tile.blockBuffer.name=Buffer
|
||||
tile.blockBuffer.item.name=Item Buffer
|
||||
tile.blockBuffer.power.name=Power Buffer
|
||||
|
||||
@@ -608,6 +608,8 @@ tile.blockExperienceObelisk.tooltip.detailed.line3=至相邻的储罐中
|
||||
tile.blockWeatherObelisk.name=气象方尖碑
|
||||
tile.blockWeatherObelisk.tooltip.detailed.line1=改变当前天气
|
||||
|
||||
tile.blockInhibitorObelisk.name=传送抑制方尖碑
|
||||
|
||||
tile.blockBuffer.item.name=物品缓存器
|
||||
tile.blockBuffer.power.name=能量缓存器
|
||||
tile.blockBuffer.omni.name=多功能缓存器
|
||||
|
||||
Reference in new issue
Block a user