From 7b7f616c74648a073a51012dfaae9437960d8425 Mon Sep 17 00:00:00 2001 From: Spacebuilder2020 Date: Mon, 23 Oct 2023 15:46:27 -0600 Subject: [PATCH] Replace all references of blockType with getBlockType to fix NPE downstream --- .../draconicevolution/common/tileentities/TileCKeyStone.java | 2 +- .../common/tileentities/TilePlayerDetector.java | 4 ++-- .../common/tileentities/TilePlayerDetectorAdvanced.java | 4 ++-- .../multiblocktiles/TileDislocatorReceptacle.java | 4 ++-- .../common/tileentities/multiblocktiles/TileEnergyPylon.java | 2 +- .../multiblocktiles/reactor/TileReactorEnergyInjector.java | 2 +- .../multiblocktiles/reactor/TileReactorStabilizer.java | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileCKeyStone.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileCKeyStone.java index ca782d75f..168900229 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileCKeyStone.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileCKeyStone.java @@ -181,6 +181,6 @@ public void readFromNBT(NBTTagCompound compound) { public void updateBlocks() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetector.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetector.java index 1cf06868d..228f5deaf 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetector.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetector.java @@ -63,13 +63,13 @@ public void setRange(int value) { private void updateBlocks() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { worldObj.notifyBlocksOfNeighborChange( xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ, - blockType, + getBlockType(), direction.getOpposite().ordinal()); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetectorAdvanced.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetectorAdvanced.java index 5c8f336d8..a35ce78d5 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetectorAdvanced.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TilePlayerDetectorAdvanced.java @@ -96,13 +96,13 @@ public void setShouldOutput(boolean shouldOutputSignal) { private void updateBlocks() { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) { worldObj.notifyBlocksOfNeighborChange( xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ, - blockType, + getBlockType(), direction.getOpposite().ordinal()); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileDislocatorReceptacle.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileDislocatorReceptacle.java index 024644628..ee0b2315a 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileDislocatorReceptacle.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileDislocatorReceptacle.java @@ -60,7 +60,7 @@ public void updateState() { } if (structure == null) { isActive = false; - worldObj.notifyBlockChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlockChange(xCoord, yCoord, zCoord, getBlockType()); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); return; } @@ -80,7 +80,7 @@ public void updateState() { } } if (isActive != isActiveBeforeUpdate) { - worldObj.notifyBlockChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlockChange(xCoord, yCoord, zCoord, getBlockType()); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileEnergyPylon.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileEnergyPylon.java index 6e85f7425..1c9568a89 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileEnergyPylon.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/TileEnergyPylon.java @@ -65,7 +65,7 @@ public void updateEntity() { if (tick % 20 == 0) { int comparatorOut = (int) (getEnergyStored() / getMaxEnergyStored() * 15D); if (comparatorOut != lastCheckCompOverride) { - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); lastCheckCompOverride = comparatorOut; } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorEnergyInjector.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorEnergyInjector.java index 637211151..99ad5b781 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorEnergyInjector.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorEnergyInjector.java @@ -46,7 +46,7 @@ public void updateEntity() { int comparatorOutput = core.getComparatorOutput(comparatorMode); if (comparatorOutput != comparatorOutputCache) { comparatorOutputCache = comparatorOutput; - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); } } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java index 56773da1d..76a949eab 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/multiblocktiles/reactor/TileReactorStabilizer.java @@ -64,7 +64,7 @@ public void updateEntity() { int comparatorOutput = core.getComparatorOutput(comparatorMode); if (comparatorOutput != comparatorOutputCache) { comparatorOutputCache = comparatorOutput; - worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType); + worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType()); } } }