Update some entity properties based on wiki.vg

This commit is contained in:
DoctorMacc 2020-06-24 16:40:42 -04:00
parent 60fa43c739
commit 8be0c4b27e
3 changed files with 9 additions and 6 deletions

View file

@ -63,6 +63,8 @@ public class FishingHookEntity extends Entity {
}
}
//TODO Is ID 8 needed?
super.updateBedrockMetadata(entityMetadata, session);
}
}

View file

@ -39,7 +39,7 @@ public class TridentEntity extends AbstractArrowEntity {
@Override
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
if (entityMetadata.getId() == 11) {
if (entityMetadata.getId() == 10) {
metadata.getFlags().setFlag(EntityFlag.ENCHANTED, (boolean) entityMetadata.getValue());
}

View file

@ -40,11 +40,6 @@ public class WolfEntity extends TameableEntity {
@Override
public void updateBedrockMetadata(EntityMetadata entityMetadata, GeyserSession session) {
// "Begging" on wiki.vg, "Interested" in Nukkit - the tilt of the head
if (entityMetadata.getId() == 18) {
metadata.getFlags().setFlag(EntityFlag.INTERESTED, (boolean) entityMetadata.getValue());
}
//Reset wolf color
if (entityMetadata.getId() == 16) {
byte xd = (byte) entityMetadata.getValue();
@ -54,11 +49,17 @@ public class WolfEntity extends TameableEntity {
}
}
// "Begging" on wiki.vg, "Interested" in Nukkit - the tilt of the head
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.getFlags().getFlag(EntityFlag.ANGRY)) {
metadata.put(EntityData.COLOR, (byte) (int) entityMetadata.getValue());
}
//TODO: Anger time int?
super.updateBedrockMetadata(entityMetadata, session);
}
}