SPIGOT-3324: Improve tameable damage handling

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-06-24 10:01:46 +10:00
parent d71a1a4036
commit 622d0477c5
4 changed files with 29 additions and 28 deletions

View File

@@ -35,20 +35,19 @@
public void setGoalTarget(@Nullable EntityLiving entityliving) {
super.setGoalTarget(entityliving);
if (entityliving == null) {
@@ -200,9 +221,10 @@
@@ -200,9 +221,9 @@
Entity entity = damagesource.getEntity();
if (this.goalSit != null) {
- this.goalSit.setSitting(false);
+ // CraftBukkit - moved into EntityLiving.d(DamageSource, float)
+ // PAIL : checkme
+ // this.goalSit.setSitting(false);
}
-
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
f = (f + 1.0F) / 2.0F;
}
@@ -245,7 +267,7 @@
@@ -245,7 +266,7 @@
itemstack.subtract(1);
}
@@ -57,7 +56,7 @@
return true;
}
} else if (itemstack.getItem() == Items.DYE) {
@@ -266,7 +288,7 @@
@@ -266,7 +287,7 @@
this.goalSit.setSitting(!this.isSitting());
this.bd = false;
this.navigation.p();
@@ -66,7 +65,7 @@
}
} else if (itemstack.getItem() == Items.BONE && !this.isAngry()) {
if (!entityhuman.abilities.canInstantlyBuild) {
@@ -274,12 +296,13 @@
@@ -274,12 +295,13 @@
}
if (!this.world.isClientSide) {