| 47 | */ |
| 48 | public class Recipe { |
| 49 | public static class RecipeMap implements Runnable { |
| 50 | /** RecipeMap-HashMap so that Machines can store their corresponding Recipe Lists as String NBT. */ |
| 51 | public static final Map<String, RecipeMap> RECIPE_MAPS = new HashMap<>(); |
| 52 | /** List of Recipe Maps in order of their creation. */ |
| 53 | public static final List<RecipeMap> RECIPE_MAP_LIST = new ArrayList<>(); |
| 54 | /** List of Fuel specific Maps in order of their creation. */ |
| 55 | public static final List<RecipeMap> FUEL_MAP_LIST = new ArrayList<>(); |
| 56 | |
| 57 | /** List of Recipe Map Handlers. They will dynamically add regular Recipes when needed. */ |
| 58 | public final List<IRecipeMapHandler> mRecipeMapHandlers = new ArrayListNoNulls<>(); |
| 59 | /** List of Machines that can perform/use the Recipes of this Map. */ |
| 60 | public final List<ItemStack> mRecipeMachineList = ST.arraylist(); |
| 61 | /** HashMap of Recipes based on their Items */ |
| 62 | public final ItemStackMap<ItemStackContainer, Collection<Recipe>> mRecipeItemMap = new ItemStackMap<>(); |
| 63 | /** HashMap of Recipes based on their Fluids */ |
| 64 | public final Map<String, Collection<Recipe>> mRecipeFluidMap = new HashMap<>(); |
| 65 | /** HashMap of Minimum Tank Sizes based on the Input Fluids */ |
| 66 | public final Map<String, Long> mMinInputTankSizes = new HashMap<>(); |
| 67 | /** The List of all Recipes */ |
| 68 | public final Collection<Recipe> mRecipeList; |
| 69 | /** Used to detect if MineTweaker fucked with the Recipe List without also fixing the HashMaps. */ |
| 70 | public int mRecipeListSize = 0; |
| 71 | /** String used as an unlocalised Name. */ |
| 72 | public final String mNameInternal; |
| 73 | /** String used as a localised Name in things that shouldn't be localised, like Config File Names. */ |
| 74 | public final String mNameLocal, mNameLocalUnderscored; |
| 75 | /** String used in NEI for the Recipe Lists. If null it will use the unlocalised Name instead*/ |
| 76 | public final String mNameNEI; |
| 77 | /** GUI used for NEI Display. Usually the GUI of the Machine itself */ |
| 78 | public final String mGUIPath; |
| 79 | public final String mNEISpecialValuePre, mNEISpecialValuePost; |
| 80 | public final byte mProgressBarDirection, mProgressBarAmount; |
| 81 | public final int mInputItemsCount, mOutputItemsCount, mInputFluidCount, mOutputFluidCount, mMinimalInputItems, mMinimalInputFluids, mMinimalInputs; |
| 82 | public final long mNEISpecialValueMultiplier, mPower; |
| 83 | public final boolean mNEIAllowed, mShowVoltageAmperageInNEI, mNeedsOutputs, mCombinePower, mUseBucketSizeIn, mUseBucketSizeOut; |
| 84 | public boolean mLogErrors = T; |
| 85 | /** Used to determine Input Tank Size. Contains the size of the largest FluidStack Input, but is almost always at least 1000. */ |
| 86 | public int mMaxFluidInputSize = 1000; |
| 87 | /** Used to determine Output Tank Size. Contains the size of the largest FluidStack Output, but is almost always at least 1000. */ |
| 88 | public int mMaxFluidOutputSize = 1000; |
| 89 | /** The Config File corresponding to this Recipe Handler. Will be initialised by GT_API. */ |
| 90 | public Config mConfigFile = null; |
| 91 | |
| 92 | /** |
| 93 | * Initialises a new type of Recipe Handler. |
| 94 | * @param aRecipeList a List you specify as Recipe List. Usually just an ArrayList with a pre-initialised Size. |
| 95 | * @param aNameInternal the unlocalised Name of this Recipe Handler, used mainly for NEI. |
| 96 | * @param aNameLocal the displayed Name inside the NEI Recipe GUI and regular ToolTips. |
| 97 | * @param aNEIGUIPath the displayed GUI Texture, usually just a Machine GUI. Auto-Attaches ".png" if forgotten. |
| 98 | * @param aInputItemsCount the usual amount of Input Slots this Recipe Class has. |
| 99 | * @param aOutputItemsCount the usual amount of Output Slots this Recipe Class has. |
| 100 | * @param aNEISpecialValuePre the String in front of the Special Value in NEI. |
| 101 | * @param aNEISpecialValueMultiplier the Value the Special Value is getting Multiplied with before displaying |
| 102 | * @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something. |
| 103 | * @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general. |
| 104 | * @param aFuelMap if NEI is allowed to display this Recipe Handler in general. |
| 105 | */ |
| 106 | public RecipeMap(Collection<Recipe> aRecipeList, String aNameInternal, String aNameLocal, String aNameNEI, long aProgressBarDirection, long aProgressBarAmount, String aNEIGUIPath, long aInputItemsCount, long aOutputItemsCount, long aMinimalInputItems, long aInputFluidCount, long aOutputFluidCount, long aMinimalInputFluids, long aMinimalInputs, long aPower, String aNEISpecialValuePre, long aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aFuelMap, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed, boolean aConfigAllowed, boolean aNeedsOutputs, boolean aCombinePower, boolean aUseBucketSizeIn, boolean aUseBucketSizeOut) { |