Jump to content

Recommended Posts

Posted

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?

Posted

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?

Posted

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.

Posted

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.

Posted

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. (:

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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