#Error launching game after changing how I register blocks seen in this video

16 messages · Page 1 of 1 (latest)

vagrant mantle
#

In this Minecraft Modding Tutorial, we are Updating our Fabric 1.21.1 Project to 1.21.3.

== 1.21 MODDING COURSES ==
▶️ NeoForge Modding with Minecraft 1.21.X:
https://url.kaupenjoe.net/CourseNeoForge121X
▶️ Fabric Modding with Minecraft 1.21.X:
https://url.kaupenjoe.net/CourseFabric121X
▶️ Forge Modding with Minecraft 1.21.X:
https...

▶ Play video
molten flume
#

you're doing unchecked casts in ModBlocks

vagrant mantle
molten flume
#

somewhere you are casting a nested class in Codec to IntProvider

sleek shell
# vagrant mantle what

i suggest learning about what type safety and type casting is in java if this crash log confuses you

vagrant mantle
#

then what am I supposed to enter here.

molten flume
#

give it IntProvider,Settings and not just Settings

#

the int provider is used to determine how much xp drops iirc

#

it's also abstract iirc so use intellij to figure out it's subclasses and pick the best fit for your use case

vagrant mantle
molten flume
#

createValidatingCodec returns a codec and not IntProvider

vagrant mantle
#

then what

molten flume
#

you need to give it an instance of IntProvider

#

IntProvider is abstract, which means it cannot be instantiated, so you have to use one of its 6 subclasses

sleek shell
#

just look at how vanilla does it