Update CraftBukkit to Minecraft 1.7.2

This commit is contained in:
mbax
2013-11-04 07:07:38 -06:00
committed by Wesley Wolfe
parent ff8b70fbb7
commit 2726696652
349 changed files with 14339 additions and 11287 deletions

View File

@@ -7,7 +7,7 @@ public abstract class EntityFireball extends Entity {
private int e = -1;
private int f = -1;
private int g = -1;
private int h;
private Block h;
private boolean i;
public EntityLiving shooter;
private int j;
@@ -23,7 +23,7 @@ public abstract class EntityFireball extends Entity {
this.a(1.0F, 1.0F);
}
protected void a() {}
protected void c() {}
public EntityFireball(World world, double d0, double d1, double d2, double d3, double d4, double d5) {
super(world);
@@ -61,16 +61,14 @@ public abstract class EntityFireball extends Entity {
this.dirZ = d2 / d3 * 0.1D;
}
public void l_() {
public void h() {
if (!this.world.isStatic && (this.shooter != null && this.shooter.dead || !this.world.isLoaded((int) this.locX, (int) this.locY, (int) this.locZ))) {
this.die();
} else {
super.l_();
super.h();
this.setOnFire(1);
if (this.i) {
int i = this.world.getTypeId(this.e, this.f, this.g);
if (i == this.h) {
if (this.world.getType(this.e, this.f, this.g) == this.h) {
++this.j;
if (this.j == 600) {
this.die();
@@ -103,10 +101,10 @@ public abstract class EntityFireball extends Entity {
List list = this.world.getEntities(this, this.boundingBox.a(this.motX, this.motY, this.motZ).grow(1.0D, 1.0D, 1.0D));
double d0 = 0.0D;
for (int j = 0; j < list.size(); ++j) {
Entity entity1 = (Entity) list.get(j);
for (int i = 0; i < list.size(); ++i) {
Entity entity1 = (Entity) list.get(i);
if (entity1.L() && (!entity1.h(this.shooter) || this.au >= 25)) {
if (entity1.R() && (!entity1.h(this.shooter) || this.au >= 25)) {
float f = 0.3F;
AxisAlignedBB axisalignedbb = entity1.boundingBox.grow((double) f, (double) f, (double) f);
MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
@@ -161,10 +159,10 @@ public abstract class EntityFireball extends Entity {
this.pitch = this.lastPitch + (this.pitch - this.lastPitch) * 0.2F;
this.yaw = this.lastYaw + (this.yaw - this.lastYaw) * 0.2F;
float f2 = this.c();
float f2 = this.e();
if (this.H()) {
for (int k = 0; k < 4; ++k) {
if (this.M()) {
for (int j = 0; j < 4; ++j) {
float f3 = 0.25F;
this.world.addParticle("bubble", this.locX - this.motX * (double) f3, this.locY - this.motY * (double) f3, this.locZ - this.motZ * (double) f3, this.motX, this.motY, this.motZ);
@@ -184,7 +182,7 @@ public abstract class EntityFireball extends Entity {
}
}
protected float c() {
protected float e() {
return 0.95F;
}
@@ -194,7 +192,7 @@ public abstract class EntityFireball extends Entity {
nbttagcompound.setShort("xTile", (short) this.e);
nbttagcompound.setShort("yTile", (short) this.f);
nbttagcompound.setShort("zTile", (short) this.g);
nbttagcompound.setByte("inTile", (byte) this.h);
nbttagcompound.setByte("inTile", (byte) Block.b(this.h));
nbttagcompound.setByte("inGround", (byte) (this.i ? 1 : 0));
// CraftBukkit - Fix direction being mismapped to invalid variables
nbttagcompound.set("power", this.a(new double[] { this.dirX, this.dirY, this.dirZ}));
@@ -204,26 +202,26 @@ public abstract class EntityFireball extends Entity {
this.e = nbttagcompound.getShort("xTile");
this.f = nbttagcompound.getShort("yTile");
this.g = nbttagcompound.getShort("zTile");
this.h = nbttagcompound.getByte("inTile") & 255;
this.h = Block.e(nbttagcompound.getByte("inTile") & 255);
this.i = nbttagcompound.getByte("inGround") == 1;
// CraftBukkit start - direction -> power
if (nbttagcompound.hasKey("power")) {
NBTTagList nbttaglist = nbttagcompound.getList("power");
if (nbttagcompound.hasKeyOfType("power", 9)) {
NBTTagList nbttaglist = nbttagcompound.getList("power", 6);
this.dirX = ((NBTTagDouble) nbttaglist.get(0)).data;
this.dirY = ((NBTTagDouble) nbttaglist.get(1)).data;
this.dirZ = ((NBTTagDouble) nbttaglist.get(2)).data;
this.dirX = nbttaglist.d(0);
this.dirY = nbttaglist.d(1);
this.dirZ = nbttaglist.d(2);
// CraftBukkit end
} else {
this.die();
}
}
public boolean L() {
public boolean R() {
return true;
}
public float Z() {
public float af() {
return 1.0F;
}
@@ -231,9 +229,9 @@ public abstract class EntityFireball extends Entity {
if (this.isInvulnerable()) {
return false;
} else {
this.K();
this.Q();
if (damagesource.getEntity() != null) {
Vec3D vec3d = damagesource.getEntity().aa();
Vec3D vec3d = damagesource.getEntity().ag();
if (vec3d != null) {
this.motX = vec3d.c;