@@ -1,29 +1,30 @@
|
||||
--- a/net/minecraft/world/level/block/BlockTripwireHook.java
|
||||
+++ b/net/minecraft/world/level/block/BlockTripwireHook.java
|
||||
@@ -27,6 +27,8 @@
|
||||
@@ -29,6 +29,11 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.block.CraftBlock;
|
||||
+import org.bukkit.event.block.BlockRedstoneEvent;
|
||||
+// CraftBukkit end
|
||||
+
|
||||
public class BlockTripwireHook extends Block {
|
||||
|
||||
public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING;
|
||||
@@ -161,6 +163,17 @@
|
||||
this.emitState(world, blockposition1, flag4, flag5, flag2, flag3);
|
||||
}
|
||||
public static final MapCodec<BlockTripwireHook> CODEC = simpleCodec(BlockTripwireHook::new);
|
||||
@@ -173,6 +178,15 @@
|
||||
emitState(world, blockposition1, flag4, flag5, flag2, flag3);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ // CraftBukkit start
|
||||
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), 15, 0);
|
||||
+ world.getCraftServer().getPluginManager().callEvent(eventRedstone);
|
||||
+
|
||||
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 15, 0);
|
||||
+ world.getCraftServer().getPluginManager().callEvent(eventRedstone);
|
||||
+ if (eventRedstone.getNewCurrent() > 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
+ if (eventRedstone.getNewCurrent() > 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
this.emitState(world, blockposition, flag4, flag5, flag2, flag3);
|
||||
if (!flag) {
|
||||
world.setBlock(blockposition, (IBlockData) iblockdata3.setValue(BlockTripwireHook.FACING, enumdirection), 3);
|
||||
emitState(world, blockposition, flag4, flag5, flag2, flag3);
|
||||
if (!flag) {
|
||||
world.setBlock(blockposition, (IBlockData) iblockdata3.setValue(BlockTripwireHook.FACING, enumdirection), 3);
|
||||
|
||||
Reference in New Issue
Block a user