229 - comment out all recipes as we can deal with these later + start thinking more about tags
This commit is contained in:
parent
ab2ce91e39
commit
91994e5a01
17 changed files with 133 additions and 169 deletions
|
@ -30,8 +30,6 @@ import techreborn.TechReborn;
|
||||||
|
|
||||||
@RebornRegister(TechReborn.MOD_ID)
|
@RebornRegister(TechReborn.MOD_ID)
|
||||||
public class ConfigTechReborn {
|
public class ConfigTechReborn {
|
||||||
@ConfigRegistry(config = "recipes", category = "railcraft", key = "disableRailcraftNugget", comment = "When true TechReborn will remove Railcraft's Iron Nugget to steel nugget recipe.")
|
|
||||||
public static boolean disableRailcraftSteelNuggetRecipe = false;
|
|
||||||
|
|
||||||
@ConfigRegistry(config = "items", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools")
|
@ConfigRegistry(config = "items", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools")
|
||||||
public static boolean enableGemArmorAndTools = true;
|
public static boolean enableGemArmorAndTools = true;
|
||||||
|
|
|
@ -68,7 +68,7 @@ public enum ModFluids {
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
ModFluids() {
|
ModFluids() {
|
||||||
this.name = this.toString().replace("_", "").toLowerCase(); //Is this ok?
|
this.name = this.name().replace("_", "").toLowerCase(); //Is this ok?
|
||||||
fluid = new Fluid(name, new ResourceLocation("techreborn", "fixme"), new ResourceLocation("techrebonr", "alsofixme"));
|
fluid = new Fluid(name, new ResourceLocation("techreborn", "fixme"), new ResourceLocation("techrebonr", "alsofixme"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,6 @@ package techreborn.init;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
import net.minecraftforge.fluids.FluidUtil;
|
import net.minecraftforge.fluids.FluidUtil;
|
||||||
|
@ -35,7 +34,6 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||||
import reborncore.api.recipe.RecipeHandler;
|
import reborncore.api.recipe.RecipeHandler;
|
||||||
import reborncore.common.registration.RebornRegister;
|
import reborncore.common.registration.RebornRegister;
|
||||||
import reborncore.common.util.ItemUtils;
|
import reborncore.common.util.ItemUtils;
|
||||||
import reborncore.common.util.OreUtil;
|
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
import techreborn.api.Reference;
|
import techreborn.api.Reference;
|
||||||
import techreborn.api.recipe.machines.GrinderRecipe;
|
import techreborn.api.recipe.machines.GrinderRecipe;
|
||||||
|
@ -56,10 +54,14 @@ import static techreborn.utils.TagUtils.joinDictName;
|
||||||
@RebornRegister(TechReborn.MOD_ID)
|
@RebornRegister(TechReborn.MOD_ID)
|
||||||
public class ModRecipes {
|
public class ModRecipes {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
//Gonna rescan to make sure we have an uptodate list
|
//Gonna rescan to make sure we have an uptodate list
|
||||||
//OreUtil.scanForOres();
|
//OreUtil.scanForOres();
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
CraftingTableRecipes.init();
|
CraftingTableRecipes.init();
|
||||||
SmeltingRecipes.init();
|
SmeltingRecipes.init();
|
||||||
ExtractorRecipes.init();
|
ExtractorRecipes.init();
|
||||||
|
@ -80,26 +82,12 @@ public class ModRecipes {
|
||||||
addVacuumFreezerRecipes();
|
addVacuumFreezerRecipes();
|
||||||
addGrinderRecipes();
|
addGrinderRecipes();
|
||||||
addCompressorRecipes();
|
addCompressorRecipes();
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void postInit() {
|
public static void postInit() {
|
||||||
if (ConfigTechReborn.disableRailcraftSteelNuggetRecipe) {
|
//IndustrialSawmillRecipes.init();
|
||||||
Iterator<Entry<ItemStack, ItemStack>> iterator = FurnaceRecipes.instance().getSmeltingList().entrySet().iterator();
|
|
||||||
Map.Entry<ItemStack, ItemStack> entry;
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
entry = iterator.next();
|
|
||||||
if (entry.getValue() instanceof ItemStack && entry.getKey() instanceof ItemStack) {
|
|
||||||
ItemStack input = (ItemStack) entry.getKey();
|
|
||||||
ItemStack output = (ItemStack) entry.getValue();
|
|
||||||
if (ItemUtils.isInputEqual("nuggetSteel", output, true, true, false) && ItemUtils.isInputEqual("nuggetIron", input, true, true, false)) {
|
|
||||||
TechReborn.LOGGER.info("Removing a steelnugget smelting recipe");
|
|
||||||
iterator.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
IndustrialSawmillRecipes.init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addCompressorRecipes() {
|
private static void addCompressorRecipes() {
|
||||||
|
@ -164,10 +152,10 @@ public class ModRecipes {
|
||||||
// int eutick = 2;
|
// int eutick = 2;
|
||||||
// int ticktime = 300;
|
// int ticktime = 300;
|
||||||
|
|
||||||
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
new ItemStack(Items.BONE),
|
// new ItemStack(Items.BONE),
|
||||||
new ItemStack(Items.DYE, 6, 15),
|
// new ItemStack(Items.DYE, 6, 15),
|
||||||
170, 19));
|
// 170, 19));
|
||||||
|
|
||||||
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
new ItemStack(Blocks.COBBLESTONE),
|
new ItemStack(Blocks.COBBLESTONE),
|
||||||
|
@ -218,10 +206,10 @@ public class ModRecipes {
|
||||||
// ItemDusts.getDustByName("ender_pearl", 2),
|
// ItemDusts.getDustByName("ender_pearl", 2),
|
||||||
// 200, 22));
|
// 200, 22));
|
||||||
|
|
||||||
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
new ItemStack(Blocks.LAPIS_ORE),
|
// new ItemStack(Blocks.LAPIS_ORE),
|
||||||
new ItemStack(Items.DYE, 10, 4),
|
// new ItemStack(Items.DYE, 10, 4),
|
||||||
170, 19));
|
// 170, 19));
|
||||||
|
|
||||||
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
// new ItemStack(Blocks.OBSIDIAN),
|
// new ItemStack(Blocks.OBSIDIAN),
|
||||||
|
@ -233,20 +221,20 @@ public class ModRecipes {
|
||||||
new ItemStack(Items.BLAZE_POWDER, 4),
|
new ItemStack(Items.BLAZE_POWDER, 4),
|
||||||
170, 19));
|
170, 19));
|
||||||
|
|
||||||
if (OreUtil.doesOreExistAndValid("stoneMarble")) {
|
// if (OreUtil.doesOreExistAndValid("stoneMarble")) {
|
||||||
// ItemStack marbleStack = getOre("stoneMarble");
|
// ItemStack marbleStack = getOre("stoneMarble");
|
||||||
// marbleStack.setCount(1);
|
// marbleStack.setCount(1);
|
||||||
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
// marbleStack, ItemDusts.getDustByName("marble"),
|
// marbleStack, ItemDusts.getDustByName("marble"),
|
||||||
// 120, 10));
|
// 120, 10));
|
||||||
}
|
// }
|
||||||
if (OreUtil.doesOreExistAndValid("stoneBasalt")) {
|
// if (OreUtil.doesOreExistAndValid("stoneBasalt")) {
|
||||||
// ItemStack marbleStack = getOre("stoneBasalt");
|
// ItemStack marbleStack = getOre("stoneBasalt");
|
||||||
// marbleStack.setCount(1);
|
// marbleStack.setCount(1);
|
||||||
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
// marbleStack, ItemDusts.getDustByName("basalt"),
|
// marbleStack, ItemDusts.getDustByName("basalt"),
|
||||||
// 120, 10));
|
// 120, 10));
|
||||||
}
|
// }
|
||||||
|
|
||||||
//See comments bellow, this allows the ore to go to the product when it sometimes goes straight to dust.
|
//See comments bellow, this allows the ore to go to the product when it sometimes goes straight to dust.
|
||||||
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(
|
||||||
|
@ -270,45 +258,45 @@ public class ModRecipes {
|
||||||
270, 31));
|
270, 31));
|
||||||
|
|
||||||
|
|
||||||
for (String oreDictionaryName : OreDictionary.getOreNames()) {
|
// for (String oreDictionaryName : OreDictionary.getOreNames()) {
|
||||||
if (isDictPrefixed(oreDictionaryName, "ore", "gem", "ingot")) {
|
// if (isDictPrefixed(oreDictionaryName, "ore", "gem", "ingot")) {
|
||||||
ItemStack oreStack = getDictOreOrEmpty(oreDictionaryName, 1);
|
// ItemStack oreStack = getDictOreOrEmpty(oreDictionaryName, 1);
|
||||||
String[] data = getDictData(oreDictionaryName);
|
// String[] data = getDictData(oreDictionaryName);
|
||||||
|
//
|
||||||
//High-level ores shouldn't grind here
|
// //High-level ores shouldn't grind here
|
||||||
if (data[0].equals("ore") && (
|
// if (data[0].equals("ore") && (
|
||||||
data[1].equals("tungsten") ||
|
// data[1].equals("tungsten") ||
|
||||||
data[1].equals("titanium") ||
|
// data[1].equals("titanium") ||
|
||||||
data[1].equals("aluminium") ||
|
// data[1].equals("aluminium") ||
|
||||||
data[1].equals("iridium") ||
|
// data[1].equals("iridium") ||
|
||||||
data[1].equals("saltpeter")||
|
// data[1].equals("saltpeter")||
|
||||||
data[1].equals("coal") || //Done here to skip going to dust so it can go to the output
|
// data[1].equals("coal") || //Done here to skip going to dust so it can go to the output
|
||||||
data[1].equals("diamond") || //For example diamond ore should go to diamonds not the diamond dust
|
// data[1].equals("diamond") || //For example diamond ore should go to diamonds not the diamond dust
|
||||||
data[1].equals("emerald") || //TODO possibly remove this and make it a bit more dyamic? (Check for furnace recipes? and then the block drop?)
|
// data[1].equals("emerald") || //TODO possibly remove this and make it a bit more dyamic? (Check for furnace recipes? and then the block drop?)
|
||||||
data[1].equals("redstone") ||
|
// data[1].equals("redstone") ||
|
||||||
data[1].equals("quartz")
|
// data[1].equals("quartz")
|
||||||
) ||
|
// ) ||
|
||||||
oreStack.isEmpty())
|
// oreStack.isEmpty())
|
||||||
continue;
|
// continue;
|
||||||
|
//
|
||||||
boolean ore = data[0].equals("ore");
|
// boolean ore = data[0].equals("ore");
|
||||||
TechReborn.LOGGER.debug("Ore: " + data[1]);
|
// TechReborn.LOGGER.debug("Ore: " + data[1]);
|
||||||
ItemStack dust = getDictOreOrEmpty(joinDictName("dust", data[1]), ore ? 2 : 1);
|
// ItemStack dust = getDictOreOrEmpty(joinDictName("dust", data[1]), ore ? 2 : 1);
|
||||||
if (dust.isEmpty() || dust.getItem() == null) {
|
// if (dust.isEmpty() || dust.getItem() == null) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
dust = dust.copy();
|
// dust = dust.copy();
|
||||||
if (ore) {
|
// if (ore) {
|
||||||
dust.setCount(2);
|
// dust.setCount(2);
|
||||||
}
|
// }
|
||||||
boolean useOreDict = true;
|
// boolean useOreDict = true;
|
||||||
//Disables the ore dict for lapis, this is becuase it is oredict with dye. This may cause some other lapis ores to not be grindable, but we can fix that when that arrises.
|
// //Disables the ore dict for lapis, this is becuase it is oredict with dye. This may cause some other lapis ores to not be grindable, but we can fix that when that arrises.
|
||||||
if(data[1].equalsIgnoreCase("lapis")){
|
// if(data[1].equalsIgnoreCase("lapis")){
|
||||||
useOreDict = false;
|
// useOreDict = false;
|
||||||
}
|
// }
|
||||||
RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(oreStack, dust, ore ? 270 : 200, ore ? 31 : 22, useOreDict));
|
// RecipeHandler.addRecipe(Reference.GRINDER_RECIPE, new GrinderRecipe(oreStack, dust, ore ? 270 : 200, ore ? 31 : 22, useOreDict));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addVacuumFreezerRecipes() {
|
static void addVacuumFreezerRecipes() {
|
||||||
|
@ -379,10 +367,4 @@ public class ModRecipes {
|
||||||
return FluidUtil.getFilledBucket(new FluidStack(fluid, Fluid.BUCKET_VOLUME));
|
return FluidUtil.getFilledBucket(new FluidStack(fluid, Fluid.BUCKET_VOLUME));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getOre(String name) {
|
|
||||||
if (OreDictionary.getOres(name).isEmpty()) {
|
|
||||||
throw new RuntimeException("Failed to get ore: " + name);
|
|
||||||
}
|
|
||||||
return OreDictionary.getOres(name).get(0).copy();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
16
src/main/java/techreborn/init/ModTags.java
Normal file
16
src/main/java/techreborn/init/ModTags.java
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
package techreborn.init;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.tags.BlockTags;
|
||||||
|
import net.minecraft.tags.Tag;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
public class ModTags {
|
||||||
|
|
||||||
|
public static Tag<Block> FENCE_IRON = get("fence_iron");
|
||||||
|
|
||||||
|
private static <T> Tag<T> get(String name) {
|
||||||
|
return (Tag<T>) new BlockTags.Wrapper(new ResourceLocation("techreborn", name));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -28,8 +28,6 @@ import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import reborncore.api.recipe.RecipeHandler;
|
import reborncore.api.recipe.RecipeHandler;
|
||||||
import reborncore.common.recipes.OreRecipeInput;
|
|
||||||
import reborncore.common.util.OreUtil;
|
|
||||||
import techreborn.api.Reference;
|
import techreborn.api.Reference;
|
||||||
import techreborn.api.recipe.machines.AlloySmelterRecipe;
|
import techreborn.api.recipe.machines.AlloySmelterRecipe;
|
||||||
|
|
||||||
|
@ -41,6 +39,8 @@ public class AlloySmelterRecipes extends RecipeMethods {
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
// OreRecipeInput ingotCopper3 = new OreRecipeInput("ingotCopper", 3);
|
// OreRecipeInput ingotCopper3 = new OreRecipeInput("ingotCopper", 3);
|
||||||
// OreRecipeInput dustCopper3 = new OreRecipeInput("dustCopper", 3);
|
// OreRecipeInput dustCopper3 = new OreRecipeInput("dustCopper", 3);
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class AlloySmelterRecipes extends RecipeMethods {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Red Alloy
|
// Red Alloy
|
||||||
if (OreUtil.doesOreExistAndValid("ingotRedAlloy")) {
|
// if (OreUtil.doesOreExistAndValid("ingotRedAlloy")) {
|
||||||
ItemStack redAlloyStack = getOre("ingotRedAlloy");
|
ItemStack redAlloyStack = getOre("ingotRedAlloy");
|
||||||
redAlloyStack.setCount(1);
|
redAlloyStack.setCount(1);
|
||||||
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
|
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
|
||||||
|
@ -115,10 +115,10 @@ public class AlloySmelterRecipes extends RecipeMethods {
|
||||||
RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
|
RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE,
|
||||||
new AlloySmelterRecipe(new ItemStack(Items.REDSTONE, 4), new ItemStack(Items.IRON_INGOT, 1),
|
new AlloySmelterRecipe(new ItemStack(Items.REDSTONE, 4), new ItemStack(Items.IRON_INGOT, 1),
|
||||||
redAlloyStack, 200, 16));
|
redAlloyStack, 200, 16));
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Blue Alloy
|
// Blue Alloy
|
||||||
if (oresExist("ingotBlueAlloy", "dustTeslatite")) {
|
// if (oresExist("ingotBlueAlloy", "dustTeslatite")) {
|
||||||
// ItemStack blueAlloyStack = getOre("ingotBlueAlloy");
|
// ItemStack blueAlloyStack = getOre("ingotBlueAlloy");
|
||||||
// blueAlloyStack.setCount(1);
|
// blueAlloyStack.setCount(1);
|
||||||
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE, new AlloySmelterRecipe(getOre("dustTeslatite", 4),
|
// RecipeHandler.addRecipe(Reference.ALLOY_SMELTER_RECIPE, new AlloySmelterRecipe(getOre("dustTeslatite", 4),
|
||||||
|
@ -126,7 +126,7 @@ public class AlloySmelterRecipes extends RecipeMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blue Alloy
|
// Blue Alloy
|
||||||
if (OreUtil.doesOreExistAndValid("ingotPurpleAlloy") && OreUtil.doesOreExistAndValid("dustInfusedTeslatite")) {
|
// if (OreUtil.doesOreExistAndValid("ingotPurpleAlloy") && OreUtil.doesOreExistAndValid("dustInfusedTeslatite")) {
|
||||||
// ItemStack purpleAlloyStack = getOre("ingotPurpleAlloy");
|
// ItemStack purpleAlloyStack = getOre("ingotPurpleAlloy");
|
||||||
// purpleAlloyStack.setCount(1);
|
// purpleAlloyStack.setCount(1);
|
||||||
// ItemStack infusedTeslatiteStack = getOre("ingotPurpleAlloy");
|
// ItemStack infusedTeslatiteStack = getOre("ingotPurpleAlloy");
|
||||||
|
@ -219,6 +219,8 @@ public class AlloySmelterRecipes extends RecipeMethods {
|
||||||
new AlloySmelterRecipe(new ItemStack(Blocks.SOUL_SAND, 1), new ItemStack(Items.GOLD_INGOT, 1),
|
new AlloySmelterRecipe(new ItemStack(Blocks.SOUL_SAND, 1), new ItemStack(Items.GOLD_INGOT, 1),
|
||||||
soulariumStack, 200, 16));
|
soulariumStack, 200, 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.init.Enchantments;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import reborncore.common.util.RebornCraftingHelper;
|
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
import techreborn.config.ConfigTechReborn;
|
import techreborn.config.ConfigTechReborn;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
|
@ -39,6 +38,8 @@ import techreborn.items.*;
|
||||||
* Created by Prospector
|
* Created by Prospector
|
||||||
*/
|
*/
|
||||||
public class CraftingTableRecipes extends RecipeMethods {
|
public class CraftingTableRecipes extends RecipeMethods {
|
||||||
|
/* TODO 1.13 :D
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
|
|
||||||
registerCompressionRecipes();
|
registerCompressionRecipes();
|
||||||
|
@ -404,4 +405,6 @@ public class CraftingTableRecipes extends RecipeMethods {
|
||||||
registerShaped(leggings, "GGG", "G G", "G G", 'G', material);
|
registerShaped(leggings, "GGG", "G G", "G G", 'G', material);
|
||||||
registerShaped(boots, "G G", "G G", 'G', material);
|
registerShaped(boots, "G G", "G G", 'G', material);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ import techreborn.items.DynamicCell;
|
||||||
* Created by Prospector
|
* Created by Prospector
|
||||||
*/
|
*/
|
||||||
public class ExtractorRecipes extends RecipeMethods {
|
public class ExtractorRecipes extends RecipeMethods {
|
||||||
|
/* TODO 1.13 :D
|
||||||
public static void init() {
|
public static void init() {
|
||||||
register(getStack(TRContent.RUBBER_SAPLING), TRContent.Parts.RUBBER.getStack(), false);
|
register(getStack(TRContent.RUBBER_SAPLING), TRContent.Parts.RUBBER.getStack(), false);
|
||||||
register(getStack(TRContent.RUBBER_LOG), TRContent.Parts.RUBBER.getStack(), false);
|
register(getStack(TRContent.RUBBER_LOG), TRContent.Parts.RUBBER.getStack(), false);
|
||||||
|
@ -75,4 +76,6 @@ public class ExtractorRecipes extends RecipeMethods {
|
||||||
static void register(ItemStack input, ItemStack output, boolean oreDict) {
|
static void register(ItemStack input, ItemStack output, boolean oreDict) {
|
||||||
RecipeHandler.addRecipe(Reference.EXTRACTOR_RECIPE, new ExtractorRecipe(input, output, 400, 2, oreDict));
|
RecipeHandler.addRecipe(Reference.EXTRACTOR_RECIPE, new ExtractorRecipe(input, output, 400, 2, oreDict));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ import techreborn.init.ModFluids;
|
||||||
*/
|
*/
|
||||||
public class FluidReplicatorRecipes {
|
public class FluidReplicatorRecipes {
|
||||||
|
|
||||||
|
/* TODO 1.13 :D
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
register(1, FluidRegistry.WATER, 40, 2);
|
register(1, FluidRegistry.WATER, 40, 2);
|
||||||
register(1, FluidRegistry.LAVA, 80, 2);
|
register(1, FluidRegistry.LAVA, 80, 2);
|
||||||
|
@ -57,4 +59,6 @@ public class FluidReplicatorRecipes {
|
||||||
}
|
}
|
||||||
FluidReplicatorRecipeList.addRecipe(new FluidReplicatorRecipe(input, output, ticks, euPerTick));
|
FluidReplicatorRecipeList.addRecipe(new FluidReplicatorRecipe(input, output, ticks, euPerTick));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,8 @@ import java.security.InvalidParameterException;
|
||||||
* Created by Prospector
|
* Created by Prospector
|
||||||
*/
|
*/
|
||||||
public class IndustrialElectrolyzerRecipes extends RecipeMethods {
|
public class IndustrialElectrolyzerRecipes extends RecipeMethods {
|
||||||
|
/* TODO 1.13 :D
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
register(getMaterial("electrolyzedwater", 6, Type.CELL), 760, 120, getMaterial("hydrogen", 4, Type.CELL), getMaterial("compressedair", Type.CELL));
|
register(getMaterial("electrolyzedwater", 6, Type.CELL), 760, 120, getMaterial("hydrogen", 4, Type.CELL), getMaterial("compressedair", Type.CELL));
|
||||||
register(getMaterial("water", Type.CELL), 20, 50, getMaterial("electrolyzedwater", Type.CELL));
|
register(getMaterial("water", Type.CELL), 20, 50, getMaterial("electrolyzedwater", Type.CELL));
|
||||||
|
@ -141,4 +143,6 @@ public class IndustrialElectrolyzerRecipes extends RecipeMethods {
|
||||||
static void register(ItemStack input, int ticks, int euPerTick, ItemStack... outputs) {
|
static void register(ItemStack input, int ticks, int euPerTick, ItemStack... outputs) {
|
||||||
register(input, ticks, euPerTick, true, outputs);
|
register(input, ticks, euPerTick, true, outputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,8 @@ import java.security.InvalidParameterException;
|
||||||
*/
|
*/
|
||||||
public class IndustrialGrinderRecipes extends RecipeMethods {
|
public class IndustrialGrinderRecipes extends RecipeMethods {
|
||||||
|
|
||||||
|
/* TODO 1.13 :D
|
||||||
|
|
||||||
static FluidStack WATER = new FluidStack(FluidRegistry.WATER, 1000);
|
static FluidStack WATER = new FluidStack(FluidRegistry.WATER, 1000);
|
||||||
static FluidStack MERCURY = new FluidStack(ModFluids.MERCURY, 1000);
|
static FluidStack MERCURY = new FluidStack(ModFluids.MERCURY, 1000);
|
||||||
static FluidStack SODIUM_PERSULFATE = new FluidStack(ModFluids.SODIUMPERSULFATE, 1000);
|
static FluidStack SODIUM_PERSULFATE = new FluidStack(ModFluids.SODIUMPERSULFATE, 1000);
|
||||||
|
@ -214,4 +216,6 @@ public class IndustrialGrinderRecipes extends RecipeMethods {
|
||||||
throw new InvalidParameterException("Invalid industrial grinder inputs: " + inputs);
|
throw new InvalidParameterException("Invalid industrial grinder inputs: " + inputs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.init.Items;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.InventoryCrafting;
|
import net.minecraft.inventory.InventoryCrafting;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.CraftingManager;
|
|
||||||
import net.minecraft.item.crafting.IRecipe;
|
import net.minecraft.item.crafting.IRecipe;
|
||||||
import net.minecraftforge.fluids.FluidRegistry;
|
import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.fluids.FluidStack;
|
import net.minecraftforge.fluids.FluidStack;
|
||||||
|
@ -51,6 +50,8 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
@RebornRegister(TechReborn.MOD_ID)
|
@RebornRegister(TechReborn.MOD_ID)
|
||||||
public class IndustrialSawmillRecipes extends RecipeMethods {
|
public class IndustrialSawmillRecipes extends RecipeMethods {
|
||||||
|
/* TODO 1.13 :D
|
||||||
|
|
||||||
static FluidStack WATER = new FluidStack(FluidRegistry.WATER, 1000);
|
static FluidStack WATER = new FluidStack(FluidRegistry.WATER, 1000);
|
||||||
|
|
||||||
@ConfigRegistry(config = "recipes", category = "sawmill", key = "plankCount", comment = "Number of planks the saw mill will ouput")
|
@ConfigRegistry(config = "recipes", category = "sawmill", key = "plankCount", comment = "Number of planks the saw mill will ouput")
|
||||||
|
@ -131,4 +132,6 @@ public class IndustrialSawmillRecipes extends RecipeMethods {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of TechReborn, licensed under the MIT License (MIT).
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018 TechReborn
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package techreborn.init.recipes;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
|
||||||
import techreborn.items.ItemCells;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
public class IngredientCell extends Ingredient {
|
|
||||||
|
|
||||||
public IngredientCell(ItemStack... stacks) {
|
|
||||||
super(stacks);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(@Nullable ItemStack itemStack) {
|
|
||||||
if(super.apply(itemStack)){
|
|
||||||
return ItemCells.isCellEqual(itemStack, this.getMatchingStacks()[0]);
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -29,7 +29,6 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import reborncore.common.util.OreUtil;
|
|
||||||
import reborncore.common.util.StringUtils;
|
import reborncore.common.util.StringUtils;
|
||||||
import techreborn.items.*;
|
import techreborn.items.*;
|
||||||
|
|
||||||
|
@ -89,9 +88,7 @@ public abstract class RecipeMethods {
|
||||||
}
|
}
|
||||||
if (object != null) {
|
if (object != null) {
|
||||||
if (object instanceof String) {
|
if (object instanceof String) {
|
||||||
if (OreUtil.doesOreExistAndValid((String) object)) {
|
throw new UnsupportedOperationException("Use tags");
|
||||||
return object;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
@ -107,24 +104,19 @@ public abstract class RecipeMethods {
|
||||||
return getMaterialObjectFromType(name, type);
|
return getMaterialObjectFromType(name, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static ItemStack getOre(String name, int count) {
|
public static ItemStack getOre(String name, int count) {
|
||||||
return OreUtil.getStackFromName(name, count).copy();
|
throw new UnsupportedOperationException("Use tags");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static ItemStack getOre(String name) {
|
public static ItemStack getOre(String name) {
|
||||||
return getOre(name, 1);
|
throw new UnsupportedOperationException("Use tags");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static boolean oresExist(String... names) {
|
public static boolean oresExist(String... names) {
|
||||||
for (String name : names) {
|
throw new UnsupportedOperationException("Use tags");
|
||||||
if (!OreDictionary.doesOreNameExist(name)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(OreDictionary.getOres(name).isEmpty()){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStack(Item item) {
|
public static ItemStack getStack(Item item) {
|
||||||
|
@ -135,12 +127,14 @@ public abstract class RecipeMethods {
|
||||||
return new ItemStack(item, count);
|
return new ItemStack(item, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static ItemStack getStack(Item item, boolean wildcard) {
|
public static ItemStack getStack(Item item, boolean wildcard) {
|
||||||
return getStack(item, 1, wildcard);
|
return getStack(item, 1, wildcard);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public static ItemStack getStack(Item item, int count, boolean wildcard) {
|
public static ItemStack getStack(Item item, int count, boolean wildcard) {
|
||||||
return getStack(item, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
|
throw new UnsupportedOperationException("Use tags");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStack(Block block) {
|
public static ItemStack getStack(Block block) {
|
||||||
|
@ -148,7 +142,7 @@ public abstract class RecipeMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStack(Block block, int count) {
|
public static ItemStack getStack(Block block, int count) {
|
||||||
return getStack(block, count, 0);
|
return getStack(block, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStack(Block block, boolean wildcard) {
|
public static ItemStack getStack(Block block, boolean wildcard) {
|
||||||
|
@ -156,15 +150,13 @@ public abstract class RecipeMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStack(Block block, int count, boolean wildcard) {
|
public static ItemStack getStack(Block block, int count, boolean wildcard) {
|
||||||
return getStack(block, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
|
throw new UnsupportedOperationException("Use tags");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemStack getStack(Block block, int count, int metadata) {
|
|
||||||
return getStack(Item.getItemFromBlock(block), count, metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Ingredient getCell(String name, int count){
|
public static Ingredient getCell(String name, int count){
|
||||||
return new IngredientCell(ItemCells.getCellByName(name, count));
|
throw new UnsupportedOperationException("fix me");
|
||||||
|
//return new IngredientCell(ItemCells.getCellByName(name, count));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Ingredient getCell(String name){
|
public static Ingredient getCell(String name){
|
||||||
|
|
|
@ -149,10 +149,10 @@ public class ScrapboxRecipes extends RecipeMethods {
|
||||||
register(getStack(Blocks.PUMPKIN));
|
register(getStack(Blocks.PUMPKIN));
|
||||||
register(getStack(Blocks.NETHERRACK));
|
register(getStack(Blocks.NETHERRACK));
|
||||||
register(getStack(Blocks.GRASS));
|
register(getStack(Blocks.GRASS));
|
||||||
register(getStack(Blocks.DIRT, 1, 0));
|
register(getStack(Blocks.DIRT, 1));
|
||||||
register(getStack(Blocks.DIRT, 1, 1));
|
register(getStack(Blocks.DIRT, 1));
|
||||||
register(getStack(Blocks.SAND, 1, 0));
|
register(getStack(Blocks.SAND, 1));
|
||||||
register(getStack(Blocks.SAND, 1, 1));
|
register(getStack(Blocks.SAND, 1));
|
||||||
register(getStack(Blocks.GLOWSTONE));
|
register(getStack(Blocks.GLOWSTONE));
|
||||||
register(getStack(Blocks.GRAVEL));
|
register(getStack(Blocks.GRAVEL));
|
||||||
// register(getStack(Blocks.HARDENED_CLAY));
|
// register(getStack(Blocks.HARDENED_CLAY));
|
||||||
|
@ -224,10 +224,6 @@ public class ScrapboxRecipes extends RecipeMethods {
|
||||||
RecipeHandler.addRecipe(Reference.SCRAPBOX_RECIPE, new ScrapboxRecipe(output, 20, 2));
|
RecipeHandler.addRecipe(Reference.SCRAPBOX_RECIPE, new ScrapboxRecipe(output, 20, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void registerDyable(Item item) {
|
|
||||||
for (int i = 0; i < 16; i++)
|
|
||||||
register(getStack(item, 1, i));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void registerDyable(Block block) {
|
static void registerDyable(Block block) {
|
||||||
//registerDyable(Item.getItemFromBlock(block));
|
//registerDyable(Item.getItemFromBlock(block));
|
||||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.init.recipes;
|
||||||
|
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import reborncore.common.util.RebornCraftingHelper;
|
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,6 +65,6 @@ public class SmeltingRecipes extends RecipeMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void register(ItemStack input, ItemStack output) {
|
static void register(ItemStack input, ItemStack output) {
|
||||||
RebornCraftingHelper.addSmelting(input, output);
|
//RebornCraftingHelper.addSmelting(input, output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
|
|
||||||
package techreborn.tiles.generator;
|
package techreborn.tiles.generator;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -37,8 +38,10 @@ import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||||
import reborncore.common.registration.RebornRegister;
|
import reborncore.common.registration.RebornRegister;
|
||||||
import reborncore.common.registration.config.ConfigRegistry;
|
import reborncore.common.registration.config.ConfigRegistry;
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
|
import techreborn.init.ModTags;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.init.TRTileEntities;
|
import techreborn.init.TRTileEntities;
|
||||||
|
import techreborn.utils.TagUtils;
|
||||||
|
|
||||||
@RebornRegister(TechReborn.MOD_ID)
|
@RebornRegister(TechReborn.MOD_ID)
|
||||||
public class TileLightningRod extends TilePowerAcceptor implements IToolDrop {
|
public class TileLightningRod extends TilePowerAcceptor implements IToolDrop {
|
||||||
|
@ -111,10 +114,9 @@ public class TileLightningRod extends TilePowerAcceptor implements IToolDrop {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValidIronFence(int y) {
|
public boolean isValidIronFence(int y) {
|
||||||
final Item itemBlock = Item.getItemFromBlock(this.world.getBlockState(new BlockPos(pos.getX(), y, pos.getZ())).getBlock());
|
Block block = this.world.getBlockState(new BlockPos(pos.getX(), y, pos.getZ())).getBlock();
|
||||||
for (final ItemStack fence : OreDictionary.getOres("fenceIron")) {
|
if(TagUtils.hasTag(block, ModTags.FENCE_IRON)){
|
||||||
if (fence.getItem() == itemBlock)
|
return true;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import net.minecraft.tags.Tag;
|
||||||
import net.minecraft.tags.TagCollection;
|
import net.minecraft.tags.TagCollection;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import techreborn.init.ModTags;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -118,4 +119,5 @@ public class TagUtils {
|
||||||
ItemStack stack, String oreName) {
|
ItemStack stack, String oreName) {
|
||||||
throw new UnsupportedOperationException("Move to tags");
|
throw new UnsupportedOperationException("Move to tags");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue