craftbukkit/src/main/java/net/minecraft/server/BlockBloodStone.java

26 lines
955 B
Java
Raw Normal View History

2011-03-07 13:52:25 -05:00
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
2011-03-07 13:52:25 -05:00
public void a(World world, int i, int j, int k, int l) {
2011-03-11 20:47:59 -05:00
if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].c()) {
2011-03-07 13:52:25 -05:00
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
2011-03-07 13:52:25 -05:00
}