Everything posted by mogo
-
java.lang.ClassNotFoundException of my ClientProxy
MinecraftByExample uses a CommonProxy class to structure his mod. Do you know of any examples that organize the proxy properly?
-
java.lang.ClassNotFoundException of my ClientProxy
I know C++ very well and I know java decently well (from CS classes in high school). I definitely prefer text-based tutorials to video. MinecraftByExample does seem like a really good resource, I think I'll try to learn from that. Thanks a lot for the advice
-
java.lang.ClassNotFoundException of my ClientProxy
I don't really know. I'm trying to learn through McJty's tutorials. Is there a better source I should try to learn from?
-
java.lang.ClassNotFoundException of my ClientProxy
I've read dozens of other posts about people with the same error, but in all of theirs they just had the directory of their file typed in wrong when making their @SidedProxy wrong. I'm pretty sure mine is right, yet my Minecraft crashes only a few seconds into running, with this error: The directory of my mod: Image PepisMod.java package andrewmogo; import andrewmogo.proxy.CommonProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.logging.log4j.Logger; @Mod(modid = PepisMod.MODID, name = PepisMod.MODNAME, version = PepisMod.MODVERSION, dependencies = "required-after:forge@[14.23.5.2814,)", useMetadata = true) public class PepisMod { public static final String MODID = "pepismod"; public static final String MODNAME = "Pepis Mod"; public static final String MODVERSION= "1.0"; //C:\Users\Andrew\Desktop\mineman modding\myMod\src\main\java\andrewmogo\pepismod\proxy\CommonProxy.java @SidedProxy(clientSide = "andrewmogo.proxy.ClientProxy", serverSide = "andrewmogo.proxy.ServerProxy") public static CommonProxy proxy; @Mod.Instance public static PepisMod instance; public static Logger logger; @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { logger = event.getModLog(); proxy.preInit(event); } @Mod.EventHandler public void init(FMLInitializationEvent e) { proxy.init(e); } @Mod.EventHandler public void postInit(FMLPostInitializationEvent e) { proxy.postInit(e); } } ClientProxy.java: package andrewmogo.proxy; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; @Mod.EventBusSubscriber(Side.CLIENT) public class ClientProxy extends CommonProxy { @Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); } @SubscribeEvent public static void registerModels(ModelRegistryEvent event) { } } CommonProxy.java: package andrewmogo.proxy; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @Mod.EventBusSubscriber // This means we can use events here, like registering blocks and items public class CommonProxy { // This is for stuff run on both client and server side public void preInit(FMLPreInitializationEvent e) { } public void init(FMLInitializationEvent e) { } public void postInit(FMLPostInitializationEvent e) { } @SubscribeEvent public static void registerBlocks(RegistryEvent.Register<Block> event) { } @SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event) { } } I'd appreciate any replies with ideas!
IPS spam blocked by CleanTalk.