From e904a296b5130eff305be8ac600518983c119691 Mon Sep 17 00:00:00 2001 From: zOnlyKroks Date: Tue, 17 Jan 2023 12:44:50 +0100 Subject: [PATCH] add glowing --- SpigotCore_Main/src/de/steamwar/entity/REntity.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SpigotCore_Main/src/de/steamwar/entity/REntity.java b/SpigotCore_Main/src/de/steamwar/entity/REntity.java index ddf4f35..3b7eb99 100644 --- a/SpigotCore_Main/src/de/steamwar/entity/REntity.java +++ b/SpigotCore_Main/src/de/steamwar/entity/REntity.java @@ -62,6 +62,7 @@ public class REntity { private FlatteningWrapper.EntityPose pose = FlatteningWrapper.EntityPose.NORMAL; private boolean bowDrawn; private boolean noGravity; + private boolean isGlowing; private int fireTick; @Getter private String displayName; @@ -86,6 +87,7 @@ public class REntity { this.itemSlots = entityType == EntityType.PLAYER ? new HashMap<>() : null; this.noGravity = false; + this.isGlowing = false; server.addEntity(this); } @@ -196,6 +198,13 @@ public class REntity { server.updateEntity(this,getDataWatcherPacket(noGravityDataWatcher,noGravity)); } + public void setGlowing(boolean glowing) { + this.isGlowing = glowing; + if(Core.getVersion() > 8) { + server.updateEntity(this,getDataWatcherPacket(entityStatusWatcher,getEntityStatus())); + } + } + private static int spawnPacketOffset() { switch (Core.getVersion()) { case 8: @@ -288,6 +297,8 @@ public class REntity { status |= 0x10; if(invisible) status |= 0x20; + if(Core.getVersion() > 8 && isGlowing) + status |= 0x40; return status; }