Move SoldererRecipe to API pkg

This commit is contained in:
Raoul Van den Berge
2016-09-16 21:32:36 +02:00
parent a749875137
commit c7f35257f3
2 changed files with 12 additions and 12 deletions

View File

@@ -1,15 +1,14 @@
package refinedstorage.apiimpl.solderer;
package refinedstorage.api.solderer;
import net.minecraft.item.ItemStack;
import refinedstorage.api.solderer.ISoldererRecipe;
import javax.annotation.Nonnull;
/**
* A solderer recipe with basic behaviour.
* Implement {@link ISoldererRecipe} for custom behaviour.
* A basic solderer recipe.
* Implement {@link ISoldererRecipe} for custom behavior.
*/
public class SoldererRecipeBasic implements ISoldererRecipe {
public class SoldererRecipe implements ISoldererRecipe {
private int duration;
private ItemStack result;
private ItemStack[] rows;
@@ -19,7 +18,7 @@ public class SoldererRecipeBasic implements ISoldererRecipe {
* @param duration The duration in ticks
* @param rows The rows of this recipe, has to be 3 rows (null for an empty row)
*/
public SoldererRecipeBasic(@Nonnull ItemStack result, int duration, ItemStack... rows) {
public SoldererRecipe(@Nonnull ItemStack result, int duration, ItemStack... rows) {
if (rows.length != 3) {
throw new IllegalArgumentException("Solderer recipe expects 3 rows, got " + rows.length + " rows");
}

View File

@@ -18,6 +18,7 @@ import refinedstorage.RefinedStorage;
import refinedstorage.RefinedStorageBlocks;
import refinedstorage.RefinedStorageItems;
import refinedstorage.api.RefinedStorageAPI;
import refinedstorage.api.solderer.SoldererRecipe;
import refinedstorage.apiimpl.autocrafting.registry.CraftingTaskFactoryNormal;
import refinedstorage.apiimpl.autocrafting.registry.CraftingTaskFactoryProcessing;
import refinedstorage.apiimpl.solderer.*;
@@ -208,7 +209,7 @@ public class CommonProxy {
);
// Disk Drive
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipeBasic(
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipe(
new ItemStack(RefinedStorageBlocks.DISK_DRIVE),
500,
new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
@@ -250,7 +251,7 @@ public class CommonProxy {
);
// Crafting Grid
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipeBasic(
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipe(
new ItemStack(RefinedStorageBlocks.GRID, 1, EnumGridType.CRAFTING.getId()),
500,
new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
@@ -259,7 +260,7 @@ public class CommonProxy {
));
// Pattern Grid
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipeBasic(
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipe(
new ItemStack(RefinedStorageBlocks.GRID, 1, EnumGridType.PATTERN.getId()),
500,
new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
@@ -268,7 +269,7 @@ public class CommonProxy {
));
// Fluid Grid
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipeBasic(
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipe(
new ItemStack(RefinedStorageBlocks.GRID, 1, EnumGridType.FLUID.getId()),
500,
new ItemStack(RefinedStorageItems.PROCESSOR, 1, ItemProcessor.TYPE_ADVANCED),
@@ -562,7 +563,7 @@ public class CommonProxy {
));
// Interface
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipeBasic(
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipe(
new ItemStack(RefinedStorageBlocks.INTERFACE),
200,
new ItemStack(RefinedStorageBlocks.IMPORTER),
@@ -571,7 +572,7 @@ public class CommonProxy {
));
// Fluid Interface
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipeBasic(
RefinedStorageAPI.instance().getSoldererRegistry().addRecipe(new SoldererRecipe(
new ItemStack(RefinedStorageBlocks.FLUID_INTERFACE),
200,
new ItemStack(Items.BUCKET),