[1.12.2] Low <1> and <2> Fence recipes don't work
sealchan1 opened this issue ยท 0 comments
If you attempt to craft one of the two wood Low Fence recipes the Crafting Table will not identify the match to the recipe as indicated by the Spruce and Birch example recipe shown in JEI.
I puzzled over this and I think I found the problem in the code which parses the 3x3 crafting table recipe to determine if it is a match to any of the MultiFenceRecipePatterns. The current code logic in MultiFenceRecipeSize is failing to match the parsed InventoryCrafting string to the pattern defined in MultiFenceRecipePatterns:
new MultiFenceRecipePattern(2, 2, " 1 " + "0 0" + "010")
The reason the failure is occurring, I suspect, is that the pattern you are getting from the parsing in the match method is yielding " 0 1 1101" which is the opposite, in all cases, to the pattern that is defined above which yields " 1 0 0010". Basically the 1's and 0's are reversed. The issue arises because the parsing code assigns the first wood it encounters an index value of '0' since it is the first "type" of wood discovered and added to the "types" array. However, I assume, based on the logic of index 0 being the "primary" wood type and index 1 being the "secondary" wood type, having the "secondary" wood type show up first as the parsing code does its work is the issue. However, if other code assumes that primary = 0 and secondary = 1, I/we will have to take care not to cause a recipe reversal (reversal of wood types) issue which was in play the last time I submitted a defect here.
I suspect the fix is to add logic which checks if the reversed pattern matches and then calling createFence with the types swapped so that the proper Low Fence is yielded on the Crafting Table.
I am going to work on providing a fix for this and submit a pull request this next week. I will test before I submit. It will be my first time attempting to configure my Eclipse environment to build a GitHub repository that is not mine, setup a test environment and provide a solution once I have tested it, so I am not sure how long it will take me.