2011-03-07 19:52:25 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
2011-03-31 22:40:00 +02:00
|
|
|
// CraftBukkit start
|
2011-03-07 19:52:25 +01:00
|
|
|
import org.bukkit.craftbukkit.CraftServer;
|
|
|
|
import org.bukkit.craftbukkit.CraftWorld;
|
|
|
|
import org.bukkit.event.block.BlockRedstoneEvent;
|
2011-03-31 22:40:00 +02:00
|
|
|
// CraftBukkit end
|
2011-03-07 19:52:25 +01:00
|
|
|
|
|
|
|
public class BlockBloodStone extends Block {
|
|
|
|
|
|
|
|
public BlockBloodStone(int i, int j) {
|
|
|
|
super(i, j, Material.STONE);
|
|
|
|
}
|
|
|
|
|
2011-03-11 22:25:35 +01:00
|
|
|
// Craftbukkit start
|
2011-04-20 19:05:14 +02:00
|
|
|
public void doPhysics(World world, int i, int j, int k, int l) {
|
|
|
|
if (net.minecraft.server.Block.byId[l] != null && net.minecraft.server.Block.byId[l].isPowerSource()) {
|
2011-03-07 19:52:25 +01: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();
|
2011-03-31 22:40:00 +02:00
|
|
|
|
2011-03-07 19:52:25 +01:00
|
|
|
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, power, power);
|
2011-03-31 22:40:00 +02:00
|
|
|
server.getPluginManager().callEvent(eventRedstone);
|
2011-03-07 19:52:25 +01:00
|
|
|
}
|
|
|
|
}
|
2011-03-11 22:25:35 +01:00
|
|
|
// Craftbukkit end
|
2011-03-07 19:52:25 +01:00
|
|
|
}
|