Verified Commit 516c7105 authored by ParkerMc's avatar ParkerMc
Browse files

Fixed explosion crash

parent ba6fefb9
Pipeline #75989840 passed with stages
in 2 minutes and 36 seconds
......@@ -35,7 +35,11 @@ public class EventBlockHarvest {
ModTools.logError("Can't get correct meta data id for block %s probably due to that mod's programming", dropBlockLocation.toString());
}
drops.add(event.getPos());
dropBlock.harvestBlock(event.getWorld(), event.getHarvester(), event.getPos(), dropState, null, event.getHarvester().getHeldItemMainhand());
if (event.getHarvester()==null){
dropBlock.dropBlockAsItemWithChance(event.getWorld(), event.getPos(), dropState, event.getDropChance(), event.getFortuneLevel());
}else {
dropBlock.harvestBlock(event.getWorld(), event.getHarvester(), event.getPos(), dropState, null, event.getHarvester().getActiveItemStack());
}
drops.remove(event.getPos());
event.getDrops().clear();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment