Skip to content

Commit

Permalink
fix: update skull textures (#522)
Browse files Browse the repository at this point in the history
* Update ItemUtil.kt

allow getskulltexture to take null itemstacks and null nbt

* Update BloodHelper.kt

new watcher skull textures

* cheap coin textures

new cheap coin textures
missing one:
http://textures.minecraft.net/texture/740d6e362bc7eee4f911dbd0446307e7458d1050d09aee538ebcb0273cf75742
could not find it in game. using old one

* nukebi fixation skull

mew nukebi fixation skull texture

* healer fairy skull texture

new healer fairy skull texture

* spirit pet skull texture

new spirit pet skull texture
keeping old as skulls do not update if not dropped
note: only the base spirit skin

* typhoeus and quazii skull textures

update typoeus and quazii skull textures

* totem skull texture

new totem skull texture
note: hypixel appear to have moved the skull to slot 0 from 4
see https://www.jsonkeeper.com/b/8XXX

* Update DungeonFeatures.kt

Signed-off-by: songreaver  <[email protected]>

---------

Signed-off-by: songreaver  <[email protected]>
  • Loading branch information
Kemmisch authored Nov 3, 2024
1 parent deacbd7 commit 0adecee
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent

object BloodHelper {
val watcherSkins = setOf(
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGNlYzQwMDA4ZTFjMzFjMTk4NGY0ZDY1MGFiYjM0MTBmMjAzNzExOWZkNjI0YWZjOTUzNTYzYjczNTE1YTA3NyJ9fX0K",
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTVjMWRjNDdhMDRjZTU3MDAxYThiNzI2ZjAxOGNkZWY0MGI3ZWE5ZDdiZDZkODM1Y2E0OTVhMGVmMTY5Zjg5MyJ9fX0K",
"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh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gICAgIH0KICAgIH0KICB9Cn0=", //f3
"ewogICJ0aW1lc3RhbXAiIDogMTU4OTU1MDkyNjM2MSwKICAicHJvZmlsZUlkIiA6ICI0ZDcwNDg2ZjUwOTI0ZDMzODZiYmZjOWMxMmJhYjRhZSIsCiAgInByb2ZpbGVOYW1lIiA6ICJzaXJGYWJpb3pzY2hlIiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzUxOTY3ZGI1ZTMxOTk5MTYyNTIwMjE5MDNjZjRlOTk1MmVmN2NlYzIyMGZhYWNhMWJhNzliYWZlNTkzOGJkODAiCiAgICB9CiAgfQp9" //f2,f1,e
)
val watchers = mutableSetOf<EntityZombie>()
val mobs = hashMapOf<EntityArmorStand, BloodMob>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ object DungeonFeatures {
private var terracottaEndTime = -1.0
private var rerollClicks = 0
private var alertedSpiritPet = false
private const val SPIRIT_PET_TEXTURE =
"ewogICJ0aW1lc3RhbXAiIDogMTU5NTg2MjAyNjE5OSwKICAicHJvZmlsZUlkIiA6ICI0ZWQ4MjMzNzFhMmU0YmI3YTVlYWJmY2ZmZGE4NDk1NyIsCiAgInByb2ZpbGVOYW1lIiA6ICJGaXJlYnlyZDg4IiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzhkOWNjYzY3MDY3N2QwY2ViYWFkNDA1OGQ2YWFmOWFjZmFiMDlhYmVhNWQ4NjM3OWEwNTk5MDJmMmZlMjI2NTUiCiAgICB9CiAgfQp9"
private val SPIRIT_PET_TEXTURES = setOf(
"ewogICJ0aW1lc3RhbXAiIDogMTU5NTg2MjAyNjE5OSwKICAicHJvZmlsZUlkIiA6ICI0ZWQ4MjMzNzFhMmU0YmI3YTVlYWJmY2ZmZGE4NDk1NyIsCiAgInByb2ZpbGVOYW1lIiA6ICJGaXJlYnlyZDg4IiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzhkOWNjYzY3MDY3N2QwY2ViYWFkNDA1OGQ2YWFmOWFjZmFiMDlhYmVhNWQ4NjM3OWEwNTk5MDJmMmZlMjI2NTUiCiAgICB9CiAgfQp9",
"ewogICJ0aW1lc3RhbXAiIDogMTY5OTU1NDAwMzI4MywKICAicHJvZmlsZUlkIiA6ICJlOTgxNDA1MTJiNmQ0MzVhOWQwYzdmY2RjMzQxM2M3OSIsCiAgInByb2ZpbGVOYW1lIiA6ICJOYXphcmJla0FsZGEiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYjhmMzNhNDkxODVjMDdhZTIxZjNiNGQ1YTU2OWFjZDEyYWUxMTE1N2U0OTZjY2NjMjY0ODdlZDFiMDlkZWQzZiIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9"
)
private var lastLitUpTime = -1L
private val lastBlockPos = BlockPos(7, 77, 34)
private var startWithoutFullParty = false
Expand Down Expand Up @@ -213,7 +215,7 @@ object DungeonFeatures {
if (it !is EntityArmorStand || it.hasCustomName()) return@any false
val item = it.heldItem ?: return@any false
if (item.item !is ItemSkull) return@any false
return@any ItemUtil.getSkullTexture(item) == SPIRIT_PET_TEXTURE
return@any (SPIRIT_PET_TEXTURES.contains(ItemUtil.getSkullTexture(item)))
}) {
UChat.chat(
"$prefix §cSomeone in your party has a Spirit Pet equipped!"
Expand Down Expand Up @@ -435,7 +437,7 @@ object DungeonFeatures {
GlStateManager.enableDepth()
GlStateManager.enableCull()
}
if (event.entity is EntityArmorStand && event.entity.isInvisible && Skytils.config.hideFairies && event.entity.heldItem != null && ItemUtil.getSkullTexture(event.entity.heldItem) == "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTZjM2UzMWNmYzY2NzMzMjc1YzQyZmNmYjVkOWE0NDM0MmQ2NDNiNTVjZDE0YzljNzdkMjczYTIzNTIifX19") {
if (event.entity is EntityArmorStand && event.entity.isInvisible && Skytils.config.hideFairies && event.entity.heldItem != null && ItemUtil.getSkullTexture(event.entity.heldItem) == "ewogICJ0aW1lc3RhbXAiIDogMTcxOTQ2MzA5MTA0NywKICAicHJvZmlsZUlkIiA6ICIyNjRkYzBlYjVlZGI0ZmI3OTgxNWIyZGY1NGY0OTgyNCIsCiAgInByb2ZpbGVOYW1lIiA6ICJxdWludHVwbGV0IiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzJlZWRjZmZjNmExMWEzODM0YTI4ODQ5Y2MzMTZhZjdhMjc1MmEzNzZkNTM2Y2Y4NDAzOWNmNzkxMDhiMTY3YWUiCiAgICB9CiAgfQp9") {
event.isCanceled = true
}
if (event.entity is EntityArmorStand && event.entity.hasCustomName()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ object MiscFeatures {
private var lastGLeave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ogMTU5ODg0NzA4MjYxMywKICAicHJvZmlsZUlkIiA6ICI0MWQzYWJjMmQ3NDk0MDBjOTA5MGQ1NDM0ZDAzODMxYiIsCiAgInByb2ZpbGVOYW1lIiA6ICJNZWdha2xvb24iLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzQwZDZlMzYyYmM3ZWVlNGY5MTFkYmQwNDQ2MzA3ZTc0NThkMTA1MGQwOWFlZTUzOGViY2IwMjczY2Y3NTc0MiIKICAgIH0KICB9Cn0=",
)
private val hubSpawnPoint = BlockPos(-2, 70, -69)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ class DemonlordSlayer(entity: EntityBlaze) :

companion object {
private const val thrownTexture =
"InRleHR1cmVzIjogeyJTS0lOIjogeyJ1cmwiOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS85YzJlOWQ4Mzk1Y2FjZDk5MjI4NjljMTUzNzNjZjdjYjE2ZGEwYTVjZTVmM2M2MzJiMTljZWIzOTI5YzlhMTEifX0="
"eyJ0aW1lc3RhbXAiOjE0NzkxODY4NTAxNDQsInByb2ZpbGVJZCI6ImQzMGRjYzE3NzlmOTRlYTdhYTdiMTg4ZGU1N2E0M2FkIiwicHJvZmlsZU5hbWUiOiJoYW9oYW5rbGxpdSIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOWMyZTlkODM5NWNhY2Q5OTIyODY5YzE1MzczY2Y3Y2IxNmRhMGE1Y2U1ZjNjNjMyYjE5Y2ViMzkyOWM5YTExIn19fQ=="
private const val quaziiT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gICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTJmMjk5NDVhYTUzY2Q5NWEwOTc4YTYyZWYxYThjMTk3ODgwMzM5NWE4YWQ1YzA5MjFkOWNiZTVlMTk2YmI4YiIKICAgIH0KICB9Cn0="

// Taken directly from https://minecraft.fandom.com/wiki/Formatting_codes#Color_codes
private val attunementColors = mapOf(
Expand Down Expand Up @@ -185,7 +185,7 @@ class DemonlordSlayer(entity: EntityBlaze) :
override fun entityJoinWorld(event: EntityJoinWorldEvent) {
(event.entity as? EntityArmorStand)?.let { e ->
tickTimer(1) {
if (e.inventory[4]?.takeIf { it.item is ItemSkull }
if (e.inventory[0]?.takeIf { it.item is ItemSkull }
?.let { ItemUtil.getSkullTexture(it) == thrownTexture } == true) {
printDevMessage(
"Found skull armor stand",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class SeraphSlayer(entity: EntityEnderman) :
printDevMessage("Found nearby armor stand", "slayer", "seraph", "seraphGlyph", "seraphFixation")
if (e.inventory.any {
it?.takeIf { it.item == Items.skull }
?.let { ItemUtil.getSkullTexture(it) } == "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="
?.let { ItemUtil.getSkullTexture(it) } == "eyJ0aW1lc3RhbXAiOjE1MzQ5NjM0MzU5NjIsInByb2ZpbGVJZCI6ImQzNGFhMmI4MzFkYTRkMjY5NjU1ZTMzYzE0M2YwOTZjIiwicHJvZmlsZU5hbWUiOiJFbmRlckRyYWdvbiIsInNpZ25hdHVyZVJlcXVpcmVkIjp0cnVlLCJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWIwNzU5NGUyZGYyNzM5MjFhNzdjMTAxZDBiZmRmYTExMTVhYmVkNWI5YjIwMjllYjQ5NmNlYmE5YmRiYjRiMyJ9fX0="
}) {
nukekebiSkulls.add(e)
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/kotlin/gg/skytils/skytilsmod/utils/ItemUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ object ItemUtil {
return item
}

fun getSkullTexture(item: ItemStack): String? {
if (item.item != Items.skull) return null
val nbt = item.tagCompound
fun getSkullTexture(item: ItemStack?): String? {
if (item?.item != Items.skull) return null
val nbt = item?.tagCompound ?: return null
if (!nbt.hasKey("SkullOwner")) return null
return nbt.getCompoundTag("SkullOwner").getCompoundTag("Properties")
.getTagList("textures", Constants.NBT.TAG_COMPOUND).getCompoundTagAt(0).getString("Value")
Expand Down

0 comments on commit 0adecee

Please sign in to comment.