diff options
author | Tahg <tahgtahv@gmail.com> | 2011-02-19 10:55:47 -0500 |
---|---|---|
committer | Tahg <tahgtahv@gmail.com> | 2011-02-19 23:44:35 -0500 |
commit | ca4076077eb8514b2e5bbeb315058b12169e7b81 (patch) | |
tree | d7894677e71eb0a148c93db28ec6580cf6a61bf0 /src/main/java/net/minecraft/server/BlockPressurePlate.java | |
parent | d4b67c5549dec7c27b39a27c81299e218b79826f (diff) | |
download | craftbukkit-ca4076077eb8514b2e5bbeb315058b12169e7b81.tar craftbukkit-ca4076077eb8514b2e5bbeb315058b12169e7b81.tar.gz craftbukkit-ca4076077eb8514b2e5bbeb315058b12169e7b81.tar.lz craftbukkit-ca4076077eb8514b2e5bbeb315058b12169e7b81.tar.xz craftbukkit-ca4076077eb8514b2e5bbeb315058b12169e7b81.zip |
fixed buttons, plates
added yield to explosion
added event for chunk unloading
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockPressurePlate.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockPressurePlate.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlate.java b/src/main/java/net/minecraft/server/BlockPressurePlate.java index 90f0a749..7fedf6ce 100644 --- a/src/main/java/net/minecraft/server/BlockPressurePlate.java +++ b/src/main/java/net/minecraft/server/BlockPressurePlate.java @@ -4,7 +4,8 @@ import java.util.List; import java.util.Random; // CraftBukkit start -import org.bukkit.block.BlockFace;import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.block.BlockFace; +import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.craftbukkit.entity.CraftLivingEntity; @@ -115,6 +116,15 @@ public class BlockPressurePlate extends Block { flag1 = true; } + // Craftbukkit start + CraftWorld craftWorld = ((WorldServer) world).getWorld(); + CraftServer server = ((WorldServer) world).getServer(); + CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k); + BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0); + server.getPluginManager().callEvent(eventRedstone); + flag1 = eventRedstone.getNewCurrent() > 0; + // Craftbukkit end + if (flag1 && !flag) { world.c(i, j, k, 1); world.h(i, j, k, this.id); |