diff --git a/src/main/java/li/cil/oc/api/IMC.java b/src/main/java/li/cil/oc/api/IMC.java index fecc03eef..3e2d7c5a3 100644 --- a/src/main/java/li/cil/oc/api/IMC.java +++ b/src/main/java/li/cil/oc/api/IMC.java @@ -166,9 +166,17 @@ public final class IMC { * Signature of callbacks must be: *
      * boolean select(ItemStack stack)
-     * ItemStack[] disassemble(ItemStack stack, ItemStack[] ingredients)
+     * Object disassemble(ItemStack stack, ItemStack[] ingredients)
      * 
*

+ * Where the Object returned from the disassemble + * method must be one of the following: + *

+ *

* Callbacks must be declared as packagePath.className.methodName. * For example: com.example.Integration.callbackMethod. * diff --git a/src/main/scala/li/cil/oc/common/template/TabletTemplate.scala b/src/main/scala/li/cil/oc/common/template/TabletTemplate.scala index 1ab9b3820..457c89c61 100644 --- a/src/main/scala/li/cil/oc/common/template/TabletTemplate.scala +++ b/src/main/scala/li/cil/oc/common/template/TabletTemplate.scala @@ -57,9 +57,9 @@ object TabletTemplate extends Template { def disassemble(stack: ItemStack, ingredients: Array[ItemStack]) = { val info = new TabletData(stack) val itemName = Constants.ItemName.TabletCase(info.tier) - Array(api.Items.get(itemName).createItemStack(1)) ++ info.items.collect { + (Array(api.Items.get(itemName).createItemStack(1), info.container.orNull) ++ info.items.collect { case Some(item) => item - }.drop(1) // Screen. + }.drop(1) /* Screen */).filter(_ != null) } def register() {