public static ComparableItemStackValidatedNBT convertInput(ItemStack stack) { return new ComparableItemStackValidatedNBT(stack, oreValidator); }
public static ComparableItemStackValidatedNBT convertInput(ItemStack stack) { return new ComparableItemStackValidatedNBT(stack, oreValidator); }
public static ComparableItemStackValidatedNBT convertInput(ItemStack stack) { return new ComparableItemStackValidatedNBT(stack); }
public static ComparableItemStackValidatedNBT convertInput(ItemStack stack) { return new ComparableItemStackValidatedNBT(stack, oreValidator); }
public static ComparableItemStackValidatedNBT convertInput(ItemStack stack) { return new ComparableItemStackValidatedNBT(stack, oreValidator); }
public static CrucibleRecipe removeRecipe(ItemStack input) { ComparableItemStackValidatedNBT inputCrucible = new ComparableItemStackValidatedNBT(input); lavaSet.remove(inputCrucible); return recipeMap.remove(inputCrucible); }
public static CrucibleRecipe getRecipe(ItemStack input) { return input.isEmpty() ? null : recipeMap.get(new ComparableItemStackValidatedNBT(input)); }
public static boolean isLava(ItemStack input) { return !input.isEmpty() && lavaSet.contains(new ComparableItemStackValidatedNBT(input)); }
public static void refresh() { Map<ComparableItemStackValidatedNBT, CrucibleRecipe> tempMap = new Object2ObjectOpenHashMap<>(recipeMap.size()); Set<ComparableItemStackValidatedNBT> tempSet = new ObjectOpenHashSet<>(); CrucibleRecipe tempRecipe; for (Entry<ComparableItemStackValidatedNBT, CrucibleRecipe> entry : recipeMap.entrySet()) { tempRecipe = entry.getValue(); ComparableItemStackValidatedNBT input = new ComparableItemStackValidatedNBT(tempRecipe.input); tempMap.put(input, tempRecipe); if (FluidRegistry.LAVA.equals(tempRecipe.getOutput().getFluid())) { tempSet.add(input); } } recipeMap.clear(); recipeMap = tempMap; lavaSet.clear(); lavaSet = tempSet; }
public static CrucibleRecipe addRecipe(int energy, ItemStack input, FluidStack output) { if (input.isEmpty() || output == null || output.amount <= 0 || energy <= 0 || recipeExists(input)) { return null; } ComparableItemStackValidatedNBT inputCrucible = new ComparableItemStackValidatedNBT(input); CrucibleRecipe recipe = new CrucibleRecipe(input, output, energy); recipeMap.put(inputCrucible, recipe); if (FluidRegistry.LAVA.equals(output.getFluid())) { lavaSet.add(inputCrucible); } return recipe; }