Having problems while looping through <ore:plankWood>.items
martinjanas opened this issue ยท 2 comments
Issue description
Hello, I have been recently learning Crafttweaker and trying to recreate the classic "1 log -> 2 planks" recipe, like in most expert modpacks.
Since I wanted to do it the smart way, via looping through oredict and not just hardcoding bunch of arrays, I've came across some problems.
In the loop, I have just simple recipes.addShaped() and print() for debugging.
First problem: The texture of the output item is just blank (black-pink) (See screenshot below!)
Second problem: The metadata id of the output item is always at 32767
I have tried to switch Crafttweakers for older version, even tried the same script in my Eclipse project, the same thing is happening again.
These problems wont happen if I hardcode the planks using bunch of arrays.
Is there a way how to make this work correctly without hardcoding bunch of arrays?
Screenshot: https://imgur.com/a/02s5QfC
Steps to reproduce
Just loop through the oreDictEntry.items
Script used
The crafttweaker.log file
Minecraft version
1.12
Forge version
14.23.5.2855
CraftTweaker version
4.1.20.659
Other relevant information
Other mods dont cause this problem.
Tested in Eclipse mod environment with examplemod.
The latest.log file
https://github.com/MinecraftForge/MinecraftForge/blob/a8b9abcb17e28007ed5f5e110997be8e499575e5/src/main/java/net/minecraftforge/oredict/OreDictionary.java#L89
OreDict does use 32767 as wildcard.
There is a solution, if the metadata is 32767, then iterate over all sub items.
https://github.com/ProjectHDS/Herodotus/blob/master/.minecraft/scripts/hds_main/utils/wood.zs
https://github.com/MinecraftForge/MinecraftForge/blob/a8b9abcb17e28007ed5f5e110997be8e499575e5/src/main/java/net/minecraftforge/oredict/OreDictionary.java#L89 OreDict does use 32767 as wildcard. There is a solution, if the metadata is 32767, then iterate over all sub items. https://github.com/ProjectHDS/Herodotus/blob/master/.minecraft/scripts/hds_main/utils/wood.zs
Thank you! Good to know, You saved me.