diff options
Diffstat (limited to 'patch-remap/og/net/minecraft/world/level/block/BlockTripwireHook.patch')
-rw-r--r-- | patch-remap/og/net/minecraft/world/level/block/BlockTripwireHook.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/patch-remap/og/net/minecraft/world/level/block/BlockTripwireHook.patch b/patch-remap/og/net/minecraft/world/level/block/BlockTripwireHook.patch new file mode 100644 index 0000000000..b1ffb21273 --- /dev/null +++ b/patch-remap/og/net/minecraft/world/level/block/BlockTripwireHook.patch @@ -0,0 +1,30 @@ +--- a/net/minecraft/world/level/block/BlockTripwireHook.java ++++ b/net/minecraft/world/level/block/BlockTripwireHook.java +@@ -29,6 +29,11 @@ + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + ++// CraftBukkit start ++import org.bukkit.craftbukkit.block.CraftBlock; ++import org.bukkit.event.block.BlockRedstoneEvent; ++// CraftBukkit end ++ + public class BlockTripwireHook extends Block { + + public static final MapCodec<BlockTripwireHook> CODEC = simpleCodec(BlockTripwireHook::new); +@@ -173,6 +178,15 @@ + emitState(world, blockposition1, flag4, flag5, flag2, flag3); + } + ++ // CraftBukkit start ++ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), 15, 0); ++ world.getCraftServer().getPluginManager().callEvent(eventRedstone); ++ ++ if (eventRedstone.getNewCurrent() > 0) { ++ return; ++ } ++ // CraftBukkit end ++ + emitState(world, blockposition, flag4, flag5, flag2, flag3); + if (!flag) { + world.setBlock(blockposition, (IBlockData) iblockdata3.setValue(BlockTripwireHook.FACING, enumdirection), 3); |