diff options
author | akarahdev <endisticbutitsforgit@gmail.com> | 2024-01-18 09:26:50 -0500 |
---|---|---|
committer | akarahdev <endisticbutitsforgit@gmail.com> | 2024-01-22 20:18:14 -0500 |
commit | 8b9f2d8bed28c0e2867871d4017eb63ebb904482 (patch) | |
tree | ba2f3c94f3ea49c1065fe08f9607d572bbdddd5d /src/main/java/de/hysky/skyblocker/skyblock | |
parent | 932cd36d51d505396552478e184d86b4a3a2eb94 (diff) | |
download | Skyblocker-8b9f2d8bed28c0e2867871d4017eb63ebb904482.tar.gz Skyblocker-8b9f2d8bed28c0e2867871d4017eb63ebb904482.tar.bz2 Skyblocker-8b9f2d8bed28c0e2867871d4017eb63ebb904482.zip |
add nukekubi glow coloring
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index 2d0eed4e..ef61271d 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -123,6 +123,39 @@ public class MobGlow { }; } + // copypaste nukekubi head logic + if(entity instanceof ArmorStandEntity) { + for (net.minecraft.item.ItemStack it : entity.getArmorItems()) { + // hacky way to check if an item is a player head w/o + // some shenanigans + if(!it.toString().startsWith("1 player_head")) + continue; + + + if (it.hasNbt()) { + assert it.getNbt() != null; + // eb07594e2df273921a77c101d0bfdfa1115abed5b9b2029eb496ceba9bdbb4b3 is texture id + // for the nukekubi head, compare against it to exclusively find + // armorstands that are nukekubi heads + if (it.getNbt().contains("SkullOwner")) { + // get the texture of the nukekubi head item itself and + // compare it + var texture = it + .getNbt() + .getCompound("SkullOwner") + .getCompound("Properties") + .getList("textures", NbtElement.COMPOUND_TYPE) + .getCompound(0) + .getString("Value"); + + if(texture.contains("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0=")) { + return 0x990099; + } + } + } + } + } + return 0xf57738; } } |