Fixed an electric chest crash
This commit is contained in:
parent
943cd1e45b
commit
dd2eb3a0fd
1 changed files with 10 additions and 2 deletions
|
@ -46,14 +46,22 @@ public class InventoryElectricChest extends InventoryBasic
|
|||
public void openInventory()
|
||||
{
|
||||
read();
|
||||
((IElectricChest)getStack().getItem()).setOpen(getStack(), true);
|
||||
|
||||
if(getStack() != null)
|
||||
{
|
||||
((IElectricChest)getStack().getItem()).setOpen(getStack(), true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory()
|
||||
{
|
||||
write();
|
||||
((IElectricChest)getStack().getItem()).setOpen(getStack(), false);
|
||||
|
||||
if(getStack() != null)
|
||||
{
|
||||
((IElectricChest)getStack().getItem()).setOpen(getStack(), false);
|
||||
}
|
||||
}
|
||||
|
||||
public void write()
|
||||
|
|
Loading…
Add table
Reference in a new issue