Removing saw recipes with multiple outputs creates errors in the crafttweaker log but still removes the recipe.
Jandakast opened this issue ยท 10 comments
Issue Description:
Attempting to remove saw recipes with multiple outputs generates errors in the crafttweaker log but still removes the recipe.
What happens:
Error is logged in the Crafttweaker log but the recipe is removed.
[AVAILABLE][CLIENT][ERROR] Error removing Saw Recipe for Cut Leather (Tanned),Leather Belt,Wooden Gear,Oak Wood Planks Siding
What you expected to happen:
No errors in the Crafttweaker.log since it is actually removing the recipe
Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):
https://gist.github.com/Jandakast/000ff627c57829b18226080b98329cfc
Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):
https://gist.github.com/Jandakast/3513b7eb1c442bfad208da82bf2fbf0d
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 2666 (This happens in 2668 and 2650 as well)
- Crafttweaker: 4.1.6
- ModTweaker: 4.0.10
- MTLib: 3.0.4
- BetterWithMods: 2.1.8
Your most recent log file where the issue was present:
https://gist.github.com/Jandakast/990bb9301b6280d289dfbb9788b0be33
might thou test that this still happens on the newest dev build of bwm because i'm staring at list.removeAll and it says it will return true if the list changed.
on that note if you want to remove all of the saw recycling stuff, you can disable SawRecycling in the config
in terms of that error, there's something badly wrong with... something. My best guess is that that script line fires twice (somehow) either by user error or just a crafttweaker oddity. Or there's a bug in ArrayList::removeAll. Who knows anymore? Sooo.... we're just gonna make it always return true, so it never returns an error :D
As far as I can tell there is no config option called SawRecycling. Unless this is a hidden config option that you don't reference in your code by that name.
I truly hope you are joking about just returning true for everything instead of finding and fixing the actual issue.
SawRecycling is found in the BWA config
And fortunately I tested it before changing code, as I cannot reproduce this. So this is a user error.
Actually @DaedalusGame your code (atleast the code you/prime PR'd and I havn't touched since) is just bad
https://github.com/jaredlll08/ModTweaker/blob/1.12/src/main/java/com/blamejared/compat/betterwithmods/base/blockrecipes/BlockRecipeRemove.java#L32-L34
If any of those recipes don't exist (such as the cut tanned leather recipe that doesn't exist in this instance), it just complains, but removes the rest.
wrong, removeAll outputs true if the list is changed, so if any recipe exists it will not complain
@Jandakast on further inspection, the recipe you are trying to remove is added by Better With ADDONS, which you do not have installed.
Thanks @jaredlll08 I didn't realize these saw recipes were added by BWA. The main pack these are for takes 6 minutes to launch so I spun up a smaller testing pack to save time. Also just tested the full Pack with the BetterWithMods-1.12-2.1.8-477.jar build and I'm not seeing the errors anymore. Thank you again for the help!
@Jandakast the method removes a single recipe that has multiple outputs, not a single method to remove multiple recipes with single outputs, which you appear to be using it for.