[Bug]: Crash since Neoforge 20.6.78-beta
cech12 opened this issue ยท 0 comments
Minecraft Version
1.20.6
What happened?
When adding an item to a Curios slot, the game crashes.
The cause is, that Neoforge added a breaking change to their getResult
and setResult
methods in the events in version 20.6.78-beta.
Discord announcement:
NeoForge 20.6.78-beta introduces some changes around Event result handling.
This update removes the getResult and setResult methods in Event, and the associated magic @HasResult annotation. Events with a result now need to explicitly declare the getResult and setResult methods.
Additionally, the Event.Result enum is gone! We recommend that event authors either use the TriState class from NeoForge instead, or define a dedicated enum inside the event class.
NeoForge's own events have been updated accordingly. Every mod that calls .getResult or .setResult on an event will need changes.
(This only affects event results. Event cancellation is unchanged.)
How do you trigger this bug?
- start the game with at least one mod that adds a curios slot
- enter a world
- put an item into a Curios slot
- crash happens
Loader
NeoForge
Loader Version
20.6.78-beta
Mod Version
curios-neoforge-8.0.0-beta.3+1.20.6