Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class VirtualHologramEntity {
private float headYaw;
private boolean small = false;
private boolean marker = false;
private boolean sneaking = false;

public VirtualHologramEntity(final UserConnection user, final int entityId) {
this.user = user;
Expand Down Expand Up @@ -111,6 +112,7 @@ public void syncState(final EntityPacketRewriter1_8 entityRewriter, final List<E
final boolean invisible = (flags & 0x20) != 0;
small = (armorStandFlags & 0x01) != 0;
marker = (armorStandFlags & 0x10) != 0;
sneaking = (flags & 0x02) != 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this tested? Sneaking is flag 1 and not 2 afaik.

I also wonder what this does. Can you maybe provide a video showing how the client reacts when this entity data is set? I can't find an implementation for it in the Minecraft sourcecode


State prevState = currentState;
if (invisible && name != null) {
Expand Down Expand Up @@ -251,6 +253,7 @@ private void writeHologramMeta(PacketWrapper wrapper) {

// Directly write 1.7 entity data here since we are making them up
final List<EntityData> entityDataList = new ArrayList<>();
entityDataList.add(new EntityData(EntityDataIndex1_7_6_10.ENTITY_FLAGS.getIndex(), EntityDataTypes1_7_6_10.BYTE, (byte) (sneaking ? 2 : 0)));
entityDataList.add(new EntityData(EntityDataIndex1_7_6_10.ABSTRACT_AGEABLE_AGE.getIndex(), EntityDataTypes1_7_6_10.INT, -1700000));
entityDataList.add(new EntityData(EntityDataIndex1_7_6_10.LIVING_ENTITY_BASE_NAME_TAG.getIndex(), EntityDataTypes1_7_6_10.STRING, name));
entityDataList.add(new EntityData(EntityDataIndex1_7_6_10.LIVING_ENTITY_BASE_NAME_TAG_VISIBILITY.getIndex(), EntityDataTypes1_7_6_10.BYTE, (byte) 1));
Expand Down
Loading