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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user