[1.16] Could not modify int map
friendlyhj opened this issue ยท 4 comments
Intro:
Could not modify int map
What you expected to happen:
Can modify int map
Script used:
var item_values = {} as int[string];
item_values["box"] = 1;
item_values["test"] = 9;
print(item_values["box"]);
crafttweaker.log file:
https://paste.ubuntu.com/p/NQdZnGth3m/
Environment:
- Minecraft Version: 1.16.5
- Forge Version: 36.0.42
- CraftTweaker Version: 7.1.0.145
- Are you using a server: no
Then it's a missed Boxing of the int.
In there, a call to the unboxingTypeVisitor is missing.
You'll most likely find that in more than one occasion when it comes to boxing, since ZC doesn't distinguish between them and in some cases I forgot to add that (since it was added later).
That specific place would need something like
AssocTypeID type = expression.target.type;
type.value.accept(type.value, boxingTypeVisistor);
javaWriter.invokeVirtual(...);
javaWriter.pop();