mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	ItemMeta needed?
This commit is contained in:
		@@ -76,10 +76,14 @@ public class NBTManager {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Invoke load() time
 | 
					        //Invoke load() time
 | 
				
			||||||
        applyNBT(nmsIS, updatedNBT);
 | 
					        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 {
 | 
					        try {
 | 
				
			||||||
            Class clazz = Class.forName("net.minecraft.server.v1_14_R1.ItemStack");
 | 
					            Class clazz = Class.forName("net.minecraft.server.v1_14_R1.ItemStack");
 | 
				
			||||||
@@ -90,8 +94,6 @@ public class NBTManager {
 | 
				
			|||||||
        } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
 | 
					        } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
 | 
				
			||||||
            e.printStackTrace();
 | 
					            e.printStackTrace();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return nmsItemStack;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public NBTBase constructNBT(String nbtString) {
 | 
					    public NBTBase constructNBT(String nbtString) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user