mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
43702a9e10
By: md_5 <git@md-5.net>
24 lines
962 B
Diff
24 lines
962 B
Diff
--- a/net/minecraft/world/level/block/BlockOre.java
|
|
+++ b/net/minecraft/world/level/block/BlockOre.java
|
|
@@ -25,13 +25,20 @@
|
|
@Override
|
|
public void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
|
super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack);
|
|
+ // CraftBukkit start - Delegated to getExpDrop
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
|
+ // CraftBukkit end
|
|
if (EnchantmentManager.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
|
int i = this.xpRange.sample(worldserver.random);
|
|
|
|
if (i > 0) {
|
|
- this.popExperience(worldserver, blockposition, i);
|
|
+ return i; // CraftBukkit
|
|
}
|
|
}
|
|
|
|
+ return 0; // CraftBukkit
|
|
}
|
|
}
|