From 61d4b9e2aba15df8e506baf169fbf03dfc7a828f Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 2 Jan 2017 02:05:02 -0500 Subject: [PATCH] Fix build I totally didn't notice that the patch had a conflict >_> --- ...074-Handle-Item-Meta-Inconsistencies.patch | 29 ++++++++++--------- ...9-Custom-replacement-for-eaten-items.patch | 8 ++--- ...th-absorb-values-and-repair-bad-data.patch | 12 ++++---- ...ityRegainHealthEvent-isFastRegen-API.patch | 10 +++---- .../0148-Toggleable-Elytra-Wall-Damage.patch | 12 ++++---- .../0188-Optimize-ItemStack.isEmpty.patch | 6 ++-- ... 0198-PlayerTeleportEndGatewayEvent.patch} | 2 +- 7 files changed, 40 insertions(+), 39 deletions(-) rename Spigot-Server-Patches/{0199-PlayerTeleportEndGatewayEvent.patch => 0198-PlayerTeleportEndGatewayEvent.patch} (95%) diff --git a/Spigot-Server-Patches/0074-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0074-Handle-Item-Meta-Inconsistencies.patch index 606722b2b4..87722b37a4 100644 --- a/Spigot-Server-Patches/0074-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0074-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From c97c3843fcad885235aa9f1f8f8ce5e010103cb6 Mon Sep 17 00:00:00 2001 +From 950fd04d7cd809ac9cd4db82e4367e1859ebd3f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 8ed4b4b..fafc6b6 100644 +index 6adbbd4ac..bd3dc027f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS; @@ -29,7 +29,7 @@ index 8ed4b4b..fafc6b6 100644 import java.util.Map; import net.minecraft.server.EnchantmentManager; -@@ -180,28 +181,11 @@ public final class CraftItemStack extends ItemStack { +@@ -183,28 +184,11 @@ public final class CraftItemStack extends ItemStack { public void addUnsafeEnchantment(Enchantment ench, int level) { Validate.notNull(ench, "Cannot add null enchantment"); @@ -63,7 +63,7 @@ index 8ed4b4b..fafc6b6 100644 } static boolean makeTag(net.minecraft.server.ItemStack item) { -@@ -218,66 +202,34 @@ public final class CraftItemStack extends ItemStack { +@@ -221,66 +205,34 @@ public final class CraftItemStack extends ItemStack { @Override public boolean containsEnchantment(Enchantment ench) { @@ -144,7 +144,7 @@ index 8ed4b4b..fafc6b6 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index b20d0f2..e2b99a4 100644 +index 6422b626e..59bd3995f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,13 +6,8 @@ import java.lang.annotation.RetentionPolicy; @@ -182,7 +182,7 @@ index b20d0f2..e2b99a4 100644 import java.util.logging.Level; import java.util.logging.Logger; import net.minecraft.server.NBTCompressedStreamTools; -@@ -223,14 +225,14 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -223,7 +225,7 @@ class CraftMetaItem implements ItemMeta, Repairable { private String displayName; private List lore; @@ -191,15 +191,16 @@ index b20d0f2..e2b99a4 100644 private int repairCost; private int hideFlag; private boolean unbreakable; - +@@ -231,7 +233,7 @@ class CraftMetaItem implements ItemMeta, Repairable { private static final Set HANDLED_TAGS = Sets.newHashSet(); + private NBTTagCompound internalTag; - private final Map unhandledTags = new HashMap(); + private final Map unhandledTags = new TreeMap<>(); // Paper CraftMetaItem(CraftMetaItem meta) { if (meta == null) { -@@ -244,7 +246,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -245,7 +247,7 @@ class CraftMetaItem implements ItemMeta, Repairable { } if (meta.enchantments != null) { // Spigot @@ -208,7 +209,7 @@ index b20d0f2..e2b99a4 100644 } this.repairCost = meta.repairCost; -@@ -456,13 +458,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -462,13 +464,13 @@ class CraftMetaItem implements ItemMeta, Repairable { } } @@ -224,7 +225,7 @@ index b20d0f2..e2b99a4 100644 for (int i = 0; i < ench.size(); i++) { int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT); -@@ -532,13 +534,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -538,13 +540,13 @@ class CraftMetaItem implements ItemMeta, Repairable { void deserializeInternal(NBTTagCompound tag) { } @@ -240,7 +241,7 @@ index b20d0f2..e2b99a4 100644 for (Map.Entry entry : ench.entrySet()) { Enchantment enchantment = Enchantment.getByName(entry.getKey().toString()); -@@ -664,12 +666,12 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -670,12 +672,12 @@ class CraftMetaItem implements ItemMeta, Repairable { } public Map getEnchants() { @@ -255,7 +256,7 @@ index b20d0f2..e2b99a4 100644 } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -837,7 +839,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -843,7 +845,7 @@ class CraftMetaItem implements ItemMeta, Repairable { clone.lore = new ArrayList(this.lore); } if (this.enchantments != null) { @@ -264,7 +265,7 @@ index b20d0f2..e2b99a4 100644 } clone.hideFlag = this.hideFlag; clone.unbreakable = this.unbreakable; -@@ -991,6 +993,28 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -997,6 +999,28 @@ class CraftMetaItem implements ItemMeta, Repairable { } } @@ -294,5 +295,5 @@ index b20d0f2..e2b99a4 100644 private final Spigot spigot = new Spigot() { -- -2.9.3 +2.11.0 diff --git a/Spigot-Server-Patches/0079-Custom-replacement-for-eaten-items.patch b/Spigot-Server-Patches/0079-Custom-replacement-for-eaten-items.patch index 516677f817..1381bea347 100644 --- a/Spigot-Server-Patches/0079-Custom-replacement-for-eaten-items.patch +++ b/Spigot-Server-Patches/0079-Custom-replacement-for-eaten-items.patch @@ -1,14 +1,14 @@ -From 3360292df03b152c1c4f6d3088c87e3122b70732 Mon Sep 17 00:00:00 2001 +From 863ebbfe00939702cab6e4f7c0b1c99a3987f54a Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sun, 21 Jun 2015 15:07:20 -0400 Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 42347e7..0f2f250 100644 +index bf8fbac4e..21603953c 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -2340,7 +2340,20 @@ public abstract class EntityLiving extends Entity { +@@ -2341,7 +2341,20 @@ public abstract class EntityLiving extends Entity { ItemStack itemstack = (craftItem.equals(event.getItem())) ? this.activeItem.a(this.world, this) : CraftItemStack.asNMSCopy(event.getItem()).a(world, this); this.a(this.cz(), itemstack); // CraftBukkit end @@ -30,5 +30,5 @@ index 42347e7..0f2f250 100644 } -- -2.9.3 +2.11.0 diff --git a/Spigot-Server-Patches/0081-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/Spigot-Server-Patches/0081-handle-NaN-health-absorb-values-and-repair-bad-data.patch index 01a54f7ed1..10c799fa8b 100644 --- a/Spigot-Server-Patches/0081-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/Spigot-Server-Patches/0081-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -1,11 +1,11 @@ -From e8411f0e9e51027d876e84d3d0a810ff187f89b3 Mon Sep 17 00:00:00 2001 +From 0f23b2d280563bf9fa7982032727db75585a6e5a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 27 Sep 2015 01:18:02 -0400 Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 0f2f250..7e0d509 100644 +index 21603953c..f57a1106a 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -481,7 +481,13 @@ public abstract class EntityLiving extends Entity { @@ -23,7 +23,7 @@ index 0f2f250..7e0d509 100644 if (nbttagcompound.hasKeyOfType("Attributes", 9) && this.world != null && !this.world.isClientSide) { GenericAttributes.a(this.getAttributeMap(), nbttagcompound.getList("Attributes", 10)); } -@@ -779,6 +785,10 @@ public abstract class EntityLiving extends Entity { +@@ -780,6 +786,10 @@ public abstract class EntityLiving extends Entity { } public void setHealth(float f) { @@ -34,7 +34,7 @@ index 0f2f250..7e0d509 100644 // CraftBukkit start - Handle scaled health if (this instanceof EntityPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity(); -@@ -2210,7 +2220,7 @@ public abstract class EntityLiving extends Entity { +@@ -2211,7 +2221,7 @@ public abstract class EntityLiving extends Entity { } public void setAbsorptionHearts(float f) { @@ -44,7 +44,7 @@ index 0f2f250..7e0d509 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7a6609f..1ea595d 100644 +index 7a6609f09..1ea595dd4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1397,6 +1397,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -56,5 +56,5 @@ index 7a6609f..1ea595d 100644 } -- -2.9.3 +2.11.0 diff --git a/Spigot-Server-Patches/0122-EntityRegainHealthEvent-isFastRegen-API.patch b/Spigot-Server-Patches/0122-EntityRegainHealthEvent-isFastRegen-API.patch index 3813277a48..367146957f 100644 --- a/Spigot-Server-Patches/0122-EntityRegainHealthEvent-isFastRegen-API.patch +++ b/Spigot-Server-Patches/0122-EntityRegainHealthEvent-isFastRegen-API.patch @@ -1,4 +1,4 @@ -From 2817475c6f24e5080e7172f6f4e2faf8748dceb1 Mon Sep 17 00:00:00 2001 +From 5f49b94077a298f1a7f1a67f670b2204d772a656 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 22 Apr 2016 01:43:11 -0500 Subject: [PATCH] EntityRegainHealthEvent isFastRegen API @@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API Don't even get me started diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 7e0d509..87c39c9 100644 +index f57a1106a..88bc7d81e 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -761,10 +761,16 @@ public abstract class EntityLiving extends Entity { +@@ -762,10 +762,16 @@ public abstract class EntityLiving extends Entity { } public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { @@ -28,7 +28,7 @@ index 7e0d509..87c39c9 100644 if (!event.isCancelled()) { diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java -index b6e9786..8d95d14 100644 +index b6e978668..8d95d148f 100644 --- a/src/main/java/net/minecraft/server/FoodMetaData.java +++ b/src/main/java/net/minecraft/server/FoodMetaData.java @@ -65,7 +65,7 @@ public class FoodMetaData { @@ -41,5 +41,5 @@ index b6e9786..8d95d14 100644 this.foodTickTimer = 0; } -- -2.9.3 +2.11.0 diff --git a/Spigot-Server-Patches/0148-Toggleable-Elytra-Wall-Damage.patch b/Spigot-Server-Patches/0148-Toggleable-Elytra-Wall-Damage.patch index 45c98a5af6..e6911c2b87 100644 --- a/Spigot-Server-Patches/0148-Toggleable-Elytra-Wall-Damage.patch +++ b/Spigot-Server-Patches/0148-Toggleable-Elytra-Wall-Damage.patch @@ -1,4 +1,4 @@ -From 961f75590f7005e54499c7c9cb884efc9624f6df Mon Sep 17 00:00:00 2001 +From 531975286ff007e40bcb53e97afb7a89f7e22c3b Mon Sep 17 00:00:00 2001 From: Jadon Fowler Date: Sat, 18 Jun 2016 23:13:59 -0700 Subject: [PATCH] Toggleable Elytra Wall Damage @@ -7,7 +7,7 @@ Instead of calculating the damage taken from hitting a wall, you can disable it in the config. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index cda516f..965edc9 100644 +index cda516f6a..965edc99c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -360,4 +360,9 @@ public class PaperWorldConfig { @@ -21,10 +21,10 @@ index cda516f..965edc9 100644 + } } diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 87c39c9..132e03f 100644 +index 88bc7d81e..7ebdb30ce 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1689,6 +1689,7 @@ public abstract class EntityLiving extends Entity { +@@ -1690,6 +1690,7 @@ public abstract class EntityLiving extends Entity { this.motY = 0.30000001192092896D; } } else if (this.cH()) { @@ -32,7 +32,7 @@ index 87c39c9..132e03f 100644 if (this.motY > -0.5D) { this.fallDistance = 1.0F; } -@@ -1738,6 +1739,7 @@ public abstract class EntityLiving extends Entity { +@@ -1739,6 +1740,7 @@ public abstract class EntityLiving extends Entity { this.damageEntity(DamageSource.FLY_INTO_WALL, f7); } } @@ -41,5 +41,5 @@ index 87c39c9..132e03f 100644 if (this.onGround && !this.world.isClientSide) { if (getFlag(7) && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit -- -2.9.3 +2.11.0 diff --git a/Spigot-Server-Patches/0188-Optimize-ItemStack.isEmpty.patch b/Spigot-Server-Patches/0188-Optimize-ItemStack.isEmpty.patch index 461f15818f..0ad41a45d8 100644 --- a/Spigot-Server-Patches/0188-Optimize-ItemStack.isEmpty.patch +++ b/Spigot-Server-Patches/0188-Optimize-ItemStack.isEmpty.patch @@ -1,4 +1,4 @@ -From ae097c16d9540ec79890ddb5ba0efe693874621a Mon Sep 17 00:00:00 2001 +From 4ddba6166c75e3d4f8026427390e943311f511f7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Dec 2016 03:48:29 -0500 Subject: [PATCH] Optimize ItemStack.isEmpty() @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index c8694e8b9..6db93b953 100644 +index 911bd879a..45ebd3f61 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java -@@ -112,9 +112,15 @@ public final class ItemStack { +@@ -120,9 +120,15 @@ public final class ItemStack { this.F(); } diff --git a/Spigot-Server-Patches/0199-PlayerTeleportEndGatewayEvent.patch b/Spigot-Server-Patches/0198-PlayerTeleportEndGatewayEvent.patch similarity index 95% rename from Spigot-Server-Patches/0199-PlayerTeleportEndGatewayEvent.patch rename to Spigot-Server-Patches/0198-PlayerTeleportEndGatewayEvent.patch index d7d7a02a62..5439a0e9e2 100644 --- a/Spigot-Server-Patches/0199-PlayerTeleportEndGatewayEvent.patch +++ b/Spigot-Server-Patches/0198-PlayerTeleportEndGatewayEvent.patch @@ -1,4 +1,4 @@ -From 8af53a4303bd5a01d365e62263a5d9a6d736fbc1 Mon Sep 17 00:00:00 2001 +From f0cd98d910ddefaf78ab4dcb659a7319cda9e995 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 31 Dec 2016 21:44:50 -0500 Subject: [PATCH] PlayerTeleportEndGatewayEvent