Simple Veinminer

Simple Veinminer

259k Downloads

Veinmined blocks with same ID can drop incorrect items

BlakeMpy opened this issue · 0 comments

commented

When playing with this mod and SuperMartijn642's Ore Growth mod, veinmining ore growths which are adjacent, but not of the same type, results in the drops of the non-initial ore growth being disregarded, and dropping the ore which corresponds to the ore growth type of the one broken. This occurs due to the ore growths all having the same BlockId - they also do not have different block states, which is likely why they are all veinmined regardless of which variant they are. They do, however, have different drops.

I am, obviously, not as familiar with this project as the one who created it, but based on a brief page through of the code, I would suspect that this line:

List<ItemStack> stacks = getDroppedStacks(currentState, (ServerWorld) world, currentPos, currentBlockEntity, player, hand);

is to blame. Specifically, the getDroppedStacks() method, I think, is always called on the block which is broken (the "this" instance, I think, since none are specified), as opposed to being called on the currentBlock variable (which changes). I may be wrong, but I think this is the cause.
I have saved a video of this phenomenon to my dropbox (github doesn't seem to like video files - understandably, I suppose) if demonstration is required: video¹

Plaintext link for cpypst if worried about security:
¹https://www.dropbox.com/scl/fi/wiowb1ytd27syptk9lho6/2024-04-17-15-38-56.mkv?rlkey=emtkp5du04z3x1urqro8slju3&dl=0