Fuzss / strawstatues

Bring some life to your builds with player statues of your favorite Minecrafters!
https://www.curseforge.com/minecraft/mc-mods/straw-statues
Mozilla Public License 2.0
1 stars 3 forks source link

[Suggestion]: Setting the skin for a statue via Player Head #20

Closed LeftChaotix closed 1 year ago

LeftChaotix commented 1 year ago

Suggestion (Required)

This one might just be a bit of a strange suggestion, but I noticed that the NBT structure the statues use for their skin is pretty much exactly what player skulls use so I decided to whip up a little command to apply the texture of a skull any statue is wearing directly to the statue

the command is : execute as @e[type=strawstatues:straw_statue,nbt={ArmorItems:[{id:"minecraft:player_head"}]}] run data modify entity @s Owner set from entity @s ArmorItems[3].tag.SkullOwner

its honestly been pretty fun to just quickly put a player head onto them, especially if you have another mod that allows the obtaining of player heads in survival. it even works with skulls that use specific texture values as long as you also assign a name to them beforehand, which gives you infinite possibilities for statues that won't ever randomly change skins thanks to sites like this one

I've also attached a video showcasing the ease of use for the prior mentioned command & specific texture value heads

https://github.com/Fuzss/strawstatues/assets/87588148/a4440af6-5657-4c30-a5e4-061626267fb5

LeftChaotix commented 1 year ago

I should maybe have also mentioned that I got the chance to test this command on a server with some friends and it worked perfectly, including after several reloads of the server and our clients.

also heres a command for the skull used in the video /give @p minecraft:player_head{SkullOwner: {Id: [I; 16, 64, 48, 32], Properties: {textures: [{Value: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjE4YmIyYWU0NzA1MmQyNGRlZTg4NzJmMmFiNWE0ZmI0ODE4MGExOTQzY2VkODYwNDYxMGQzYWE2ZmQ2ZmI3YSJ9fX0="}]}, Name: "Spiderman"}}

Fuzss commented 1 year ago

Thanks for the suggestion, implemented in v4.0.11. I don't think this is useful, you will probably be the only person to ever use it, but here you go haha.

The implementation only works when equipping a player head in-world, not when placing the head from the gui. It made the most sense to me like that. If you have any other suggestion regarding this let me know.

loaficus commented 11 months ago

hello! I'm trying to get this to work but I think I'm doing something wrong:'D I'm not familiar with commands, what should I do for it to work?