summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockRedstoneTorch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/BlockRedstoneTorch.patch')
-rw-r--r--nms-patches/BlockRedstoneTorch.patch25
1 files changed, 16 insertions, 9 deletions
diff --git a/nms-patches/BlockRedstoneTorch.patch b/nms-patches/BlockRedstoneTorch.patch
index 8fcee650..24ebe58e 100644
--- a/nms-patches/BlockRedstoneTorch.patch
+++ b/nms-patches/BlockRedstoneTorch.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/BlockRedstoneTorch.java 2014-11-28 17:43:42.949707438 +0000
-+++ src/main/java/net/minecraft/server/BlockRedstoneTorch.java 2014-11-28 17:38:19.000000000 +0000
+--- /home/matt/mc-dev-private//net/minecraft/server/BlockRedstoneTorch.java 2015-02-26 22:40:22.231608143 +0000
++++ src/main/java/net/minecraft/server/BlockRedstoneTorch.java 2015-02-26 22:40:22.235608143 +0000
@@ -6,6 +6,8 @@
import java.util.Map;
import java.util.Random;
@@ -8,12 +8,20 @@
+
public class BlockRedstoneTorch extends BlockTorch {
- private static Map b = Maps.newHashMap();
-@@ -95,9 +97,26 @@
- while (list != null && !list.isEmpty() && world.getTime() - ((RedstoneUpdateInfo) list.get(0)).b > 60L) {
+ private static Map<World, List<BlockRedstoneTorch.RedstoneUpdateInfo>> b = Maps.newHashMap();
+@@ -13,7 +15,7 @@
+
+ private boolean a(World world, BlockPosition blockposition, boolean flag) {
+ if (!BlockRedstoneTorch.b.containsKey(world)) {
+- BlockRedstoneTorch.b.put(world, Lists.newArrayList());
++ BlockRedstoneTorch.b.put(world, Lists.<BlockRedstoneTorch.RedstoneUpdateInfo>newArrayList()); // CraftBukkit - fix decompile error
+ }
+
+ List list = (List) BlockRedstoneTorch.b.get(world);
+@@ -96,8 +98,25 @@
list.remove(0);
}
-+
+
+ // CraftBukkit start
+ org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -21,7 +29,7 @@
+
+ BlockRedstoneEvent event = new BlockRedstoneEvent(block, oldCurrent, oldCurrent);
+ // CraftBukkit end
-
++
if (this.isOn) {
if (flag) {
+ // CraftBukkit start
@@ -36,7 +44,7 @@
world.setTypeAndData(blockposition, Blocks.UNLIT_REDSTONE_TORCH.getBlockData().set(BlockRedstoneTorch.FACING, iblockdata.get(BlockRedstoneTorch.FACING)), 3);
if (this.a(world, blockposition, true)) {
world.makeSound((double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), "random.fizz", 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
-@@ -114,6 +133,16 @@
+@@ -114,6 +133,15 @@
}
}
} else if (!flag && !this.a(world, blockposition, false)) {
@@ -49,7 +57,6 @@
+ }
+ }
+ // CraftBukkit end
-+
world.setTypeAndData(blockposition, Blocks.REDSTONE_TORCH.getBlockData().set(BlockRedstoneTorch.FACING, iblockdata.get(BlockRedstoneTorch.FACING)), 3);
}