Cloth Config API (Fabric/Forge/NeoForge)

Cloth Config API (Fabric/Forge/NeoForge)

169M Downloads

Support translatable config options in server-only compilation

haykam821 opened this issue ยท 4 comments

commented

When setting serverOnlyMinecraftJar() with Loom 0.11+, classes implementing Translatable fail to compile:

./common/src/main/java/io/github/haykam821/collectater/config/ParasiteRenderMode.java:5: error: cannot access ParentElement
public enum ParasiteRenderMode implements Translatable {
       ^
  class file for net.minecraft.client.gui.ParentElement not found
warning: unknown enum constant Env.CLIENT
  reason: class file for com.demonwav.mcdev.annotations.Env not found
./common/src/main/java/io/github/haykam821/collectater/config/ParasiteRenderMode.java:18: error: method does not override or implement a method from a supertype
        @Override
        ^
commented

don't care

commented
@Mixin(value = ParasiteRenderMode.class, remap = false)
public class ParasiteRenderModeMixin implements Translatable {
	@Shadow
	@Final
	private String key;

	@Override
	public String getKey() {
		return this.key;
	}
}
commented

shouldn't loom be the one to strip it??

commented

I don't understand why you want to implement Translatable on a server only jar, it should be only used on the client config gui