mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2024-11-25 15:06:14 +00:00
21 lines
897 B
Diff
21 lines
897 B
Diff
--- a/net/minecraft/world/level/block/DropExperienceBlock.java
|
|
+++ b/net/minecraft/world/level/block/DropExperienceBlock.java
|
|
@@ -31,9 +31,16 @@
|
|
@Override
|
|
protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
|
|
super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
|
|
+ // CraftBukkit start - Delegate to getExpDrop
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
|
|
if (flag) {
|
|
- this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
|
|
+ return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
|
|
}
|
|
|
|
+ return 0;
|
|
+ // CraftBukkit end
|
|
}
|
|
}
|