Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] 2-Dimensional arrays #23

Open
BarbasTheDog opened this issue Oct 25, 2014 · 3 comments
Open

[Request] 2-Dimensional arrays #23

BarbasTheDog opened this issue Oct 25, 2014 · 3 comments

Comments

@BarbasTheDog
Copy link

ie.: Arrays inside arrays. Possibly inside arrays inside arrays inside arrays inside arrays inside arrays...

I was creating a script today for unification of oreDicttionary entries for ores in a crafting grid and I realised the cleanest way to do it would be to use an array of arrays.

I do realise that this would probably be low on the list of priorities, and possibly a pain to implement, but it would be nice to eventually see it in.

@stanhebben
Copy link
Owner

It should already work (shaped ingredients use twodimensional arrays). Besides that, finishing the scripting engine is a top priority.

Soon you should also have classes, interfaces and structs to organize code better - it's an important step towards MineTweaker 3.1.

@BarbasTheDog
Copy link
Author

hmm... I may have been formatting them wrong, it threw all sorts of bytecode error when I tried. I'll give it a second try when I get to my computer.

Also, classes sounds awesome!

@BarbasTheDog
Copy link
Author

There we go. Just for testing purposes i wrote a script with just the following lines of code:

import minetweaker.item.IIngredient;
import minetweaker.item.IItemStack;
import minetweaker.oredict.IOreDictEntry;

var ores = [
    [<ThermalFoundation:Ore:0>, <ThermalFoundation:Ore:1>, <ThermalFoundation:Ore:2>, <ThermalFoundation:Ore:3>],
    [<ThermalFoundation:Ore:0>, <ThermalFoundation:Ore:1>, <ThermalFoundation:Ore:2>, <ThermalFoundation:Ore:3>]
];

And when I tried to /mt reload, this happened:
2014-11-01_21 22 46

btw, that whole closing/reopening the issue was me pressing the wrong button when commenting. ^ ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants