diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMinecart.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityMinecart.java | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMinecart.java b/src/main/java/net/minecraft/server/EntityMinecart.java index 60e1bdf0..9ad729a5 100644 --- a/src/main/java/net/minecraft/server/EntityMinecart.java +++ b/src/main/java/net/minecraft/server/EntityMinecart.java @@ -55,26 +55,26 @@ public class EntityMinecart extends Entity implements IInventory { this.b = 0; this.c = 1; this.i = false; - this.aI = true; + this.aY = true; this.b(0.98F, 0.7F); this.height = this.width / 2.0F; } - protected boolean n() { + protected boolean e_() { return false; } protected void b() {} - public AxisAlignedBB a_(Entity entity) { + public AxisAlignedBB b(Entity entity) { return entity.boundingBox; } - public AxisAlignedBB e_() { + public AxisAlignedBB f() { return null; } - public boolean d_() { + public boolean g() { return true; } @@ -92,15 +92,15 @@ public class EntityMinecart extends Entity implements IInventory { this.world.getServer().getPluginManager().callEvent(new VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit } - public double m() { + public double n() { return (double) this.width * 0.0D - 0.30000001192092896D; } - public boolean damageEntity(Entity entity, int i) { + public boolean damageEntity(DamageSource damagesource, int i) { if (!this.world.isStatic && !this.dead) { // CraftBukkit start Vehicle vehicle = (Vehicle) this.getBukkitEntity(); - org.bukkit.entity.Entity passenger = (entity == null) ? null : entity.getBukkitEntity(); + org.bukkit.entity.Entity passenger = (damagesource.a() == null) ? null : damagesource.a().getBukkitEntity(); VehicleDamageEvent event = new VehicleDamageEvent(vehicle, passenger, i); this.world.getServer().getPluginManager().callEvent(event); @@ -114,7 +114,7 @@ public class EntityMinecart extends Entity implements IInventory { this.c = -this.c; this.b = 10; - this.af(); + this.aq(); this.damage += i * 10; if (this.damage > 40) { if (this.passenger != null) { @@ -175,7 +175,7 @@ public class EntityMinecart extends Entity implements IInventory { } } - public boolean l_() { + public boolean r_() { return !this.dead; } @@ -571,7 +571,7 @@ public class EntityMinecart extends Entity implements IInventory { for (int l1 = 0; l1 < list.size(); ++l1) { Entity entity = (Entity) list.get(l1); - if (entity != this.passenger && entity.d_() && entity instanceof EntityMinecart) { + if (entity != this.passenger && entity.g() && entity instanceof EntityMinecart) { entity.collide(this); } } @@ -673,7 +673,7 @@ public class EntityMinecart extends Entity implements IInventory { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.a("Slot", (byte) i); - this.items[i].a(nbttagcompound1); + this.items[i].b(nbttagcompound1); nbttaglist.a((NBTBase) nbttagcompound1); } } @@ -698,7 +698,7 @@ public class EntityMinecart extends Entity implements IInventory { int j = nbttagcompound1.c("Slot") & 255; if (j >= 0 && j < this.items.length) { - this.items[j] = new ItemStack(nbttagcompound1); + this.items[j] = ItemStack.a(nbttagcompound1); } } } @@ -749,8 +749,8 @@ public class EntityMinecart extends Entity implements IInventory { d1 *= d3; d0 *= 0.10000000149011612D; d1 *= 0.10000000149011612D; - d0 *= (double) (1.0F - this.bu); - d1 *= (double) (1.0F - this.bu); + d0 *= (double) (1.0F - this.bK); + d1 *= (double) (1.0F - this.bK); d0 *= 0.5D; d1 *= 0.5D; if (entity instanceof EntityMinecart) { @@ -843,7 +843,7 @@ public class EntityMinecart extends Entity implements IInventory { public void update() {} - public boolean a(EntityHuman entityhuman) { + public boolean b(EntityHuman entityhuman) { if (this.type == 0) { if (this.passenger != null && this.passenger instanceof EntityHuman && this.passenger != entityhuman) { return true; @@ -885,7 +885,11 @@ public class EntityMinecart extends Entity implements IInventory { return true; } - public boolean a_(EntityHuman entityhuman) { - return this.dead ? false : entityhuman.g(this) <= 64.0D; + public boolean a(EntityHuman entityhuman) { + return this.dead ? false : entityhuman.h(this) <= 64.0D; } + + public void e() {} + + public void t_() {} } |