@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityWolf.java
|
||||
+++ b/net/minecraft/server/EntityWolf.java
|
||||
@@ -3,6 +3,11 @@
|
||||
import com.google.common.base.Predicate;
|
||||
@@ -4,6 +4,11 @@
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
@@ -12,7 +12,7 @@
|
||||
public class EntityWolf extends EntityTameableAnimal {
|
||||
|
||||
private static final DataWatcherObject<Float> DATA_HEALTH = DataWatcher.a(EntityWolf.class, DataWatcherRegistry.c);
|
||||
@@ -59,6 +64,22 @@
|
||||
@@ -60,6 +65,22 @@
|
||||
this.getAttributeMap().b(GenericAttributes.ATTACK_DAMAGE).setValue(2.0D);
|
||||
}
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public void setGoalTarget(EntityLiving entityliving) {
|
||||
public void setGoalTarget(@Nullable EntityLiving entityliving) {
|
||||
super.setGoalTarget(entityliving);
|
||||
if (entityliving == null) {
|
||||
@@ -192,9 +213,10 @@
|
||||
@@ -194,9 +215,10 @@
|
||||
Entity entity = damagesource.getEntity();
|
||||
|
||||
if (this.goalSit != null) {
|
||||
@@ -48,7 +48,7 @@
|
||||
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
|
||||
f = (f + 1.0F) / 2.0F;
|
||||
}
|
||||
@@ -235,7 +257,7 @@
|
||||
@@ -237,7 +259,7 @@
|
||||
--itemstack.count;
|
||||
}
|
||||
|
||||
@@ -57,16 +57,16 @@
|
||||
return true;
|
||||
}
|
||||
} else if (itemstack.getItem() == Items.DYE) {
|
||||
@@ -256,7 +278,7 @@
|
||||
@@ -258,7 +280,7 @@
|
||||
this.goalSit.setSitting(!this.isSitting());
|
||||
this.bc = false;
|
||||
this.bd = false;
|
||||
this.navigation.o();
|
||||
- this.setGoalTarget((EntityLiving) null);
|
||||
+ this.setGoalTarget((EntityLiving) null, TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason
|
||||
}
|
||||
} else if (itemstack != null && itemstack.getItem() == Items.BONE && !this.isAngry()) {
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
@@ -264,12 +286,14 @@
|
||||
@@ -266,12 +288,14 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -82,7 +82,7 @@
|
||||
this.setOwnerUUID(entityhuman.getUniqueID());
|
||||
this.o(true);
|
||||
this.world.broadcastEntityEffect(this, (byte) 7);
|
||||
@@ -351,7 +375,7 @@
|
||||
@@ -353,7 +377,7 @@
|
||||
}
|
||||
|
||||
protected boolean isTypeNotPersistent() {
|
||||
|
||||
Reference in New Issue
Block a user