mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
b3a8254758
By: md_5 <git@md-5.net>
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
--- a/net/minecraft/world/level/block/BlockOre.java
|
|
+++ b/net/minecraft/world/level/block/BlockOre.java
|
|
@@ -25,6 +25,7 @@
|
|
@Override
|
|
public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
|
super.dropNaturally(iblockdata, worldserver, blockposition, itemstack);
|
|
+ /* CraftBukkit start - Delegated to getExpDrop
|
|
if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
|
int i = this.xpRange.a(worldserver.random);
|
|
|
|
@@ -32,6 +33,21 @@
|
|
this.dropExperience(worldserver, blockposition, i);
|
|
}
|
|
}
|
|
+ // */
|
|
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
|
+ if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
|
+ int i = this.xpRange.a(worldserver.random);
|
|
+
|
|
+ if (i > 0) {
|
|
+ return i;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
+ // CraftBukkit end
|
|
+ }
|
|
}
|