Fix redstone upgrade strong neighbor update

This commit is contained in:
Justin Aquadro committed 2016-06-20 00:03:01 -04:00
1 parent ef6eb97bb5
commit 51ecc08ec3
2 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge'
version = "1.7.10-1.9.9"
version = "1.7.10-1.9.10"
group= "com.jaquadro.minecraft.storagedrawers" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "StorageDrawers"
@@ -171,6 +171,7 @@ public abstract class TileEntityDrawers extends BaseTileEntity implements IDrawe
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord - 1, zCoord, getBlockType());
}
}
@@ -519,8 +520,10 @@ public abstract class TileEntityDrawers extends BaseTileEntity implements IDrawe
IDrawer drawer = drawers[slot];
drawer.setStoredItemCount(drawer.getStoredItemCount() - stack.stackSize);
if (isRedstone() && worldObj != null)
if (isRedstone() && worldObj != null) {
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord - 1, zCoord, getBlockType());
}
// TODO: Reset empty drawer in subclasses
@@ -777,8 +780,10 @@ public abstract class TileEntityDrawers extends BaseTileEntity implements IDrawe
@Override
public void markDirty () {
inventory.markDirty();
if (isRedstone() && worldObj != null)
if (isRedstone() && worldObj != null) {
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord - 1, zCoord, getBlockType());
}
super.markDirty();
}