Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Revert to 1.5 despawning behaviour for Ocelots and Wolves. Fixes BUKKIT-4449
Dieser Commit ist enthalten in:
Ursprung
a466e0aa6c
Commit
720a8d706a
@ -377,8 +377,9 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void bo() {
|
protected void bo() {
|
||||||
// CraftBukkit - temporary hack to handle Ocelot despawning
|
if (this.persistent) {
|
||||||
if ((this instanceof EntityOcelot && this.isTypeNotPersistent()) || (!this.persistent)) {
|
this.aV = 0;
|
||||||
|
} else {
|
||||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||||
|
|
||||||
if (entityhuman != null) {
|
if (entityhuman != null) {
|
||||||
@ -397,11 +398,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|||||||
this.aV = 0;
|
this.aV = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit start
|
|
||||||
} else {
|
|
||||||
this.aV = 0;
|
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bh() {
|
protected void bh() {
|
||||||
|
@ -48,7 +48,7 @@ public class EntityOcelot extends EntityTameableAnimal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isTypeNotPersistent() {
|
protected boolean isTypeNotPersistent() {
|
||||||
return !this.isTamed() && this.ticksLived > 2400;
|
return !this.isTamed(); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean be() {
|
public boolean be() {
|
||||||
|
@ -339,7 +339,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isTypeNotPersistent() {
|
protected boolean isTypeNotPersistent() {
|
||||||
return !this.isTamed() && this.ticksLived > 2400;
|
return !this.isTamed(); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(EntityLiving entityliving, EntityLiving entityliving1) {
|
public boolean a(EntityLiving entityliving, EntityLiving entityliving1) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren