null check to prevent bukkit crash

This commit is contained in:
Blood-Asp 2017-03-31 16:14:36 +02:00
parent 1cf68bbcdf
commit d725c463e5

View file

@ -147,6 +147,7 @@ public class GT_TileEntity_Ores extends TileEntity implements ITexturedTileEntit
}
public void overrideOreBlockMaterial(Block aOverridingStoneBlock, byte aOverridingStoneMeta) {
if(this.worldObj == null || blockType==null)return;
this.mMetaData = ((short) (int) (this.mMetaData % 1000L + this.mMetaData / 16000L * 16000L));
if (aOverridingStoneBlock.isReplaceableOreGen(this.worldObj, this.xCoord, this.yCoord, this.zCoord, Blocks.netherrack)) {
this.mMetaData = ((short) (this.mMetaData + 1000));