Description
Minecraft Version: 1.21.1 (and up)
NeoForge Version: 21.1.143
Logs: n/a
Steps to Reproduce:
- Create a block using the WeatheringCopperFullBlock constructor (properties don't matter)
- Add the block to the oxidizables data map
- Place block
- Wait
- Block will not randomtick.
An example of this in the wild is Create.
Description of issue:
Or at the very least the docs are wrong as they state using the vanilla class is enough:
https://docs.neoforged.net/docs/resources/server/datamaps/builtin#neoforgeoxidizables
Whether a block is random ticked is cached at registry freeze. WeatheringCopper{Variant}Block checks the map in WeatheringCopper for this (and does not check the isRandomlyTicking block property (that vanilla also doesn't set) so that's not a workaround), when the data map is obviously not loaded yet and so will not contain our new block. Thus without extending the class and overriding isRandomlyTicking, the block won't be ticked.