Update to new RebornCore. Added a config setting to disable railcrafts Iron Nugget to Steel Nugget recipe.
This commit is contained in:
parent
5588bda10b
commit
2c60034a88
9 changed files with 118 additions and 33 deletions
|
@ -7,6 +7,7 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
@ -17,6 +18,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import reborncore.api.recipe.RecipeHandler;
|
||||
import reborncore.common.util.CraftingHelper;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import reborncore.common.util.OreUtil;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.Core;
|
||||
|
@ -36,10 +38,8 @@ import techreborn.parts.powerCables.ItemStandaloneCables;
|
|||
import techreborn.utils.RecipeUtils;
|
||||
import techreborn.utils.StackWIPHandler;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import static techreborn.utils.OreDictUtils.getDictData;
|
||||
import static techreborn.utils.OreDictUtils.getDictOreOrNull;
|
||||
|
@ -104,6 +104,25 @@ public class ModRecipes {
|
|||
addScrapBoxloot();
|
||||
}
|
||||
|
||||
public static void postInit(){
|
||||
if(ConfigTechReborn.disableRailcraftSteelNuggetRecipe){
|
||||
Iterator iterator = FurnaceRecipes.instance().getSmeltingList().entrySet().iterator();
|
||||
Map.Entry entry;
|
||||
while (iterator.hasNext()) {
|
||||
entry = (Map.Entry) iterator.next();
|
||||
if (entry.getValue() instanceof ItemStack && entry.getKey() instanceof ItemStack) {
|
||||
ItemStack input = (ItemStack) entry.getKey();
|
||||
ItemStack output = (ItemStack) entry.getValue();
|
||||
System.out.println("====");
|
||||
if(ItemUtils.isInputEqual("nuggetSteel", output, true , true, false) && ItemUtils.isInputEqual("nuggetIron", input, true , true, false)){
|
||||
Core.logHelper.info("Removing a steelnugget smelting recipe");
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void addScrapBoxloot() {
|
||||
ScrapboxList.addItemStackToList(new ItemStack(Items.DIAMOND));
|
||||
ScrapboxList.addItemStackToList(new ItemStack(Items.STICK));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue