From 473a981f5115db5f1c9f886e43f7252a41638412 Mon Sep 17 00:00:00 2001 From: Modmuss50 Date: Mon, 16 Nov 2015 20:27:45 +0000 Subject: [PATCH] Hot fix 0.6.1 and Fusion Reactor API --- build.gradle | 4 +- .../api/reactor/FusionReactorRecipe.java | 77 +++++++++++++++++++ .../reactor/FusionReactorRecipeHelper.java | 18 +++++ .../techreborn/api/reactor/package-info.java | 4 + 4 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 src/main/java/techreborn/api/reactor/FusionReactorRecipe.java create mode 100644 src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java create mode 100644 src/main/java/techreborn/api/reactor/package-info.java diff --git a/build.gradle b/build.gradle index c53c43498..9c11c1128 100644 --- a/build.gradle +++ b/build.gradle @@ -66,9 +66,9 @@ configurations { def ENV = System.getenv() if (ENV.BUILD_NUMBER) { - version = "0.6.0." + "${System.getenv().BUILD_NUMBER}" + version = "0.6.1." + "${System.getenv().BUILD_NUMBER}" } else { - version = "0.6.0.BUILD" + version = "0.6.1.BUILD" } minecraft { diff --git a/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java b/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java new file mode 100644 index 000000000..16576eb17 --- /dev/null +++ b/src/main/java/techreborn/api/reactor/FusionReactorRecipe.java @@ -0,0 +1,77 @@ +package techreborn.api.reactor; + + +import net.minecraft.item.ItemStack; + +public class FusionReactorRecipe { + + /** + * This is the item stack that is required in the top slot + * + * This cannot be null + */ + ItemStack topInput; + + /** + * This is the item stack that is required in the bottom slot + * + * This can be null + */ + ItemStack bottomInput; + + /** + * This is the output stack + * + * This cannot be null + */ + ItemStack output; + + + /** + * This is the required eu that has to be in the rector for the reaction to start + */ + double startEU; + /** + * This is the eu that changes every tick, set as a minus number to use power and a positive number to gen power. + */ + double euTick; + + /** + * This is the time in ticks that the reaction takes to complete + */ + int tickTime; + + public FusionReactorRecipe(ItemStack topInput, ItemStack bottomInput, ItemStack output, double startEU, double euTick, int tickTime) { + this.topInput = topInput; + this.bottomInput = bottomInput; + this.output = output; + this.startEU = startEU; + this.euTick = euTick; + this.tickTime = tickTime; + } + + + public ItemStack getTopInput() { + return topInput; + } + + public ItemStack getBottomInput() { + return bottomInput; + } + + public ItemStack getOutput() { + return output; + } + + public double getStartEU() { + return startEU; + } + + public double getEuTick() { + return euTick; + } + + public int getTickTime() { + return tickTime; + } +} diff --git a/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java b/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java new file mode 100644 index 000000000..5f2181f74 --- /dev/null +++ b/src/main/java/techreborn/api/reactor/FusionReactorRecipeHelper.java @@ -0,0 +1,18 @@ +package techreborn.api.reactor; + + +import java.util.ArrayList; + +public class FusionReactorRecipeHelper { + + public static ArrayList reactorRecipes = new ArrayList(); + + /** + * Register your reactor recipe here + * + * @param reactorRecipe + */ + public static void registerRecipe(FusionReactorRecipe reactorRecipe){ + reactorRecipes.add(reactorRecipe); + } +} diff --git a/src/main/java/techreborn/api/reactor/package-info.java b/src/main/java/techreborn/api/reactor/package-info.java new file mode 100644 index 000000000..f31b52998 --- /dev/null +++ b/src/main/java/techreborn/api/reactor/package-info.java @@ -0,0 +1,4 @@ +@API(apiVersion = "@MODVERSION@", owner = "techreborn", provides = "techrebornAPI") package techreborn.api.reactor; + +import cpw.mods.fml.common.API; +