src/main/java/arcaratus/bloodarsenal/common/util/helper/NBTHelper.java
public static JsonObject serializeStack(ItemStack stack)
    {
        CompoundNBT nbt = stack.write(new CompoundNBT());
        byte c = nbt.getByte("Count");
        if (c != 1)
        {
            nbt.putByte("count", c);
        }
        nbt.remove("Count");
        renameTag(nbt, "id", "item");
        renameTag(nbt, "tag", "nbt");
        Dynamic<INBT> dyn = new Dynamic<>(NBTDynamicOps.INSTANCE, nbt);
        return dyn.convert(JsonOps.INSTANCE).getValue().getAsJsonObject();
    }
/**
     * Serializes the given stack such that {@link net.minecraft.item.crafting.ShapedRecipe#deserializeItem}
     * would be able to read the result back
     */
Serializes the given stack such that  net.minecraft.item.crafting.ShapedRecipe#deserializeItem
would be able to read the result back
Serializes the given stack such that net . minecraft . item . crafting . ShapedRecipe#deserializeItem would be able to read the result back
public static JsonObject serializeStack(ItemStack stack)
    {
        CompoundNBT nbt = stack.write(new CompoundNBT());
        byte c = nbt.getByte("Count");
        if (c != 1)
        {
            nbt.putByte("count", c);
        }
        nbt.remove("Count");
        renameTag(nbt, "id", "item");
        renameTag(nbt, "tag", "nbt");
        Dynamic<INBT> dyn = new Dynamic<>(NBTDynamicOps.INSTANCE, nbt);
        return dyn.convert(JsonOps.INSTANCE).getValue().getAsJsonObject();
    }
public static JsonObject serializeStack ( ItemStack stack ) { CompoundNBT nbt = stack . write ( new CompoundNBT ( ) ) ; byte c = nbt . getByte ( "Count" ) ; if ( c != 1 ) { nbt . putByte ( "count" , c ) ; } nbt . remove ( "Count" ) ; renameTag ( nbt , "id" , "item" ) ; renameTag ( nbt , "tag" , "nbt" ) ; Dynamic < INBT > dyn = new Dynamic < > ( NBTDynamicOps . INSTANCE , nbt ) ; return dyn . convert ( JsonOps . INSTANCE ) . getValue ( ) . getAsJsonObject ( ) ; }
Serializes the given stack such that {@link net.minecraft.item.crafting.ShapedRecipe#deserializeItem}
 would be able to read the result back
Serializes the given stack such that { @link net . minecraft . item . crafting . ShapedRecipe#deserializeItem } would be able to read the result back