Script not expressing expected behaviour
GreatestFool opened this issue ยท 2 comments
Issue Description:
I'm having issues with line 17 and 18. I have previously reached out on discord and got to talk with SkySom and Jared. But they were unable to help, Jared was uncertain
ItemUtils is supposed to return a list, and according to the print in the latest log, it does. It outputs the correct list like I expected, but the recipes do not recognize or accept the inputs given. Something along the lines of [ore:thisOreDoesNotExist] as you said. However, the script as it is now should at least put something into the recipes because as can be seen on line 79 to 89 in the latest log, it outputs the correct oredicts. At line 1551 and 1691 in the log for the oredict entry output, the relevant oredicts can be seen.
I've tested by removing the oredicts and adding custom ones to no luck, I've also made a fresh instance with only the relevant scripts and mods to no luck.
At this point I'm fairly certain that itemUtils does not actually support calling to oredict entries for some reason. Calling a material directly without using itemUtils works fine. If that is really the case, can direct oredict calling be added? At least for me, it is sorely needed.
What happens:
The script adds the recipes but the inputs are not recognized or accepted resulting in uncraftable item.
What you expected to happen:
Expected behavior is to add the materials in the correct sequence like the armor, or at the very least something to the recipes, the inputs should be valid as they're simply variations of oredict entries for plates.
Script used:
crafttweaker.log file:
Here's the output of oredict entries in the current instance.
Affected Versions:
- Minecraft: 1.12.2
- Forge: 14.23.5.2838
- Crafttweaker: 4.1.19
- Using a server: No.
Your most recent log file where the issue was present:
Here's the most recent log, that prints the list to the log.
So it was something like that. Thank you! I've been stuck on this for like two weeks but been to stubborn to give up completely.
ItemUtils.getItem is the Item Bracket Handler Not the OreDict bracket handler.
That means
val platename = "<ore:plate" + ores + ">";
val Plate = itemUtils.getItem(platename);
This cannot work.
What you could do would be something like
val Plate = oreDict["plate" ~ ores];
Also, itemUtils.getItem(...)
returns a single item.
itemUtils.getItemsByRegexRegistryName(...)
returns more than one item