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

@@ -9,25 +9,17 @@
}
protected void initAttributes() {
@@ -103,6 +103,9 @@
return entity.damageEntity(DamageSource.mobAttack(this), 3.0F);
}
+ /* CraftBukkit start
+ // Function disabled as it has no special function anymore after
+ // setSitting is disabled.
public boolean damageEntity(DamageSource damagesource, float f) {
if (this.isInvulnerable(damagesource)) {
@@ -108,7 +108,8 @@
return false;
@@ -114,6 +117,7 @@
return super.damageEntity(damagesource, f);
}
}
+ // CraftBukkit end */
} else {
if (this.goalSit != null) {
- this.goalSit.setSitting(false);
+ // CraftBukkit - moved into EntityLiving.d(DamageSource, float)
+ // this.goalSit.setSitting(false);
}
@Nullable
protected MinecraftKey J() {
@@ -133,7 +137,8 @@
return super.damageEntity(damagesource, f);
@@ -133,7 +134,8 @@
}
if (!this.world.isClientSide) {
@@ -37,7 +29,7 @@
this.c(entityhuman);
this.setCatType(1 + this.world.random.nextInt(3));
this.p(true);
@@ -237,7 +242,7 @@
@@ -237,7 +239,7 @@
entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entityocelot.setAgeRaw(-24000);