diff options
| author | Martin Robertz <dream-master@gmx.net> | 2022-10-09 12:12:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-09 12:12:31 +0200 |
| commit | f7ffab4b1f0ef45dd4852b26965367f2c559ca0a (patch) | |
| tree | 2e94fcd7517921328eebb51abe506f99b9a10dd5 /src/main/java/kekztech/GuiHandler.java | |
| parent | 7f193e090a535bf026e92f17a676f78d7771277f (diff) | |
| parent | 145e13b90195d9d58f5629fb1c2d1c90b9a5b1b1 (diff) | |
| download | GT5-Unofficial-f7ffab4b1f0ef45dd4852b26965367f2c559ca0a.tar.gz GT5-Unofficial-f7ffab4b1f0ef45dd4852b26965367f2c559ca0a.tar.bz2 GT5-Unofficial-f7ffab4b1f0ef45dd4852b26965367f2c559ca0a.zip | |
Merge pull request #44 from GTNewHorizons/fix/lsc-division-zero
Fix division by zero error
Diffstat (limited to 'src/main/java/kekztech/GuiHandler.java')
| -rw-r--r-- | src/main/java/kekztech/GuiHandler.java | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/src/main/java/kekztech/GuiHandler.java b/src/main/java/kekztech/GuiHandler.java index 97d4350b71..56c7a8b102 100644 --- a/src/main/java/kekztech/GuiHandler.java +++ b/src/main/java/kekztech/GuiHandler.java @@ -10,32 +10,35 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class GuiHandler implements IGuiHandler { - - public static final int ITEM_PROXY_SOURCE = 0; - public static final int ITEM_PROXY_ENDPOINT = 1; - - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - final TileEntity te = world.getTileEntity(x, y, z); - if(te != null) { - switch(ID) { - case ITEM_PROXY_SOURCE: return new Container_ItemProxySource(te, player); - case ITEM_PROXY_ENDPOINT: return new Container_ItemProxyEndpoint(te, player); - } - } - return null; - } - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { - final TileEntity te = world.getTileEntity(x, y, z); - if(te != null) { - switch(ID) { - case ITEM_PROXY_SOURCE: return new Gui_ItemProxySource(te, player); - case ITEM_PROXY_ENDPOINT: return new Gui_ItemProxyEndpoint(te, player); - } - } - return null; - } + public static final int ITEM_PROXY_SOURCE = 0; + public static final int ITEM_PROXY_ENDPOINT = 1; + @Override + public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + final TileEntity te = world.getTileEntity(x, y, z); + if (te != null) { + switch (ID) { + case ITEM_PROXY_SOURCE: + return new Container_ItemProxySource(te, player); + case ITEM_PROXY_ENDPOINT: + return new Container_ItemProxyEndpoint(te, player); + } + } + return null; + } + + @Override + public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { + final TileEntity te = world.getTileEntity(x, y, z); + if (te != null) { + switch (ID) { + case ITEM_PROXY_SOURCE: + return new Gui_ItemProxySource(te, player); + case ITEM_PROXY_ENDPOINT: + return new Gui_ItemProxyEndpoint(te, player); + } + } + return null; + } } |
