2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/block/BlockOre.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockOre.java
|
2021-11-21 23:00:00 +01:00
|
|
|
@@ -25,13 +25,20 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2021-11-21 23:00:00 +01:00
|
|
|
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);
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
if (i > 0) {
|
|
|
|
- this.popExperience(worldserver, blockposition, i);
|
|
|
|
+ return i; // CraftBukkit
|
2019-04-23 04:00:00 +02:00
|
|
|
}
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
2015-02-26 23:41:06 +01:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
+ return 0; // CraftBukkit
|
2015-02-26 23:41:06 +01:00
|
|
|
}
|
2019-04-23 04:00:00 +02:00
|
|
|
}
|