summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityWolf.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityWolf.patch')
-rw-r--r--nms-patches/EntityWolf.patch20
1 files changed, 12 insertions, 8 deletions
diff --git a/nms-patches/EntityWolf.patch b/nms-patches/EntityWolf.patch
index 47efd69c..ed990124 100644
--- a/nms-patches/EntityWolf.patch
+++ b/nms-patches/EntityWolf.patch
@@ -12,26 +12,30 @@
public class EntityWolf extends EntityTameableAnimal {
private static final DataWatcherObject<Float> DATA_HEALTH = DataWatcher.a(EntityWolf.class, DataWatcherRegistry.c);
-@@ -59,6 +64,18 @@
+@@ -59,6 +64,22 @@
this.getAttributeMap().b(GenericAttributes.ATTACK_DAMAGE).setValue(2.0D);
}
+ // CraftBukkit - add overriden version
+ @Override
-+ public void setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fire) {
-+ super.setGoalTarget(entityliving, reason, fire);
++ public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fire) {
++ if (!super.setGoalTarget(entityliving, reason, fire)) {
++ return false;
++ }
++ entityliving = getGoalTarget();
+ if (entityliving == null) {
+ this.setAngry(false);
+ } else if (!this.isTamed()) {
+ this.setAngry(true);
+ }
++ return true;
+ }
+ // CraftBukkit end
+
public void setGoalTarget(EntityLiving entityliving) {
super.setGoalTarget(entityliving);
if (entityliving == null) {
-@@ -192,9 +209,10 @@
+@@ -192,9 +213,10 @@
Entity entity = damagesource.getEntity();
if (this.goalSit != null) {
@@ -44,7 +48,7 @@
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
f = (f + 1.0F) / 2.0F;
}
-@@ -235,7 +253,7 @@
+@@ -235,7 +257,7 @@
--itemstack.count;
}
@@ -53,7 +57,7 @@
return true;
}
} else if (itemstack.getItem() == Items.DYE) {
-@@ -256,7 +274,7 @@
+@@ -256,7 +278,7 @@
this.goalSit.setSitting(!this.isSitting());
this.bc = false;
this.navigation.o();
@@ -62,7 +66,7 @@
}
} else if (itemstack != null && itemstack.getItem() == Items.BONE && !this.isAngry()) {
if (!entityhuman.abilities.canInstantlyBuild) {
-@@ -264,12 +282,14 @@
+@@ -264,12 +286,14 @@
}
if (!this.world.isClientSide) {
@@ -78,7 +82,7 @@
this.setOwnerUUID(entityhuman.getUniqueID());
this.o(true);
this.world.broadcastEntityEffect(this, (byte) 7);
-@@ -351,7 +371,7 @@
+@@ -351,7 +375,7 @@
}
protected boolean isTypeNotPersistent() {