From b37ae0fa9d7f213ac71e2f7beb83f5a3bfa79619 Mon Sep 17 00:00:00 2001 From: Flowsqy <47575244+Flowsqy@users.noreply.github.com> Date: Wed, 29 Dec 2021 16:05:54 +0100 Subject: [PATCH] Add marker flag to the fake armorstand --- .../shopchest/nms/v1_17_R1/FakeArmorStandImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nms/v1_17_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_R1/FakeArmorStandImpl.java b/nms/v1_17_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_R1/FakeArmorStandImpl.java index 926210f..ca940fa 100644 --- a/nms/v1_17_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_R1/FakeArmorStandImpl.java +++ b/nms/v1_17_R1/src/main/java/de/epiceric/shopchest/nms/v1_17_R1/FakeArmorStandImpl.java @@ -11,6 +11,7 @@ import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.decoration.ArmorStand; import org.bukkit.Location; import org.bukkit.entity.Player; @@ -21,9 +22,10 @@ import java.util.Optional; public class FakeArmorStandImpl extends FakeEntityImpl implements FakeArmorStand { private final static byte INVISIBLE_FLAG = 0b100000; - protected static final EntityDataAccessor DATA_SHARED_FLAGS_ID; - private static final EntityDataAccessor> DATA_CUSTOM_NAME; - private static final EntityDataAccessor DATA_CUSTOM_NAME_VISIBLE; + private final static byte MARKER_FLAG = 0b10000; + private final static EntityDataAccessor DATA_SHARED_FLAGS_ID; + private final static EntityDataAccessor> DATA_CUSTOM_NAME; + private final static EntityDataAccessor DATA_CUSTOM_NAME_VISIBLE; private final static float MARKER_ARMOR_STAND_OFFSET = 1.975f; static { @@ -77,7 +79,7 @@ public class FakeArmorStandImpl extends FakeEntityImpl implements FakeAr ) ))); packedItems.add(new SynchedEntityData.DataItem<>(DATA_CUSTOM_NAME_VISIBLE, true)); - // TODO Add Marker (specific to ArmorStand) + packedItems.add(new SynchedEntityData.DataItem<>(ArmorStand.DATA_CLIENT_FLAGS, MARKER_FLAG)); } @Override