Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
Fixed EntityTame event firing too many times.
Dieser Commit ist enthalten in:
Ursprung
d48e9c22f5
Commit
68695fb9d6
@ -419,18 +419,12 @@ public class EntityWolf extends EntityAnimal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void d(boolean flag) {
|
public void d(boolean flag) {
|
||||||
// CraftBukkit start
|
byte b0 = this.datawatcher.a(16);
|
||||||
EntityTameEvent event = CraftEventFactory.callEntityTameEvent(this, null);
|
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (flag) {
|
||||||
// CraftBukkit end
|
this.datawatcher.b(16, Byte.valueOf((byte) (b0 | 4)));
|
||||||
byte b0 = this.datawatcher.a(16);
|
} else {
|
||||||
|
this.datawatcher.b(16, Byte.valueOf((byte) (b0 & -5)));
|
||||||
if (flag) {
|
|
||||||
this.datawatcher.b(16, Byte.valueOf((byte) (b0 | 4)));
|
|
||||||
} else {
|
|
||||||
this.datawatcher.b(16, Byte.valueOf((byte) (b0 & -5)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren