Jump to content

[1.19.4] Making a block oxidizable


JimiIT92

Recommended Posts

I'm trying to make some copper block variants and I want them to act like regular blocks, so over time they oxidize, they can be waxed with honeycomb and can be scraped with an axe.
Now, doing the blocks and making them work this way isn't really a problem (you can see a WIP implementation here: https://github.com/JimiIT92/MineWorld/blob/master/src/main/java/org/mineworld/block/IMWWeatheringBlock.java), however

as you might guess I've duplicated the WeatheringCopper interface from vanilla Minecraft and added my own logic to make it work with my custom block.

That's because what I've originally tried is to add values to the NEXT_BY_BLOCK map inside the FMLCommonSetupEvent, however that is an Immutable Map, and as such I can't add values to it (I get an UnsupportedOperationException if I try to do that).
In a similar way I've also tried to add the waxed variants to the HoneycombItem#WAXABLES map, but again that is immutable.

So, is there a way to actually modify these maps so you don't have to rewrite the same logic?

Don't blame me if i always ask for your help. I just want to learn to be better :)

Link to comment
Share on other sites

Understand, well I guess is fine then to do my own custom weathering interface and replicate the blocks as I need. May I ask why the PR went stale? Was it discarded by Forge or it required more work and eventually got forgotten?

Don't blame me if i always ask for your help. I just want to learn to be better :)

Link to comment
Share on other sites

23 hours ago, JimiIT92 said:

May I ask why the PR went stale? Was it discarded by Forge or it required more work and eventually got forgotten?

A mix of both. The triage team wanted a different implementation of the PR to which the author never addressed, which eventually left it stale for a year and ultimately closed.

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.



×
×
  • Create New...

Important Information

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