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

NBT Heads

Shane Bee edited this page Jan 15, 2023 · 11 revisions

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

  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
{display:{Name:"{\"text\":\"Lightly Weathered Copper Block\"}"},SkullOwner:{Id:[I;560730361,-2039592014,-1344041958,
-1058039007],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5
taW5lY3JhZnQubmV0L3RleHR1cmUvZDc1MzA1NmVjYzEyYjY0MWJhNmE1Y2JkZjUwMzlkZWRlYzQ5MmFjNGZiNTgzNTQ1N2QzYTRlNDMyMmJkYjNkIn19fQ=="}]}}}
  1. replace all the quotes " with double quotes "", should look like this
{display:{Name:""{\""text\"":\""Lightly Weathered Copper Block\""}""},SkullOwner:{Id:[I;560730361,-2039592014,-1344041958,
-1058039007],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQu
bmV0L3RleHR1cmUvZDc1MzA1NmVjYzEyYjY0MWJhNmE1Y2JkZjUwMzlkZWRlYzQ5MmFjNGZiNTgzNTQ1N2QzYTRlNDMyMmJkYjNkIn19fQ==""}]}}}
  1. now we're going to create a simple head and apply this NBT to it.
set {_n} to nbt compound from "{display:{Name:""{\""text\"":\""Lightly Weathered Copper Block\""}""},SkullOwner:{Id:[I;560730361,-2039592014,-1344041958,
-1058039007],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3Rl
eHR1cmUvZDc1MzA1NmVjYzEyYjY0MWJhNmE1Y2JkZjUwMzlkZWRlYzQ5MmFjNGZiNTgzNTQ1N2QzYTRlNDMyMmJkYjNkIn19fQ==""}]}}}"
set {_i} to a player head with nbt {_n}

4b) Alternatively:

set {_i} to a player head
set {_n} to nbt item compound of {_i}
add nbt compound of "{display:{Name:""{\""text\"":\""Lightly Weathered Copper Block\""}""},SkullOwner:{Id:[I;560730361,-2039592014,-1344041958,-1058039007],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDc1MzA1NmVjYzEyYjY0MWJhNmE1Y2JkZjUwMzlkZWRlYzQ5MmFjNGZiNTgzNTQ1N2QzYTRlNDMyMmJkYjNkIn19fQ==""}]}}}" 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 /test:
	trigger:
		set {_i} to a player head
		set {_n} to nbt item compound of {_i}
		add nbt compound of "{display:{Name:""{\""text\"":\""Lightly Weathered Copper Block\""}""},SkullOwner:{Id:[I;560730361,-2039592014,-1344041958,-1058039007],Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDc1MzA1NmVjYzEyYjY0MWJhNmE1Y2JkZjUwMzlkZWRlYzQ5MmFjNGZiNTgzNTQ1N2QzYTRlNDMyMmJkYjNkIn19fQ==""}]}}}" to {_n}
		
		open chest inventory with 1 rows named "Le Test" to player
		set slot 0 of current inventory of player to {_i}

And there you go, Bob's your uncle

Clone this wiki locally