mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 01:32:02 -07:00
Properly handle BlockBreakEvent#isDropItems
Setting whether a block break dropped items controlled far more than just whether blocks dropped, like stat increases food consumption, turtle egg count decreases, ice to water conversions and beehive releases
This commit is contained in:
@@ -337,8 +337,9 @@
|
||||
|
||||
itemstack.mineBlock(this.level, iblockdata1, pos, this.player);
|
||||
- if (flag && flag1) {
|
||||
+ if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
|
||||
block.playerDestroy(this.level, this.player, pos, iblockdata1, tileentity, itemstack1);
|
||||
- block.playerDestroy(this.level, this.player, pos, iblockdata1, tileentity, itemstack1);
|
||||
+ if (flag && flag1/* && event.isDropItems() */) { // CraftBukkit - Check if block should drop items // Paper - fix drops not preventing stats/food exhaustion
|
||||
+ block.playerDestroy(this.level, this.player, pos, iblockdata1, tileentity, itemstack1, event.isDropItems(), false); // Paper - fix drops not preventing stats/food exhaustion
|
||||
}
|
||||
|
||||
- return true;
|
||||
|
Reference in New Issue
Block a user