use of net.minecraft.server.v1_14_R1.NBTTagString in project WildLoaders by BG-Software-LLC.
the class NMSAdapter_v1_8_R3 method setTag.
@Override
public org.bukkit.inventory.ItemStack setTag(org.bukkit.inventory.ItemStack itemStack, String key, String value) {
ItemStack nmsItem = CraftItemStack.asNMSCopy(itemStack);
NBTTagCompound tagCompound = nmsItem.hasTag() ? nmsItem.getTag() : new NBTTagCompound();
tagCompound.set(key, new NBTTagString(value));
nmsItem.setTag(tagCompound);
return CraftItemStack.asBukkitCopy(nmsItem);
}
use of net.minecraft.server.v1_14_R1.NBTTagString in project PaperDev by Kamillaova.
the class CraftMetaKnowledgeBook method applyToItem.
void applyToItem(NBTTagCompound itemData) {
super.applyToItem(itemData);
if (hasRecipes()) {
NBTTagList list = new NBTTagList();
for (NamespacedKey recipe : this.recipes) {
list.add(new NBTTagString(recipe.toString()));
}
itemData.set(BOOK_RECIPES.NBT, list);
}
}
Aggregations