badasintended / wthit

what the hell is that?
https://docs.bai.lol/wthit
Other
121 stars 21 forks source link

Custom head support #237

Closed sternschnaube closed 9 months ago

sternschnaube commented 10 months ago

image


deirn commented 9 months ago

I assume you get the head from Minecraft Heads?

The command that it gives doesn't store the head name of the block entity.

give @p minecraft:player_head{display:{Name:"{\"text\":\"Creeper Skeleton Skull\"}"},SkullOwner:{Id:[I;257906651,-2018555868,-1417719731,-326173565],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzFjNzVmMzViZGRlMjRlY2RmNzUwYjE0YTUwNjc3NjhlODIzMGExNTRkNDk4Yjc4NjNhNTQ2N2Y3ZWExMTg0MSJ9fX0="}]}}} 1

This result the block to have this data:

{
  SkullOwner: {
    Id: [I; 257906651, -2018555868, -1417719731, -326173565], 
    Properties: {
      textures: [{
       Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzFjNzVmMzViZGRlMjRlY2RmNzUwYjE0YTUwNjc3NjhlODIzMGExNTRkNDk4Yjc4NjNhNTQ2N2Y3ZWExMTg0MSJ9fX0="
      }]
    }
  }
}

If it instead also set the name inside SkullOwner then WTHIT can get it's name

give @p minecraft:player_head{display:{Name:"{\"text\":\"Creeper Skeleton Skull\"}"},SkullOwner:{Id:[I;257906651,-2018555868,-1417719731,-326173565],Name:"Creeper Skeleton Skull",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzFjNzVmMzViZGRlMjRlY2RmNzUwYjE0YTUwNjc3NjhlODIzMGExNTRkNDk4Yjc4NjNhNTQ2N2Y3ZWExMTg0MSJ9fX0="}]}}} 1
{
  SkullOwner: {
    Id: [I; 257906651, -2018555868, -1417719731, -326173565], 
    Properties: {
      textures: [{
       Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzFjNzVmMzViZGRlMjRlY2RmNzUwYjE0YTUwNjc3NjhlODIzMGExNTRkNDk4Yjc4NjNhNTQ2N2Y3ZWExMTg0MSJ9fX0="
      }]
    },
    Name: "Creeper Skeleton Skull"
  }
}

image (the head shows as steve on the current version, it's a bug that was fixed in d2b424d96f10f28adc5118f58fce2ff08152d4cd)

Minecraft Heads' custom heads are also hard to identify for them to be special-cased. All of them seem to have different UUIDs. If all have the same then that would be easy to hide the "Player Head" text and replace it with the custom name.

In the end, this is more of Minecraft Heads' issue than WTHIT's.

sternschnaube commented 9 months ago

Thank you so much 😊

deirn commented 9 months ago

Head Name Fix seem to retain the head item name to the placed block, that might fix the naming issue.