forked from GeyserMC/Geyser
add phew entity flags (#79)
* Add some entity flags * goddangit stupid web editor * whoops (Some information pulled from BMan's pull request for flags)
This commit is contained in:
parent
10ba2db34c
commit
38ae400d0c
1 changed files with 4 additions and 1 deletions
|
@ -55,6 +55,9 @@ public class JavaEntityMetadataTranslator extends PacketTranslator<ServerEntityM
|
||||||
byte xd = (byte)metadata.getValue();
|
byte xd = (byte)metadata.getValue();
|
||||||
entity.getMetadata().getFlags().setFlag(EntityFlag.SPRINTING, (xd & 0x08) == 0x08);
|
entity.getMetadata().getFlags().setFlag(EntityFlag.SPRINTING, (xd & 0x08) == 0x08);
|
||||||
entity.getMetadata().getFlags().setFlag(EntityFlag.SNEAKING, (xd & 0x02) == 0x02);
|
entity.getMetadata().getFlags().setFlag(EntityFlag.SNEAKING, (xd & 0x02) == 0x02);
|
||||||
|
entity.getMetadata().getFlags().setFlag(EntityFlag.SWIMMING, (xd & 0x10) == 0x10);
|
||||||
|
entity.getMetadata().getFlags().setFlag(EntityFlag.GLIDING, (xd & 0x80) == 0x80);
|
||||||
|
entity.getMetadata().getFlags().setFlag(EntityFlag.INVISIBLE, (xd & 0x20) == 0x20);
|
||||||
} else if (entity.getEntityType() == EntityType.ITEM && metadata.getId() == 7) {
|
} else if (entity.getEntityType() == EntityType.ITEM && metadata.getId() == 7) {
|
||||||
AddItemEntityPacket itemPacket = new AddItemEntityPacket();
|
AddItemEntityPacket itemPacket = new AddItemEntityPacket();
|
||||||
itemPacket.setRuntimeEntityId(entity.getGeyserId());
|
itemPacket.setRuntimeEntityId(entity.getGeyserId());
|
||||||
|
|
Loading…
Reference in a new issue