Jump to content

MC 1.12.2 Replacing registered blocks/items with yours.


winnetrie

Recommended Posts

Can we replace registered blocks/items with your own?

For example if i want to replace minecraft:stone with my modded stone, wich would in fact delete the  original block.

That brings also the next question. Can we delete a registered block from the registry?

I assume that could bring a lot of issues, especially if other classes depends on the original block.

I guess mods that use static fields to instantiate their stuff won't be compatible.

 

In the past days i have come up with alot of neat ideas, but that would require to replace some blocks and items from vanilla and maybe other mods too.

Are we even allowed to do this?

Link to comment
Share on other sites

Just register a new object with the same registry name as the old one, that will result in an override if the registry supports that.

 

43 minutes ago, winnetrie said:

I guess mods that use static fields to instantiate their stuff won't be compatible.

 

Depends. If they use those fields to reference their blocks for checks here and there then no, they won't be. If they are only using them to instantinate the block and never do anything with the field beyound that then they will be compatible.

 

Besides you always can resort to reflection to change the values of those fields if you need to. Although yes, there wouldn't be a need to do that if those mods used the ObjectHolder annotation.

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.