aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api')
-rw-r--r--src/main/java/gregtech/api/interfaces/IRecipeMutableAccess.java18
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java4
2 files changed, 20 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/interfaces/IRecipeMutableAccess.java b/src/main/java/gregtech/api/interfaces/IRecipeMutableAccess.java
new file mode 100644
index 0000000000..5c6d931d5a
--- /dev/null
+++ b/src/main/java/gregtech/api/interfaces/IRecipeMutableAccess.java
@@ -0,0 +1,18 @@
+package gregtech.api.interfaces;
+
+import net.minecraft.item.ItemStack;
+
+/**
+ * Mixed-in interface for recipe classes in Forge and Vanilla that allows mutating the input and output items.
+ */
+public interface IRecipeMutableAccess {
+
+ /** @return Gets the current output item of the recipe */
+ ItemStack gt5u$getRecipeOutputItem();
+
+ /** Sets a new output item on the recipe */
+ void gt5u$setRecipeOutputItem(ItemStack newItem);
+
+ /** @return The raw list or array of recipe inputs, the exact type depends on the underlying recipe type. */
+ Object gt5u$getRecipeInputs();
+}
diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java
index 8c43a5334b..45df4ffeea 100644
--- a/src/main/java/gregtech/api/util/GT_ModHandler.java
+++ b/src/main/java/gregtech/api/util/GT_ModHandler.java
@@ -93,8 +93,8 @@ public class GT_ModHandler {
public static final List<IRecipe> sSingleNonBlockDamagableRecipeList = new ArrayList<>(1000);
private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<>();
- private static final List<IRecipe> sAllRecipeList = new ArrayList<>(5000),
- sBufferRecipeList = new ArrayList<>(1000);
+ // public for bartworks
+ public static final List<IRecipe> sAllRecipeList = new ArrayList<>(5000), sBufferRecipeList = new ArrayList<>(1000);
private static final List<ItemStack> delayedRemovalByOutput = new ArrayList<>();
private static final List<InventoryCrafting> delayedRemovalByRecipe = new ArrayList<>();