Posted February 19, 201411 yr Hi I was trying to mod in 1.7 recently, and after 30 min. of trying to understand why this doesn't work: @EventHandler public void Init(FMLInitializationEvent event) { //Add blocks and Items customBeacon = new CustomBeacon().setBlockName("customBeacon").setCreativeTab(CreativeTabs.tabRedstone); //Block and Item game registry GameRegistry.registerBlock(customBeacon, beamcraft.MODID + "_" + CustomBeacon.class.getSimpleName()); } I found that copying it into PreInit will fix it. So the question is: Is there a) A way to know what to put where. b) A convention, on what order to do stuff in. c) A basic patter of why some things go in certain places. Ehhh, as far as I remember there used ti be no hardcoded limitaions on Init, PreInit and PostInit.
February 19, 201411 yr Hi A little bit more info here http://greyminecraftcoder.blogspot.com/2013/11/how-forge-starts-up-your-code.html Like DieSieben7 says, the @EventHandler in @Mod.java has a couple of lines of info on each one. -TGG
February 20, 201411 yr Author Hi, isn't this a bit outdated? I haven't seen people use proxies in a while. Additionaly, is there a way for me to register my ores only if no ore dictionary matches were found?
February 20, 201411 yr Hi, isn't this a bit outdated? I haven't seen people use proxies in a while. Additionaly, is there a way for me to register my ores only if no ore dictionary matches were found? How are proxies outdated? It's simply a design decision to use them or not - it has nothing to do with this or that update. The reason many mod authors use proxies is because they greatly facilitate distinguishing between client and server side during mod initialization, which is important for doing things like registering render classes, key handlers, etc., all of which you'd have to do manually otherwise. http://i.imgur.com/NdrFdld.png[/img]
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.