ItemMeta needed?

This commit is contained in:
nossr50 2019-10-01 16:33:31 -07:00
parent 7f6bbadc1c
commit 365938f351

View File

@ -76,10 +76,14 @@ public class NBTManager {
//Invoke load() time
applyNBT(nmsIS, updatedNBT);
//Apply Item Meta (Not sure if needed)
CraftItemStack craftItemStack = CraftItemStack.asCraftMirror(nmsIS);
itemStack.setItemMeta(craftItemStack.getItemMeta());
}
public net.minecraft.server.v1_14_R1.ItemStack applyNBT(net.minecraft.server.v1_14_R1.ItemStack nmsItemStack, NBTTagCompound nbtTagCompound) {
public void applyNBT(net.minecraft.server.v1_14_R1.ItemStack nmsItemStack, NBTTagCompound nbtTagCompound) {
try {
Class clazz = Class.forName("net.minecraft.server.v1_14_R1.ItemStack");
@ -90,8 +94,6 @@ public class NBTManager {
} catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
e.printStackTrace();
}
return nmsItemStack;
}
public NBTBase constructNBT(String nbtString) {