aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/TripWireHookBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/TripWireHookBlock.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/TripWireHookBlock.java.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/TripWireHookBlock.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/TripWireHookBlock.java.patch
new file mode 100644
index 0000000000..f73c8995e6
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/level/block/TripWireHookBlock.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/level/block/TripWireHookBlock.java
++++ b/net/minecraft/world/level/block/TripWireHookBlock.java
+@@ -26,6 +28,10 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.BlockRedstoneEvent;
++// CraftBukkit end
+
+ public class TripWireHookBlock extends Block {
+ public static final MapCodec<TripWireHookBlock> CODEC = simpleCodec(TripWireHookBlock::new);
+@@ -163,7 +177,16 @@
+ emitState(level, blockPosx, var21, var22, flag, flag1);
+ }
+
+- emitState(level, level1, var21, var22, flag, flag1);
++ // CraftBukkit start
++ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, level), 15, 0);
++ world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++ if (eventRedstone.getNewCurrent() > 0) {
++ return;
++ }
++ // CraftBukkit end
++
++ emitState(world, level, flag4, flag5, flag2, flag3);
+ if (!hookState) {
+ level.setBlock(level1, blockState1.setValue(FACING, direction), 3);
+ if (attaching) {