fix syncID issues, should fix a lot of issues with the inv handing.

This commit is contained in:
modmuss50 2019-07-22 11:54:13 +01:00
parent 50c13bafdc
commit 7f8674f1ca
83 changed files with 209 additions and 211 deletions

View file

@ -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;
}

View file

@ -40,8 +40,8 @@ public class GuiAlloyFurnace extends AbstractContainerScreen<BuiltContainer> {
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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}