Can't define list with mixed values (liquids, items and integers)
whocares0101 opened this issue ยท 1 comments
Issue Description:
Can't define list with mixed values (liquids, items and integers).
val recycle_array = [
// output liquid, input item, item liquid value, heat required
[liquid:gold, minecraft:golden_sword, metal_ingot_value * 2, 541]
] as IAny[][];
What happens:
An exception.
Type integer (current frame, stack[7]) is not assignable to reference type
What you expected to happen:
Being able to define nested lists with mixed types and iterate over the list inside the outer list.
So "item" should always be a list from "recycle_array".
for item in recycle_array {
val output_liquid = item[0];
val input_item = item[1];
val item_liquid_value = item[2] * recycle_return;
val heat_required = item[3];
Value unpacking like python may be nice too e.g.
for output_liquid,input_item,item_liquid_value,heat_required in recycle_array {
Script used:
https://paste.ubuntu.com/26008945/
Minetweaker.log file:
https://paste.ubuntu.com/26008947/
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 1.12.2-forge1.12.2-14.23.0.2531
- Crafttweaker: CraftTweaker2-1.12-4.0.10