Treecapitator

Treecapitator

5M Downloads

HarvestDropsEvent is bypassed when stackDrops is true

squeek502 opened this issue ยท 0 comments

commented

Relevant code on the 1.7.10 branch:

                    if (TCSettings.stackDrops)
                        addDrop(block, metadata, pos);
                    else if (TCSettings.itemsDropInPlace)
                        block.dropBlockAsItem(world, pos.x, pos.y, pos.z, metadata, EnchantmentHelper.getFortuneModifier(player));
                    else
                        block.dropBlockAsItem(world, startPos.x, startPos.y, startPos.z, metadata, EnchantmentHelper.getFortuneModifier(player));

block.dropBlockAsItem has some extra Forge logic, calling ForgeEventFactory.fireBlockHarvesting to allow the HarvestDropsEvent to modify the drops of a block.

Adding a ForgeEventFactory.fireBlockHarvesting call to this code block would allow consistent functionality and compatibility with mods that modify drops in that Forge event.