diff options
author | Tahg <tahgtahv@gmail.com> | 2011-03-07 13:52:25 -0500 |
---|---|---|
committer | Tahg <tahgtahv@gmail.com> | 2011-03-10 13:06:59 -0500 |
commit | 9428907e624aefaaaafa1e2d8704553f18d4c1e8 (patch) | |
tree | 803535e47f31e9230282cb3bc445c7aa80464fe3 /src/main/java/net/minecraft/server/BlockBloodStone.java | |
parent | 39acc5817ef7433062172c541964c814cfdb76f2 (diff) | |
download | craftbukkit-9428907e624aefaaaafa1e2d8704553f18d4c1e8.tar craftbukkit-9428907e624aefaaaafa1e2d8704553f18d4c1e8.tar.gz craftbukkit-9428907e624aefaaaafa1e2d8704553f18d4c1e8.tar.lz craftbukkit-9428907e624aefaaaafa1e2d8704553f18d4c1e8.tar.xz craftbukkit-9428907e624aefaaaafa1e2d8704553f18d4c1e8.zip |
Add redstone events to common blocks
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockBloodStone.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockBloodStone.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/BlockBloodStone.java b/src/main/java/net/minecraft/server/BlockBloodStone.java new file mode 100644 index 00000000..4134fe45 --- /dev/null +++ b/src/main/java/net/minecraft/server/BlockBloodStone.java @@ -0,0 +1,25 @@ +package net.minecraft.server; + +import org.bukkit.craftbukkit.CraftServer; +import org.bukkit.craftbukkit.CraftWorld; +import org.bukkit.event.block.BlockRedstoneEvent; + +public class BlockBloodStone extends Block { + + public BlockBloodStone(int i, int j) { + super(i, j, Material.STONE); + } + + //Craftbukkit start + public void a(World world, int i, int j, int k, int l) { + if(net.minecraft.server.Block.byId[l].c()) { + CraftWorld craftWorld = ((WorldServer) world).getWorld(); + CraftServer server = ((WorldServer) world).getServer(); + org.bukkit.block.Block block = craftWorld.getBlockAt(i, j, k); + int power = block.getBlockPower(); + BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, power, power); + server.getPluginManager().callEvent(eventRedstone); + } + } + //Craftbukkit end +} |