Posted April 18, 201312 yr I'm starting to use nested classes towards my mod, just for fun and testing. I'm actually trying to make nested classes of the configs, networkmod, proxy's and other stuff into one big mod file. Its possible, altought there is a simply way, I want to try nested classes. I get this error after I attempt to run the mod: java.lang.IllegalAccessException: Class cpw.mods.fml.common.network.NetworkModHandler can not access a member of class il.steamcraft.common.Steamcraft$NetworkHandler with modifiers "" while its trying to 'tryCreatingPacketHandler()'. I'm using this as my NetworkHandler nest. static class NetworkHandler implements IPacketHandler, IGuiHandler { @Override public void onPacketData(INetworkManager INM, Packet250CustomPayload packet, Player player) {} @Override public Object getServerGuiElement(int var1, EntityPlayer EP, World W, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int var1, EntityPlayer EP, World W, int x, int y, int z) { return null; } } Nothing special, just a stock code. And I'm using this above my main class @Mod(modid = Steamcraft.SteamcraftInfo.ModID, version = Steamcraft.SteamcraftInfo.Version) @NetworkMod(channels = { Steamcraft.SteamcraftInfo.ModID }, packetHandler = Steamcraft.NetworkHandler.class, clientSideRequired=true) public class Steamcraft { Could anyone help me with this, and please correct me if its 'impossible' due to Forge constructor pre-requests.
April 18, 201312 yr Author I'm starting to use nested classes towards my mod, just for fun and testing. I'm actually trying to make nested classes of the configs, networkmod, proxy's and other stuff into one big mod file. Its possible, altought there is a simply way, I want to try nested classes. I get this error after I attempt to run the mod: java.lang.IllegalAccessException: Class cpw.mods.fml.common.network.NetworkModHandler can not access a member of class il.steamcraft.common.Steamcraft$NetworkHandler with modifiers "" while its trying to 'tryCreatingPacketHandler()'. I'm using this as my NetworkHandler nest. static class NetworkHandler implements IPacketHandler, IGuiHandler { @Override public void onPacketData(INetworkManager INM, Packet250CustomPayload packet, Player player) {} @Override public Object getServerGuiElement(int var1, EntityPlayer EP, World W, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int var1, EntityPlayer EP, World W, int x, int y, int z) { return null; } } Nothing special, just a stock code. And I'm using this above my main class @Mod(modid = Steamcraft.SteamcraftInfo.ModID, version = Steamcraft.SteamcraftInfo.Version) @NetworkMod(channels = { Steamcraft.SteamcraftInfo.ModID }, packetHandler = Steamcraft.NetworkHandler.class, clientSideRequired=true) public class Steamcraft { Could anyone help me with this, and please correct me if its 'impossible' due to Forge constructor pre-requests.
April 18, 201312 yr switch the modifier from static to public static I think its my java of the variables.
April 18, 201312 yr switch the modifier from static to public static I think its my java of the variables.
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.