Open MattiDragon opened 8 months ago
This can likely be best fixed by allowing the jars to be split with splitMinecraftJar()
without the adding the client only annotations. Care needs to be taken to ensure that the jar will get a diffrent name when this option is enabled. The API would be something like:
loom {
splitMinecraftJar() {
enableEnvAnnotations = false
}
}
Loom currently adds
@Environment(EnvType.CLIENT)
to all client only minecraft classes with no way to disable. This isn't great as the annotations come from fabric loader, which isn't required for loom to work. The primary case where loom is used without loader is in multiloader setups, where loom is used for managing minecraft in the common subproject. Adding these annotations without loader on classpath results in ugly errors in IDEs and log spam from APs unable to resolve the annotations in the form ofwarning: unknown enum constant EnvType.CLIENT
.An option to disable environment annotations (or possibly to swap the out for a custom class) would improve the experiance when using loom for multiloader projects.