2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/EntityOcelot.java
|
|
|
|
+++ b/net/minecraft/server/EntityOcelot.java
|
2019-06-21 12:00:00 +02:00
|
|
|
@@ -81,7 +81,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
|
|
|
public boolean isTypeNotPersistent(double d0) {
|
|
|
|
- return !this.isTrusting() && this.ticksLived > 2400;
|
|
|
|
+ return !this.isTrusting() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2020-08-11 23:00:00 +02:00
|
|
|
public static AttributeProvider.Builder eK() {
|
2020-06-25 02:00:00 +02:00
|
|
|
@@ -135,7 +135,8 @@
|
2020-08-11 23:00:00 +02:00
|
|
|
if ((this.br == null || this.br.h()) && !this.isTrusting() && this.k(itemstack) && entityhuman.h((Entity) this) < 9.0D) {
|
2019-04-23 04:00:00 +02:00
|
|
|
this.a(entityhuman, itemstack);
|
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()) {
|
2019-04-23 04:00:00 +02:00
|
|
|
this.setTrusting(true);
|
2020-06-25 02:00:00 +02:00
|
|
|
this.u(true);
|
2019-04-23 04:00:00 +02:00
|
|
|
this.world.broadcastEntityEffect(this, (byte) 41);
|
2020-08-11 23:00:00 +02:00
|
|
|
@@ -243,9 +244,9 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
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
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2019-04-23 04:00:00 +02:00
|
|
|
- super(entityocelot, oclass, f, d0, d1, predicate::test);
|
|
|
|
+ super(entityocelot, oclass, f, d0, d1, IEntitySelector.e::test); // CraftBukkit - decompile error
|
|
|
|
this.i = entityocelot;
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|