From d725c463e5d134223fb4daf321d67babb1ca4de4 Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 31 Mar 2017 16:14:36 +0200 Subject: [PATCH] null check to prevent bukkit crash --- src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java index baae2527..cd133100 100644 --- a/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_TileEntity_Ores.java @@ -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));