From 0ad50a3e620d4468e9cef621c6e44ea57b903663 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 20 Sep 2015 18:59:58 +0200 Subject: [PATCH] Fixed a bug with TileEntities getting looked for when opening the book --- .../ellpeck/actuallyadditions/inventory/GuiHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java b/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java index 47601fe71..26fd21167 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java @@ -24,10 +24,8 @@ public class GuiHandler implements IGuiHandler{ @Override public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){ - if(id == GuiTypes.BOOK.ordinal()) return null; - TileEntityBase tile = null; - if(id != GuiTypes.CRAFTER.ordinal() && id != GuiTypes.DRILL.ordinal()){ + if(id != GuiTypes.CRAFTER.ordinal() && id != GuiTypes.DRILL.ordinal() && id != GuiTypes.BOOK.ordinal()){ tile = (TileEntityBase)world.getTileEntity(x, y, z); } switch(GuiTypes.values()[id]){ @@ -87,7 +85,7 @@ public class GuiHandler implements IGuiHandler{ @Override public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){ TileEntityBase tile = null; - if(id != GuiTypes.CRAFTER.ordinal() && id != GuiTypes.DRILL.ordinal()){ + if(id != GuiTypes.CRAFTER.ordinal() && id != GuiTypes.DRILL.ordinal() && id != GuiTypes.BOOK.ordinal()){ tile = (TileEntityBase)world.getTileEntity(x, y, z); } switch(GuiTypes.values()[id]){