mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-12-28 07:20:28 +01:00
WolfEntity: fix entire wolf being set to a color in rare instances (#1630)
This commit is contained in:
parent
2f294c9466
commit
798ae34cd1
1 changed files with 5 additions and 0 deletions
|
@ -60,6 +60,11 @@ public class WolfEntity extends TameableEntity {
|
|||
// Relies on EntityData.OWNER_EID being set in TameableEntity.java
|
||||
if (entityMetadata.getId() == 19 && !metadata.getFlags().getFlag(EntityFlag.ANGRY)) {
|
||||
metadata.put(EntityData.COLOR, collarColor = (byte) (int) entityMetadata.getValue());
|
||||
if (!metadata.containsKey(EntityData.OWNER_EID)) {
|
||||
// If a color is set and there is no owner entity ID, set one.
|
||||
// Otherwise, the entire wolf is set to that color: https://user-images.githubusercontent.com/9083212/99209989-92691200-2792-11eb-911d-9a315c955be9.png
|
||||
metadata.put(EntityData.OWNER_EID, session.getPlayerEntity().getGeyserId());
|
||||
}
|
||||
}
|
||||
|
||||
// Wolf anger (1.16+)
|
||||
|
|
Loading…
Reference in a new issue