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
2023.2 ProcedureCompilation issues #3859
Comments
Thank you for the bug report. Please attach either example workspace or PTPL exported procedure file |
I'm not seeing any option to attach a PTPL file here. It isn't one of the supported file types. Do I need to add it as a link to download? |
Yes, or you could zip it and attach zip |
Can confirm the issue, happens with most blocks that return a boolean value and use pattern matching. This is caused by the parenthesis optimization, removing parentheses even when pattern matching happens. |
Could you take a look into this? I think you know the best how the optimization works and how best to approach this |
Another case of this was found here: https://mcreator.net/forum/96782/build-failed-after-new-update |
This also happen for the same reason |
#3863 seems to fail on 1.19.2 in some cases too |
Also having this issue. Please ping me if there's anything I can do to assist with investigating. |
Issue description
I've imported my working mod from the 2023.1 version to 2023.2 snapshot and get compilation errors with 1.19.2 and 1.19.4 builds.
C:\MCreator-Releases\MCreator20232\workspaces\gravels\src\main\java\net\mcreator\tmtmcgravels\procedures\CompletedAllGravelsProProcedure.java:51: error: illegal attempt to redefine an existing match binding
&& _plr.getAdvancements().getOrStartProgress(_plr.server.getAdvancements().getAdvancement(new ResourceLocation("tmtmcgravels:gravel_light_gray_ach"))).isDone() && entity instanceof ServerPlayer _plr
C:\MCreator-Releases\MCreator20232\workspaces\gravels\src\main\java\net\mcreator\tmtmcgravels\procedures\CompletedAllGravelsProProcedure.java:53: error: variable _plr is already defined in method execute(Event,Entity)
if (entity instanceof ServerPlayer _plr && _plr.level instanceof ServerLevel
How to reproduce this issue?
Imported the workspace ZIP file from 2023.1 to 2023.2 and after compilation was done, it though errors on the 6 Completion Procedures that check for existing achievements and then grants XP or XP Levels if all are done.
I've tried moving each group of two to a separate If/do block and that had no change in behavior. I've even tried double clicking on each of the advancement checks and re-selected the same Advancement but no difference in behavior.
Here is example of one of the references:
Operating system
Windows
Details
MCreator 2023.2 Snapshot
Forge 1.19.2 and 1.194
Example workspace
No response
Logs
https://pastebin.com/PVWGcFzf
Issue tracker rule checks (please read carefully)
The text was updated successfully, but these errors were encountered: