![Ore Growth](https://media.forgecdn.net/avatars/thumbnails/885/662/256/256/638321294520165143_animated.gif)
[Feature] Allow fully grown crystals to drop their resource if the ore block is broken/moved.
Wilevar opened this issue ยท 5 comments
Is your feature request related to a problem? Please describe.
I've been considering some automation options and realized that when the ore block a crystal is growing from is mined, even fully grown crystals don't drop their resource when they too break.
Describe the solution you'd like
I would like for fully grown ore crystals to drop their resource if the ore block they're growing from is mined or moved. Doing so would allow pistons to "shake" the crystals off an ore by moving it, making vanilla automation of harvesting ore crystals possible.
any news on this or other ways to automate the harvesting of the crystals when fully gorwth?
The crystals are implemented as simple blocks which don't have a block entity. I did this for performance reasons as I expect a good amount of crystals to spawn throughout the world and having a block entity for each would likely impact performance. However, this means the crystals can't store any additional information and thus 'don't know' what kind of block's crystal they are. Any time that info is needed, Ore Growth simply checks what block the crystal is placed on.
The problem when breaking the block the crystal is placed on is that Minecraft first removes the block and then informs any surrounding blocks. This means the crystal has no way to know what block it is supposed to drop items for when you break the block it is placed on.
Another problem I have with this, is that it would bypass the requirement to mine the crystal with the correct tool. Vanilla, for example, locks diamonds behind having an iron pickaxe to mine them with. Modpacks also often expand on this, locking certain resources behind obtaining the tools to mine them. If the crystals were to drop items when the block they are on is broken, it would allow players to bypass the tool requirement by breaking the base block by hand and then taking the resources from the crystals which were on that block.
However, this means the crystals can't store any additional information and thus 'don't know' what kind of block's crystal they are. Any time that info is needed, Ore Growth simply checks what block the crystal is placed on.
Is this the reason why the game shows particles from iron ore when mining any of them, even if they are not iron ore-crystals?
The method to get the particle texture from a model indeed does not receive world context and hence simply defaults to the iron ore texture.
However, Ore Growth has a mixin, ParticleEngineMixin, into the place where the particle texture is used to correct it to the correct texture for ore growth crystals.
If the particle texture does not look correct, that'd be a bug. (Could be some other mod you have, could simply be an issue in Ore Growth)
Could you create a separate issue for it if that's the case?