--- a/net/minecraft/world/level/block/Block.java +++ b/net/minecraft/world/level/block/Block.java @@ -354,7 +354,13 @@ EntityItem entityitem = (EntityItem) supplier.get(); entityitem.defaultPickupDelay(); - world.addEntity(entityitem); + // CraftBukkit start + if (world.captureDrops != null) { + world.captureDrops.add(entityitem); + } else { + world.addEntity(entityitem); + } + // CraftBukkit end } } @@ -380,7 +386,7 @@ public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, ItemStack itemstack) { entityhuman.b(StatisticList.BLOCK_MINED.b(this)); - entityhuman.applyExhaustion(0.005F); + entityhuman.applyExhaustion(0.005F, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.BLOCK_MINED); // CraftBukkit - EntityExhaustionEvent dropItems(iblockdata, world, blockposition, tileentity, entityhuman, itemstack); } @@ -514,6 +520,12 @@ return (ImmutableMap) this.stateDefinition.a().stream().collect(ImmutableMap.toImmutableMap(Function.identity(), function)); } + // CraftBukkit start + public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) { + return 0; + } + // CraftBukkit end + public static final class a { private final IBlockData first;