#Errors on building mod

1 messages · Page 1 of 1 (latest)

slender pasture
#

you're loading MinecraftClient on a common ModInitializer

untold kiln
#

I see! What would be the best way to fix this? Shifting it over to the ClientModInitilizer? (Sorry I am very new)

sage sparrow
#

!!splitsources

spring nacelleBOT
#
Split Sources

Split Sources provide a compile-time guarantee against calling client only Minecraft code or client only API on the server.

Client-only code can be placed in client, and code that is common to client and server can be placed in main. Client-only code can refer code in main, but not the other way.

Read more: Split Client and Common code - Fabric Loom

sage sparrow
#

yes use split sources to avoid issues like these