mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
34 lines
1.6 KiB
Diff
34 lines
1.6 KiB
Diff
--- a/net/minecraft/server/EntityOcelot.java
|
|
+++ b/net/minecraft/server/EntityOcelot.java
|
|
@@ -81,7 +81,7 @@
|
|
|
|
@Override
|
|
public boolean isTypeNotPersistent(double d0) {
|
|
- return !this.isTrusting() && this.ticksLived > 2400;
|
|
+ return !this.isTrusting() /*&& this.ticksLived > 2400*/; // CraftBukkit
|
|
}
|
|
|
|
public static AttributeProvider.Builder eL() {
|
|
@@ -135,7 +135,8 @@
|
|
if ((this.by == null || this.by.h()) && !this.isTrusting() && this.k(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.setTrusting(true);
|
|
this.u(true);
|
|
this.world.broadcastEntityEffect(this, (byte) 41);
|
|
@@ -244,9 +245,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;
|
|
}
|
|
|