The bucket item should be pretty straight forward and is handled in a general purpose registry file. I basically just copied the vanilla water bucket registry, and changed to what I needed. The fluid block and registry however gave me some headache. You prolly want to adapt to changes in 1.17+, but most of the code should be working out of the box.
I'm using a NoFeature generator to spawn block types of ores, that resemble deposits at lower layers. Right now they look the same as the ore blocks some levels lower, but I actually want them to exist as items on the surface.
In the past I was utilizing onBlockAdded(), and dropBlockAsItem() directly inside my blocks to do exactly that, but this does no longer seem to be an option, because any of the block methods, that handle "BlockAdded" logic can't be used during world generation, when starting a new game. Which is unfortunate to say the least.
The problem I'm facing right now: dropping an item from block after it is placed in the world, without player interaction, doesn't seem to be an option either or I just fail to find it. At least none of the block or item .classes contain anything useful.
Can someone direct me where to look, please?