Posted April 19, 201312 yr Hey there. I have been reading a few different modders' code and I can see some differences in style. One thing that occurred to me is the different uses of the pre-init and init functions. Some modders use pre-init to load configuration files, blocks, items etc, and use init just for registering network GUI handlers. Others use pre-init just for config files and load everything else in init. I was wondering what the norm is and what differences (if any) there are in these implementations?
April 19, 201312 yr Author Hey there. I have been reading a few different modders' code and I can see some differences in style. One thing that occurred to me is the different uses of the pre-init and init functions. Some modders use pre-init to load configuration files, blocks, items etc, and use init just for registering network GUI handlers. Others use pre-init just for config files and load everything else in init. I was wondering what the norm is and what differences (if any) there are in these implementations?
April 19, 201312 yr Author Yes, Pahimar is one of the modder's I have been looking at. However, apart from saying 'different things need loaded at different times' (which is true) he doesn't give any reason why the blocks should be loaded there. I say should, as other modders load them in init and it works perfectly fine.
April 19, 201312 yr Author Yes, Pahimar is one of the modder's I have been looking at. However, apart from saying 'different things need loaded at different times' (which is true) he doesn't give any reason why the blocks should be loaded there. I say should, as other modders load them in init and it works perfectly fine.
April 19, 201312 yr Author Pahimar stated that CPW wants it this way. (Blocks, items etc. in the pre-init). Basically, it's where cpw wants it (and since he wrote FML, that's where it should go) Basically, if you do it there you will always get your textures for your blocks/items. If you do it later, no guarantee. I'll leave it to cpw to explain the mechanics though! So yeah. That's good enough for me. (:
April 19, 201312 yr Author Pahimar stated that CPW wants it this way. (Blocks, items etc. in the pre-init). Basically, it's where cpw wants it (and since he wrote FML, that's where it should go) Basically, if you do it there you will always get your textures for your blocks/items. If you do it later, no guarantee. I'll leave it to cpw to explain the mechanics though! So yeah. That's good enough for me. (:
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.