Jump to content

[1.12.2] Handling "obsolete" blocks and items


Kinniken

Recommended Posts

Hi all,

 

I would like to know if there is a good way to make blocks and items "obsolete" in new versions of a mod. As far as I know there are two ways of dealing with this:

- Delete them from the mod. The cleanest, but popups an ugly-looking warning to players who upgrade existing worlds.

- Keep them in the mod, but make them unavailable. That avoids the issue above but then the mod is stuck with dead items/blocks for ever, removing them later just ends up with the same issue as in the first option.

 

Any better option?

 

Thanks

Link to comment
Share on other sites

5 hours ago, Kinniken said:

Any better option?

Um, what other options are you looking for exactly? You can either delete the stuff you don't need or don't. Can you describe what you want to happen? If the world loads up with some registry entries missing it will always tell the player about that and there is no way around that nor should there be.

Link to comment
Share on other sites

Some way of declaring an item obsolete so it neither generates warnings in old worlds nor get added to the registry of new worlds I guess.

 

"it will always tell the player about that and there is no way around that nor should there be."

 

If that is indeed the case then I have no choice... Ah well, would have been nice not to have to chose between keeping my code clean and scaring users with nasty-looking warnings.

 

Link to comment
Share on other sites

On 11/1/2018 at 10:04 AM, Kinniken said:

Some way of declaring an item obsolete so it neither generates warnings in old worlds nor get added to the registry of new worlds I guess.

You can do this in the MissingMappingEvent.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.