diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/BlockCommand.java | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockCommand.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockCommand.java | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/main/java/net/minecraft/server/BlockCommand.java b/src/main/java/net/minecraft/server/BlockCommand.java deleted file mode 100644 index c60f0a94..00000000 --- a/src/main/java/net/minecraft/server/BlockCommand.java +++ /dev/null @@ -1,87 +0,0 @@ -package net.minecraft.server; - -import java.util.Random; - -import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit - -public class BlockCommand extends BlockContainer { - - public BlockCommand() { - super(Material.ORE); - } - - public TileEntity a(World world, int i) { - return new TileEntityCommand(); - } - - public void doPhysics(World world, int i, int j, int k, Block block) { - if (!world.isStatic) { - boolean flag = world.isBlockIndirectlyPowered(i, j, k); - int l = world.getData(i, j, k); - boolean flag1 = (l & 1) != 0; - - // CraftBukkit start - org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(i, j, k); - int old = flag1 ? 15 : 0; - int current = flag ? 15 : 0; - - BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, old, current); - world.getServer().getPluginManager().callEvent(eventRedstone); - // CraftBukkit end - - if (eventRedstone.getNewCurrent() > 0 && !(eventRedstone.getOldCurrent() > 0)) { // CraftBukkit - world.setData(i, j, k, l | 1, 4); - world.a(i, j, k, this, this.a(world)); - } else if (!(eventRedstone.getNewCurrent() > 0) && eventRedstone.getOldCurrent() > 0) { // CraftBukkit - world.setData(i, j, k, l & -2, 4); - } - } - } - - public void a(World world, int i, int j, int k, Random random) { - TileEntity tileentity = world.getTileEntity(i, j, k); - - if (tileentity != null && tileentity instanceof TileEntityCommand) { - CommandBlockListenerAbstract commandblocklistenerabstract = ((TileEntityCommand) tileentity).getCommandBlock(); - - commandblocklistenerabstract.a(world); - world.updateAdjacentComparators(i, j, k, this); - } - } - - public int a(World world) { - return 1; - } - - public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) { - TileEntityCommand tileentitycommand = (TileEntityCommand) world.getTileEntity(i, j, k); - - if (tileentitycommand != null) { - entityhuman.a((TileEntity) tileentitycommand); - } - - return true; - } - - public boolean isComplexRedstone() { - return true; - } - - public int g(World world, int i, int j, int k, int l) { - TileEntity tileentity = world.getTileEntity(i, j, k); - - return tileentity != null && tileentity instanceof TileEntityCommand ? ((TileEntityCommand) tileentity).getCommandBlock().g() : 0; - } - - public void postPlace(World world, int i, int j, int k, EntityLiving entityliving, ItemStack itemstack) { - TileEntityCommand tileentitycommand = (TileEntityCommand) world.getTileEntity(i, j, k); - - if (itemstack.hasName()) { - tileentitycommand.getCommandBlock().setName(itemstack.getName()); - } - } - - public int a(Random random) { - return 0; - } -} |