Commits

md_5 authored 7f9fbe54baf
Simplify a few diffs
No tags

nms-patches/BlockMinecartDetector.patch

Modified
6 6
7 7 +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
8 8 +
9 9 public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
10 10
11 11 public static final BlockStateEnum<BlockMinecartTrackAbstract.EnumTrackPosition> SHAPE = BlockStateEnum.a("shape", BlockMinecartTrackAbstract.EnumTrackPosition.class, new Predicate() {
12 12 @@ -66,6 +68,17 @@
13 13 flag1 = true;
14 14 }
15 15
16 -+ // CraftBukkit start
16 ++ // CraftBukkit start
17 17 + if (flag != flag1) {
18 18 + org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
19 19 +
20 20 + BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 15 : 0, flag1 ? 15 : 0);
21 21 + world.getServer().getPluginManager().callEvent(eventRedstone);
22 22 +
23 23 + flag1 = eventRedstone.getNewCurrent() > 0;
24 24 + }
25 25 + // CraftBukkit end
26 26 +

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut