mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-18 00:25:39 +01:00
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
--- a/net/minecraft/server/BlockOre.java
|
|
+++ b/net/minecraft/server/BlockOre.java
|
|
@@ -15,6 +15,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.a(worldserver.random);
|
|
|
|
@@ -22,6 +23,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.a(worldserver.random);
|
|
+
|
|
+ if (i > 0) {
|
|
+ return i;
|
|
+ }
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
+ // CraftBukkit end
|
|
+ }
|
|
}
|