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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

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