Fix desync issue caused by container type switching

This commit is contained in:
Shadowfacts 2018-12-27 21:44:58 -05:00
parent 6d0a8f22bf
commit 36019c3116
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 9 additions and 0 deletions

View File

@ -72,4 +72,13 @@ public abstract class AbstractContainerBlock extends Block implements BlockEntit
@Override @Override
public abstract AbstractContainerBlockEntity createBlockEntity(BlockView world); public abstract AbstractContainerBlockEntity createBlockEntity(BlockView world);
@Override
@Deprecated
public void onBlockRemoved(BlockState blockState_1, World world, BlockPos pos, BlockState blockState_2, boolean boolean_1) {
super.onBlockRemoved(blockState_1, world, pos, blockState_2, boolean_1);
if (blockState_1 != blockState_2) {
world.removeBlockEntity(pos);
}
}
} }