Merge branch 'master' into 1.17

This commit is contained in:
gnembon committed 2020-11-11 02:08:05 -04:00
commit be3cb35f75
19 files changed
+744 -133

No files matched your search

@@ -22,4 +22,23 @@ public class WorldChunk_fillUpdatesMixin
if (!CarpetSettings.impendingFillSkipUpdates)
blockState.onBlockAdded(world_1, blockPos_1, blockState_1, boolean_1);
}
@Redirect(method = "setBlockState", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/BlockState;onStateReplaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)V"
))
private void onRemovedBlock(BlockState blockState, World world, BlockPos pos, BlockState state, boolean moved)
{
if (CarpetSettings.impendingFillSkipUpdates) // doing due dilligence from AbstractBlock onStateReplaced
{
if (blockState.getBlock().hasBlockEntity() && !blockState.isOf(state.getBlock()))
{
world.removeBlockEntity(pos);
}
}
else
{
blockState.onStateReplaced(world, pos, state, moved);
}
}
}