2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/EntityOcelot.java
|
|
|
|
+++ b/net/minecraft/server/EntityOcelot.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -60,7 +60,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2018-10-22 21:00:00 +02:00
|
|
|
public boolean isTypeNotPersistent() {
|
2014-11-25 22:32:16 +01:00
|
|
|
- return !this.isTamed() && this.ticksLived > 2400;
|
|
|
|
+ return !this.isTamed() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
|
|
|
}
|
|
|
|
|
2015-02-26 23:41:06 +01:00
|
|
|
protected void initAttributes() {
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -107,7 +107,8 @@
|
2014-12-09 15:40:38 +01:00
|
|
|
return false;
|
2017-06-24 02:01:46 +02:00
|
|
|
} else {
|
|
|
|
if (this.goalSit != null) {
|
|
|
|
- this.goalSit.setSitting(false);
|
|
|
|
+ // CraftBukkit - moved into EntityLiving.d(DamageSource, float)
|
|
|
|
+ // this.goalSit.setSitting(false);
|
|
|
|
}
|
2014-12-09 15:40:38 +01:00
|
|
|
|
2017-06-24 02:01:46 +02:00
|
|
|
return super.damageEntity(damagesource, f);
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -132,7 +133,8 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2015-02-26 23:41:06 +01:00
|
|
|
if (!this.world.isClientSide) {
|
2014-11-25 22:32:16 +01:00
|
|
|
- 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()) {
|
2017-05-14 04:00:00 +02:00
|
|
|
this.c(entityhuman);
|
2014-11-25 22:32:16 +01:00
|
|
|
this.setCatType(1 + this.world.random.nextInt(3));
|
2018-07-15 02:00:00 +02:00
|
|
|
this.s(true);
|
|
|
|
@@ -238,7 +240,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|