Dropt

Dropt

3M Downloads

harvester type: explosive

WarlordWossman opened this issue ยท 2 comments

commented

Currently we got the harvester types player, non-player and any, I think it would be very cool if I could specify that explosives have to break a block to get a specific drop from it.
Would enable a lot of cool in world crafting options with explosives, creepers etc.

commented

I could hook the ExplosionEvent.Detonate and cache the list of affected blocks when an explosion happens. Then, in the BlockEvent.HarvestDropsEvent, check if the broken block is in the list of explosion affected blocks and, finally, clear the cache of explosion affected blocks.

The cache couldn't be cleared from the harvest drops event, because that event is fired for every block. It would have to be cleared during the ServerTickEvent's END phase.

This is doable.

commented

Feature available in version 1.12.2-1.13.0