mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-20 04:09:37 +00:00
Don't try to open GUIs of nonexistant TEs if crap is passed to the gui handler
This commit is contained in:
1 parent
c44729536c
commit
2d539e8013
1 file changed
+9
-2
@@ -23,6 +23,13 @@ trait GuiProvider {
|
||||
def getContainer(te: TEClass, player: EntityPlayer): AnyRef
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
def getGui(te: TileEntity, player: EntityPlayer): AnyRef = getGui(te.asInstanceOf[TEClass], player)
|
||||
def getContainer(te: TileEntity, player: EntityPlayer): AnyRef = getContainer(te.asInstanceOf[TEClass], player)
|
||||
def getGui(te: TileEntity, player: EntityPlayer): AnyRef =
|
||||
if (te != null)
|
||||
getGui(te.asInstanceOf[TEClass], player)
|
||||
else null
|
||||
|
||||
def getContainer(te: TileEntity, player: EntityPlayer): AnyRef =
|
||||
if (te != null)
|
||||
getContainer(te.asInstanceOf[TEClass], player)
|
||||
else null
|
||||
}
|
||||
Reference in new issue
Block a user