Initializing data structures on declaration

The place to request or discuss MineTweaker features.

Initializing data structures on declaration

Postby leagris » Sat Nov 07, 2015 2:17 pm

Wiki doc on structured data types (ZenCode_specification#Associative_Arrays) is a bit lean.

If I want to add recipes in a loop from a data set example:
: [Select all] [/] [] ()
  1. for i,v in myRecipes {
  2.   addShaped(v.output,v.inputs);
  3. }
GeSHi © Codebox Plus

How shall I initialise myRecipes as object[], given each object contains two member? An IItemStack named output and a 2d IIngredient array named input?
Posts: 1
Joined: Sat Nov 07, 2015 12:26 pm

Return to Feature Discussions

Who is online

Users browsing this forum: No registered users and 1 guest