Updated API reference for recipes.

This commit is contained in:
drcrazy 2018-03-05 14:45:23 +03:00
parent 4a369d0ee7
commit 111ee7630a
60 changed files with 76 additions and 156 deletions

View file

@ -46,12 +46,12 @@ public class ScrapboxRecipeCrafter extends RecipeCrafter {
* @param outputSlots Slot IDs for output
*/
public ScrapboxRecipeCrafter(TileEntity parentTile, Inventory inventory, int[] inputSlots, int[] outputSlots) {
super(Reference.scrapboxRecipe, parentTile, 1, 1, inventory, inputSlots, outputSlots);
super(Reference.SCRAPBOX_RECIPE, parentTile, 1, 1, inventory, inputSlots, outputSlots);
}
@Override
public void updateCurrentRecipe(){
List<IBaseRecipeType> scrapboxRecipeList = RecipeHandler.getRecipeClassFromName(Reference.scrapboxRecipe);
List<IBaseRecipeType> scrapboxRecipeList = RecipeHandler.getRecipeClassFromName(Reference.SCRAPBOX_RECIPE);
int random = parentTile.getWorld().rand.nextInt(scrapboxRecipeList.size());
// Sets the current recipe then syncs
setCurrentRecipe(scrapboxRecipeList.get(random));

View file

@ -31,7 +31,7 @@ import techreborn.api.recipe.BaseRecipe;
public class AlloySmelterRecipe extends BaseRecipe {
public AlloySmelterRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.alloySmelterRecipe, tickTime, euPerTick);
super(Reference.ALLOY_SMELTER_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (input2 != null)

View file

@ -31,7 +31,7 @@ import techreborn.api.recipe.BaseRecipe;
public class AssemblingMachineRecipe extends BaseRecipe {
public AssemblingMachineRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.assemblingMachineRecipe, tickTime, euPerTick);
super(Reference.ASSEMBLING_MACHINE_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (input2 != null)

View file

@ -34,7 +34,7 @@ public class BlastFurnaceRecipe extends BaseRecipe {
public BlastFurnaceRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2, int tickTime,
int euPerTick, int neededHeat) {
super(Reference.blastFurnaceRecipe, tickTime, euPerTick);
super(Reference.BLAST_FURNACE_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (input2 != null)

View file

@ -34,7 +34,7 @@ public class CentrifugeRecipe extends BaseRecipe {
public CentrifugeRecipe(Object input1, ItemStack input2, ItemStack output1, ItemStack output2, ItemStack output3,
ItemStack output4, int tickTime, int euPerTick) {
super(Reference.centrifugeRecipe, tickTime, euPerTick);
super(Reference.CENTRIFUGE_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (input2 != null)

View file

@ -31,7 +31,7 @@ import techreborn.api.recipe.BaseRecipe;
public class ChemicalReactorRecipe extends BaseRecipe {
public ChemicalReactorRecipe(ItemStack input1, ItemStack input2, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.chemicalReactorRecipe, tickTime, euPerTick);
super(Reference.CHEMICAL_REACTOR_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (input2 != null)

View file

@ -31,7 +31,7 @@ import techreborn.api.recipe.BaseRecipe;
public class CompressorRecipe extends BaseRecipe {
public CompressorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.compressorRecipe, tickTime, euPerTick);
super(Reference.COMPRESSOR_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (output1 != null)

View file

@ -48,7 +48,7 @@ public class DistillationTowerRecipe extends BaseRecipe {
*/
public DistillationTowerRecipe(ItemStack inputCells, ItemStack input2, ItemStack output1, ItemStack output2,
ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
super(Reference.distillationTowerRecipe, tickTime, euPerTick);
super(Reference.DISTILLATION_TOWER_RECIPE, tickTime, euPerTick);
if (inputCells != null)
addInput(inputCells);
if (input2 != null)

View file

@ -33,7 +33,7 @@ public class ExtractorRecipe extends BaseRecipe {
boolean useOreDic = true;
public ExtractorRecipe(ItemStack input1, ItemStack output1, int tickTime, int euPerTick) {
super(Reference.extractorRecipe, tickTime, euPerTick);
super(Reference.EXTRACTOR_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (output1 != null)

View file

@ -33,7 +33,7 @@ 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
super(Reference.GRINDER_RECIPE, tickTime, euPerTick / 10); //Done to buff energy usage to be more in line with ic2
if (input1 != null)
addInput(input1);
if (output1 != null)
@ -41,7 +41,7 @@ public class GrinderRecipe extends BaseRecipe {
}
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
super(Reference.GRINDER_RECIPE, tickTime, euPerTick / 10); //Done to buff energy usage to be more in line with ic2
this.useOreDict = useOreDict;
if (input1 != null)
addInput(input1);

View file

@ -32,7 +32,7 @@ public class ImplosionCompressorRecipe extends BaseRecipe {
public ImplosionCompressorRecipe(ItemStack input1, ItemStack input2, ItemStack output1, ItemStack output2,
int tickTime, int euPerTick) {
super(Reference.implosionCompressorRecipe, tickTime, euPerTick);
super(Reference.IMPLOSION_COMPRESSOR_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (input2 != null)

View file

@ -34,7 +34,7 @@ public class IndustrialElectrolyzerRecipe extends BaseRecipe {
public IndustrialElectrolyzerRecipe(ItemStack inputCells, ItemStack input2, ItemStack output1, ItemStack output2,
ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
super(Reference.industrialElectrolyzerRecipe, tickTime, euPerTick);
super(Reference.INDUSTRIAL_ELECTROLYZER_RECIPE, tickTime, euPerTick);
if (inputCells != null)
addInput(inputCells);
if (input2 != null)

View file

@ -36,7 +36,7 @@ public class IndustrialGrinderRecipe extends BaseRecipe {
public IndustrialGrinderRecipe(ItemStack input1, FluidStack fluidStack, ItemStack output1,
ItemStack output2, ItemStack output3, ItemStack output4, int tickTime, int euPerTick) {
super(Reference.industrialGrinderRecipe, tickTime, euPerTick);
super(Reference.INDUSTRIAL_GRINDER_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (output1 != null)

View file

@ -36,7 +36,7 @@ public class IndustrialSawmillRecipe extends BaseRecipe {
public IndustrialSawmillRecipe(ItemStack input1, FluidStack fluidStack, ItemStack output1,
ItemStack output2, ItemStack output3, int tickTime, int euPerTick) {
super(Reference.industrialSawmillRecipe, tickTime, euPerTick);
super(Reference.INDUSTRIAL_SAWMILL_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (output1 != null)
@ -50,7 +50,7 @@ public class IndustrialSawmillRecipe extends BaseRecipe {
public IndustrialSawmillRecipe(ItemStack input1, FluidStack fluidStack, ItemStack output1,
ItemStack output2, ItemStack output3, int tickTime, int euPerTick, boolean canUseOreDict) {
super(Reference.industrialSawmillRecipe, tickTime, euPerTick);
super(Reference.INDUSTRIAL_SAWMILL_RECIPE, tickTime, euPerTick);
if (input1 != null)
addInput(input1);
if (output1 != null)

View file

@ -33,7 +33,7 @@ import techreborn.api.recipe.BaseRecipe;
public class RecyclerRecipe extends BaseRecipe {
public RecyclerRecipe(ItemStack input) {
super(Reference.recyclerRecipe, 0, 0);
super(Reference.RECYCLER_RECIPE, 0, 0);
addInput(input);
addOutput(TechRebornAPI.subItemRetriever.getPartByName("scrap"));
}

View file

@ -32,7 +32,7 @@ import techreborn.api.recipe.BaseRecipe;
public class ScrapboxRecipe extends BaseRecipe {
public ScrapboxRecipe(ItemStack output, int tickTime, int euPerTick) {
super(Reference.scrapboxRecipe, tickTime, euPerTick);
super(Reference.SCRAPBOX_RECIPE, tickTime, euPerTick);
if (output != null) {
addInput(new ItemStack(TechRebornAPI.getItem("SCRAP_BOX")));
addOutput(output);

View file

@ -31,7 +31,7 @@ import techreborn.api.recipe.BaseRecipe;
public class VacuumFreezerRecipe extends BaseRecipe {
public VacuumFreezerRecipe(ItemStack input, ItemStack output, int tickTime, int euPerTick) {
super(Reference.vacuumFreezerRecipe, tickTime, euPerTick);
super(Reference.VACUUM_FREEZER_RECIPE, tickTime, euPerTick);
if (input != null)
addInput(input);
if (output != null)