diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/ScaffoldingBlock.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/ScaffoldingBlock.java.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/ScaffoldingBlock.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/ScaffoldingBlock.java.patch new file mode 100644 index 0000000000..980267e902 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/ScaffoldingBlock.java.patch @@ -0,0 +1,22 @@ +--- a/net/minecraft/world/level/block/ScaffoldingBlock.java ++++ b/net/minecraft/world/level/block/ScaffoldingBlock.java +@@ -107,12 +99,13 @@ + } + + @Override +- public void tick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { +- int distance = getDistance(level, pos); +- BlockState blockState = state.setValue(DISTANCE, Integer.valueOf(distance)).setValue(BOTTOM, Boolean.valueOf(this.isBottom(level, pos, distance))); +- if (blockState.getValue(DISTANCE) == 7) { +- if (state.getValue(DISTANCE) == 7) { +- FallingBlockEntity.fall(level, pos, blockState); ++ public void tick(IBlockData state, ServerLevel level, BlockPos pos, RandomSource random) { ++ int i = getDistance(level, pos); ++ IBlockData iblockdata1 = (IBlockData) ((IBlockData) state.setValue(ScaffoldingBlock.DISTANCE, i)).setValue(ScaffoldingBlock.BOTTOM, this.isBottom(level, pos, i)); ++ ++ if ((Integer) iblockdata1.getValue(ScaffoldingBlock.DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(level, pos, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit - BlockFadeEvent ++ if ((Integer) state.getValue(ScaffoldingBlock.DISTANCE) == 7) { ++ FallingBlockEntity.fall(level, pos, iblockdata1); + } else { + level.destroyBlock(pos, true); + } |