mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 23:33:00 +00:00
#561 Add "gui open" and "active" packet updates
This commit is contained in:
1 parent
0655ea235a
commit
68315ee614
23 files changed
+377
-142
No files matched your search
@@ -43,16 +43,16 @@ public class GuiHandlerEnergy extends GuiHandlerBase {
|
||||
switch (GuiId.values()[id]) {
|
||||
|
||||
case EngineBronzeGUI:
|
||||
return new GuiEngineBronze(player.inventory, (EngineBronze) getTileForestry(world, x, y, z));
|
||||
return new GuiEngineBronze(player.inventory, getTileForestry(world, x, y, z, EngineBronze.class));
|
||||
|
||||
case EngineCopperGUI:
|
||||
return new GuiEngineCopper(player.inventory, (EngineCopper) getTileForestry(world, x, y, z));
|
||||
return new GuiEngineCopper(player.inventory, getTileForestry(world, x, y, z, EngineCopper.class));
|
||||
|
||||
case EngineTinGUI:
|
||||
return new GuiEngineTin(player.inventory, (EngineTin) getTileForestry(world, x, y, z));
|
||||
return new GuiEngineTin(player.inventory, getTileForestry(world, x, y, z, EngineTin.class));
|
||||
|
||||
case GeneratorGUI:
|
||||
return new GuiGenerator(player.inventory, (MachineGenerator) getTileForestry(world, x, y, z));
|
||||
return new GuiGenerator(player.inventory, getTileForestry(world, x, y, z, MachineGenerator.class));
|
||||
|
||||
default:
|
||||
return null;
|
||||
@@ -69,18 +69,18 @@ public class GuiHandlerEnergy extends GuiHandlerBase {
|
||||
switch (GuiId.values()[id]) {
|
||||
|
||||
case EngineBronzeGUI:
|
||||
return new ContainerEngineBronze(player.inventory, (EngineBronze) getTileForestry(world, x, y, z));
|
||||
return new ContainerEngineBronze(player.inventory, getTileForestry(world, x, y, z, EngineBronze.class));
|
||||
|
||||
case EngineCopperGUI:
|
||||
return new ContainerEngineCopper(player.inventory, (EngineCopper) getTileForestry(world, x, y, z));
|
||||
return new ContainerEngineCopper(player.inventory, getTileForestry(world, x, y, z, EngineCopper.class));
|
||||
|
||||
case EngineTinGUI:
|
||||
EngineTin tile = (EngineTin) getTileForestry(world, x, y, z);
|
||||
EngineTin tile = getTileForestry(world, x, y, z, EngineTin.class);
|
||||
Proxies.net.sendToPlayer(new PacketSocketUpdate(PacketId.SOCKET_UPDATE, tile), player);
|
||||
return new ContainerEngineTin(player.inventory, tile);
|
||||
|
||||
case GeneratorGUI:
|
||||
return new ContainerGenerator(player.inventory, (MachineGenerator) getTileForestry(world, x, y, z));
|
||||
return new ContainerGenerator(player.inventory, getTileForestry(world, x, y, z, MachineGenerator.class));
|
||||
|
||||
default:
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user