Posted April 30, 20196 yr Sorry if Forgelin isn't supported here, there was nowhere else to ask. If you post Java, IDEA automatically converts it into Kotlin, so it doesn't matter if you don't know Kotlin. Anyway, I set up a ClientProxy and ServerProxy that implement an IProxy interface I made. I added a public static val (like a constant in Java) of type IProxy? with an @SidedProxy annotation with the exact package names of both proxies. Both the proxies are public. When I run, I get an error saying this: java.lang.IllegalAccessException: Class net.minecraftforge.fml.common.ProxyInjector can not access a member of class com.fieldbox.upgrademod.ClientProxy with modifiers "private" I don't understand. The object ClientProxy is public, so it shouldn't be throwing this error, right? Proxy code in mod file (Kotlin) @JvmStatic @SidedProxy(clientSide = "com.fieldbox.upgrademod.ClientProxy", serverSide = "com.fieldbox.upgrademod.ServerProxy") public val proxy : IProxy? = null Proxy code in mod file (Java, but a bit rusty) @SidedProxyclientSide = "com.fieldbox.upgrademod.ClientProxy", serverSide = "com.fieldbox.upgrademod.ServerProxy"public static final IProxy
April 30, 20196 yr 7 minutes ago, fieldbox said: The object ClientProxy is public, so it shouldn't be throwing this error, right? Apparently it’s not public. You probably don’t need a proxy at all and can get rid of it completely btw. @diesieben07 knows plenty about kotlin About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
April 30, 20196 yr Author Ah, ok. There is a public keyword in there, but I'll just delete the proxy I guess. I'm assuming world.isRemote will be fine for any side related code?
April 30, 20196 yr 3 minutes ago, fieldbox said: I'm assuming world.isRemote will be fine for any side related code? Any logical side related code. Proxies deal with physical sides. The replacement for Proxies in 99.5% or cases is Sided EventSubscribers. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
April 30, 20196 yr Author Still not working with lateinit var and no nullable type, I'll just delete it.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.