Fixed a bug with TileEntities getting looked for when opening the book

This commit is contained in:
Ellpeck 2015-09-20 18:59:58 +02:00
parent 657cde463f
commit 0ad50a3e62

View file

@ -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]){