From 27cb8a7e6d0ac959aa1800adfa2c6b8a5c484069 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 2 Jun 2014 15:38:03 +0100 Subject: [PATCH] Upstream merge --- Bukkit | 2 +- Bukkit-Patches/0001-POM-Changes.patch | 6 +-- CraftBukkit | 2 +- CraftBukkit-Patches/0001-POM-Changes.patch | 6 +-- .../0019-PlayerItemDamageEvent.patch | 10 ++--- .../0081-Fix-ItemStack-Unbreakable-Code.patch | 6 +-- ...ck-data-values-that-crash-the-client.patch | 41 +------------------ .../0148-Fix-Max-Stack-Size-Tracking.patch | 31 -------------- 8 files changed, 17 insertions(+), 87 deletions(-) delete mode 100644 CraftBukkit-Patches/0148-Fix-Max-Stack-Size-Tracking.patch diff --git a/Bukkit b/Bukkit index 914108488..fc7109d4d 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit 91410848816e1c9824207d0f9a93e379bb9f02e4 +Subproject commit fc7109d4d1a867162961f07b711e1d6157ecd3e2 diff --git a/Bukkit-Patches/0001-POM-Changes.patch b/Bukkit-Patches/0001-POM-Changes.patch index 7f49fbedc..520409a24 100644 --- a/Bukkit-Patches/0001-POM-Changes.patch +++ b/Bukkit-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From 08a077bcb805a326ab9197a5814d2a9a54762c90 Mon Sep 17 00:00:00 2001 +From 34f763cc0aea978efc5e76c9c3df06df012bafa1 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 10:36:24 +1000 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 23b7cc3..b394a33 100644 +index dcf7ed3..f7d100a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,42 +1,21 @@ @@ -15,7 +15,7 @@ index 23b7cc3..b394a33 100644 - bukkit + org.spigotmc + spigot-api - 1.7.9-R0.2-SNAPSHOT + 1.7.9-R0.3-SNAPSHOT - Bukkit - http://www.bukkit.org + Spigot-API diff --git a/CraftBukkit b/CraftBukkit index 4d832c39f..a6e0bfd19 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit 4d832c39f320f7745a210a9d9a0accc665bd49dd +Subproject commit a6e0bfd1982470a64afae7bd2d265b3302f053ac diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index 2f4e276bd..c7cca7bf8 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From a7344d5de1c9952cf0e2c9e27a3a5f3283289a53 Mon Sep 17 00:00:00 2001 +From ae912a83567434a436fad96553d8f1ff5114db6a Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 13:07:39 +1000 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index b4b7ae0..006d26b 100644 +index b2e2002..c1073e5 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -17,7 +17,7 @@ index b4b7ae0..006d26b 100644 + org.spigotmc + spigot jar - 1.7.9-R0.2-SNAPSHOT + 1.7.9-R0.3-SNAPSHOT - CraftBukkit - http://www.bukkit.org + Spigot diff --git a/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch b/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch index d2c838421..0840e2f80 100644 --- a/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch +++ b/CraftBukkit-Patches/0019-PlayerItemDamageEvent.patch @@ -1,14 +1,14 @@ -From 9bc96791db6467b0721810dba820374aa6c46065 Mon Sep 17 00:00:00 2001 +From 6d1e63d8c59ecc36efdbd54880bb0ca1af9bda2c Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 4 Mar 2013 18:45:52 +1100 Subject: [PATCH] PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 7342848..5138eec 100644 +index f9aaf4a..f32f40d 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -270,7 +270,13 @@ public final class ItemStack { +@@ -279,7 +279,13 @@ public final class ItemStack { return this.item.getMaxDurability(); } @@ -22,7 +22,7 @@ index 7342848..5138eec 100644 if (!this.g()) { return false; } else { -@@ -285,7 +291,16 @@ public final class ItemStack { +@@ -294,7 +300,16 @@ public final class ItemStack { } i -= k; @@ -40,7 +40,7 @@ index 7342848..5138eec 100644 return false; } } -@@ -298,7 +313,7 @@ public final class ItemStack { +@@ -307,7 +322,7 @@ public final class ItemStack { public void damage(int i, EntityLiving entityliving) { if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { if (this.g()) { diff --git a/CraftBukkit-Patches/0081-Fix-ItemStack-Unbreakable-Code.patch b/CraftBukkit-Patches/0081-Fix-ItemStack-Unbreakable-Code.patch index 9602e5979..173cad235 100644 --- a/CraftBukkit-Patches/0081-Fix-ItemStack-Unbreakable-Code.patch +++ b/CraftBukkit-Patches/0081-Fix-ItemStack-Unbreakable-Code.patch @@ -1,14 +1,14 @@ -From de4027c312d39d2ab4824c5de2c0f43a79ce091d Mon Sep 17 00:00:00 2001 +From 5048ab570df46e50d433d0de6d88c1cc29977ed6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 10 Jan 2014 15:15:50 +1100 Subject: [PATCH] Fix ItemStack Unbreakable Code diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 5138eec..3a18002 100644 +index f32f40d..d1bbb05 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -224,7 +224,13 @@ public final class ItemStack { +@@ -228,7 +228,13 @@ public final class ItemStack { } public boolean g() { diff --git a/CraftBukkit-Patches/0084-Block-data-values-that-crash-the-client.patch b/CraftBukkit-Patches/0084-Block-data-values-that-crash-the-client.patch index e540087e0..20778c7e1 100644 --- a/CraftBukkit-Patches/0084-Block-data-values-that-crash-the-client.patch +++ b/CraftBukkit-Patches/0084-Block-data-values-that-crash-the-client.patch @@ -1,4 +1,4 @@ -From 2a693183d7eef1e420940b89477c31b4589e6dea Mon Sep 17 00:00:00 2001 +From d2464ff0ee510c4d7eae1439b190f8438583a285 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 15 Jan 2014 21:52:47 +0000 Subject: [PATCH] Block data values that crash the client @@ -56,45 +56,6 @@ index 874a089..088ee42 100644 TileEntity tileentity = this.e(i, j, k); if (tileentity != null) { -diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 3a18002..2ab3b9b 100644 ---- a/src/main/java/net/minecraft/server/ItemStack.java -+++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -204,10 +204,7 @@ public final class ItemStack { - public void c(NBTTagCompound nbttagcompound) { - this.item = Item.d(nbttagcompound.getShort("id")); - this.count = nbttagcompound.getByte("Count"); -- this.damage = nbttagcompound.getShort("Damage"); -- if (this.damage < 0) { -- this.damage = 0; -- } -+ setData( nbttagcompound.getShort("Damage") ); // Spigot - - if (nbttagcompound.hasKeyOfType("tag", 10)) { - // CraftBukkit - make defensive copy as this data may be coming from the save thread -@@ -258,11 +255,21 @@ public final class ItemStack { - } - - // Is this a block? -- if (CraftMagicNumbers.getBlock(CraftMagicNumbers.getId(this.getItem())) != Blocks.AIR) { -+ // Spigot start - filter -+ Block block = CraftMagicNumbers.getBlock(CraftMagicNumbers.getId(this.getItem())); -+ if (block != Blocks.AIR) { - // If vanilla doesn't use data on it don't allow any - if (!(this.usesData() || this.getItem().usesDurability())) { - i = 0; - } -+ if ( block == Blocks.DOUBLE_PLANT ) -+ { -+ if ( i >= 6 && i != 8 ) -+ { -+ i = 0; -+ } -+ } -+ // Spigot end - } - // CraftBukkit end - -- 1.9.1 diff --git a/CraftBukkit-Patches/0148-Fix-Max-Stack-Size-Tracking.patch b/CraftBukkit-Patches/0148-Fix-Max-Stack-Size-Tracking.patch deleted file mode 100644 index 6e2284353..000000000 --- a/CraftBukkit-Patches/0148-Fix-Max-Stack-Size-Tracking.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d69b3ad28f5941dfdfa8a31213ffe41c0cd7bacd Mon Sep 17 00:00:00 2001 -From: prplz -Date: Tue, 27 May 2014 17:39:41 +1000 -Subject: [PATCH] Fix Max Stack Size Tracking - - -diff --git a/src/main/java/net/minecraft/server/Container.java b/src/main/java/net/minecraft/server/Container.java -index 7358645..12e48d4 100644 ---- a/src/main/java/net/minecraft/server/Container.java -+++ b/src/main/java/net/minecraft/server/Container.java -@@ -504,7 +504,7 @@ public abstract class Container { - itemstack.count -= maxStack - itemstack1.count; - itemstack1.count = maxStack; - slot.f(); -- flag1 = itemstack.count == 0; // Don't give a success return if we have leftovers -+ flag1 = true; // Don't give a success return if we have leftovers - } - // CraftBukkit end - } -@@ -532,7 +532,7 @@ public abstract class Container { - slot.f(); - // CraftBukkit start - Don't assume entire stack went in - itemstack.count -= slot.getItem().count; -- flag1 = itemstack.count == 0; -+ flag1 = true; - // CraftBukkit end - break; - } --- -1.9.1 -