Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static ItemStack headFromTexture(String value) {
- ItemStack itemStack = new ItemStack(Material.PLAYER_HEAD);
- NBT.modifyComponents(itemStack, nbt -> {
- ReadWriteNBT profileCompound = nbt.getOrCreateCompound("profile");
- profileCompound.setUUID("id", UUID.randomUUID());
- ReadWriteNBT propertiesCompound = profileCompound.getCompoundList("properties").addCompound();
- propertiesCompound.setString("name", "textures");
- propertiesCompound.setString("value", value);
- });
- return itemStack;
- }
Advertisement
Add Comment
Please, Sign In to add comment