From 421c1728c81e2f729dff88da2ac96535d2b8e5e8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 15 Jul 2018 10:00:00 +1000 Subject: Update to Minecraft 1.13-pre7 --- nms-patches/ContainerAnvil.patch | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'nms-patches/ContainerAnvil.patch') diff --git a/nms-patches/ContainerAnvil.patch b/nms-patches/ContainerAnvil.patch index e32f857e..0f9f7d3a 100644 --- a/nms-patches/ContainerAnvil.patch +++ b/nms-patches/ContainerAnvil.patch @@ -26,7 +26,7 @@ this.j = blockposition; this.i = world; this.m = entityhuman; -@@ -110,7 +120,7 @@ +@@ -111,7 +121,7 @@ byte b1 = 0; if (itemstack.isEmpty()) { @@ -35,25 +35,25 @@ this.levelCost = 0; } else { ItemStack itemstack1 = itemstack.cloneItemStack(); -@@ -128,7 +138,7 @@ - if (itemstack1.f() && itemstack1.getItem().a(itemstack, itemstack2)) { - k = Math.min(itemstack1.i(), itemstack1.k() / 4); +@@ -129,7 +139,7 @@ + if (itemstack1.e() && itemstack1.getItem().a(itemstack, itemstack2)) { + k = Math.min(itemstack1.getDamage(), itemstack1.h() / 4); if (k <= 0) { - this.g.setItem(0, ItemStack.a); + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), ItemStack.a); // CraftBukkit this.levelCost = 0; return; } -@@ -143,7 +153,7 @@ +@@ -144,7 +154,7 @@ this.k = l; } else { - if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.f())) { + if (!flag && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.e())) { - this.g.setItem(0, ItemStack.a); + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), ItemStack.a); // CraftBukkit this.levelCost = 0; return; } -@@ -236,7 +246,7 @@ +@@ -237,7 +247,7 @@ } if (flag2 && !flag1) { @@ -62,7 +62,7 @@ this.levelCost = 0; return; } -@@ -283,7 +293,7 @@ +@@ -284,7 +294,7 @@ EnchantmentManager.a(map, itemstack1); } @@ -71,17 +71,17 @@ this.b(); } } -@@ -301,6 +311,7 @@ +@@ -302,6 +312,7 @@ } public boolean canUse(EntityHuman entityhuman) { + if (!this.checkReachable) return true; // CraftBukkit - return this.i.getType(this.j).getBlock() != Blocks.ANVIL ? false : entityhuman.d((double) this.j.getX() + 0.5D, (double) this.j.getY() + 0.5D, (double) this.j.getZ() + 0.5D) <= 64.0D; + return !this.i.getType(this.j).a(TagsBlock.x) ? false : entityhuman.d((double) this.j.getX() + 0.5D, (double) this.j.getY() + 0.5D, (double) this.j.getZ() + 0.5D) <= 64.0D; } -@@ -356,4 +367,33 @@ +@@ -357,4 +368,33 @@ - this.e(); + this.d(); } + + // CraftBukkit start -- cgit v1.2.3