From 9d09e7d0167326d4169f734e4b6d04c54d767507 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Thu, 22 Mar 2012 20:39:39 +0000 Subject: Updated to Minecraft version 1.2.4. Updated version string to 1.2.4-R0.1. --- .../java/net/minecraft/server/EntityMinecart.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/main/java/net/minecraft/server/EntityMinecart.java') diff --git a/src/main/java/net/minecraft/server/EntityMinecart.java b/src/main/java/net/minecraft/server/EntityMinecart.java index 4945a01a..f71dc9e2 100644 --- a/src/main/java/net/minecraft/server/EntityMinecart.java +++ b/src/main/java/net/minecraft/server/EntityMinecart.java @@ -145,7 +145,7 @@ public class EntityMinecart extends Entity implements IInventory { this.e(-this.n()); this.d(10); - this.aV(); + this.aW(); this.setDamage(this.getDamage() + i * 10); if (this.getDamage() > 40) { // CraftBukkit start @@ -241,8 +241,12 @@ public class EntityMinecart extends Entity implements IInventory { } itemstack.count -= j; - // CraftBukkit - include enchantments in the new itemstack - EntityItem entityitem = new EntityItem(this.world, this.locX + (double) f, this.locY + (double) f1, this.locZ + (double) f2, new ItemStack(itemstack.id, j, itemstack.getData(), itemstack.getEnchantments())); + EntityItem entityitem = new EntityItem(this.world, this.locX + (double) f, this.locY + (double) f1, this.locZ + (double) f2, new ItemStack(itemstack.id, j, itemstack.getData())); + + if (itemstack.hasTag()) { + entityitem.itemStack.setTag((NBTTagCompound) itemstack.getTag().clone()); + } + float f3 = 0.05F; entityitem.motX = (double) ((float) this.random.nextGaussian() * f3); @@ -256,7 +260,7 @@ public class EntityMinecart extends Entity implements IInventory { super.die(); } - public void G_() { + public void F_() { // CraftBukkit start double prevX = this.locX; double prevY = this.locY; @@ -273,6 +277,10 @@ public class EntityMinecart extends Entity implements IInventory { this.setDamage(this.getDamage() - 1); } + if (this.locY < -64.0D) { + this.aI(); + } + if (this.k() && this.random.nextInt(4) == 0) { this.world.a("largesmoke", this.locX, this.locY + 0.8D, this.locZ, 0.0D, 0.0D, 0.0D); } @@ -333,7 +341,7 @@ public class EntityMinecart extends Entity implements IInventory { flag1 = !flag; } - if (((BlockMinecartTrack) Block.byId[l]).h()) { + if (((BlockMinecartTrack) Block.byId[l]).i()) { i1 &= 7; } @@ -659,7 +667,7 @@ public class EntityMinecart extends Entity implements IInventory { int i1 = this.world.getData(i, j, k); d1 = (double) j; - if (((BlockMinecartTrack) Block.byId[l]).h()) { + if (((BlockMinecartTrack) Block.byId[l]).i()) { i1 &= 7; } -- cgit v1.2.3