@@ -1,40 +1,42 @@
|
||||
--- a/net/minecraft/server/EntityOcelot.java
|
||||
+++ b/net/minecraft/server/EntityOcelot.java
|
||||
@@ -60,7 +60,7 @@
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
@Override
|
||||
public boolean isTypeNotPersistent(double d0) {
|
||||
- return !this.isTrusting() && this.ticksLived > 2400;
|
||||
+ return !this.isTrusting() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
||||
}
|
||||
|
||||
public boolean isTypeNotPersistent() {
|
||||
- return !this.isTamed() && this.ticksLived > 2400;
|
||||
+ return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
||||
}
|
||||
|
||||
protected void initAttributes() {
|
||||
@@ -107,7 +107,8 @@
|
||||
return false;
|
||||
} else {
|
||||
if (this.goalSit != null) {
|
||||
- this.goalSit.setSitting(false);
|
||||
+ // CraftBukkit - moved into EntityLiving.d(DamageSource, float)
|
||||
+ // this.goalSit.setSitting(false);
|
||||
}
|
||||
|
||||
return super.damageEntity(damagesource, f);
|
||||
@@ -132,7 +133,8 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +131,8 @@
|
||||
if ((this.bD == null || this.bD.h()) && !this.isTrusting() && this.i(itemstack) && entityhuman.h((Entity) this) < 9.0D) {
|
||||
this.a(entityhuman, itemstack);
|
||||
if (!this.world.isClientSide) {
|
||||
- if (this.random.nextInt(3) == 0) {
|
||||
+ // CraftBukkit - added event call and isCancelled check
|
||||
+ if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
|
||||
this.c(entityhuman);
|
||||
this.setCatType(1 + this.world.random.nextInt(3));
|
||||
this.setTrusting(true);
|
||||
this.s(true);
|
||||
@@ -238,7 +240,7 @@
|
||||
this.world.broadcastEntityEffect(this, (byte) 41);
|
||||
@@ -217,7 +218,7 @@
|
||||
|
||||
entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
entityocelot.setAgeRaw(-24000);
|
||||
- this.world.addEntity(entityocelot);
|
||||
+ this.world.addEntity(entityocelot, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.OCELOT_BABY); // CraftBukkit - add SpawnReason
|
||||
}
|
||||
entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
|
||||
entityocelot.setAgeRaw(-24000);
|
||||
- this.world.addEntity(entityocelot);
|
||||
+ this.world.addEntity(entityocelot, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.OCELOT_BABY); // CraftBukkit - add SpawnReason
|
||||
}
|
||||
|
||||
}
|
||||
@@ -253,9 +254,9 @@
|
||||
private final EntityOcelot i;
|
||||
|
||||
public a(EntityOcelot entityocelot, Class<T> oclass, float f, double d0, double d1) {
|
||||
- Predicate predicate = IEntitySelector.e;
|
||||
+ // Predicate predicate = IEntitySelector.e; // CraftBukkit - decompile error
|
||||
|
||||
- super(entityocelot, oclass, f, d0, d1, predicate::test);
|
||||
+ super(entityocelot, oclass, f, d0, d1, IEntitySelector.e::test); // CraftBukkit - decompile error
|
||||
this.i = entityocelot;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user