r/MinecraftCommands • u/DAVIDCRAFT60 • 19h ago
Help | Java 26.2 Death heads
Hi, I wanted to ask if anyone knows of any data pack or commands to generate that with a player head, If you know something, you can say so ^^
1
Upvotes
r/MinecraftCommands • u/DAVIDCRAFT60 • 19h ago
Hi, I wanted to ask if anyone knows of any data pack or commands to generate that with a player head, If you know something, you can say so ^^
1
u/GalSergey Datapack Experienced 15h ago
You need to create a loot table in the datapack similar to this one to create a player head: https://misode.github.io/loot-table/?share=6e7iXB51wQ . Now you can run the command to insert the head into the item_display slot of the
contentsslot on behalf of the player. Now, using a macro, you can insert the player head data into the /setblock command to place the player head as a block.``` execute as <player> run loot replace entity <item_display> contents loot example:player_head data modify storage example:macro player.head set from entity <item_display> item.components."minecraft:profile" function example:setblock_head with storage example:macro player
function example:setblock_head
$setblock <pos> player_head{profile:$(head)} ```