Moved campfire recipes to be 100% on config.
parent
d0e014ddfa
commit
b167a2a345
|
@ -182,7 +182,8 @@ public class BBConfig
|
|||
SMELTING, true, "Only remove furnace recipes for vanilla items/blocks. Requires" +
|
||||
" 'Disable vanilla smelting'.");
|
||||
canCampfireDoAllKilnStuff = config.getBoolean("Allow campfire to use all kiln recipes", SMELTING, false,
|
||||
"Allow campfire to process all recipes kiln can, instead of just a few.");
|
||||
"Allow campfire to process all recipes kiln can, instead of just a few. Delete your" +
|
||||
" config/betterbeginnings/advancedcrafting/main.json file afterward.");
|
||||
smeltersCanUseCoal = config.getBoolean("Allow smelters to use coal as fuel", SMELTING, false,
|
||||
"Allow smelters to use regular coal as fuel in addition to charcoal.");
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ public class BBConfigFolderLoader
|
|||
loadJsonConfig(e, SmelterConfig.INSTANCE);
|
||||
loadJsonConfig(e, BrickOvenConfig.INSTANCE);
|
||||
loadJsonConfig(e, AdvancedCraftingConfig.INSTANCE);
|
||||
loadJsonConfig(e, CampfireConfig.INSTANCE);
|
||||
}
|
||||
|
||||
public static void loadJsonConfig(FMLInitializationEvent e, IJsonConfig config)
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
package net.einsteinsci.betterbeginnings.config.json;
|
||||
|
||||
import net.einsteinsci.betterbeginnings.util.FileUtil;
|
||||
import net.einsteinsci.betterbeginnings.util.LogUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CampfireConfig implements IJsonConfig
|
||||
{
|
||||
public static final CampfireConfig INSTANCE = new CampfireConfig();
|
||||
|
||||
private static JsonCampfireRecipeHandler initialRecipes = new JsonCampfireRecipeHandler();
|
||||
|
||||
private JsonCampfireRecipeHandler mainRecipes = new JsonCampfireRecipeHandler();
|
||||
private JsonCampfireRecipeHandler customRecipes = new JsonCampfireRecipeHandler();
|
||||
|
||||
private List<JsonCampfireRecipeHandler> includes = new ArrayList<>();
|
||||
|
||||
public static void addRecipe(ItemStack input, ItemStack output, float xp)
|
||||
{
|
||||
initialRecipes.getRecipes().add(new JsonCampfireRecipe(input, output, xp));
|
||||
}
|
||||
public static void addRecipe(Item input, ItemStack output, float xp)
|
||||
{
|
||||
addRecipe(new ItemStack(input), output, xp);
|
||||
}
|
||||
public static void addRecipe(Block input, ItemStack output, float xp)
|
||||
{
|
||||
addRecipe(new ItemStack(input), output, xp);
|
||||
}
|
||||
public static void addRecipe(String input, ItemStack output, float xp)
|
||||
{
|
||||
initialRecipes.getRecipes().add(new JsonCampfireRecipe(JsonLoadedItem.makeOreDictionary(input),
|
||||
new JsonLoadedItemStack(output), xp));
|
||||
}
|
||||
public static void addPanRecipe(ItemStack input, ItemStack output, float xp)
|
||||
{
|
||||
initialRecipes.getPanRecipes().add(new JsonCampfirePanRecipe(input, output, xp));
|
||||
}
|
||||
public static void addPanRecipe(Item input, ItemStack output, float xp)
|
||||
{
|
||||
addPanRecipe(new ItemStack(input), output, xp);
|
||||
}
|
||||
public static void addPanRecipe(Block input, ItemStack output, float xp)
|
||||
{
|
||||
addPanRecipe(new ItemStack(input), output, xp);
|
||||
}
|
||||
public static void addPanRecipe(String input, ItemStack output, float xp)
|
||||
{
|
||||
initialRecipes.getPanRecipes().add(new JsonCampfirePanRecipe(JsonLoadedItem.makeOreDictionary(input),
|
||||
new JsonLoadedItemStack(output), xp));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubFolder()
|
||||
{
|
||||
return "campfire";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMainJson(File subfolder)
|
||||
{
|
||||
File mainf = new File(subfolder, "main.json");
|
||||
String json = FileUtil.readAllText(mainf);
|
||||
if (json == null)
|
||||
{
|
||||
// Kind of inefficient, but it's easiest this way.
|
||||
json = BBJsonLoader.serializeObject(initialRecipes);
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAutoJson(File subfolder)
|
||||
{
|
||||
return "{}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCustomJson(File subfolder)
|
||||
{
|
||||
File customf = new File(subfolder, "custom.json");
|
||||
String json = FileUtil.readAllText(customf);
|
||||
if (json == null)
|
||||
{
|
||||
json = "{}";
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getIncludedJson(File subfolder)
|
||||
{
|
||||
List<String> res = new ArrayList<>();
|
||||
for (String fileName : customRecipes.getIncludes())
|
||||
{
|
||||
File incf = new File(subfolder, fileName);
|
||||
String json = FileUtil.readAllText(incf);
|
||||
res.add(json);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadJsonConfig(FMLInitializationEvent e, String mainJson, String autoJson, String customJson)
|
||||
{
|
||||
mainRecipes = BBJsonLoader.deserializeObject(mainJson, JsonCampfireRecipeHandler.class);
|
||||
for (JsonCampfireRecipe j : mainRecipes.getRecipes())
|
||||
{
|
||||
j.register();
|
||||
}
|
||||
for (JsonCampfirePanRecipe p : mainRecipes.getPanRecipes())
|
||||
{
|
||||
p.register();
|
||||
}
|
||||
|
||||
customRecipes = BBJsonLoader.deserializeObject(customJson, JsonCampfireRecipeHandler.class);
|
||||
for (JsonCampfireRecipe r : customRecipes.getRecipes())
|
||||
{
|
||||
r.register();
|
||||
}
|
||||
for (JsonCampfirePanRecipe p : customRecipes.getPanRecipes())
|
||||
{
|
||||
p.register();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadIncludedConfig(FMLInitializationEvent e, List<String> includedJsons)
|
||||
{
|
||||
for (String json : includedJsons)
|
||||
{
|
||||
JsonCampfireRecipeHandler handler = BBJsonLoader.deserializeObject(json, JsonCampfireRecipeHandler.class);
|
||||
|
||||
if (handler == null)
|
||||
{
|
||||
LogUtil.log(Level.ERROR, "Could not deserialize included json.");
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean missingDependencies = false;
|
||||
for (String mod : handler.getModDependencies())
|
||||
{
|
||||
if (!Loader.isModLoaded(mod))
|
||||
{
|
||||
LogUtil.log(Level.WARN, "Mod '" + mod + "' missing, skipping all recipes in file.");
|
||||
missingDependencies = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (missingDependencies)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
includes.add(handler);
|
||||
|
||||
for (JsonCampfireRecipe r : handler.getRecipes())
|
||||
{
|
||||
r.register();
|
||||
}
|
||||
for (JsonCampfirePanRecipe p : handler.getPanRecipes())
|
||||
{
|
||||
p.register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePostLoad(File subfolder)
|
||||
{
|
||||
String json = BBJsonLoader.serializeObject(mainRecipes);
|
||||
File mainf = new File(subfolder, "main.json");
|
||||
FileUtil.overwriteAllText(mainf, json);
|
||||
}
|
||||
|
||||
public JsonCampfireRecipeHandler getMainRecipes()
|
||||
{
|
||||
return mainRecipes;
|
||||
}
|
||||
|
||||
public JsonCampfireRecipeHandler getCustomRecipes()
|
||||
{
|
||||
return customRecipes;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package net.einsteinsci.betterbeginnings.config.json;
|
||||
|
||||
import net.einsteinsci.betterbeginnings.register.recipe.CampfirePanRecipeHandler;
|
||||
import net.einsteinsci.betterbeginnings.util.LogUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JsonCampfirePanRecipe
|
||||
{
|
||||
private JsonLoadedItem input;
|
||||
private JsonLoadedItemStack output;
|
||||
private float experience;
|
||||
|
||||
public JsonCampfirePanRecipe(JsonLoadedItem input, JsonLoadedItemStack output, float xp)
|
||||
{
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
experience = xp;
|
||||
}
|
||||
public JsonCampfirePanRecipe(ItemStack input, ItemStack output, float xp)
|
||||
{
|
||||
this(new JsonLoadedItem(input), new JsonLoadedItemStack(output), xp);
|
||||
}
|
||||
|
||||
public JsonLoadedItem getInput()
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
public JsonLoadedItemStack getOutput()
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
public float getExperience()
|
||||
{
|
||||
return experience;
|
||||
}
|
||||
|
||||
public void register()
|
||||
{
|
||||
List<ItemStack> possibleOutputs = output.getItemStacks();
|
||||
if (possibleOutputs.isEmpty())
|
||||
{
|
||||
LogUtil.log(Level.ERROR, "No matching item found for output '" + output.getItemName() + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (input.isOreDictionary())
|
||||
{
|
||||
CampfirePanRecipeHandler.addRecipe(input.getItemName(), possibleOutputs.get(0), experience);
|
||||
LogUtil.logDebug("Successfully loaded campfire recipe (OreDictionary) for " + possibleOutputs.get(0).toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
List<ItemStack> possibleInputs = input.getItemStacks();
|
||||
if (possibleInputs.isEmpty())
|
||||
{
|
||||
LogUtil.log(Level.ERROR, "No matching item found for input '" + input.getItemName() + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
CampfirePanRecipeHandler.addRecipe(possibleInputs.get(0), possibleOutputs.get(0), experience);
|
||||
LogUtil.logDebug("Successfully loaded campfire recipe for " + possibleOutputs.get(0).toString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package net.einsteinsci.betterbeginnings.config.json;
|
||||
|
||||
import net.einsteinsci.betterbeginnings.register.recipe.CampfireRecipeHandler;
|
||||
import net.einsteinsci.betterbeginnings.util.LogUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JsonCampfireRecipe
|
||||
{
|
||||
private JsonLoadedItem input;
|
||||
private JsonLoadedItemStack output;
|
||||
private float experience;
|
||||
|
||||
public JsonCampfireRecipe(JsonLoadedItem input, JsonLoadedItemStack output, float xp)
|
||||
{
|
||||
this.input = input;
|
||||
this.output = output;
|
||||
experience = xp;
|
||||
}
|
||||
public JsonCampfireRecipe(ItemStack input, ItemStack output, float xp)
|
||||
{
|
||||
this(new JsonLoadedItem(input), new JsonLoadedItemStack(output), xp);
|
||||
}
|
||||
|
||||
public JsonLoadedItem getInput()
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
public JsonLoadedItemStack getOutput()
|
||||
{
|
||||
return output;
|
||||
}
|
||||
|
||||
public float getExperience()
|
||||
{
|
||||
return experience;
|
||||
}
|
||||
|
||||
public void register()
|
||||
{
|
||||
List<ItemStack> possibleOutputs = output.getItemStacks();
|
||||
if (possibleOutputs.isEmpty())
|
||||
{
|
||||
LogUtil.log(Level.ERROR, "No matching item found for output '" + output.getItemName() + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (input.isOreDictionary())
|
||||
{
|
||||
CampfireRecipeHandler.addRecipe(input.getItemName(), possibleOutputs.get(0), experience);
|
||||
LogUtil.logDebug("Successfully loaded campfire recipe (OreDictionary) for " + possibleOutputs.get(0).toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
List<ItemStack> possibleInputs = input.getItemStacks();
|
||||
if (possibleInputs.isEmpty())
|
||||
{
|
||||
LogUtil.log(Level.ERROR, "No matching item found for input '" + input.getItemName() + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
CampfireRecipeHandler.addRecipe(possibleInputs.get(0), possibleOutputs.get(0), experience);
|
||||
LogUtil.logDebug("Successfully loaded campfire recipe for " + possibleOutputs.get(0).toString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package net.einsteinsci.betterbeginnings.config.json;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class JsonCampfireRecipeHandler
|
||||
{
|
||||
private List<JsonCampfireRecipe> recipes = new ArrayList<>();
|
||||
private List<JsonCampfirePanRecipe> panRecipes = new ArrayList<>();
|
||||
|
||||
private List<String> includes = new ArrayList<>();
|
||||
private List<String> modDependencies = new ArrayList<>();
|
||||
|
||||
public JsonCampfireRecipeHandler()
|
||||
{ }
|
||||
|
||||
public JsonCampfireRecipeHandler(boolean includeTesting)
|
||||
{
|
||||
if (includeTesting)
|
||||
{
|
||||
// TESTING ONLY
|
||||
recipes.add(new JsonCampfireRecipe(new ItemStack(Blocks.bedrock), new ItemStack(Items.magma_cream), 0.5f));
|
||||
panRecipes.add(new JsonCampfirePanRecipe(new ItemStack(Blocks.bedrock), new ItemStack(Items.ender_eye), 2.0f));
|
||||
}
|
||||
}
|
||||
|
||||
public List<JsonCampfireRecipe> getRecipes()
|
||||
{
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public List<JsonCampfirePanRecipe> getPanRecipes()
|
||||
{
|
||||
return panRecipes;
|
||||
}
|
||||
|
||||
public List<String> getIncludes()
|
||||
{
|
||||
return includes;
|
||||
}
|
||||
|
||||
public List<String> getModDependencies()
|
||||
{
|
||||
return modDependencies;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,7 @@
|
|||
package net.einsteinsci.betterbeginnings.register;
|
||||
|
||||
import net.einsteinsci.betterbeginnings.config.BBConfig;
|
||||
import net.einsteinsci.betterbeginnings.config.json.AdvancedCraftingConfig;
|
||||
import net.einsteinsci.betterbeginnings.config.json.BrickOvenConfig;
|
||||
import net.einsteinsci.betterbeginnings.config.json.KilnConfig;
|
||||
import net.einsteinsci.betterbeginnings.config.json.SmelterConfig;
|
||||
import net.einsteinsci.betterbeginnings.config.json.*;
|
||||
import net.einsteinsci.betterbeginnings.items.ItemCharredMeat;
|
||||
import net.einsteinsci.betterbeginnings.register.recipe.*;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
@ -190,44 +187,44 @@ public class RegisterRecipes
|
|||
|
||||
private static void addCampfireRecipes()
|
||||
{
|
||||
CampfireRecipeHandler.addRecipe("logWood", new ItemStack(Items.coal, 1, 1), 0.15f);
|
||||
CampfireRecipeHandler.addRecipe(new ItemStack(Blocks.sponge, 1, 1), new ItemStack(Blocks.sponge, 1, 0), 0.1f);
|
||||
CampfireConfig.addRecipe("logWood", new ItemStack(Items.coal, 1, 1), 0.15f);
|
||||
CampfireConfig.addRecipe(new ItemStack(Blocks.sponge, 1, 1), new ItemStack(Blocks.sponge, 1, 0), 0.1f);
|
||||
|
||||
CampfireRecipeHandler.addRecipe(RegisterItems.roastingStickRawMallow,
|
||||
CampfireConfig.addRecipe(RegisterItems.roastingStickRawMallow,
|
||||
new ItemStack(RegisterItems.roastingStickCookedMallow), 0.5f);
|
||||
|
||||
CampfireRecipeHandler.addRecipe(Items.beef, new ItemStack(RegisterItems.charredMeat), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Items.porkchop, new ItemStack(RegisterItems.charredMeat), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Items.chicken, new ItemStack(RegisterItems.charredMeat, 1,
|
||||
CampfireConfig.addRecipe(Items.beef, new ItemStack(RegisterItems.charredMeat), 0.1f);
|
||||
CampfireConfig.addRecipe(Items.porkchop, new ItemStack(RegisterItems.charredMeat), 0.1f);
|
||||
CampfireConfig.addRecipe(Items.chicken, new ItemStack(RegisterItems.charredMeat, 1,
|
||||
ItemCharredMeat.META_CHICKEN), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(new ItemStack(Items.fish, 1, 0), new ItemStack(RegisterItems.charredMeat, 1,
|
||||
CampfireConfig.addRecipe(new ItemStack(Items.fish, 1, 0), new ItemStack(RegisterItems.charredMeat, 1,
|
||||
ItemCharredMeat.META_FISH), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(new ItemStack(Items.fish, 1, 1), new ItemStack(RegisterItems.charredMeat, 1,
|
||||
CampfireConfig.addRecipe(new ItemStack(Items.fish, 1, 1), new ItemStack(RegisterItems.charredMeat, 1,
|
||||
ItemCharredMeat.META_FISH), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Items.rabbit, new ItemStack(RegisterItems.charredMeat, 1,
|
||||
CampfireConfig.addRecipe(Items.rabbit, new ItemStack(RegisterItems.charredMeat, 1,
|
||||
ItemCharredMeat.META_RABBIT), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Items.mutton, new ItemStack(RegisterItems.charredMeat, 1,
|
||||
CampfireConfig.addRecipe(Items.mutton, new ItemStack(RegisterItems.charredMeat, 1,
|
||||
ItemCharredMeat.META_MUTTON), 0.1f);
|
||||
|
||||
if (BBConfig.canCampfireDoAllKilnStuff)
|
||||
{
|
||||
CampfireRecipeHandler.addRecipe(Items.clay_ball, new ItemStack(Items.brick), 0.35f);
|
||||
CampfireRecipeHandler.addRecipe(Blocks.clay, new ItemStack(Blocks.hardened_clay), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe("cobblestone", new ItemStack(Blocks.stone), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(new ItemStack(Blocks.stonebrick, 1, 0),
|
||||
CampfireConfig.addRecipe(Items.clay_ball, new ItemStack(Items.brick), 0.35f);
|
||||
CampfireConfig.addRecipe(Blocks.clay, new ItemStack(Blocks.hardened_clay), 0.1f);
|
||||
CampfireConfig.addRecipe("cobblestone", new ItemStack(Blocks.stone), 0.1f);
|
||||
CampfireConfig.addRecipe(new ItemStack(Blocks.stonebrick, 1, 0),
|
||||
new ItemStack(Blocks.stonebrick, 1, 2), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Blocks.cactus, new ItemStack(Items.dye, 1, 2), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Blocks.sand, new ItemStack(Blocks.glass), 0.1f);
|
||||
CampfireRecipeHandler.addRecipe(Blocks.netherrack, new ItemStack(Items.netherbrick), 0.1f);
|
||||
CampfireConfig.addRecipe(Blocks.cactus, new ItemStack(Items.dye, 1, 2), 0.1f);
|
||||
CampfireConfig.addRecipe(Blocks.sand, new ItemStack(Blocks.glass), 0.1f);
|
||||
CampfireConfig.addRecipe(Blocks.netherrack, new ItemStack(Items.netherbrick), 0.1f);
|
||||
}
|
||||
|
||||
CampfirePanRecipeHandler.addRecipe(Items.beef, new ItemStack(Items.cooked_beef), 0.1f);
|
||||
CampfirePanRecipeHandler.addRecipe(Items.porkchop, new ItemStack(Items.cooked_porkchop), 0.1f);
|
||||
CampfirePanRecipeHandler.addRecipe(Items.chicken, new ItemStack(Items.cooked_chicken), 0.1f);
|
||||
CampfirePanRecipeHandler.addRecipe(new ItemStack(Items.fish, 1, 0), new ItemStack(Items.cooked_fish, 1, 0), 0.1f);
|
||||
CampfirePanRecipeHandler.addRecipe(new ItemStack(Items.fish, 1, 1), new ItemStack(Items.cooked_fish, 1, 1), 0.1f);
|
||||
CampfirePanRecipeHandler.addRecipe(Items.rabbit, new ItemStack(Items.cooked_rabbit), 0.1f);
|
||||
CampfirePanRecipeHandler.addRecipe(Items.mutton, new ItemStack(Items.cooked_mutton), 0.1f);
|
||||
CampfireConfig.addPanRecipe(Items.beef, new ItemStack(Items.cooked_beef), 0.1f);
|
||||
CampfireConfig.addPanRecipe(Items.porkchop, new ItemStack(Items.cooked_porkchop), 0.1f);
|
||||
CampfireConfig.addPanRecipe(Items.chicken, new ItemStack(Items.cooked_chicken), 0.1f);
|
||||
CampfireConfig.addPanRecipe(new ItemStack(Items.fish, 1, 0), new ItemStack(Items.cooked_fish, 1, 0), 0.1f);
|
||||
CampfireConfig.addPanRecipe(new ItemStack(Items.fish, 1, 1), new ItemStack(Items.cooked_fish, 1, 1), 0.1f);
|
||||
CampfireConfig.addPanRecipe(Items.rabbit, new ItemStack(Items.cooked_rabbit), 0.1f);
|
||||
CampfireConfig.addPanRecipe(Items.mutton, new ItemStack(Items.cooked_mutton), 0.1f);
|
||||
}
|
||||
|
||||
public static void addAdvancedRecipes()
|
||||
|
|
|
@ -35,6 +35,14 @@ public class CampfirePanRecipeHandler
|
|||
return INSTANCE;
|
||||
}
|
||||
|
||||
public static void addRecipe(String input, ItemStack output, float experience)
|
||||
{
|
||||
for (ItemStack stack : OreDictionary.getOres(input))
|
||||
{
|
||||
instance().putLists(stack, output, experience);
|
||||
}
|
||||
}
|
||||
|
||||
public void putLists(ItemStack itemStack, ItemStack itemStack2, float experience)
|
||||
{
|
||||
smeltingList.put(itemStack, itemStack2);
|
||||
|
|
|
@ -16,9 +16,7 @@ public class CampfireRecipeHandler
|
|||
private Map experienceList = new HashMap();
|
||||
|
||||
private CampfireRecipeHandler()
|
||||
{
|
||||
// nothing here
|
||||
}
|
||||
{ }
|
||||
|
||||
public static void addRecipe(Item input, ItemStack output, float experience)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue