From 699e52510dd3870daff7cc40c56304f7da35e871 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 17 Feb 2019 12:07:58 +0100 Subject: [PATCH] Fixed regression in Botania compatibility --- src/main/java/cr0s/warpdrive/compat/CompatBotania.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/compat/CompatBotania.java b/src/main/java/cr0s/warpdrive/compat/CompatBotania.java index 4fc6068d..4c65a495 100644 --- a/src/main/java/cr0s/warpdrive/compat/CompatBotania.java +++ b/src/main/java/cr0s/warpdrive/compat/CompatBotania.java @@ -96,7 +96,8 @@ public class CompatBotania implements IBlockTransformer { } } - if ( nbtTileEntity.hasKey("bindX") + if ( nbtTileEntity != null + && nbtTileEntity.hasKey("bindX") && nbtTileEntity.hasKey("bindY") && nbtTileEntity.hasKey("bindZ") ) { final BlockPos targetBind = transformation.apply(nbtTileEntity.getInteger("bindX"), nbtTileEntity.getInteger("bindY"), nbtTileEntity.getInteger("bindZ")); @@ -105,7 +106,8 @@ public class CompatBotania implements IBlockTransformer { nbtTileEntity.setInteger("bindZ", targetBind.getZ()); } - if (nbtTileEntity.hasKey("subTileCmp")) { + if ( nbtTileEntity != null + && nbtTileEntity.hasKey("subTileCmp") ) { final NBTTagCompound nbtSubTileCmp = nbtTileEntity.getCompoundTag("subTileCmp"); if ( nbtSubTileCmp.hasKey("collectorX") && nbtSubTileCmp.hasKey("collectorY") @@ -117,7 +119,8 @@ public class CompatBotania implements IBlockTransformer { } } - if (nbtTileEntity.hasKey("rotationX")) { + if ( nbtTileEntity != null + && nbtTileEntity.hasKey("rotationX") ) { final float rotationX = nbtTileEntity.getInteger("rotationX"); nbtTileEntity.setFloat("rotationX", (rotationX + 270.0F * rotationSteps) % 360.0F); }