Fix a few nutderps on block updates
Incorrect assumptions + adopting very early = mistakes were made
This commit is contained in:
parent
26f7c874ff
commit
1bcc4e47e0
7 changed files with 18 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -75,7 +75,7 @@ public class TileSpectralBlock extends TileEntity implements ITickable
|
|||
block = Block.getBlockFromName(containedBlockName);
|
||||
|
||||
if (block != null && worldObj.setBlockState(pos, block.getStateFromMeta(containedBlockMeta)))
|
||||
markDirty();
|
||||
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
|
||||
}
|
||||
|
||||
public static void createSpectralBlock(World world, BlockPos blockPos, int duration)
|
||||
|
|
|
@ -80,7 +80,7 @@ public class TileRoutingNode extends TileInventory implements IRoutingNode, IIte
|
|||
if (tile instanceof IRoutingNode)
|
||||
{
|
||||
((IRoutingNode) tile).removeConnection(pos);
|
||||
markDirty();
|
||||
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ public class TileRoutingNode extends TileInventory implements IRoutingNode, IIte
|
|||
{
|
||||
if (!connectionList.contains(pos1))
|
||||
{
|
||||
markDirty();
|
||||
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
|
||||
connectionList.add(pos1);
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ public class TileRoutingNode extends TileInventory implements IRoutingNode, IIte
|
|||
if (connectionList.contains(pos1))
|
||||
{
|
||||
connectionList.remove(pos1);
|
||||
markDirty();
|
||||
getWorld().notifyBlockUpdate(getPos(), getWorld().getBlockState(getPos()), getWorld().getBlockState(getPos()), 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue