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-06-11 07:00:00 +02:00
|
|
|
@@ -25,6 +25,7 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
2020-08-11 23:00:00 +02:00
|
|
|
public void dropNaturally(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
|
|
|
super.dropNaturally(iblockdata, worldserver, blockposition, itemstack);
|
2014-11-25 22:32:16 +01:00
|
|
|
+ /* CraftBukkit start - Delegated to getExpDrop
|
2019-04-23 04:00:00 +02:00
|
|
|
if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
2021-06-11 07:00:00 +02:00
|
|
|
int i = this.xpRange.a(worldserver.random);
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -32,6 +33,21 @@
|
2020-08-11 23:00:00 +02:00
|
|
|
this.dropExperience(worldserver, blockposition, i);
|
2019-04-23 04:00:00 +02:00
|
|
|
}
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
2015-02-26 23:41:06 +01:00
|
|
|
+ // */
|
|
|
|
|
|
|
|
}
|
2019-04-23 04:00:00 +02:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
+ @Override
|
2020-08-11 23:00:00 +02:00
|
|
|
+ public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
|
2019-04-23 04:00:00 +02:00
|
|
|
+ if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
|
2021-06-11 07:00:00 +02:00
|
|
|
+ int i = this.xpRange.a(worldserver.random);
|
2014-11-25 22:32:16 +01:00
|
|
|
+
|
2019-04-23 04:00:00 +02:00
|
|
|
+ if (i > 0) {
|
|
|
|
+ return i;
|
2014-11-25 22:32:16 +01:00
|
|
|
+ }
|
|
|
|
+ }
|
2015-02-26 23:41:06 +01:00
|
|
|
+
|
2014-11-25 22:32:16 +01:00
|
|
|
+ return 0;
|
|
|
|
+ // CraftBukkit end
|
2015-02-26 23:41:06 +01:00
|
|
|
+ }
|
2019-04-23 04:00:00 +02:00
|
|
|
}
|