Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ItemStack headStack = new ItemStack(Material.PLAYER_HEAD);
- NBT.modify(headStack, nbt -> {
- final ReadWriteNBT skullOwnerCompound = nbt.getOrCreateCompound("SkullOwner");
- // The owner UUID. Note that skulls with the same UUID but different textures will misbehave and only one texture will load.
- // They will share the texture. To avoid this limitation, it is recommended to use a random UUID.
- skullOwnerCompound.setUUID("Id", UUID.randomUUID());
- skullOwnerCompound.getOrCreateCompound("Properties")
- .getCompoundList("textures")
- .addCompound()
- .setString("Value", "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYmU0NGQ1ZjZmMDI1YmM5N2YzNzAzNTJjMGU1ZDliMGU4MGFjMjIwN2Y3YzIyYzI2OGM5OGUxNDkyNzc3MGEzIn19fQ==");
- });
- player.getInventory().addItem(headStack);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement