Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:modding_imc [2015/04/23 16:06]
sangar
tutorial:modding_imc [2015/04/23 17:45] (current)
sangar
Line 8: Line 8:
 ``` ```
 { {
 +  name : `String` // Optional, name of the template, used in logging only.
   select : `String` // Name of a static method that's queried to determine whether the template applies to an item stack.   select : `String` // Name of a static method that's queried to determine whether the template applies to an item stack.
   validate : `String` // Name of static method to call for checking if assembly may be started. Returns additional lines for the assemble button and text for the status bar.   validate : `String` // Name of static method to call for checking if assembly may be started. Returns additional lines for the assemble button and text for the status bar.
   assemble : `String` // Name of a static method that is called to create the resulting ItemStack and energy to consume.   assemble : `String` // Name of a static method that is called to create the resulting ItemStack and energy to consume.
-  ​hostName ​: `String` // Name of a class or interface that is the environment or implemented by the environment that will represent the assembled device. Passed to HostAware drivers.+  ​hostClass ​: `String` // Name of a class or interface that is the environment or implemented by the environment that will represent the assembled device. Passed to HostAware drivers.
   componentSlots : `NBTTagList` {   componentSlots : `NBTTagList` {
     `NBTTagCompound` {     `NBTTagCompound` {
Line 38: Line 39:
 - Template selector: `boolean select(ItemStack stack)` - Template selector: `boolean select(ItemStack stack)`
 - Build validator: `Object[] validate(IInventory inventory)`  ​ - Build validator: `Object[] validate(IInventory inventory)`  ​
-  Values in the returned array: a boolean indicating whether the current configuration is valid for assembly, ​a string ​to display in the progress bar and a string ​array of lines to display in the assemble button tooltip. All are optional, defaulting to false, null and empty, respectively.+  Values in the returned array: a boolean indicating whether the current configuration is valid for assembly, ​an IChatComponent ​to display in the progress bar and an IChatComponent ​array of lines to display in the assemble button tooltip. All are optional, defaulting to false, null and empty, respectively.
 - Assembly callback: `Object[] assemble(IInventory inventory)`  ​ - Assembly callback: `Object[] assemble(IInventory inventory)`  ​
   Values in the returned array: the ItemStack to produce and a Double value, indicating the energy to consume (and thus the time it takes to build the object).   Values in the returned array: the ItemStack to produce and a Double value, indicating the energy to consume (and thus the time it takes to build the object).
Line 74: Line 75:
 ``` ```
 { {
-  name: `String` // This is optional, used only in logging. +  name : `String` // This is optional, used only in logging. 
-  select: `String` // Name of static method to call for checking if a stack can be disassembled. +  select : `String` // Name of static method to call for checking if a stack can be disassembled. 
-  disassemble:​ `String` // Name of static method to call to to get results for a disassembly operation.+  disassemble : `String` // Name of static method to call to to get results for a disassembly operation.
 } }
 ``` ```