Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-22 14:28:09 +01:00
30 Zeilen
1.3 KiB
Diff
30 Zeilen
1.3 KiB
Diff
--- /home/matt/mc-dev-private//net/minecraft/server/BlockTripwireHook.java 2015-02-26 22:40:22.275608143 +0000
|
|
+++ src/main/java/net/minecraft/server/BlockTripwireHook.java 2015-02-26 22:40:22.279608143 +0000
|
|
@@ -5,6 +5,8 @@
|
|
import java.util.Iterator;
|
|
import java.util.Random;
|
|
|
|
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
|
+
|
|
public class BlockTripwireHook extends Block {
|
|
|
|
public static final BlockStateDirection FACING = BlockStateDirection.of("facing", (Predicate) EnumDirection.EnumDirectionLimit.HORIZONTAL);
|
|
@@ -141,6 +143,17 @@
|
|
this.a(world, blockposition1, flag5, flag6, flag2, flag3);
|
|
}
|
|
|
|
+ // CraftBukkit start
|
|
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
|
+
|
|
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, 15, 0);
|
|
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
|
+
|
|
+ if (eventRedstone.getNewCurrent() > 0) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
this.a(world, blockposition, flag5, flag6, flag2, flag3);
|
|
if (!flag) {
|
|
world.setTypeAndData(blockposition, iblockdata3.set(BlockTripwireHook.FACING, enumdirection), 3);
|