Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

mogo

Members
  • Joined

  • Last visited

  1. MinecraftByExample uses a CommonProxy class to structure his mod. Do you know of any examples that organize the proxy properly?
  2. 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
  3. 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?
  4. 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!

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.