diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-13 17:33:27 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-15 13:28:59 -0500 |
commit | 83d29e461c85733f0113b6eb19db6e3b42da2949 (patch) | |
tree | b3063a1c28f478ab368d5ba3413a842def68c28f /src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java | |
parent | ba6e4c38cfa98ad291974195cc46d70a4f138ac1 (diff) | |
download | craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.gz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.lz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.xz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.zip |
Update CraftBukkit to Minecraft 1.5
Diffstat (limited to 'src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java')
-rw-r--r-- | src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java b/src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java index 2da34d37..2a7b4ad3 100644 --- a/src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java +++ b/src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java @@ -5,34 +5,29 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack; import org.bukkit.event.block.BlockDispenseEvent; // CraftBukkit end -public class DispenseBehaviorMinecart extends DispenseBehaviorItem { +final class DispenseBehaviorMinecart extends DispenseBehaviorItem { - private final DispenseBehaviorItem c; + private final DispenseBehaviorItem b = new DispenseBehaviorItem(); - final MinecraftServer b; - - public DispenseBehaviorMinecart(MinecraftServer minecraftserver) { - this.b = minecraftserver; - this.c = new DispenseBehaviorItem(); - } + DispenseBehaviorMinecart() {} public ItemStack b(ISourceBlock isourceblock, ItemStack itemstack) { - EnumFacing enumfacing = EnumFacing.a(isourceblock.h()); + EnumFacing enumfacing = BlockDispenser.j_(isourceblock.h()); World world = isourceblock.k(); double d0 = isourceblock.getX() + (double) ((float) enumfacing.c() * 1.125F); - double d1 = isourceblock.getY(); + double d1 = isourceblock.getY() + (double) ((float) enumfacing.d() * 1.125F); double d2 = isourceblock.getZ() + (double) ((float) enumfacing.e() * 1.125F); int i = isourceblock.getBlockX() + enumfacing.c(); - int j = isourceblock.getBlockY(); + int j = isourceblock.getBlockY() + enumfacing.d(); int k = isourceblock.getBlockZ() + enumfacing.e(); int l = world.getTypeId(i, j, k); double d3; - if (BlockMinecartTrack.e(l)) { + if (BlockMinecartTrackAbstract.d_(l)) { d3 = 0.0D; } else { - if (l != 0 || !BlockMinecartTrack.e(world.getTypeId(i, j - 1, k))) { - return this.c.a(isourceblock, itemstack); + if (l != 0 || !BlockMinecartTrackAbstract.d_(world.getTypeId(i, j - 1, k))) { + return this.b.a(isourceblock, itemstack); } d3 = -1.0D; @@ -65,10 +60,10 @@ public class DispenseBehaviorMinecart extends DispenseBehaviorItem { } itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); - EntityMinecart entityminecart = new EntityMinecart(world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), ((ItemMinecart) itemstack1.getItem()).a); + EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.a(world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), ((ItemMinecart) itemstack1.getItem()).a); // CraftBukkit end - world.addEntity(entityminecart); + world.addEntity(entityminecartabstract); // itemstack.a(1); // CraftBukkit - handled during event processing return itemstack; } |