Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-10-01 23:50:11 +02:00
Fix wolf collar color when it's no longer angry (Closes #1404)
Dieser Commit ist enthalten in:
Ursprung
7d2745dee6
Commit
64f2233581
@ -34,6 +34,8 @@ import org.geysermc.connector.network.session.GeyserSession;
|
||||
|
||||
public class WolfEntity extends TameableEntity {
|
||||
|
||||
private byte collarColor;
|
||||
|
||||
public WolfEntity(long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation) {
|
||||
super(entityId, geyserId, entityType, position, motion, rotation);
|
||||
}
|
||||
@ -57,12 +59,13 @@ public class WolfEntity extends TameableEntity {
|
||||
// Wolf collar color
|
||||
// Relies on EntityData.OWNER_EID being set in TameableEntity.java
|
||||
if (entityMetadata.getId() == 19 && !metadata.getFlags().getFlag(EntityFlag.ANGRY)) {
|
||||
metadata.put(EntityData.COLOR, (byte) (int) entityMetadata.getValue());
|
||||
metadata.put(EntityData.COLOR, collarColor = (byte) (int) entityMetadata.getValue());
|
||||
}
|
||||
|
||||
// Wolf anger (1.16+)
|
||||
if (entityMetadata.getId() == 20) {
|
||||
metadata.getFlags().setFlag(EntityFlag.ANGRY, (int) entityMetadata.getValue() != 0);
|
||||
metadata.put(EntityData.COLOR, (int) entityMetadata.getValue() != 0 ? (byte) 0 : collarColor);
|
||||
}
|
||||
|
||||
super.updateBedrockMetadata(entityMetadata, session);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren