diff --git a/src/main/java/techreborn/client/GuiHandler.java b/src/main/java/techreborn/client/GuiHandler.java index 22a639612..092a86132 100644 --- a/src/main/java/techreborn/client/GuiHandler.java +++ b/src/main/java/techreborn/client/GuiHandler.java @@ -64,104 +64,102 @@ public class GuiHandler { public static void register(){ - EGui.stream().forEach(gui -> ContainerProviderRegistry.INSTANCE.registerFactory(gui.getID(), (i, identifier, playerEntity, packetByteBuf) -> { + EGui.stream().forEach(gui -> ContainerProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> { final BlockEntity tile = playerEntity.world.getBlockEntity(packetByteBuf.readBlockPos()); - BuiltContainer container = ((IContainerProvider) tile).createContainer(playerEntity); - ((ContainerExtensions)container).setSyncID(i); - return container; + return ((IContainerProvider) tile).createContainer(syncID, playerEntity); })); - EGui.stream().forEach(gui -> ScreenProviderRegistry.INSTANCE.registerFactory(gui.getID(), (i, identifier, playerEntity, packetByteBuf) -> getClientGuiElement(EGui.byID(identifier), playerEntity, packetByteBuf.readBlockPos()))); + EGui.stream().forEach(gui -> ScreenProviderRegistry.INSTANCE.registerFactory(gui.getID(), (syncID, identifier, playerEntity, packetByteBuf) -> getClientGuiElement(EGui.byID(identifier), playerEntity, packetByteBuf.readBlockPos(), syncID))); } - private static AbstractContainerScreen getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos) { + private static AbstractContainerScreen getClientGuiElement(final EGui gui, final PlayerEntity player, BlockPos pos, int syncID) { final BlockEntity tile = player.world.getBlockEntity(pos); switch (gui) { case AESU: - return new GuiAESU(player, (TileAdjustableSU) tile); + return new GuiAESU(syncID, player, (TileAdjustableSU) tile); case ALLOY_FURNACE: - return new GuiAlloyFurnace(player, (TileIronAlloyFurnace) tile); + return new GuiAlloyFurnace(syncID, player, (TileIronAlloyFurnace) tile); case ALLOY_SMELTER: - return new GuiAlloySmelter(player, (TileAlloySmelter) tile); + return new GuiAlloySmelter(syncID, player, (TileAlloySmelter) tile); case ASSEMBLING_MACHINE: - return new GuiAssemblingMachine(player, (TileAssemblingMachine) tile); + return new GuiAssemblingMachine(syncID, player, (TileAssemblingMachine) tile); case LOW_VOLTAGE_SU: - return new GuiBatbox(player, (TileLowVoltageSU) tile); + return new GuiBatbox(syncID, player, (TileLowVoltageSU) tile); case BLAST_FURNACE: - return new GuiBlastFurnace(player, (TileIndustrialBlastFurnace) tile); + return new GuiBlastFurnace(syncID, player, (TileIndustrialBlastFurnace) tile); case CENTRIFUGE: - return new GuiCentrifuge(player, (TileIndustrialCentrifuge) tile); + return new GuiCentrifuge(syncID, player, (TileIndustrialCentrifuge) tile); case CHARGEBENCH: - return new GuiChargeBench(player, (TileChargeOMat) tile); + return new GuiChargeBench(syncID, player, (TileChargeOMat) tile); case CHEMICAL_REACTOR: - return new GuiChemicalReactor(player, (TileChemicalReactor) tile); + return new GuiChemicalReactor(syncID, player, (TileChemicalReactor) tile); case CHUNK_LOADER: - return new GuiChunkLoader(player, (TileChunkLoader) tile); + return new GuiChunkLoader(syncID, player, (TileChunkLoader) tile); case COMPRESSOR: - return new GuiCompressor(player, (TileCompressor) tile); + return new GuiCompressor(syncID, player, (TileCompressor) tile); case DESTRUCTOPACK: return new GuiDestructoPack(new ContainerDestructoPack(player)); case DIESEL_GENERATOR: - return new GuiDieselGenerator(player, (TileDieselGenerator) tile); + return new GuiDieselGenerator(syncID, player, (TileDieselGenerator) tile); case DIGITAL_CHEST: - return new GuiDigitalChest(player, (TileDigitalChest) tile); + return new GuiDigitalChest(syncID, player, (TileDigitalChest) tile); case ELECTRIC_FURNACE: - return new GuiElectricFurnace(player, (TileElectricFurnace) tile); + return new GuiElectricFurnace(syncID, player, (TileElectricFurnace) tile); case EXTRACTOR: - return new GuiExtractor(player, (TileExtractor) tile); + return new GuiExtractor(syncID, player, (TileExtractor) tile); case FUSION_CONTROLLER: - return new GuiFusionReactor(player, (TileFusionControlComputer) tile); + return new GuiFusionReactor(syncID, player, (TileFusionControlComputer) tile); case GAS_TURBINE: - return new GuiGasTurbine(player, (TileGasTurbine) tile); + return new GuiGasTurbine(syncID, player, (TileGasTurbine) tile); case GENERATOR: - return new GuiGenerator(player, (TileSolidFuelGenerator) tile); + return new GuiGenerator(syncID, player, (TileSolidFuelGenerator) tile); case GRINDER: - return new GuiGrinder(player, (TileGrinder) tile); + return new GuiGrinder(syncID, player, (TileGrinder) tile); case IDSU: - return new GuiIDSU(player, (TileInterdimensionalSU) tile); + return new GuiIDSU(syncID, player, (TileInterdimensionalSU) tile); case IMPLOSION_COMPRESSOR: - return new GuiImplosionCompressor(player, (TileImplosionCompressor) tile); + return new GuiImplosionCompressor(syncID, player, (TileImplosionCompressor) tile); case INDUSTRIAL_ELECTROLYZER: - return new GuiIndustrialElectrolyzer(player, (TileIndustrialElectrolyzer) tile); + return new GuiIndustrialElectrolyzer(syncID, player, (TileIndustrialElectrolyzer) tile); case INDUSTRIAL_GRINDER: - return new GuiIndustrialGrinder(player, (TileIndustrialGrinder) tile); + return new GuiIndustrialGrinder(syncID, player, (TileIndustrialGrinder) tile); case IRON_FURNACE: - return new GuiIronFurnace(player, (TileIronFurnace) tile); + return new GuiIronFurnace(syncID, player, (TileIronFurnace) tile); case LESU: - return new GuiLESU(player, (TileLapotronicSU) tile); + return new GuiLESU(syncID, player, (TileLapotronicSU) tile); case MATTER_FABRICATOR: - return new GuiMatterFabricator(player, (TileMatterFabricator) tile); + return new GuiMatterFabricator(syncID, player, (TileMatterFabricator) tile); case MEDIUM_VOLTAGE_SU: - return new GuiMFE(player, (TileMediumVoltageSU) tile); + return new GuiMFE(syncID, player, (TileMediumVoltageSU) tile); case HIGH_VOLTAGE_SU: - return new GuiMFSU(player, (TileHighVoltageSU) tile); + return new GuiMFSU(syncID, player, (TileHighVoltageSU) tile); case QUANTUM_CHEST: - return new GuiQuantumChest(player, (TileQuantumChest) tile); + return new GuiQuantumChest(syncID, player, (TileQuantumChest) tile); case QUANTUM_TANK: - return new GuiQuantumTank(player, (TileQuantumTank) tile); + return new GuiQuantumTank(syncID, player, (TileQuantumTank) tile); case RECYCLER: - return new GuiRecycler(player, (TileRecycler) tile); + return new GuiRecycler(syncID, player, (TileRecycler) tile); case ROLLING_MACHINE: - return new GuiRollingMachine(player, (TileRollingMachine) tile); + return new GuiRollingMachine(syncID, player, (TileRollingMachine) tile); case SAWMILL: - return new GuiIndustrialSawmill(player, (TileIndustrialSawmill) tile); + return new GuiIndustrialSawmill(syncID, player, (TileIndustrialSawmill) tile); case SCRAPBOXINATOR: - return new GuiScrapboxinator(player, (TileScrapboxinator) tile); + return new GuiScrapboxinator(syncID, player, (TileScrapboxinator) tile); case SEMIFLUID_GENERATOR: - return new GuiSemifluidGenerator(player, (TileSemiFluidGenerator) tile); + return new GuiSemifluidGenerator(syncID, player, (TileSemiFluidGenerator) tile); case THERMAL_GENERATOR: - return new GuiThermalGenerator(player, (TileThermalGenerator) tile); + return new GuiThermalGenerator(syncID, player, (TileThermalGenerator) tile); case VACUUM_FREEZER: - return new GuiVacuumFreezer(player, (TileVacuumFreezer) tile); + return new GuiVacuumFreezer(syncID, player, (TileVacuumFreezer) tile); case AUTO_CRAFTING_TABLE: - return new GuiAutoCrafting(player, (TileAutoCraftingTable) tile); + return new GuiAutoCrafting(syncID, player, (TileAutoCraftingTable) tile); case PLASMA_GENERATOR: - return new GuiPlasmaGenerator(player, (TilePlasmaGenerator) tile); + return new GuiPlasmaGenerator(syncID, player, (TilePlasmaGenerator) tile); case DISTILLATION_TOWER: - return new GuiDistillationTower(player, (TileDistillationTower) tile); + return new GuiDistillationTower(syncID, player, (TileDistillationTower) tile); case FLUID_REPLICATOR: - return new GuiFluidReplicator(player, (TileFluidReplicator) tile); + return new GuiFluidReplicator(syncID, player, (TileFluidReplicator) tile); default: break; diff --git a/src/main/java/techreborn/client/gui/GuiAESU.java b/src/main/java/techreborn/client/gui/GuiAESU.java index c1205321d..5e986928a 100644 --- a/src/main/java/techreborn/client/gui/GuiAESU.java +++ b/src/main/java/techreborn/client/gui/GuiAESU.java @@ -38,8 +38,8 @@ public class GuiAESU extends GuiBase { TileAdjustableSU tile; - public GuiAESU(final PlayerEntity player, final TileAdjustableSU aesu) { - super(player, aesu, aesu.createContainer(player)); + public GuiAESU(int syncID, final PlayerEntity player, final TileAdjustableSU aesu) { + super(player, aesu, aesu.createContainer(syncID, player)); this.tile = aesu; } diff --git a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java index 06f72c8c8..416a76c72 100644 --- a/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiAlloyFurnace.java @@ -40,8 +40,8 @@ public class GuiAlloyFurnace extends AbstractContainerScreen { TileIronAlloyFurnace alloyfurnace; - public GuiAlloyFurnace(final PlayerEntity player, final TileIronAlloyFurnace alloyFurnace) { - super(alloyFurnace.createContainer(player), player.inventory, new LiteralText("techreborn.alloy_furnace")); + public GuiAlloyFurnace(int syncID, final PlayerEntity player, final TileIronAlloyFurnace alloyFurnace) { + super(alloyFurnace.createContainer(syncID, player), player.inventory, new LiteralText("techreborn.alloy_furnace")); this.containerWidth = 176; this.containerHeight = 167; this.alloyfurnace = alloyFurnace; diff --git a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java index d90be541c..13c15cbfe 100644 --- a/src/main/java/techreborn/client/gui/GuiAlloySmelter.java +++ b/src/main/java/techreborn/client/gui/GuiAlloySmelter.java @@ -33,8 +33,8 @@ public class GuiAlloySmelter extends GuiBase { TileAlloySmelter tile; - public GuiAlloySmelter(final PlayerEntity player, final TileAlloySmelter tile) { - super(player, tile, tile.createContainer(player)); + public GuiAlloySmelter(int syncID, final PlayerEntity player, final TileAlloySmelter tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java index 83bc5a1d3..5f0e966e2 100644 --- a/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiAssemblingMachine.java @@ -33,8 +33,8 @@ public class GuiAssemblingMachine extends GuiBase { TileAssemblingMachine tile; - public GuiAssemblingMachine(final PlayerEntity player, final TileAssemblingMachine tile) { - super(player, tile, tile.createContainer(player)); + public GuiAssemblingMachine(int syncID, final PlayerEntity player, final TileAssemblingMachine tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiAutoCrafting.java b/src/main/java/techreborn/client/gui/GuiAutoCrafting.java index 1c8f87543..f96b2077c 100644 --- a/src/main/java/techreborn/client/gui/GuiAutoCrafting.java +++ b/src/main/java/techreborn/client/gui/GuiAutoCrafting.java @@ -44,8 +44,8 @@ public class GuiAutoCrafting extends GuiBase { boolean showGui = true; TileAutoCraftingTable tileAutoCraftingTable; - public GuiAutoCrafting(PlayerEntity player, TileAutoCraftingTable tile) { - super(player, tile, tile.createContainer(player)); + public GuiAutoCrafting(int syncID, PlayerEntity player, TileAutoCraftingTable tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tileAutoCraftingTable = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiBatbox.java b/src/main/java/techreborn/client/gui/GuiBatbox.java index 337d5d04c..413ca1419 100644 --- a/src/main/java/techreborn/client/gui/GuiBatbox.java +++ b/src/main/java/techreborn/client/gui/GuiBatbox.java @@ -34,8 +34,8 @@ public class GuiBatbox extends GuiBase { TileLowVoltageSU tile; - public GuiBatbox(final PlayerEntity player, final TileLowVoltageSU tile) { - super(player, tile, tile.createContainer(player)); + public GuiBatbox(int syncID, final PlayerEntity player, final TileLowVoltageSU tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java index 14b793440..2d111492c 100644 --- a/src/main/java/techreborn/client/gui/GuiBlastFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiBlastFurnace.java @@ -44,8 +44,8 @@ public class GuiBlastFurnace extends GuiBase { public TileIndustrialBlastFurnace tile; boolean hasMultiBlock; - public GuiBlastFurnace(final PlayerEntity player, final TileIndustrialBlastFurnace tile) { - super(player, tile, tile.createContainer(player)); + public GuiBlastFurnace(int syncID, final PlayerEntity player, final TileIndustrialBlastFurnace tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiCentrifuge.java b/src/main/java/techreborn/client/gui/GuiCentrifuge.java index a75fd0d97..d64875e23 100644 --- a/src/main/java/techreborn/client/gui/GuiCentrifuge.java +++ b/src/main/java/techreborn/client/gui/GuiCentrifuge.java @@ -33,8 +33,8 @@ public class GuiCentrifuge extends GuiBase { TileIndustrialCentrifuge tile; - public GuiCentrifuge(final PlayerEntity player, final TileIndustrialCentrifuge tile) { - super(player, tile, tile.createContainer(player)); + public GuiCentrifuge(int syncID, final PlayerEntity player, final TileIndustrialCentrifuge tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiChargeBench.java b/src/main/java/techreborn/client/gui/GuiChargeBench.java index 1709a1ec3..e8196b7d4 100644 --- a/src/main/java/techreborn/client/gui/GuiChargeBench.java +++ b/src/main/java/techreborn/client/gui/GuiChargeBench.java @@ -32,8 +32,8 @@ public class GuiChargeBench extends GuiBase { TileChargeOMat tile; - public GuiChargeBench(final PlayerEntity player, final TileChargeOMat tile) { - super(player, tile, tile.createContainer(player)); + public GuiChargeBench(int syncID, final PlayerEntity player, final TileChargeOMat tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiChemicalReactor.java b/src/main/java/techreborn/client/gui/GuiChemicalReactor.java index 06b48d639..4381ceb36 100644 --- a/src/main/java/techreborn/client/gui/GuiChemicalReactor.java +++ b/src/main/java/techreborn/client/gui/GuiChemicalReactor.java @@ -33,8 +33,8 @@ public class GuiChemicalReactor extends GuiBase { TileChemicalReactor tile; - public GuiChemicalReactor(final PlayerEntity player, final TileChemicalReactor tile) { - super(player, tile, tile.createContainer(player)); + public GuiChemicalReactor(int syncID, final PlayerEntity player, final TileChemicalReactor tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiChunkLoader.java b/src/main/java/techreborn/client/gui/GuiChunkLoader.java index 17bc8c4b6..f18d4766f 100644 --- a/src/main/java/techreborn/client/gui/GuiChunkLoader.java +++ b/src/main/java/techreborn/client/gui/GuiChunkLoader.java @@ -44,8 +44,8 @@ public class GuiChunkLoader extends AbstractContainerScreen { private ButtonWidget minusOneButton; private ButtonWidget minusTenButton; - public GuiChunkLoader(final PlayerEntity player, final TileChunkLoader chunkLoader) { - super(chunkLoader.createContainer(player), player.inventory, new LiteralText("techreborn.chunkloader")); + public GuiChunkLoader(int syncID, final PlayerEntity player, final TileChunkLoader chunkLoader) { + super(chunkLoader.createContainer(syncID, player), player.inventory, new LiteralText("techreborn.chunkloader")); this.containerWidth = 176; this.containerHeight = 167; this.chunkloader = chunkLoader; diff --git a/src/main/java/techreborn/client/gui/GuiCompressor.java b/src/main/java/techreborn/client/gui/GuiCompressor.java index bbb80adb3..3229fe008 100644 --- a/src/main/java/techreborn/client/gui/GuiCompressor.java +++ b/src/main/java/techreborn/client/gui/GuiCompressor.java @@ -33,8 +33,8 @@ public class GuiCompressor extends GuiBase { TileCompressor tile; - public GuiCompressor(final PlayerEntity player, final TileCompressor tile) { - super(player, tile, tile.createContainer(player)); + public GuiCompressor(int syncID, final PlayerEntity player, final TileCompressor tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiDieselGenerator.java b/src/main/java/techreborn/client/gui/GuiDieselGenerator.java index 2bf47ea6f..2f57ebfc7 100644 --- a/src/main/java/techreborn/client/gui/GuiDieselGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiDieselGenerator.java @@ -36,8 +36,8 @@ public class GuiDieselGenerator extends GuiBase { TileDieselGenerator tile; - public GuiDieselGenerator(final PlayerEntity player, final TileDieselGenerator tile) { - super(player, tile, tile.createContainer(player)); + public GuiDieselGenerator(int syncID, final PlayerEntity player, final TileDieselGenerator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiDigitalChest.java b/src/main/java/techreborn/client/gui/GuiDigitalChest.java index 4cab689f0..7f00ffd36 100644 --- a/src/main/java/techreborn/client/gui/GuiDigitalChest.java +++ b/src/main/java/techreborn/client/gui/GuiDigitalChest.java @@ -32,8 +32,8 @@ public class GuiDigitalChest extends GuiBase { TileDigitalChest tile; - public GuiDigitalChest(final PlayerEntity player, final TileDigitalChest tile) { - super(player, tile, tile.createContainer(player)); + public GuiDigitalChest(int syncID, final PlayerEntity player, final TileDigitalChest tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiDistillationTower.java b/src/main/java/techreborn/client/gui/GuiDistillationTower.java index 66985d605..812b29b71 100644 --- a/src/main/java/techreborn/client/gui/GuiDistillationTower.java +++ b/src/main/java/techreborn/client/gui/GuiDistillationTower.java @@ -43,8 +43,8 @@ public class GuiDistillationTower extends GuiBase { public TileDistillationTower tile; - public GuiDistillationTower(final PlayerEntity player, final TileDistillationTower tile) { - super(player, tile, tile.createContainer(player)); + public GuiDistillationTower(int syncID, final PlayerEntity player, final TileDistillationTower tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiElectricFurnace.java b/src/main/java/techreborn/client/gui/GuiElectricFurnace.java index 0cbb3324d..de3881cee 100644 --- a/src/main/java/techreborn/client/gui/GuiElectricFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiElectricFurnace.java @@ -33,8 +33,8 @@ public class GuiElectricFurnace extends GuiBase { TileElectricFurnace tile; - public GuiElectricFurnace(final PlayerEntity player, final TileElectricFurnace tile) { - super(player, tile, tile.createContainer(player)); + public GuiElectricFurnace(int syncID, final PlayerEntity player, final TileElectricFurnace tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiExtractor.java b/src/main/java/techreborn/client/gui/GuiExtractor.java index ee66e9f0f..1ac414f9d 100644 --- a/src/main/java/techreborn/client/gui/GuiExtractor.java +++ b/src/main/java/techreborn/client/gui/GuiExtractor.java @@ -33,8 +33,8 @@ public class GuiExtractor extends GuiBase { TileExtractor tile; - public GuiExtractor(final PlayerEntity player, final TileExtractor tile) { - super(player, tile, tile.createContainer(player)); + public GuiExtractor(int syncID, final PlayerEntity player, final TileExtractor tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiFluidReplicator.java b/src/main/java/techreborn/client/gui/GuiFluidReplicator.java index 9819df195..ca1790f7d 100644 --- a/src/main/java/techreborn/client/gui/GuiFluidReplicator.java +++ b/src/main/java/techreborn/client/gui/GuiFluidReplicator.java @@ -46,8 +46,8 @@ public class GuiFluidReplicator extends GuiBase { TileFluidReplicator tile; - public GuiFluidReplicator(final PlayerEntity player, final TileFluidReplicator tile) { - super(player, tile, tile.createContainer(player)); + public GuiFluidReplicator(int syncID, final PlayerEntity player, final TileFluidReplicator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiFusionReactor.java b/src/main/java/techreborn/client/gui/GuiFusionReactor.java index a1e10a08c..5836998a7 100644 --- a/src/main/java/techreborn/client/gui/GuiFusionReactor.java +++ b/src/main/java/techreborn/client/gui/GuiFusionReactor.java @@ -51,8 +51,8 @@ import java.util.Optional; public class GuiFusionReactor extends GuiBase { TileFusionControlComputer tile; - public GuiFusionReactor(final PlayerEntity player, final TileFusionControlComputer tile) { - super(player, tile, tile.createContainer(player)); + public GuiFusionReactor(int syncID, final PlayerEntity player, final TileFusionControlComputer tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiGasTurbine.java b/src/main/java/techreborn/client/gui/GuiGasTurbine.java index 5b335523c..91f7b2b38 100644 --- a/src/main/java/techreborn/client/gui/GuiGasTurbine.java +++ b/src/main/java/techreborn/client/gui/GuiGasTurbine.java @@ -33,8 +33,8 @@ public class GuiGasTurbine extends GuiBase { TileGasTurbine tile; - public GuiGasTurbine(final PlayerEntity player, final TileGasTurbine tile) { - super(player, tile, tile.createContainer(player)); + public GuiGasTurbine(int syncID, final PlayerEntity player, final TileGasTurbine tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiGenerator.java b/src/main/java/techreborn/client/gui/GuiGenerator.java index cf5bbdb37..5a030674c 100644 --- a/src/main/java/techreborn/client/gui/GuiGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiGenerator.java @@ -32,8 +32,8 @@ public class GuiGenerator extends GuiBase { TileSolidFuelGenerator tile; - public GuiGenerator(final PlayerEntity player, final TileSolidFuelGenerator tile) { - super(player, tile, tile.createContainer(player)); + public GuiGenerator(int syncID, final PlayerEntity player, final TileSolidFuelGenerator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiGrinder.java b/src/main/java/techreborn/client/gui/GuiGrinder.java index 51651cb00..5b1a0a248 100644 --- a/src/main/java/techreborn/client/gui/GuiGrinder.java +++ b/src/main/java/techreborn/client/gui/GuiGrinder.java @@ -33,8 +33,8 @@ public class GuiGrinder extends GuiBase { TileGrinder tile; - public GuiGrinder(final PlayerEntity player, final TileGrinder tile) { - super(player, tile, tile.createContainer(player)); + public GuiGrinder(int syncID, final PlayerEntity player, final TileGrinder tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiIDSU.java b/src/main/java/techreborn/client/gui/GuiIDSU.java index 2b4d82734..14a7f2a09 100644 --- a/src/main/java/techreborn/client/gui/GuiIDSU.java +++ b/src/main/java/techreborn/client/gui/GuiIDSU.java @@ -34,8 +34,8 @@ public class GuiIDSU extends GuiBase { TileInterdimensionalSU idsu; - public GuiIDSU(PlayerEntity player, TileInterdimensionalSU tileIDSU) { - super(player, tileIDSU, tileIDSU.createContainer(player)); + public GuiIDSU(int syncID, PlayerEntity player, TileInterdimensionalSU tileIDSU) { + super(player, tileIDSU, tileIDSU.createContainer(syncID, player)); idsu = tileIDSU; } diff --git a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java index e3ce60879..cf9f98024 100644 --- a/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java +++ b/src/main/java/techreborn/client/gui/GuiImplosionCompressor.java @@ -42,8 +42,8 @@ public class GuiImplosionCompressor extends GuiBase { TileImplosionCompressor tile; - public GuiImplosionCompressor(final PlayerEntity player, final TileImplosionCompressor tile) { - super(player, tile, tile.createContainer(player)); + public GuiImplosionCompressor(int syncID, final PlayerEntity player, final TileImplosionCompressor tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java index d45abb915..c86458399 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialElectrolyzer.java @@ -33,8 +33,8 @@ public class GuiIndustrialElectrolyzer extends GuiBase { TileIndustrialElectrolyzer tile; - public GuiIndustrialElectrolyzer(final PlayerEntity player, final TileIndustrialElectrolyzer tile) { - super(player, tile, tile.createContainer(player)); + public GuiIndustrialElectrolyzer(int syncID, final PlayerEntity player, final TileIndustrialElectrolyzer tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java b/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java index b6cada6d9..14760d6d6 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java @@ -43,8 +43,8 @@ public class GuiIndustrialGrinder extends GuiBase { TileIndustrialGrinder tile; - public GuiIndustrialGrinder(final PlayerEntity player, final TileIndustrialGrinder tile) { - super(player, tile, tile.createContainer(player)); + public GuiIndustrialGrinder(int syncID, final PlayerEntity player, final TileIndustrialGrinder tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java index 4c284ece3..3db76f690 100644 --- a/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java +++ b/src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java @@ -43,8 +43,8 @@ public class GuiIndustrialSawmill extends GuiBase { TileIndustrialSawmill tile; - public GuiIndustrialSawmill(final PlayerEntity player, final TileIndustrialSawmill tile) { - super(player, tile, tile.createContainer(player)); + public GuiIndustrialSawmill(int syncID, final PlayerEntity player, final TileIndustrialSawmill tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiIronFurnace.java b/src/main/java/techreborn/client/gui/GuiIronFurnace.java index b7585fc38..27c102763 100644 --- a/src/main/java/techreborn/client/gui/GuiIronFurnace.java +++ b/src/main/java/techreborn/client/gui/GuiIronFurnace.java @@ -40,8 +40,8 @@ public class GuiIronFurnace extends GuiBase { TileIronFurnace furnace; - public GuiIronFurnace(final PlayerEntity player, final TileIronFurnace furnace) { - super(player, furnace, furnace.createContainer(player)); + public GuiIronFurnace(int syncID, final PlayerEntity player, final TileIronFurnace furnace) { + super(player, furnace, furnace.createContainer(syncID, player)); this.containerWidth = 176; this.containerHeight = 167; this.furnace = furnace; diff --git a/src/main/java/techreborn/client/gui/GuiLESU.java b/src/main/java/techreborn/client/gui/GuiLESU.java index aae754de6..cd86664a2 100644 --- a/src/main/java/techreborn/client/gui/GuiLESU.java +++ b/src/main/java/techreborn/client/gui/GuiLESU.java @@ -34,8 +34,8 @@ public class GuiLESU extends GuiBase { TileLapotronicSU tile; - public GuiLESU(final PlayerEntity player, final TileLapotronicSU tile) { - super(player, tile, tile.createContainer(player)); + public GuiLESU(int syncID, final PlayerEntity player, final TileLapotronicSU tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiMFE.java b/src/main/java/techreborn/client/gui/GuiMFE.java index 3b3c82cb6..1b8c4a39b 100644 --- a/src/main/java/techreborn/client/gui/GuiMFE.java +++ b/src/main/java/techreborn/client/gui/GuiMFE.java @@ -34,8 +34,8 @@ public class GuiMFE extends GuiBase { TileMediumVoltageSU mfe; - public GuiMFE(final PlayerEntity player, final TileMediumVoltageSU mfe) { - super(player, mfe, mfe.createContainer(player)); + public GuiMFE(int syncID, final PlayerEntity player, final TileMediumVoltageSU mfe) { + super(player, mfe, mfe.createContainer(syncID, player)); this.mfe = mfe; } diff --git a/src/main/java/techreborn/client/gui/GuiMFSU.java b/src/main/java/techreborn/client/gui/GuiMFSU.java index 4d645126e..10861fecd 100644 --- a/src/main/java/techreborn/client/gui/GuiMFSU.java +++ b/src/main/java/techreborn/client/gui/GuiMFSU.java @@ -34,8 +34,8 @@ public class GuiMFSU extends GuiBase { TileHighVoltageSU mfsu; - public GuiMFSU(final PlayerEntity player, final TileHighVoltageSU mfsu) { - super(player, mfsu, mfsu.createContainer(player)); + public GuiMFSU(int syncID, final PlayerEntity player, final TileHighVoltageSU mfsu) { + super(player, mfsu, mfsu.createContainer(syncID, player)); this.mfsu = mfsu; } diff --git a/src/main/java/techreborn/client/gui/GuiMatterFabricator.java b/src/main/java/techreborn/client/gui/GuiMatterFabricator.java index 5b458168b..c95443669 100644 --- a/src/main/java/techreborn/client/gui/GuiMatterFabricator.java +++ b/src/main/java/techreborn/client/gui/GuiMatterFabricator.java @@ -33,8 +33,8 @@ public class GuiMatterFabricator extends GuiBase { TileMatterFabricator tile; - public GuiMatterFabricator(final PlayerEntity player, final TileMatterFabricator tile) { - super(player, tile, tile.createContainer(player)); + public GuiMatterFabricator(int syncID, final PlayerEntity player, final TileMatterFabricator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java b/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java index b29539f9c..d90ebddb1 100644 --- a/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiPlasmaGenerator.java @@ -45,8 +45,8 @@ public class GuiPlasmaGenerator extends GuiBase { */ TilePlasmaGenerator tile; - public GuiPlasmaGenerator(final PlayerEntity player, final TilePlasmaGenerator tile) { - super(player, tile, tile.createContainer(player)); + public GuiPlasmaGenerator(int syncID, final PlayerEntity player, final TilePlasmaGenerator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiQuantumChest.java b/src/main/java/techreborn/client/gui/GuiQuantumChest.java index bc5e249f3..32581ff2e 100644 --- a/src/main/java/techreborn/client/gui/GuiQuantumChest.java +++ b/src/main/java/techreborn/client/gui/GuiQuantumChest.java @@ -32,8 +32,8 @@ public class GuiQuantumChest extends GuiBase { TileQuantumChest quantumChest; - public GuiQuantumChest(final PlayerEntity player, final TileQuantumChest quantumChest) { - super(player, quantumChest, quantumChest.createContainer(player)); + public GuiQuantumChest(int syncID, final PlayerEntity player, final TileQuantumChest quantumChest) { + super(player, quantumChest, quantumChest.createContainer(syncID, player)); this.quantumChest = quantumChest; } diff --git a/src/main/java/techreborn/client/gui/GuiQuantumTank.java b/src/main/java/techreborn/client/gui/GuiQuantumTank.java index 765e5a220..ef950bdd3 100644 --- a/src/main/java/techreborn/client/gui/GuiQuantumTank.java +++ b/src/main/java/techreborn/client/gui/GuiQuantumTank.java @@ -33,8 +33,8 @@ public class GuiQuantumTank extends GuiBase { TileQuantumTank quantumTank; - public GuiQuantumTank(final PlayerEntity player, final TileQuantumTank quantumTank) { - super(player, quantumTank, quantumTank.createContainer(player)); + public GuiQuantumTank(int syncID, final PlayerEntity player, final TileQuantumTank quantumTank) { + super(player, quantumTank, quantumTank.createContainer(syncID, player)); this.quantumTank = quantumTank; } diff --git a/src/main/java/techreborn/client/gui/GuiRecycler.java b/src/main/java/techreborn/client/gui/GuiRecycler.java index 01233eef8..85a16b1fa 100644 --- a/src/main/java/techreborn/client/gui/GuiRecycler.java +++ b/src/main/java/techreborn/client/gui/GuiRecycler.java @@ -33,8 +33,8 @@ public class GuiRecycler extends GuiBase { TileRecycler tile; - public GuiRecycler(final PlayerEntity player, final TileRecycler tile) { - super(player, tile, tile.createContainer(player)); + public GuiRecycler(int syncID, final PlayerEntity player, final TileRecycler tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiRollingMachine.java b/src/main/java/techreborn/client/gui/GuiRollingMachine.java index 652af814c..4c7b0fb11 100644 --- a/src/main/java/techreborn/client/gui/GuiRollingMachine.java +++ b/src/main/java/techreborn/client/gui/GuiRollingMachine.java @@ -35,8 +35,8 @@ public class GuiRollingMachine extends GuiBase { TileRollingMachine rollingMachine; - public GuiRollingMachine(final PlayerEntity player, final TileRollingMachine tileRollingmachine) { - super(player, tileRollingmachine, tileRollingmachine.createContainer(player)); + public GuiRollingMachine(int syncID, final PlayerEntity player, final TileRollingMachine tileRollingmachine) { + super(player, tileRollingmachine, tileRollingmachine.createContainer(syncID, player)); this.rollingMachine = tileRollingmachine; } diff --git a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java index 27ffb1b2c..812238682 100644 --- a/src/main/java/techreborn/client/gui/GuiScrapboxinator.java +++ b/src/main/java/techreborn/client/gui/GuiScrapboxinator.java @@ -33,8 +33,8 @@ public class GuiScrapboxinator extends GuiBase { TileScrapboxinator tile; - public GuiScrapboxinator(final PlayerEntity player, final TileScrapboxinator tile) { - super(player, tile, tile.createContainer(player)); + public GuiScrapboxinator(int syncID, final PlayerEntity player, final TileScrapboxinator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java b/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java index 4a866d280..27e3d0c64 100644 --- a/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiSemifluidGenerator.java @@ -33,8 +33,8 @@ public class GuiSemifluidGenerator extends GuiBase { TileSemiFluidGenerator tile; - public GuiSemifluidGenerator(final PlayerEntity player, final TileSemiFluidGenerator tile) { - super(player, tile, tile.createContainer(player)); + public GuiSemifluidGenerator(int syncID, final PlayerEntity player, final TileSemiFluidGenerator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiThermalGenerator.java b/src/main/java/techreborn/client/gui/GuiThermalGenerator.java index b318380e7..5754c9b07 100644 --- a/src/main/java/techreborn/client/gui/GuiThermalGenerator.java +++ b/src/main/java/techreborn/client/gui/GuiThermalGenerator.java @@ -33,8 +33,8 @@ public class GuiThermalGenerator extends GuiBase { TileThermalGenerator tile; - public GuiThermalGenerator(final PlayerEntity player, final TileThermalGenerator tile) { - super(player, tile, tile.createContainer(player)); + public GuiThermalGenerator(int syncID, final PlayerEntity player, final TileThermalGenerator tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java index 32f713196..58a3cec45 100644 --- a/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java +++ b/src/main/java/techreborn/client/gui/GuiVacuumFreezer.java @@ -41,8 +41,8 @@ public class GuiVacuumFreezer extends GuiBase { TileVacuumFreezer tile; - public GuiVacuumFreezer(final PlayerEntity player, final TileVacuumFreezer tile) { - super(player, tile, tile.createContainer(player)); + public GuiVacuumFreezer(int syncID, final PlayerEntity player, final TileVacuumFreezer tile) { + super(player, tile, tile.createContainer(syncID, player)); this.tile = tile; } diff --git a/src/main/java/techreborn/tiles/TileChargeOMat.java b/src/main/java/techreborn/tiles/TileChargeOMat.java index 6b30f5433..49bba0505 100644 --- a/src/main/java/techreborn/tiles/TileChargeOMat.java +++ b/src/main/java/techreborn/tiles/TileChargeOMat.java @@ -120,9 +120,9 @@ public class TileChargeOMat extends TilePowerAcceptor // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("chargebench").player(player.inventory).inventory().hotbar().addInventory() .tile(this).energySlot(0, 62, 25).energySlot(1, 98, 25).energySlot(2, 62, 45).energySlot(3, 98, 45) - .energySlot(4, 62, 65).energySlot(5, 98, 65).syncEnergyValue().addInventory().create(this); + .energySlot(4, 62, 65).energySlot(5, 98, 65).syncEnergyValue().addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/TileDigitalChest.java b/src/main/java/techreborn/tiles/TileDigitalChest.java index 206e4b629..57682e173 100644 --- a/src/main/java/techreborn/tiles/TileDigitalChest.java +++ b/src/main/java/techreborn/tiles/TileDigitalChest.java @@ -44,8 +44,8 @@ public class TileDigitalChest extends TileTechStorageBase implements IContainerP } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("digitalchest").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this); + .tile(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java b/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java index 3aa4f8b9d..685d7b3e0 100644 --- a/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java +++ b/src/main/java/techreborn/tiles/TileIndustrialCentrifuge.java @@ -62,14 +62,14 @@ public class TileIndustrialCentrifuge extends TileGenericMachine implements ICon // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("centrifuge").player(player.inventory).inventory().hotbar() .addInventory().tile(this) .filterSlot(1, 40, 54, stack -> ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .filterSlot(0, 40, 34, stack -> !ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .outputSlot(2, 82, 44).outputSlot(3, 101, 25) .outputSlot(4, 120, 44).outputSlot(5, 101, 63).energySlot(6, 8, 72).syncEnergyValue() - .syncCrafterValue().addInventory().create(this); + .syncCrafterValue().addInventory().create(this, syncID); } // IListInfoProvider diff --git a/src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java b/src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java index 1b553218c..b309d614e 100644 --- a/src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java +++ b/src/main/java/techreborn/tiles/fusionReactor/TileFusionControlComputer.java @@ -379,7 +379,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("fusionreactor").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).syncEnergyValue() .syncIntegerValue(this::getCoilStatus, this::setCoilStatus) @@ -387,7 +387,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor .syncIntegerValue(this::getFinalTickTime, this::setFinalTickTime) .syncIntegerValue(this::getSize, this::setSize) .syncIntegerValue(this::getState, this::setState) - .syncIntegerValue(this::getNeededPower, this::setNeededPower).addInventory().create(this); + .syncIntegerValue(this::getNeededPower, this::setNeededPower).addInventory().create(this, syncID); } public int getCoilStatus() { diff --git a/src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java b/src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java index e88ab8693..3b3d9bae9 100644 --- a/src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java +++ b/src/main/java/techreborn/tiles/generator/TilePlasmaGenerator.java @@ -68,12 +68,12 @@ public class TilePlasmaGenerator extends TileBaseFluidGenerator implements ICont } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("plasmagenerator").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) - .addInventory().create(this); + .addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java b/src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java index 3784747a8..4e365491a 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java +++ b/src/main/java/techreborn/tiles/generator/advanced/TileDieselGenerator.java @@ -69,11 +69,11 @@ public class TileDieselGenerator extends TileBaseFluidGenerator implements ICont } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("dieselgenerator").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) - .addInventory().create(this); + .addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java b/src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java index 874a22294..4ba35307c 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java +++ b/src/main/java/techreborn/tiles/generator/advanced/TileGasTurbine.java @@ -69,11 +69,11 @@ public class TileGasTurbine extends TileBaseFluidGenerator implements IContainer } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("gasturbine").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) - .addInventory().create(this); + .addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java b/src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java index bd5f379ba..8a188f72b 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java +++ b/src/main/java/techreborn/tiles/generator/advanced/TileSemiFluidGenerator.java @@ -69,11 +69,11 @@ public class TileSemiFluidGenerator extends TileBaseFluidGenerator implements IC } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("semifluidgenerator").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) - .addInventory().create(this); + .addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java b/src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java index b0f59c5be..4f0bcfe94 100644 --- a/src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java +++ b/src/main/java/techreborn/tiles/generator/advanced/TileThermalGenerator.java @@ -69,11 +69,11 @@ public class TileThermalGenerator extends TileBaseFluidGenerator implements ICon } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("thermalgenerator").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 25, 35).outputSlot(1, 25, 55).syncEnergyValue() .syncIntegerValue(this::getTicksSinceLastChange, this::setTicksSinceLastChange) .syncIntegerValue(this::getTankAmount, this::setTankAmount) - .addInventory().create(this); + .addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java b/src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java index 51999420c..759b12bc5 100644 --- a/src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java +++ b/src/main/java/techreborn/tiles/generator/basic/TileSolidFuelGenerator.java @@ -177,11 +177,11 @@ public class TileSolidFuelGenerator extends TilePowerAcceptor implements IToolDr } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("generator").player(player.inventory).inventory().hotbar().addInventory() .tile(this).fuelSlot(0, 80, 54).energySlot(1, 8, 72).syncEnergyValue() .syncIntegerValue(this::getBurnTime, this::setBurnTime) - .syncIntegerValue(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this); + .syncIntegerValue(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this, syncID); } @Override diff --git a/src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java b/src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java index 54e321e95..b54bf2810 100644 --- a/src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java +++ b/src/main/java/techreborn/tiles/machine/iron/TileIronAlloyFurnace.java @@ -272,7 +272,7 @@ public class TileIronAlloyFurnace extends TileMachineBase } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("alloyfurnace").player(player.inventory).inventory(8, 84).hotbar(8, 142) .addInventory().tile(this) .filterSlot(0, 47, 17, @@ -281,7 +281,7 @@ public class TileIronAlloyFurnace extends TileMachineBase stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(1).test(stack))) .outputSlot(2, 116, 35).fuelSlot(3, 56, 53).syncIntegerValue(this::getBurnTime, this::setBurnTime) .syncIntegerValue(this::getCookTime, this::setCookTime) - .syncIntegerValue(this::getCurrentItemBurnTime, this::setCurrentItemBurnTime).addInventory().create(this); + .syncIntegerValue(this::getCurrentItemBurnTime, this::setCurrentItemBurnTime).addInventory().create(this, syncID); } @Override diff --git a/src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java b/src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java index eee54efca..afed66caa 100644 --- a/src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java +++ b/src/main/java/techreborn/tiles/machine/iron/TileIronFurnace.java @@ -221,11 +221,11 @@ public class TileIronFurnace extends TileMachineBase } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("ironfurnace").player(player.inventory).inventory(8, 84).hotbar(8, 142) .addInventory().tile(this).fuelSlot(2, 56, 53).slot(0, 56, 17).outputSlot(1, 116, 35) .syncIntegerValue(this::getBurnTime, this::setBurnTime) .syncIntegerValue(this::getProgress, this::setProgress) - .syncIntegerValue(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this); + .syncIntegerValue(this::getTotalBurnTime, this::setTotalBurnTime).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java b/src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java index 3f11b730a..66fe4bec4 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileDistillationTower.java @@ -88,10 +88,10 @@ public class TileDistillationTower extends TileGenericMachine implements IContai // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("Distillationtower").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 35, 27).slot(1, 35, 47).outputSlot(2, 79, 37).outputSlot(3, 99, 37) .outputSlot(4, 119, 37).outputSlot(5, 139, 37).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue() - .addInventory().create(this); + .addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java b/src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java index 316569d76..4a102de9a 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileFluidReplicator.java @@ -141,10 +141,10 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine // IContainerProvider @Override - public BuiltContainer createContainer(PlayerEntity player) { + public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("fluidreplicator").player(player.inventory).inventory().hotbar().addInventory() .tile(this).fluidSlot(1, 124, 35).filterSlot(0, 55, 45, stack -> stack.isItemEqualIgnoreDamage(TRContent.Parts.UU_MATTER.getStack())) .outputSlot(2, 124, 55).energySlot(3, 8, 72).syncEnergyValue().syncCrafterValue().addInventory() - .create(this); + .create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java b/src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java index fb20ed73d..ca5b7526d 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileImplosionCompressor.java @@ -81,9 +81,9 @@ public class TileImplosionCompressor extends TileGenericMachine implements ICont // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("implosioncompressor").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36) - .energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this); + .energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java b/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java index 336f25605..bd20a6130 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialBlastFurnace.java @@ -140,11 +140,11 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("blastfurnace").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 93, 37).outputSlot(3, 113, 37) .energySlot(4, 8, 72).syncEnergyValue().syncCrafterValue() - .syncIntegerValue(this::getHeat, this::setHeat).addInventory().create(this); + .syncIntegerValue(this::getHeat, this::setHeat).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java b/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java index b5cd3a0a1..9c6540fb2 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialGrinder.java @@ -142,12 +142,12 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { // fluidSlot first to support automation and shift-click return new ContainerBuilder("industrialgrinder").player(player.inventory).inventory().hotbar().addInventory() .tile(this).fluidSlot(1, 34, 35).slot(0, 84, 43).outputSlot(2, 126, 18).outputSlot(3, 126, 36) .outputSlot(4, 126, 54).outputSlot(5, 126, 72).outputSlot(6, 34, 55).energySlot(7, 8, 72) - .syncEnergyValue().syncCrafterValue().addInventory().create(this); + .syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java b/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java index a037143a0..4c81b9480 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileIndustrialSawmill.java @@ -144,11 +144,11 @@ public class TileIndustrialSawmill extends TileGenericMachine implements IContai // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("industrialsawmill").player(player.inventory).inventory().hotbar().addInventory() .tile(this).fluidSlot(1, 34, 35).slot(0, 84, 43).outputSlot(2, 126, 25).outputSlot(3, 126, 43) .outputSlot(4, 126, 61).outputSlot(5, 34, 55).energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue() - .addInventory().create(this); + .addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java b/src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java index 9afeecaf9..1b6d1b2d2 100644 --- a/src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java +++ b/src/main/java/techreborn/tiles/machine/multiblock/TileVacuumFreezer.java @@ -84,9 +84,9 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("vacuumfreezer").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() - .syncCrafterValue().addInventory().create(this); + .syncCrafterValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java b/src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java index c7d791150..bcbab981c 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileAlloySmelter.java @@ -56,7 +56,7 @@ public class TileAlloySmelter extends TileGenericMachine implements IContainerPr // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("alloysmelter").player(player.inventory).inventory().hotbar() .addInventory().tile(this) .filterSlot(0, 34, 47, @@ -64,6 +64,6 @@ public class TileAlloySmelter extends TileGenericMachine implements IContainerPr .filterSlot(1, 126, 47, stack -> ModRecipes.ALLOY_SMELTER.getRecipes(player.world).stream().anyMatch(recipe -> recipe.getRebornIngredients().get(1).test(stack))) .outputSlot(2, 80, 47).energySlot(3, 8, 72).syncEnergyValue().syncCrafterValue().addInventory() - .create(this); + .create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java b/src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java index cb37930ac..33cdd0319 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileAssemblingMachine.java @@ -56,9 +56,9 @@ public class TileAssemblingMachine extends TileGenericMachine implements IContai // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("assemblingmachine").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 55, 35).slot(1, 55, 55).outputSlot(2, 101, 45).energySlot(3, 8, 72) - .syncEnergyValue().syncCrafterValue().addInventory().create(this); + .syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java b/src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java index 7e6658c5a..7d00b59d2 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileAutoCraftingTable.java @@ -441,13 +441,13 @@ public class TileAutoCraftingTable extends TilePowerAcceptor // IContainerProvider @Override - public BuiltContainer createContainer(PlayerEntity player) { + public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("autocraftingtable").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 28, 25).slot(1, 46, 25).slot(2, 64, 25).slot(3, 28, 43).slot(4, 46, 43) .slot(5, 64, 43).slot(6, 28, 61).slot(7, 46, 61).slot(8, 64, 61).outputSlot(9, 145, 42) .outputSlot(10, 145, 70).syncEnergyValue().syncIntegerValue(this::getProgress, this::setProgress) .syncIntegerValue(this::getMaxProgress, this::setMaxProgress) - .syncIntegerValue(this::getLockedInt, this::setLockedInt).addInventory().create(this); + .syncIntegerValue(this::getLockedInt, this::setLockedInt).addInventory().create(this, syncID); } @Override diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java b/src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java index bcad05d3d..5c9dbd8ba 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileChemicalReactor.java @@ -56,9 +56,9 @@ public class TileChemicalReactor extends TileGenericMachine implements IContaine // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("chemicalreactor").player(player.inventory).inventory().hotbar() .addInventory().tile(this).slot(0, 34, 47).slot(1, 126, 47).outputSlot(2, 80, 47).energySlot(3, 8, 72) - .syncEnergyValue().syncCrafterValue().addInventory().create(this); + .syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java b/src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java index 25e94e0ea..27e005854 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileCompressor.java @@ -56,9 +56,9 @@ public class TileCompressor extends TileGenericMachine implements IContainerProv // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("compressor").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() - .syncCrafterValue().addInventory().create(this); + .syncCrafterValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java b/src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java index c30adb98e..b7564952e 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileElectricFurnace.java @@ -216,9 +216,9 @@ public class TileElectricFurnace extends TilePowerAcceptor // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("electricfurnace").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() - .syncIntegerValue(this::getBurnTime, this::setBurnTime).addInventory().create(this); + .syncIntegerValue(this::getBurnTime, this::setBurnTime).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java b/src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java index 19701fc91..3fe9a50fe 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileExtractor.java @@ -56,9 +56,9 @@ public class TileExtractor extends TileGenericMachine implements IContainerProvi // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("extractor").player(player.inventory).inventory().hotbar().addInventory().tile(this) .slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue() - .addInventory().create(this); + .addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java b/src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java index c0f22d58a..e3fcc44a3 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileGrinder.java @@ -56,9 +56,9 @@ public class TileGrinder extends TileGenericMachine implements IContainerProvide // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("grinder").player(player.inventory).inventory().hotbar().addInventory().tile(this) .slot(0, 55, 45).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue() - .addInventory().create(this); + .addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java b/src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java index e6e34b5cc..4baebc6cf 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileIndustrialElectrolyzer.java @@ -58,12 +58,12 @@ public class TileIndustrialElectrolyzer extends TileGenericMachine implements IC // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("industrialelectrolyzer").player(player.inventory).inventory().hotbar() .addInventory().tile(this) .filterSlot(1, 47, 72, stack -> ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .filterSlot(0, 81, 72, stack -> !ItemUtils.isItemEqual(stack, DynamicCell.getEmptyCell(1), true, true)) .outputSlot(2, 51, 24).outputSlot(3, 71, 24).outputSlot(4, 91, 24).outputSlot(5, 111, 24) - .energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this); + .energySlot(6, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java b/src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java index fc095c00f..aeb7bc1f5 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileRecycler.java @@ -202,9 +202,9 @@ public class TileRecycler extends TilePowerAcceptor // IContainerProvider @Override - public BuiltContainer createContainer(PlayerEntity player) { + public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("recycler").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 55, 45, itemStack -> itemStack.getItem() instanceof IUpgrade).outputSlot(1, 101, 45).energySlot(2, 8, 72).syncEnergyValue() - .syncIntegerValue(this::getProgress, this::setProgress).addInventory().create(this); + .syncIntegerValue(this::getProgress, this::setProgress).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java b/src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java index bf839b41c..19a0eba98 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileRollingMachine.java @@ -375,7 +375,7 @@ public class TileRollingMachine extends TilePowerAcceptor } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("rollingmachine").player(player.inventory) .inventory().hotbar() .addInventory().tile(this) @@ -385,7 +385,7 @@ public class TileRollingMachine extends TilePowerAcceptor .onCraft(inv -> this.inventory.setInvStack(1, RollingMachineRecipe.instance.findMatchingRecipeOutput(getCraftingMatrix(), this.world))) .outputSlot(9, 124, 40) .energySlot(10, 8, 70) - .syncEnergyValue().syncIntegerValue(this::getBurnTime, this::setBurnTime).syncIntegerValue(this::getLockedInt, this::setLockedInt).addInventory().create(this); + .syncEnergyValue().syncIntegerValue(this::getBurnTime, this::setBurnTime).syncIntegerValue(this::getLockedInt, this::setLockedInt).addInventory().create(this, syncID); } //Easyest way to sync back to the client diff --git a/src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java b/src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java index 9e1e2ace5..b7d1e694b 100644 --- a/src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java +++ b/src/main/java/techreborn/tiles/machine/tier1/TileScrapboxinator.java @@ -61,9 +61,9 @@ public class TileScrapboxinator extends TileGenericMachine implements IContainer // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("scrapboxinator").player(player.inventory).inventory().hotbar().addInventory() .tile(this).filterSlot(0, 55, 45, stack -> stack.getItem() == TRContent.SCRAP_BOX).outputSlot(1, 101, 45) - .energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this); + .energySlot(2, 8, 72).syncEnergyValue().syncCrafterValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java b/src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java index 6b01fa699..7e79e4f4c 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java +++ b/src/main/java/techreborn/tiles/machine/tier3/TileChunkLoader.java @@ -99,8 +99,8 @@ public class TileChunkLoader extends TilePowerAcceptor implements IToolDrop, Inv } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("chunkloader").player(player.inventory).inventory(8,84).hotbar(8,142).addInventory() - .create(this); + .create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java b/src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java index fac9c0535..30a6b050a 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java +++ b/src/main/java/techreborn/tiles/machine/tier3/TileMatterFabricator.java @@ -208,11 +208,11 @@ public class TileMatterFabricator extends TilePowerAcceptor // IContainerProvider @Override - public BuiltContainer createContainer(PlayerEntity player) { + public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("matterfabricator").player(player.inventory).inventory().hotbar().addInventory() .tile(this).slot(0, 30, 20).slot(1, 50, 20).slot(2, 70, 20).slot(3, 90, 20).slot(4, 110, 20) .slot(5, 130, 20).outputSlot(6, 40, 66).outputSlot(7, 60, 66).outputSlot(8, 80, 66) .outputSlot(9, 100, 66).outputSlot(10, 120, 66).energySlot(11, 8, 72).syncEnergyValue() - .syncIntegerValue(this::getProgress, this::setProgress).addInventory().create(this); + .syncIntegerValue(this::getProgress, this::setProgress).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java b/src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java index 59e79d762..6f410cbdd 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java +++ b/src/main/java/techreborn/tiles/machine/tier3/TileQuantumChest.java @@ -50,9 +50,9 @@ public class TileQuantumChest extends TileTechStorageBase implements IContainerP } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("quantumchest").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this); + .tile(this).slot(0, 80, 24).outputSlot(1, 80, 64).addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java b/src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java index 741506710..30bfec3a0 100644 --- a/src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java +++ b/src/main/java/techreborn/tiles/machine/tier3/TileQuantumTank.java @@ -144,10 +144,10 @@ public class TileQuantumTank extends TileMachineBase // IContainerProvider @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("quantumtank").player(player.inventory).inventory().hotbar() .addInventory().tile(this).fluidSlot(0, 80, 17).outputSlot(1, 80, 53).addInventory() - .create(this); + .create(this, syncID); } @Nullable diff --git a/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java b/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java index d9250d2a8..8aad8a89d 100644 --- a/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java +++ b/src/main/java/techreborn/tiles/storage/TileAdjustableSU.java @@ -167,10 +167,10 @@ public class TileAdjustableSU extends TileEnergyStorage implements IContainerPro // IContainerProvider @Override - public BuiltContainer createContainer(PlayerEntity player) { + public BuiltContainer createContainer(int syncID, PlayerEntity player) { return new ContainerBuilder("aesu").player(player.inventory).inventory().hotbar().armor() .complete(8, 18).addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45) - .syncEnergyValue().syncIntegerValue(this::getCurrentOutput, this::setCurentOutput).addInventory().create(this); + .syncEnergyValue().syncIntegerValue(this::getCurrentOutput, this::setCurentOutput).addInventory().create(this, syncID); } @Override diff --git a/src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java b/src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java index 6e5851796..067f0d929 100644 --- a/src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java +++ b/src/main/java/techreborn/tiles/storage/TileHighVoltageSU.java @@ -46,9 +46,9 @@ public class TileHighVoltageSU extends TileEnergyStorage implements IContainerPr } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("mfsu").player(player.inventory).inventory().hotbar().armor() .complete(8, 18).addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45) - .syncEnergyValue().addInventory().create(this); + .syncEnergyValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java b/src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java index de25fca96..9f7815daa 100644 --- a/src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java +++ b/src/main/java/techreborn/tiles/storage/TileLowVoltageSU.java @@ -42,8 +42,8 @@ public class TileLowVoltageSU extends TileEnergyStorage implements IContainerPro } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("batbox").player(player.inventory).inventory().hotbar().addInventory() - .tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue().addInventory().create(this); + .tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue().addInventory().create(this, syncID); } } diff --git a/src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java b/src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java index 13a01a49b..a3bcb476e 100644 --- a/src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java +++ b/src/main/java/techreborn/tiles/storage/TileMediumVoltageSU.java @@ -46,10 +46,10 @@ public class TileMediumVoltageSU extends TileEnergyStorage implements IContainer } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("mfe").player(player.inventory).inventory().hotbar().armor() .complete(8, 18).addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45) - .syncEnergyValue().addInventory().create(this); + .syncEnergyValue().addInventory().create(this, syncID); } } \ No newline at end of file diff --git a/src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java b/src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java index f99ef1180..4278e4ef3 100644 --- a/src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java +++ b/src/main/java/techreborn/tiles/storage/idsu/TileInterdimensionalSU.java @@ -110,10 +110,10 @@ public class TileInterdimensionalSU extends TileEnergyStorage implements IContai } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("idsu").player(player.inventory).inventory().hotbar().armor() .complete(8, 18).addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45) - .syncEnergyValue().addInventory().create(this); + .syncEnergyValue().addInventory().create(this, syncID); } @Override diff --git a/src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java b/src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java index 918b3b498..baa4605f7 100644 --- a/src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java +++ b/src/main/java/techreborn/tiles/storage/lesu/TileLapotronicSU.java @@ -133,10 +133,10 @@ public class TileLapotronicSU extends TileEnergyStorage implements IContainerPro } @Override - public BuiltContainer createContainer(final PlayerEntity player) { + public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("lesu").player(player.inventory).inventory().hotbar().armor().complete(8, 18) .addArmor().addInventory().tile(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue() .syncIntegerValue(this::getOutputRate, this::setOutputRate) - .syncIntegerValue(this::getConnectedBlocksNum, this::setConnectedBlocksNum).addInventory().create(this); + .syncIntegerValue(this::getConnectedBlocksNum, this::setConnectedBlocksNum).addInventory().create(this, syncID); } }