Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

140M Downloads

[Bug]: Crash since Neoforge 20.6.78-beta

cech12 opened this issue ยท 0 comments

commented

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?

  1. start the game with at least one mod that adds a curios slot
  2. enter a world
  3. put an item into a Curios slot
  4. crash happens

Loader

NeoForge

Loader Version

20.6.78-beta

Mod Version

curios-neoforge-8.0.0-beta.3+1.20.6

Relevant Log Outputs

https://pastebin.com/yTXiMKjc