aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/api/objects')
-rw-r--r--src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java b/src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java
new file mode 100644
index 0000000000..e725d250cc
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/objects/minecraft/ItemPackage.java
@@ -0,0 +1,41 @@
+package gtPlusPlus.api.objects.minecraft;
+
+import gtPlusPlus.api.interfaces.RunnableWithInfo;
+import gtPlusPlus.core.handler.COMPAT_HANDLER;
+
+public abstract class ItemPackage implements RunnableWithInfo<String> {
+
+ public ItemPackage() {
+ // Register for late run
+ COMPAT_HANDLER.mObjectsToRunInPostInit.put(this);
+ init();
+ }
+
+ @Override
+ public final void run() {
+ generateRecipes();
+ }
+
+ @Override
+ public final String getInfoData() {
+ return errorMessage();
+ }
+
+ public abstract String errorMessage();
+
+ public abstract boolean generateRecipes();
+
+ private final void init() {
+ items();
+ blocks();
+ fluids();
+ }
+
+ public abstract void items();
+
+ public abstract void blocks();
+
+ public abstract void fluids();
+
+
+}