Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

NBT Heads 1.20.5

Shane Bee edited this page Aug 10, 2024 · 10 revisions

Warning

This wiki relates to Minecraft 1.20.5+

So you're looking to use some custom heads in your script?
Cool, well let's look at how you do that.

The main goal here is to set the player profile nbt component tag of the player head item to some data.
You can read more about the profile component on McWiki

  1. First step is to find a head from a database, like Minecraft-heads.com
  2. Copy the nbt portion of the command it gives into a text editor of your choice, should look like this
{"minecraft:profile":{id:[I;1012646827,1820739582,-1120930980,-1600539797],name:"",properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDIzOGEyZWE0ZTk5OWM2OWQzZjQyMzdjOGY1MmRiNWFiZWNjMjI0Mzc0NWY5Yjg0M2ZiYjdmNjBjNmNlN2UyMCJ9fX0="}]}}
  1. replace all the quotes " with double quotes "", should look like this
{""minecraft:profile"":{id:[I;1012646827,1820739582,-1120930980,-1600539797],name:"""",properties:[{name:""textures"",value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDIzOGEyZWE0ZTk5OWM2OWQzZjQyMzdjOGY1MmRiNWFiZWNjMjI0Mzc0NWY5Yjg0M2ZiYjdmNjBjNmNlN2UyMCJ9fX0=""}]}}
  1. now we're going to create a simple head and apply this NBT to it.
set {_n} to nbt from "{""minecraft:profile"":{id:[I;1012646827,1820739582,-1120930980,-1600539797],name:"""",properties:[{name:""textures"",value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDIzOGEyZWE0ZTk5OWM2OWQzZjQyMzdjOGY1MmRiNWFiZWNjMjI0Mzc0NWY5Yjg0M2ZiYjdmNjBjNmNlN2UyMCJ9fX0=""}]}}"
set {_i} to a player head with nbt {_n}

4b) Alternatively:

set {_i} to a player head
set {_n} to nbt of {_i}
add nbt compound of "{""minecraft:profile"":{id:[I;1012646827,1820739582,-1120930980,-1600539797],name:"""",properties:[{name:""textures"",value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDIzOGEyZWE0ZTk5OWM2OWQzZjQyMzdjOGY1MmRiNWFiZWNjMjI0Mzc0NWY5Yjg0M2ZiYjdmNjBjNmNlN2UyMCJ9fX0=""}]}}" to {_n}
give player 1 of {_i}
  1. Now we can give the item to a player, or throw it in a GUI. Let's see an example.
command /monkeyman:
	trigger:
		set {_i} to a player head
		set {_n} to component nbt of {_i}
		add nbt compound of "{""minecraft:profile"":{id:[I;1012646827,1820739582,-1120930980,-1600539797],name:"""",properties:[{name:""textures"",value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDIzOGEyZWE0ZTk5OWM2OWQzZjQyMzdjOGY1MmRiNWFiZWNjMjI0Mzc0NWY5Yjg0M2ZiYjdmNjBjNmNlN2UyMCJ9fX0=""}]}}" to {_n}
		set name of {_i} to "&bMr Monkey"

		set {_g} to chest inventory with 1 rows named "Le Test"
		set slot 0 of {_g} to {_i}
		open {_g} to player

And there you go, Bob's your uncle
Screenshot 2024-04-25 at 11 51 34 PM

Clone this wiki locally