Updated CraftBukkit to 1.2
This commit is contained in:
@@ -90,15 +90,15 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
this.datawatcher.a(19, new Integer(0));
|
||||
}
|
||||
|
||||
public AxisAlignedBB a_(Entity entity) {
|
||||
public AxisAlignedBB b_(Entity entity) {
|
||||
return entity.boundingBox;
|
||||
}
|
||||
|
||||
public AxisAlignedBB h_() {
|
||||
public AxisAlignedBB h() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean f_() {
|
||||
public boolean e_() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
this.world.getServer().getPluginManager().callEvent(new VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
|
||||
}
|
||||
|
||||
public double q() {
|
||||
public double x_() {
|
||||
return (double) this.length * 0.0D - 0.30000001192092896D;
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
i = event.getDamage();
|
||||
// CraftBukkit end
|
||||
|
||||
this.d(-this.m());
|
||||
this.c(10);
|
||||
this.aM();
|
||||
this.e(-this.n());
|
||||
this.d(10);
|
||||
this.aV();
|
||||
this.setDamage(this.getDamage() + i * 10);
|
||||
if (this.getDamage() > 40) {
|
||||
if (this.passenger != null) {
|
||||
@@ -200,7 +200,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean e_() {
|
||||
public boolean o_() {
|
||||
return !this.dead;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
super.die();
|
||||
}
|
||||
|
||||
public void y_() {
|
||||
public void G_() {
|
||||
// CraftBukkit start
|
||||
double prevX = this.locX;
|
||||
double prevY = this.locY;
|
||||
@@ -245,15 +245,15 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
float prevPitch = this.pitch;
|
||||
// CraftBukkit end
|
||||
|
||||
if (this.l() > 0) {
|
||||
this.c(this.l() - 1);
|
||||
if (this.m() > 0) {
|
||||
this.d(this.m() - 1);
|
||||
}
|
||||
|
||||
if (this.getDamage() > 0) {
|
||||
this.setDamage(this.getDamage() - 1);
|
||||
}
|
||||
|
||||
if (this.j() && this.random.nextInt(4) == 0) {
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -598,7 +598,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.f_() && entity instanceof EntityMinecart) {
|
||||
if (entity != this.passenger && entity.e_() && entity instanceof EntityMinecart) {
|
||||
entity.collide(this);
|
||||
}
|
||||
}
|
||||
@@ -851,6 +851,17 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack splitWithoutUpdate(int i) {
|
||||
if (this.items[i] != null) {
|
||||
ItemStack itemstack = this.items[i];
|
||||
|
||||
this.items[i] = null;
|
||||
return itemstack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void setItem(int i, ItemStack itemstack) {
|
||||
this.items[i] = itemstack;
|
||||
if (itemstack != null && itemstack.count > this.getMaxStackSize()) {
|
||||
@@ -859,7 +870,7 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "Minecart";
|
||||
return "container.minecart";
|
||||
}
|
||||
|
||||
public int getMaxStackSize() {
|
||||
@@ -900,10 +911,10 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return this.dead ? false : entityhuman.i(this) <= 64.0D;
|
||||
return this.dead ? false : entityhuman.j(this) <= 64.0D;
|
||||
}
|
||||
|
||||
protected boolean j() {
|
||||
protected boolean k() {
|
||||
return (this.datawatcher.getByte(16) & 1) != 0;
|
||||
}
|
||||
|
||||
@@ -927,19 +938,19 @@ public class EntityMinecart extends Entity implements IInventory {
|
||||
return this.datawatcher.getInt(19);
|
||||
}
|
||||
|
||||
public void c(int i) {
|
||||
public void d(int i) {
|
||||
this.datawatcher.watch(17, Integer.valueOf(i));
|
||||
}
|
||||
|
||||
public int l() {
|
||||
public int m() {
|
||||
return this.datawatcher.getInt(17);
|
||||
}
|
||||
|
||||
public void d(int i) {
|
||||
public void e(int i) {
|
||||
this.datawatcher.watch(18, Integer.valueOf(i));
|
||||
}
|
||||
|
||||
public int m() {
|
||||
public int n() {
|
||||
return this.datawatcher.getInt(18);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user