#2671 check if the chunk is loaded

This commit is contained in:
Matthias Mann committed 2015-07-25 22:56:16 +02:00
1 parent 849d87bb7d
commit e535124397
1 file changed
+1 -1
@@ -158,6 +158,6 @@ public class TileWirelessCharger extends TileEntityEio implements IInternalPower
}
public boolean isActive() {
return getEnergyStored() > 0 && !isPoweredRedstone();
return getEnergyStored() > 0 && worldObj != null && worldObj.getChunkProvider().chunkExists(xCoord >> 4, zCoord >> 4) && !isPoweredRedstone();
}
}