diff --git a/src/main/java/com/hermanoid/nerd/RecipeDumpContext.java b/src/main/java/com/hermanoid/nerd/RecipeDumpContext.java index 24ca399..4621188 100644 --- a/src/main/java/com/hermanoid/nerd/RecipeDumpContext.java +++ b/src/main/java/com/hermanoid/nerd/RecipeDumpContext.java @@ -1,13 +1,11 @@ package com.hermanoid.nerd; -import codechicken.nei.util.NBTJson; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonPrimitive; -import com.google.gson.reflect.TypeToken; -import com.hermanoid.nerd.info_extractors.GTRecipeGson; -import gregtech.common.fluid.GT_Fluid; +import java.lang.reflect.Type; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -15,11 +13,15 @@ import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import java.lang.reflect.Type; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonPrimitive; +import com.google.gson.reflect.TypeToken; +import com.hermanoid.nerd.info_extractors.GTRecipeGson; + +import codechicken.nei.util.NBTJson; +import gregtech.common.fluid.GT_Fluid; public class RecipeDumpContext { diff --git a/src/main/java/com/hermanoid/nerd/RecipeDumper.java b/src/main/java/com/hermanoid/nerd/RecipeDumper.java index 82c11cc..2fe601f 100644 --- a/src/main/java/com/hermanoid/nerd/RecipeDumper.java +++ b/src/main/java/com/hermanoid/nerd/RecipeDumper.java @@ -1,13 +1,19 @@ package com.hermanoid.nerd; -import codechicken.core.CommonUtils; -import codechicken.nei.ItemList; -import codechicken.nei.NEIClientConfig; -import codechicken.nei.NEIClientUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.config.DataDumper; -import codechicken.nei.recipe.GuiCraftingRecipe; -import codechicken.nei.recipe.ICraftingHandler; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.util.List; +import java.util.Timer; +import java.util.TimerTask; +import java.util.stream.Stream; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentTranslation; + +import org.apache.commons.lang3.NotImplementedException; +import org.jetbrains.annotations.NotNull; + import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.google.gson.Gson; @@ -15,18 +21,15 @@ import com.google.gson.JsonObject; import com.google.gson.stream.JsonWriter; import com.hermanoid.nerd.info_extractors.IRecipeInfoExtractor; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ChatComponentTranslation; -import org.apache.commons.lang3.NotImplementedException; -import org.jetbrains.annotations.NotNull; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.util.List; -import java.util.Timer; -import java.util.TimerTask; -import java.util.stream.Stream; +import codechicken.core.CommonUtils; +import codechicken.nei.ItemList; +import codechicken.nei.NEIClientConfig; +import codechicken.nei.NEIClientUtils; +import codechicken.nei.PositionedStack; +import codechicken.nei.config.DataDumper; +import codechicken.nei.recipe.GuiCraftingRecipe; +import codechicken.nei.recipe.ICraftingHandler; // This dumper will likely be pretty heavy when run on a large modpack // It finds all items in the world, then queries all recipe handlers for recipes to make it (crafting, not usage) diff --git a/src/main/java/com/hermanoid/nerd/info_extractors/GTRecipeGson.java b/src/main/java/com/hermanoid/nerd/info_extractors/GTRecipeGson.java index cd5ea34..7497fe2 100644 --- a/src/main/java/com/hermanoid/nerd/info_extractors/GTRecipeGson.java +++ b/src/main/java/com/hermanoid/nerd/info_extractors/GTRecipeGson.java @@ -1,18 +1,26 @@ package com.hermanoid.nerd.info_extractors; -import com.google.gson.*; -import com.hermanoid.nerd.RecipeDumpContext; -import gregtech.api.enums.Materials; -import gregtech.nei.GT_NEI_DefaultHandler; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - import java.lang.reflect.Type; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import com.google.gson.ExclusionStrategy; +import com.google.gson.FieldAttributes; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonElement; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.hermanoid.nerd.RecipeDumpContext; + +import gregtech.api.enums.Materials; +import gregtech.nei.GT_NEI_DefaultHandler; + public class GTRecipeGson { public static class GTRecipeExclusionStrategy implements ExclusionStrategy {