aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/interfaces
diff options
context:
space:
mode:
authorRaven Szewczyk <git@eigenraven.me>2024-07-27 07:12:04 +0100
committerGitHub <noreply@github.com>2024-07-27 13:12:04 +0700
commitc7b38c23c5b34a324256966f0a9335694fe8d63b (patch)
tree92aab6471745549a79c9f84f38c3076d9275ac4f /src/main/java/gregtech/api/interfaces
parentc55db9d91fa0a065d7565107a1eca679698eab04 (diff)
downloadGT5-Unofficial-c7b38c23c5b34a324256966f0a9335694fe8d63b.tar.gz
GT5-Unofficial-c7b38c23c5b34a324256966f0a9335694fe8d63b.tar.bz2
GT5-Unofficial-c7b38c23c5b34a324256966f0a9335694fe8d63b.zip
Optimize load time (#2774)
* Load time optimization: replace recipe reflection with mixin accessor * Save an inner loop allocation in StaticRecipeChangeLoaders * Move Bauble event handler from individual items to GT++ proxy * Update mobs info with more optimizations
Diffstat (limited to 'src/main/java/gregtech/api/interfaces')
-rw-r--r--src/main/java/gregtech/api/interfaces/IRecipeMutableAccess.java18
1 files changed, 18 insertions, 0 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();
+}