From 2a30a76ac589feaedff5118ff972902fffdde1dd Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 3 Dec 2014 18:13:06 -0600 Subject: [PATCH] Merge with Spigot da32fe1d549 <- Increase max scoreboard objective size --- .../0003-Skeleton-API-Implementations.patch | 6 ++--- .../0006-Better-Chunk-Tick-Selection.patch | 8 +++---- .../0010-Async-Operation-Catching.patch | 8 +++---- ...Disabling-of-Random-Lighting-Updates.patch | 6 ++--- .../0122-Cap-Objective-Score-Length.patch | 6 ++--- .../0129-Better-item-validation.patch | 8 +++---- ...-modifiers-which-cause-the-attribute.patch | 6 ++--- .../0151-Remove-uneeded-validation.patch | 8 +++---- ...ip-invalid-enchants-in-CraftMetaItem.patch | 6 ++--- ...kable-and-setUnbreakable-to-ItemMeta.patch | 24 +++++++++---------- 10 files changed, 43 insertions(+), 43 deletions(-) diff --git a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch index 9990ef7a0..da23099e9 100644 --- a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch +++ b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch @@ -1,4 +1,4 @@ -From 0acb066ebb5448e7910e2fcb3724d92f71723324 Mon Sep 17 00:00:00 2001 +From 612a8c1fc34fe2df4d22a21196f0b7df9341c974 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 2 Jun 2013 15:10:56 +1000 Subject: [PATCH] Skeleton API Implementations @@ -124,10 +124,10 @@ index 3b9bfec..e4d0e41 100644 + // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index c9738c4..32d4a67 100644 +index 1f7b523..651f81c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -665,4 +665,16 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -666,4 +666,16 @@ class CraftMetaItem implements ItemMeta, Repairable { public final String toString() { return SerializableMeta.classMap.get(getClass()) + "_META:" + serialize(); // TODO: cry } diff --git a/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch b/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch index 4f6106ff8..666a16f4f 100644 --- a/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch +++ b/CraftBukkit-Patches/0006-Better-Chunk-Tick-Selection.patch @@ -1,4 +1,4 @@ -From 0b4a7be15ef20fd9da2461d422aa8375d8916185 Mon Sep 17 00:00:00 2001 +From 55ce35368ebdbbcfc801fea686fbd53c9c2a0a05 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 11 Jun 2013 12:56:02 +1000 Subject: [PATCH] Better Chunk Tick Selection @@ -6,7 +6,7 @@ Subject: [PATCH] Better Chunk Tick Selection An optimized chunk ticking algorithm which better selects chunks around players which are active on the server. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 130c54d..9a218e4 100644 +index 8d5b733..2836702 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -64,7 +64,7 @@ public abstract class World implements IBlockAccess { @@ -62,7 +62,7 @@ index 130c54d..9a218e4 100644 this.K = this.random.nextInt(12000); this.allowMonsters = true; -@@ -1897,17 +1927,44 @@ public abstract class World implements IBlockAccess { +@@ -1903,17 +1933,44 @@ public abstract class World implements IBlockAccess { int k; int l; @@ -111,7 +111,7 @@ index 130c54d..9a218e4 100644 this.methodProfiler.b(); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1a6024f..93e5a14 100644 +index 12f80a7..be9c866 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -344,12 +344,15 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/CraftBukkit-Patches/0010-Async-Operation-Catching.patch b/CraftBukkit-Patches/0010-Async-Operation-Catching.patch index 56beb66fd..6a75efb38 100644 --- a/CraftBukkit-Patches/0010-Async-Operation-Catching.patch +++ b/CraftBukkit-Patches/0010-Async-Operation-Catching.patch @@ -1,4 +1,4 @@ -From bf458c840cda852fece98340e8529e55cf21cb3b Mon Sep 17 00:00:00 2001 +From 0b5076af3d1f7517fd27ffb01174908a0cc24fe6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 25 Mar 2014 16:10:01 +1100 Subject: [PATCH] Async Operation Catching @@ -66,7 +66,7 @@ index 7c58740..f5d518f 100644 this.trackedPlayers.remove(entityplayer); entityplayer.d(this.tracker); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6b53f5b..69e78b8 100644 +index 703cf73..b25c672 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -891,6 +891,7 @@ public abstract class World implements IBlockAccess { @@ -85,7 +85,7 @@ index 6b53f5b..69e78b8 100644 entity.die(); if (entity instanceof EntityHuman) { this.players.remove(entity); -@@ -2423,6 +2425,7 @@ public abstract class World implements IBlockAccess { +@@ -2429,6 +2431,7 @@ public abstract class World implements IBlockAccess { } public void b(Collection collection) { @@ -122,7 +122,7 @@ index 17d24ce..a45f2a3 100644 if (generate) { // Use the default variant of loadChunk when generate == true. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index acd6a34..a0df1d2 100644 +index e4d0e41..36469db 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -214,6 +214,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/CraftBukkit-Patches/0031-Allow-Disabling-of-Random-Lighting-Updates.patch b/CraftBukkit-Patches/0031-Allow-Disabling-of-Random-Lighting-Updates.patch index c5064b27d..4e8a4adcf 100644 --- a/CraftBukkit-Patches/0031-Allow-Disabling-of-Random-Lighting-Updates.patch +++ b/CraftBukkit-Patches/0031-Allow-Disabling-of-Random-Lighting-Updates.patch @@ -1,4 +1,4 @@ -From db55ab7f90f09b34ed44ccc65d553e62a764433c Mon Sep 17 00:00:00 2001 +From a0ca1b6090c638af225f2c897e5fde8fca22429a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 22 Jun 2013 16:12:02 +1000 Subject: [PATCH] Allow Disabling of Random Lighting Updates @@ -18,10 +18,10 @@ index c3059b6..9e9ea23 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index aa6d407..7c058fc 100644 +index e5da9db..372733a 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -2022,7 +2022,7 @@ public abstract class World implements IBlockAccess { +@@ -2028,7 +2028,7 @@ public abstract class World implements IBlockAccess { } this.methodProfiler.a("playerCheckLight"); diff --git a/CraftBukkit-Patches/0122-Cap-Objective-Score-Length.patch b/CraftBukkit-Patches/0122-Cap-Objective-Score-Length.patch index f70f836a4..627a29377 100644 --- a/CraftBukkit-Patches/0122-Cap-Objective-Score-Length.patch +++ b/CraftBukkit-Patches/0122-Cap-Objective-Score-Length.patch @@ -1,4 +1,4 @@ -From 56ed76c2889bd362dca4fbb2fa777b9c2cb1833a Mon Sep 17 00:00:00 2001 +From 1d7b2b965435427e441c24abdb23fc18979c2a15 Mon Sep 17 00:00:00 2001 From: hauno Date: Tue, 6 May 2014 18:01:37 -0700 Subject: [PATCH] Cap Objective Score Length @@ -6,14 +6,14 @@ Subject: [PATCH] Cap Objective Score Length Adds a check for Score arguments that would crash the client diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java -index 9eaec71..0ee1147 100644 +index 9eaec71..992ef73 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java @@ -95,6 +95,7 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective public Score getScore(String entry) throws IllegalArgumentException, IllegalStateException { Validate.notNull(entry, "Entry cannot be null"); -+ if (entry.length() > 16) throw new IllegalArgumentException("Entry cannot be longer than 16 characters!"); // Spigot ++ if (entry.length() > 40) throw new IllegalArgumentException("Entry cannot be longer than 40 characters!"); // Spigot CraftScoreboard scoreboard = checkState(); return new CraftScore(this, entry); diff --git a/CraftBukkit-Patches/0129-Better-item-validation.patch b/CraftBukkit-Patches/0129-Better-item-validation.patch index 61e37b54a..e5344b55f 100644 --- a/CraftBukkit-Patches/0129-Better-item-validation.patch +++ b/CraftBukkit-Patches/0129-Better-item-validation.patch @@ -1,4 +1,4 @@ -From 002ce45a97550324fa70f68268fa70fdfe98fc7c Mon Sep 17 00:00:00 2001 +From 79fcb7d55239dec5e6f656769874836fd905f075 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 2 Jul 2014 23:35:51 +0100 Subject: [PATCH] Better item validation @@ -102,7 +102,7 @@ index 9a24d2e..d3b5002 100644 addPage(pageArray); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 32d4a67..53c3f6c 100644 +index 651f81c..9ab79e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -36,6 +36,10 @@ import com.google.common.base.Strings; @@ -116,7 +116,7 @@ index 32d4a67..53c3f6c 100644 /** * Children must include the following: * -@@ -227,7 +231,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -228,7 +232,7 @@ class CraftMetaItem implements ItemMeta, Repairable { NBTTagCompound display = tag.getCompound(DISPLAY.NBT); if (display.hasKey(NAME.NBT)) { @@ -125,7 +125,7 @@ index 32d4a67..53c3f6c 100644 } if (display.hasKey(LORE.NBT)) { -@@ -235,7 +239,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -236,7 +240,7 @@ class CraftMetaItem implements ItemMeta, Repairable { lore = new ArrayList(list.size()); for (int index = 0; index < list.size(); index++) { diff --git a/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch b/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch index f6d7bdd7e..11e1dd961 100644 --- a/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch +++ b/CraftBukkit-Patches/0147-Filter-attribute-modifiers-which-cause-the-attribute.patch @@ -1,4 +1,4 @@ -From aef567662449181c785c7e44e7c5f616d9c4037c Mon Sep 17 00:00:00 2001 +From 5101f8f8ab70eca352b0e785443daa64aab9d876 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 31 Jul 2014 17:48:20 +0100 Subject: [PATCH] Filter attribute modifiers which cause the attribute to go @@ -6,7 +6,7 @@ Subject: [PATCH] Filter attribute modifiers which cause the attribute to go diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 53c3f6c..e4ddece 100644 +index 9ab79e3..aaf56bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -38,6 +38,8 @@ import com.google.common.collect.ImmutableMap; @@ -18,7 +18,7 @@ index 53c3f6c..e4ddece 100644 // Spigot end /** -@@ -256,6 +258,123 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -257,6 +259,123 @@ class CraftMetaItem implements ItemMeta, Repairable { NBTTagList save = null; NBTTagList nbttaglist = tag.getList(ATTRIBUTES.NBT, 10); diff --git a/CraftBukkit-Patches/0151-Remove-uneeded-validation.patch b/CraftBukkit-Patches/0151-Remove-uneeded-validation.patch index fc4c9e56b..957649ab5 100644 --- a/CraftBukkit-Patches/0151-Remove-uneeded-validation.patch +++ b/CraftBukkit-Patches/0151-Remove-uneeded-validation.patch @@ -1,14 +1,14 @@ -From 81305ee404567adea739ffbd08b1e2f585284501 Mon Sep 17 00:00:00 2001 +From 57b0eac9f25991ca4dc7112f5b831c2da86614c0 Mon Sep 17 00:00:00 2001 From: drXor Date: Fri, 15 Aug 2014 18:11:09 -0400 Subject: [PATCH] Remove uneeded validation diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index e4ddece..18d7c96 100644 +index aaf56bf..7f3339c 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -509,7 +509,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -510,7 +510,7 @@ class CraftMetaItem implements ItemMeta, Repairable { } static void applyEnchantments(Map enchantments, NBTTagCompound tag, ItemMetaKey key) { @@ -17,7 +17,7 @@ index e4ddece..18d7c96 100644 return; } -@@ -600,7 +600,14 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -601,7 +601,14 @@ class CraftMetaItem implements ItemMeta, Repairable { } public boolean removeEnchant(Enchantment ench) { diff --git a/CraftBukkit-Patches/0154-Skip-invalid-enchants-in-CraftMetaItem.patch b/CraftBukkit-Patches/0154-Skip-invalid-enchants-in-CraftMetaItem.patch index 11b432308..65fe3391d 100644 --- a/CraftBukkit-Patches/0154-Skip-invalid-enchants-in-CraftMetaItem.patch +++ b/CraftBukkit-Patches/0154-Skip-invalid-enchants-in-CraftMetaItem.patch @@ -1,4 +1,4 @@ -From 682010b58ea10a2eba83b13250f030a3658ea702 Mon Sep 17 00:00:00 2001 +From 3afef16f899a9de931737b9b7f712357fcf6f947 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Tue, 19 Aug 2014 11:04:21 +0100 Subject: [PATCH] Skip invalid enchants in CraftMetaItem @@ -8,10 +8,10 @@ CraftMetaItem would add a null enchantment into the enchantment map which causes NullPointers later diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 18d7c96..799b148 100644 +index 7f3339c..9db1c14 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -432,7 +432,11 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -433,7 +433,11 @@ class CraftMetaItem implements ItemMeta, Repairable { int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT); int level = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_LVL.NBT); diff --git a/CraftBukkit-Patches/0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch b/CraftBukkit-Patches/0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch index e45bdf622..e9691f4c7 100644 --- a/CraftBukkit-Patches/0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch +++ b/CraftBukkit-Patches/0156-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch @@ -1,14 +1,14 @@ -From fca20c52e41ace119b95af8c948023b4e52bd9e0 Mon Sep 17 00:00:00 2001 +From dbd41a3b6050781403b9f53c6dbcc2c02d4d21d8 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 22 Aug 2014 05:35:16 -0400 Subject: [PATCH] Added isUnbreakable and setUnbreakable to ItemMeta diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 799b148..70855f9 100644 +index 9db1c14..0b4776e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -201,6 +201,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -202,6 +202,7 @@ class CraftMetaItem implements ItemMeta, Repairable { static final ItemMetaKey ATTRIBUTES_UUID_HIGH = new ItemMetaKey("UUIDMost"); @Specific(Specific.To.NBT) static final ItemMetaKey ATTRIBUTES_UUID_LOW = new ItemMetaKey("UUIDLeast"); @@ -16,7 +16,7 @@ index 799b148..70855f9 100644 private String displayName; private List lore; -@@ -226,6 +227,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -227,6 +228,7 @@ class CraftMetaItem implements ItemMeta, Repairable { this.repairCost = meta.repairCost; this.attributes = meta.attributes; @@ -24,7 +24,7 @@ index 799b148..70855f9 100644 } CraftMetaItem(NBTTagCompound tag) { -@@ -418,6 +420,12 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -419,6 +421,12 @@ class CraftMetaItem implements ItemMeta, Repairable { } else { attributes = null; } @@ -37,7 +37,7 @@ index 799b148..70855f9 100644 } static Map buildEnchantments(NBTTagCompound tag, ItemMetaKey key) { -@@ -458,6 +466,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -459,6 +467,13 @@ class CraftMetaItem implements ItemMeta, Repairable { } attributes = null; @@ -51,7 +51,7 @@ index 799b148..70855f9 100644 } static Map buildEnchantments(Map map, ItemMetaKey key) { -@@ -490,6 +505,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -491,6 +506,13 @@ class CraftMetaItem implements ItemMeta, Repairable { applyEnchantments(enchantments, itemTag, ENCHANTMENTS); @@ -65,7 +65,7 @@ index 799b148..70855f9 100644 if (hasRepairCost()) { itemTag.setInt(REPAIR.NBT, repairCost); } -@@ -548,7 +570,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -549,7 +571,7 @@ class CraftMetaItem implements ItemMeta, Repairable { @Overridden boolean isEmpty() { @@ -74,7 +74,7 @@ index 799b148..70855f9 100644 } public String getDisplayName() { -@@ -672,7 +694,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -673,7 +695,7 @@ class CraftMetaItem implements ItemMeta, Repairable { && (this.hasEnchants() ? that.hasEnchants() && this.enchantments.equals(that.enchantments) : !that.hasEnchants()) && (this.hasLore() ? that.hasLore() && this.lore.equals(that.lore) : !that.hasLore()) && (this.hasAttributes() ? that.hasAttributes() && this.attributes.equals(that.attributes) : !that.hasAttributes()) @@ -83,7 +83,7 @@ index 799b148..70855f9 100644 } /** -@@ -698,6 +720,7 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -699,6 +721,7 @@ class CraftMetaItem implements ItemMeta, Repairable { hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0); hash = 61 * hash + (hasAttributes() ? this.attributes.hashCode() : 0); hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0); @@ -91,7 +91,7 @@ index 799b148..70855f9 100644 return hash; } -@@ -741,6 +764,13 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -742,6 +765,13 @@ class CraftMetaItem implements ItemMeta, Repairable { builder.put(REPAIR.BUKKIT, repairCost); } @@ -105,7 +105,7 @@ index 799b148..70855f9 100644 return builder; } -@@ -803,6 +833,19 @@ class CraftMetaItem implements ItemMeta, Repairable { +@@ -804,6 +834,19 @@ class CraftMetaItem implements ItemMeta, Repairable { // Spigot start private final Spigot spigot = new Spigot() {