mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Changes?
This commit is contained in:
parent
5ecbb49cf8
commit
c777641a90
3 changed files with 8 additions and 3 deletions
|
@ -45,10 +45,11 @@ public class CatEntity extends TameableEntity {
|
|||
if ((int) entityMetadata.getValue() == 0) {
|
||||
metadata.put(EntityData.VARIANT, 8);
|
||||
} else if ((int) entityMetadata.getValue() == 8) {
|
||||
// Assumption, need to test
|
||||
metadata.put(EntityData.VARIANT, 0);
|
||||
} else if ((int) entityMetadata.getValue() == 9) {
|
||||
metadata.put(EntityData.VARIANT, 7);
|
||||
metadata.put(EntityData.VARIANT, 10);
|
||||
} else if ((int) entityMetadata.getValue() == 10) {
|
||||
metadata.put(EntityData.VARIANT, 9);
|
||||
} else {
|
||||
metadata.put(EntityData.VARIANT, (int) entityMetadata.getValue());
|
||||
}
|
||||
|
|
|
@ -46,9 +46,11 @@ public class TameableEntity extends AnimalEntity {
|
|||
metadata.getFlags().setFlag(EntityFlag.SITTING, (xd & 0x01) == 0x01);
|
||||
metadata.getFlags().setFlag(EntityFlag.ANGRY, (xd & 0x02) == 0x02);
|
||||
metadata.getFlags().setFlag(EntityFlag.TAMED, (xd & 0x04) == 0x04);
|
||||
// Must be set for wolf collar color to work
|
||||
// Extending it to all entities to prevent future bugs
|
||||
if (metadata.getFlags().getFlag(EntityFlag.TAMED)) {
|
||||
metadata.put(EntityData.OWNER_EID, session.getPlayerEntity().getGeyserId());
|
||||
}
|
||||
} // Can't de-tame an entity so no resetting the owner ID
|
||||
}
|
||||
super.updateBedrockMetadata(entityMetadata, session);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ public class WolfEntity extends TameableEntity {
|
|||
if (entityMetadata.getId() == 18) {
|
||||
metadata.getFlags().setFlag(EntityFlag.INTERESTED, (boolean) entityMetadata.getValue());
|
||||
}
|
||||
// Wolf collar color
|
||||
// Relies on EntityData.OWNER_EID being set in TameableEntity.java
|
||||
if (entityMetadata.getId() == 19) {
|
||||
metadata.put(EntityData.COLOR, (byte) (int) entityMetadata.getValue());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue