mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
Fixed a bug with TileEntities getting looked for when opening the book
This commit is contained in:
parent
657cde463f
commit
0ad50a3e62
1 changed files with 2 additions and 4 deletions
|
@ -24,10 +24,8 @@ public class GuiHandler implements IGuiHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
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;
|
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);
|
tile = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||||
}
|
}
|
||||||
switch(GuiTypes.values()[id]){
|
switch(GuiTypes.values()[id]){
|
||||||
|
@ -87,7 +85,7 @@ public class GuiHandler implements IGuiHandler{
|
||||||
@Override
|
@Override
|
||||||
public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
public Object getClientGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
||||||
TileEntityBase tile = 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);
|
tile = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||||
}
|
}
|
||||||
switch(GuiTypes.values()[id]){
|
switch(GuiTypes.values()[id]){
|
||||||
|
|
Loading…
Reference in a new issue