Update CraftBukkit to 1.6.4
This commit is contained in:
@@ -55,7 +55,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, 0.7D));
|
||||
this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
||||
this.cH();
|
||||
this.loadChest();
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@@ -239,7 +239,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
|
||||
public int t(int i) {
|
||||
int j = MathHelper.a(this.getTemper() + i, 0, this.cq());
|
||||
int j = MathHelper.a(this.getTemper() + i, 0, this.getMaxDomestication());
|
||||
|
||||
this.setTemper(j);
|
||||
return j;
|
||||
@@ -251,11 +251,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f);
|
||||
}
|
||||
|
||||
public int aP() {
|
||||
public int aQ() {
|
||||
return by[this.cf()];
|
||||
}
|
||||
|
||||
public boolean L() {
|
||||
public boolean M() {
|
||||
return this.passenger == null;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return this.hasChest() /* && (i == 1 || i == 2) */ ? 17 : 2; // CraftBukkit - Remove type check
|
||||
}
|
||||
|
||||
public void cH() { // CraftBukkit - private -> public
|
||||
public void loadChest() { // CraftBukkit - private -> public
|
||||
InventoryHorseChest inventoryhorsechest = this.inventoryChest;
|
||||
|
||||
this.inventoryChest = new InventoryHorseChest("HorseChest", this.cG(), this); // CraftBukkit - add this horse
|
||||
@@ -402,7 +402,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return this.getAttributeInstance(attributeJumpStrength).getValue();
|
||||
}
|
||||
|
||||
protected String aO() {
|
||||
protected String aP() {
|
||||
this.cM();
|
||||
int i = this.getType();
|
||||
|
||||
@@ -416,7 +416,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return i == 4 ? Item.BONE.id : (i == 3 ? (flag ? 0 : Item.ROTTEN_FLESH.id) : Item.LEATHER.id);
|
||||
}
|
||||
|
||||
protected String aN() {
|
||||
protected String aO() {
|
||||
this.cM();
|
||||
if (this.random.nextInt(3) == 0) {
|
||||
this.cO();
|
||||
@@ -433,7 +433,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
|
||||
protected String r() {
|
||||
this.cM();
|
||||
if (this.random.nextInt(10) == 0 && !this.bb()) {
|
||||
if (this.random.nextInt(10) == 0 && !this.bc()) {
|
||||
this.cO();
|
||||
}
|
||||
|
||||
@@ -478,9 +478,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
}
|
||||
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.aW().b(attributeJumpStrength);
|
||||
protected void az() {
|
||||
super.az();
|
||||
this.aX().b(attributeJumpStrength);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(53.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.22499999403953552D);
|
||||
}
|
||||
@@ -489,11 +489,11 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return 6;
|
||||
}
|
||||
|
||||
public int cq() {
|
||||
public int getMaxDomestication() {
|
||||
return this.maxDomestication; // CraftBukkit - return stored max domestication instead of 100
|
||||
}
|
||||
|
||||
protected float aZ() {
|
||||
protected float ba() {
|
||||
return 0.8F;
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
if (b1 > 0 && (flag || !this.isTame()) && b1 < this.cq()) {
|
||||
if (b1 > 0 && (flag || !this.isTame()) && b1 < this.getMaxDomestication()) {
|
||||
flag = true;
|
||||
this.t(b1);
|
||||
}
|
||||
@@ -625,7 +625,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
this.setHasChest(true);
|
||||
this.makeSound("mob.chickenplop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
flag = true;
|
||||
this.cH();
|
||||
this.loadChest();
|
||||
}
|
||||
|
||||
if (!flag && this.ca() && !this.co() && itemstack.id == Item.SADDLE.id) {
|
||||
@@ -675,7 +675,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return i == 2 || i == 1;
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean bc() {
|
||||
return this.passenger != null && this.co() ? true : this.cg() || this.ch();
|
||||
}
|
||||
|
||||
@@ -845,7 +845,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
String s = this.cp();
|
||||
|
||||
if (s != null) {
|
||||
this.makeSound(s, this.aZ(), this.ba());
|
||||
this.makeSound(s, this.ba(), this.bb());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -911,7 +911,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
|
||||
this.Y = 1.0F;
|
||||
this.aR = this.bf() * 0.1F;
|
||||
this.aR = this.bg() * 0.1F;
|
||||
if (!this.world.isStatic) {
|
||||
this.i((float) this.getAttributeInstance(GenericAttributes.d).getValue());
|
||||
super.e(f, f1);
|
||||
@@ -997,7 +997,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication");
|
||||
}
|
||||
// CraftBukkit end
|
||||
AttributeInstance attributeinstance = this.aW().a("Speed");
|
||||
AttributeInstance attributeinstance = this.aX().a("Speed");
|
||||
|
||||
if (attributeinstance != null) {
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D);
|
||||
@@ -1006,7 +1006,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
if (this.hasChest()) {
|
||||
NBTTagList nbttaglist = nbttagcompound.getList("Items");
|
||||
|
||||
this.cH();
|
||||
this.loadChest();
|
||||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
||||
NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.get(i);
|
||||
@@ -1160,7 +1160,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
return (GroupDataEntity) object;
|
||||
}
|
||||
|
||||
protected boolean be() {
|
||||
protected boolean bf() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1188,15 +1188,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
|
||||
}
|
||||
}
|
||||
|
||||
public void V() {
|
||||
super.V();
|
||||
public void W() {
|
||||
super.W();
|
||||
if (this.bM > 0.0F) {
|
||||
float f = MathHelper.sin(this.aN * 3.1415927F / 180.0F);
|
||||
float f1 = MathHelper.cos(this.aN * 3.1415927F / 180.0F);
|
||||
float f2 = 0.7F * this.bM;
|
||||
float f3 = 0.15F * this.bM;
|
||||
|
||||
this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.X() + this.passenger.W() + (double) f3, this.locZ - (double) (f2 * f1));
|
||||
this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.Y() + this.passenger.X() + (double) f3, this.locZ - (double) (f2 * f1));
|
||||
if (this.passenger instanceof EntityLiving) {
|
||||
((EntityLiving) this.passenger).aN = this.aN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user