1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-12 03:13:00 +00:00

Fix turtle peripherals becoming desynced

When a turtle was unloaded but not actually disposed of, the
m_peripheral map hangs around. As a result, when creating a new
ServerComputer, the peripherals aren't considered changed and so they're
never attached.

Fixes #50.

Also fix that blumin' deprecated method which has been around for a wee
while now.
This commit is contained in:
SquidDev
2019-02-18 23:28:51 +00:00
parent e46ab1e267
commit 11e4d0de82
4 changed files with 23 additions and 51 deletions

View File

@@ -55,12 +55,7 @@ public abstract class BlockGeneric extends Block implements ITileEntityProvider
public final void neighborChanged( IBlockState state, World world, BlockPos pos, Block block, BlockPos neighbour )
{
TileEntity tile = world.getTileEntity( pos );
if( tile instanceof TileGeneric )
{
TileGeneric generic = (TileGeneric) tile;
generic.onNeighbourChange();
generic.onNeighbourChange( neighbour );
}
if( tile instanceof TileGeneric ) ((TileGeneric) tile).onNeighbourChange( neighbour );
}
@Override