Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/BlockOre.patch
2019-04-23 12:00:00 +10:00

33 Zeilen
1.0 KiB
Diff

--- a/net/minecraft/server/BlockOre.java
+++ b/net/minecraft/server/BlockOre.java
@@ -15,6 +15,7 @@
@Override
public void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
super.dropNaturally(iblockdata, world, blockposition, itemstack);
+ /* CraftBukkit start - Delegated to getExpDrop
if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
int i = this.a(world.random);
@@ -22,6 +23,21 @@
this.dropExperience(world, blockposition, i);
}
}
+ // */
}
+
+ @Override
+ public int getExpDrop(IBlockData iblockdata, World world, BlockPosition blockposition, ItemStack itemstack) {
+ if (EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) == 0) {
+ int i = this.a(world.random);
+
+ if (i > 0) {
+ return i;
+ }
+ }
+
+ return 0;
+ // CraftBukkit end
+ }
}