mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
43702a9e10
By: md_5 <git@md-5.net>
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
--- a/net/minecraft/world/level/block/Block.java
|
|
+++ b/net/minecraft/world/level/block/Block.java
|
|
@@ -352,7 +352,13 @@
|
|
EntityItem entityitem = (EntityItem) supplier.get();
|
|
|
|
entityitem.setDefaultPickUpDelay();
|
|
- world.addFreshEntity(entityitem);
|
|
+ // CraftBukkit start
|
|
+ if (world.captureDrops != null) {
|
|
+ world.captureDrops.add(entityitem);
|
|
+ } else {
|
|
+ world.addFreshEntity(entityitem);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
}
|
|
|
|
@@ -378,7 +384,7 @@
|
|
|
|
public void playerDestroy(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, ItemStack itemstack) {
|
|
entityhuman.awardStat(StatisticList.BLOCK_MINED.get(this));
|
|
- entityhuman.causeFoodExhaustion(0.005F);
|
|
+ entityhuman.causeFoodExhaustion(0.005F, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.BLOCK_MINED); // CraftBukkit - EntityExhaustionEvent
|
|
dropResources(iblockdata, world, blockposition, tileentity, entityhuman, itemstack);
|
|
}
|
|
|
|
@@ -512,6 +518,12 @@
|
|
return (ImmutableMap) this.stateDefinition.getPossibleStates().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;
|