Integrated Dynamics

Integrated Dynamics

63M Downloads

Can't find a clean way to create a dict/mapping

tornewuff opened this issue · 3 comments

commented

Issue type:

  • ➕ Feature request

It'd be really useful to be able to map one constant value to another, for example to be able to map "oak wood" to "oak wood planks" for controlling crafting. The only way I can think of to do this with the current mod facilities is a deeply nested chain of choices, which is really hard to modify later (and also didn't work on my first attempt due to #484 which restricts what's a valid parameter to the choice operator).

Unless there's an easier way to do this that I'm missing, it would be really nice to have either an actual dict/mapping data type and associated operators (using a similar UI to lists to create it, except you'd have to select two types and each entry would have two inputs), or alternatively just the ability to nest lists inside lists (at which point a mapping can be simulated with a list of pairs).

This is probably nontrivial to ask for :)

commented

Good suggestion. Will require some work, but definitely possible.

commented

If you're okay with only strings being keys, NBT already lets you do this.

commented

NBT works for some cases, but it's really unwieldy to map things like items, which might need item IDs + metadata values (e.g. mapping each type of log to its corresponding type of plank).