This commit is contained in:
modmuss50 2018-01-31 09:46:26 +00:00
parent 6c9712956c
commit af57ef708d
2 changed files with 26 additions and 2 deletions

View file

@ -30,6 +30,8 @@ import techreborn.api.recipe.BaseRecipe;
public class GrinderRecipe extends BaseRecipe {
public boolean useOreDict = true;
public GrinderRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.grinderRecipe, tickTime, euPerTick / 10); //Done to buff energy usage to be more in line with ic2
if (input1 != null)
@ -38,6 +40,20 @@ public class GrinderRecipe extends BaseRecipe {
addOutput(output1);
}
public GrinderRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick, boolean useOreDict) {
super(Reference.grinderRecipe, tickTime, euPerTick / 10); //Done to buff energy usage to be more in line with ic2
this.useOreDict = useOreDict;
if (input1 != null)
addInput(input1);
if (output1 != null)
addOutput(output1);
}
@Override
public boolean useOreDic() {
return useOreDict;
}
@Override
public String getUserFreindlyName() {
return "Grinder";

View file

@ -39,7 +39,10 @@ import reborncore.common.util.ItemUtils;
import reborncore.common.util.OreUtil;
import reborncore.common.util.RebornCraftingHelper;
import techreborn.Core;
import techreborn.api.recipe.machines.*;
import techreborn.api.recipe.machines.BlastFurnaceRecipe;
import techreborn.api.recipe.machines.CompressorRecipe;
import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.api.recipe.machines.VacuumFreezerRecipe;
import techreborn.blocks.BlockOre;
import techreborn.compat.CompatManager;
import techreborn.config.ConfigTechReborn;
@ -260,7 +263,12 @@ public class ModRecipes {
if (ore) {
dust.setCount(2);
}
RecipeHandler.addRecipe(new GrinderRecipe(oreStack, dust, ore ? 270 : 200, ore ? 31 : 22));
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.
if(data[1].equalsIgnoreCase("lapis")){
useOreDict = false;
}
RecipeHandler.addRecipe(new GrinderRecipe(oreStack, dust, ore ? 270 : 200, ore ? 31 : 22, useOreDict));
}
}
}