Fix a few nutderps on block updates

Incorrect assumptions + adopting very early = mistakes were made
This commit is contained in:
Nick 2016-03-18 13:05:57 -07:00
parent 26f7c874ff
commit 1bcc4e47e0
7 changed files with 18 additions and 11 deletions

View file

@ -130,6 +130,9 @@ public class TileInventory extends TileEntity implements IInventory
{
if (inventory[index] != null)
{
if (!getWorld().isRemote)
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
if (inventory[index].stackSize <= count)
{
ItemStack itemStack = inventory[index];
@ -168,6 +171,8 @@ public class TileInventory extends TileEntity implements IInventory
if (stack != null && stack.stackSize > getInventoryStackLimit())
stack.stackSize = getInventoryStackLimit();
markDirty();
if (!getWorld().isRemote)
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
}
@Override