Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.12.2] Low <1> and <2> Fence recipes don't work #651

Open
sealchan1 opened this issue May 30, 2020 · 0 comments
Open

[1.12.2] Low <1> and <2> Fence recipes don't work #651

sealchan1 opened this issue May 30, 2020 · 0 comments

Comments

@sealchan1
Copy link

sealchan1 commented May 30, 2020

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.

@sealchan1 sealchan1 changed the title [1.12] Low <1> and <2> Fence recipes don't work [1.12.2] Low <1> and <2> Fence recipes don't work May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant