Skip to content

Commit

Permalink
Codestyle tings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hermanoid committed Jan 15, 2024
1 parent 3328aad commit 0baf959
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 39 deletions.
28 changes: 15 additions & 13 deletions src/main/java/com/hermanoid/nerd/RecipeDumpContext.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
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;
import net.minecraft.util.RegistryNamespaced;
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 {

Expand Down
41 changes: 22 additions & 19 deletions src/main/java/com/hermanoid/nerd/RecipeDumper.java
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
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;
import com.google.gson.JsonArray;
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)
Expand Down
22 changes: 15 additions & 7 deletions src/main/java/com/hermanoid/nerd/info_extractors/GTRecipeGson.java
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 0baf959

Please sign in to comment.