summaryrefslogtreecommitdiffstats
path: root/nms-patches/ContainerAnvil.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-15 10:00:00 +1000
committermd_5 <git@md-5.net>2018-07-15 10:00:00 +1000
commit421c1728c81e2f729dff88da2ac96535d2b8e5e8 (patch)
tree6c51d93e811d1eb86b68461a42fc5cf03b168b0c /nms-patches/ContainerAnvil.patch
parent57ab4cfc6f4ff526d44319d9b8c79f6848db2de7 (diff)
downloadcraftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.gz
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.lz
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.tar.xz
craftbukkit-421c1728c81e2f729dff88da2ac96535d2b8e5e8.zip
Update to Minecraft 1.13-pre7
Diffstat (limited to 'nms-patches/ContainerAnvil.patch')
-rw-r--r--nms-patches/ContainerAnvil.patch24
1 files changed, 12 insertions, 12 deletions
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