summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-10-10 17:02:49 +1100
committermd_5 <git@md-5.net>2016-10-10 17:02:49 +1100
commit744e1a177a0c98a7690e72a640d6993c12ae4564 (patch)
tree97de818e02d53b86ad9909b07cd4a443fe90b421 /nms-patches
parent70aace03129560549b84d7a6b3896308248311ef (diff)
downloadcraftbukkit-744e1a177a0c98a7690e72a640d6993c12ae4564.tar
craftbukkit-744e1a177a0c98a7690e72a640d6993c12ae4564.tar.gz
craftbukkit-744e1a177a0c98a7690e72a640d6993c12ae4564.tar.lz
craftbukkit-744e1a177a0c98a7690e72a640d6993c12ae4564.tar.xz
craftbukkit-744e1a177a0c98a7690e72a640d6993c12ae4564.zip
Fix looting enchant using wrong variable
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/PlayerInteractManager.patch11
1 files changed, 5 insertions, 6 deletions
diff --git a/nms-patches/PlayerInteractManager.patch b/nms-patches/PlayerInteractManager.patch
index dc3de548..89fc8b9b 100644
--- a/nms-patches/PlayerInteractManager.patch
+++ b/nms-patches/PlayerInteractManager.patch
@@ -123,7 +123,7 @@
}
}
-@@ -192,13 +251,81 @@
+@@ -192,13 +251,80 @@
}
public boolean breakBlock(BlockPosition blockposition) {
@@ -159,8 +159,7 @@
+ if (nmsBlock != null && !event.isCancelled() && !this.isCreative() && this.player.hasBlock(nmsBlock.getBlockData())) {
+ // Copied from block.a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, TileEntity tileentity)
+ // PAIL: checkme each update
-+ if (!(nmsBlock.p() && EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) > 0)) {
-+ int data = block.getData();
++ if (!(nmsBlock.o() && EnchantmentManager.getEnchantmentLevel(Enchantments.SILK_TOUCH, itemstack) > 0)) {
+ int bonusLevel = EnchantmentManager.getEnchantmentLevel(Enchantments.LOOT_BONUS_BLOCKS, itemstack);
+
+ event.setExpToDrop(nmsBlock.getExpDrop(this.world, nmsData, bonusLevel));
@@ -206,7 +205,7 @@
if ((block instanceof BlockCommand || block instanceof BlockStructure) && !this.player.dh()) {
this.world.notify(blockposition, iblockdata, iblockdata, 3);
return false;
-@@ -243,6 +370,12 @@
+@@ -243,6 +369,12 @@
}
}
@@ -219,7 +218,7 @@
return flag;
}
}
-@@ -283,7 +416,13 @@
+@@ -283,7 +415,13 @@
}
}
@@ -233,7 +232,7 @@
if (this.gamemode == EnumGamemode.SPECTATOR) {
TileEntity tileentity = world.getTileEntity(blockposition);
-@@ -340,6 +479,74 @@
+@@ -340,6 +478,74 @@
}
}
}