Skip to content

Mannequin type entities must have a head based on their skin. #19

Description

@DearFox

At the moment, if I pick up a Mannequin-type entity, I'll get a head with a question mark:

Image Image

What behavior would I like to get instead:

Image

How this can be implemented:

After examining the data from the head I am currently receiving, I get the following NBT data:

{components: {"minecraft:item_name": {color: "yellow", extra: ["#5", '"'], text: '"', italic: 0b}, "minecraft:lore": [{color: "dark_gray", extra: ["манекен", " back."], text: "Right click to place the ", italic: 0b}], "minecraft:custom_name": {color: "yellow", extra: ["#5", '"'], text: '"', italic: 0b}, "minecraft:profile": {name: "", id: [I; -1322120106, -67221710, -1210061277, 1850866857], properties: [{name: "textures", value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWU3NzAwMDk2YjVhMmE4NzM4NmQ2MjA1YjRkZGNjMTRmZDMzY2YyNjkzNjJmYTY4OTM0OTk0MzFjZTc3YmY5In19fQ=="}]}, "minecraft:custom_data": {Brain: {memories: {}}, immovable: 1b, description: "Гоблин 1", Invulnerable: 1b, FallFlying: 0b, PortalCooldown: 0, AbsorptionAmount: 0.0f, DeathTime: 0s, UUID: [I; 1318752353, 1392398074, -2098303530, 97379367], hidden_layers: [], Motion: [0.0d, 0.0d, 0.0d], Health: 1.0f, pose: "standing", profile: {properties: [{name: "textures", value: "ewogICJ0aW1lc3RhbXAiIDogMTc4OTAzNTQyNTU0MywKICAicHJvZmlsZUlkIiA6ICI4ZjllYTBhNWJhOGE0NTNkYTgzNTBmYjRmNzVmOTJiOSIsCiAgInByb2ZpbGVOYW1lIiA6ICJDeWJlck1pbm55IiwKICAic2lnbmF0dXJlUmVxdWlyZWQiIDogdHJ1ZSwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2YyZDFjMDQ5YzAyMjRjMzA3MWMxZDVjNjY5ZGQzNTY5ZWExMWNlMmUwZDM2MWIyZDRmMTY1MDFlODAxZTI2NWUiCiAgICB9CiAgfQp9"}]}, fall_distance: 0.0d, Air: 300s, OnGround: 0b, Rotation: [143.73984f, 0.0f], current_impulse_context_reset_grace_time: 0, EntityType: "minecraft:mannequin", main_hand: "right", CustomName: "#5", Pos: [-49.5d, 70.0d, 79.5d], Fire: 0s, attributes: [{id: "minecraft:scale", base: 0.95d}, {id: "minecraft:movement_speed", base: 0.7d}, {id: "minecraft:max_health", base: 1.0d}], HurtTime: 0s, CustomNameVisible: 1b}}, count: 1, id: "minecraft:player_head"}

In this case, if the mannequin contains the value data of its skin right away, we can simply copy the value data from this mannequin to the value data of the item.

But Mannequin do not always contain a value field in their NBT tags.
Here's another example:

{components: {"minecraft:item_name": {color: "yellow", italic: 0b, translate: "entity.minecraft.mannequin"}, "minecraft:lore": [{color: "dark_gray", extra: ["манекен", " back."], text: "Right click to place the ", italic: 0b}], "minecraft:custom_name": {color: "yellow", italic: 0b, translate: "entity.minecraft.mannequin"}, "minecraft:profile": {name: "", id: [I; -1995368708, 1634486748, -1699551568, -1991787571], properties: [{name: "textures", value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWU3NzAwMDk2YjVhMmE4NzM4NmQ2MjA1YjRkZGNjMTRmZDMzY2YyNjkzNjJmYTY4OTM0OTk0MzFjZTc3YmY5In19fQ=="}]}, "minecraft:custom_data": {Motion: [0.017062061623791286d, 0.0d, -0.19746702725709883d], Brain: {memories: {}}, Health: 20.0f, pose: "standing", immovable: 1b, profile: {name: "DearFox", model: "slim"}, Invulnerable: 1b, FallFlying: 0b, fall_distance: 0.0d, Air: 300s, OnGround: 0b, PortalCooldown: 0, AbsorptionAmount: 0.0f, Rotation: [0.0f, 0.0f], current_impulse_context_reset_grace_time: 0, EntityType: "minecraft:mannequin", main_hand: "right", Pos: [-50.57802130861897d, 70.0d, 80.87074368642297d], DeathTime: 0s, Fire: 0s, attributes: [{id: "minecraft:scale", base: 1.0d}, {id: "minecraft:movement_speed", base: 0.7d}], UUID: [I; -681180455, 1572359625, -2128867821, -797508656], HurtTime: 0s, hidden_layers: []}}, count: 1, id: "minecraft:player_head"}

In this case, the following NBT tags can be used for the item. Just as an example:

{components: {"minecraft:profile": {name: "DearFox", model: "slim"}}, count: 1, id: "minecraft:player_head"}

I hope this information helps.
This improvement would help me better navigate my Mannequins.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions