Jump to content

Giving a Block dimensional features (like ender chest)?


xKashanx

Recommended Posts

If you think about it logically...

 

Your block data will not exist in any _World_.  It will only exist as _data_, stored somewhere in your mod.  You will need a way to maintain this data across saves, and access it from any instance/copy of that block.

 

So... you will need to sideline data alongside the world (i.e. store your data in a file in the world directory).  This gets into the realm of writing custom .dat files, and using the onWorldLoad and onWorldSave events provided by Forge/FML.

 

Several other mods already do very similar things.  If you are looking for code examples--Look at the NEI code, ChickenBones stores the 'saved inventories' into a .dat file alongside the world (in the world folder).

 

 

 

 

Link to comment
Share on other sites

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.