Replace all references of blockType with getBlockType to fix NPE downstream

This commit is contained in:
Spacebuilder2020 authored and Jason Mitchell committed 2023-10-23 19:52:21 -07:00
1 parent f54c69738e
commit 0da29db9be
7 files changed
+10 -10

No files matched your search

@@ -181,6 +181,6 @@ public class TileCKeyStone extends TileEntity {
public void updateBlocks() {
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType);
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
}
}
@@ -63,13 +63,13 @@ public class TilePlayerDetector extends TileEntity {
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());
}
}
@@ -96,13 +96,13 @@ public class TilePlayerDetectorAdvanced extends TileEntity implements IInventory
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());
}
}
@@ -60,7 +60,7 @@ public class TileDislocatorReceptacle extends TileEntity implements IInventory {
}
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 class TileDislocatorReceptacle extends TileEntity implements IInventory {
}
}
if (isActive != isActiveBeforeUpdate) {
worldObj.notifyBlockChange(xCoord, yCoord, zCoord, blockType);
worldObj.notifyBlockChange(xCoord, yCoord, zCoord, getBlockType());
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
@@ -65,7 +65,7 @@ public class TileEnergyPylon extends TileObjectSync implements IEnergyHandler, I
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;
}
}
@@ -46,7 +46,7 @@ public class TileReactorEnergyInjector extends TileEntity implements IReactorPar
int comparatorOutput = core.getComparatorOutput(comparatorMode);
if (comparatorOutput != comparatorOutputCache) {
comparatorOutputCache = comparatorOutput;
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType);
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
}
}
}
@@ -64,7 +64,7 @@ public class TileReactorStabilizer extends TileEntity implements IReactorPart, I
int comparatorOutput = core.getComparatorOutput(comparatorMode);
if (comparatorOutput != comparatorOutputCache) {
comparatorOutputCache = comparatorOutput;
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, blockType);
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
}
}
}