Prevent crash when creating EnergyAcceptorWrapper

This commit is contained in:
Aidan C. Brady 2015-04-14 10:55:38 -04:00
parent 33f19cf895
commit 425f0c27c3

View file

@ -18,6 +18,11 @@ public abstract class EnergyAcceptorWrapper implements IStrictEnergyAcceptor
public static EnergyAcceptorWrapper get(TileEntity tileEntity) public static EnergyAcceptorWrapper get(TileEntity tileEntity)
{ {
if(tileEntity.getWorldObj() == null)
{
return null;
}
EnergyAcceptorWrapper wrapper = null; EnergyAcceptorWrapper wrapper = null;
if(tileEntity instanceof IStrictEnergyAcceptor) if(tileEntity instanceof IStrictEnergyAcceptor)