Prevent crash when creating EnergyAcceptorWrapper
This commit is contained in:
parent
33f19cf895
commit
425f0c27c3
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue