You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Required type Provided
t1: App<Mu<BiomeModifier>, T1> RecordCodecBuilder<ExampleBiomeModifier,HolderSet<Biome>>
t2: App<Mu<BiomeModifier>, T2> RecordCodecBuilder<ExampleBiomeModifier,Integer>
reason: no instance(s) of type variable(s) exist so that BiomeModifier conforms to ExampleBiomeModifier
I'm pretty new to Minecraft modding so this may be my issue, but I have copied the example code exactly and even tried modifying it to fix it myself and yet no luck. This might be a holdover from NeoForge 1.20 or maybe even older Forge implementation.
The text was updated successfully, but these errors were encountered:
Bittorn
changed the title
Creating Custom Biome Modifiers: example code throws error
[bug] Creating Custom Biome Modifiers: example code throws error
Feb 10, 2025
So, this is not an issue with the codec itself, but rather with the ambiguous generic being set. This can be fixed by holding an instance of Supplier<ExampleBiomeModifier> instead of the holder for the constant. The docs should probably be updated to use suppliers or the deferred holder objects by default, leaving holders only when absolutely necessary.
For the record, I am using NeoForge 21.1.82 for MC 1.21.1 for my project, but I have tested in the latest 21.4.88-beta and it throws the same error.
The relevant code:
Throws this error:
I'm pretty new to Minecraft modding so this may be my issue, but I have copied the example code exactly and even tried modifying it to fix it myself and yet no luck. This might be a holdover from NeoForge 1.20 or maybe even older Forge implementation.
The text was updated successfully, but these errors were encountered: