From afa737e5a5647913e58e7802395671c6e4cf1448 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Thu, 18 Dec 2014 17:33:08 -0600 Subject: [PATCH] Update from upstream SpigotMC a3168ab2ce4 9b45d9fa8d3 b43a31a5c25 a926b96d5d1 d6b5ba7ca03 bb782d07aed 5a74d55c678 47b1dff3e68 [M] --- Bukkit-Patches/0006-Add-Particle-API.patch | 4 +- ...ntoryClickEvent-getClickedInventory.patch} | 0 Bukkit-Patches/0009-Update-Depends.patch | 46 --- ...SessionData-to-the-Conversation-API.patch} | 0 ... 0011-Catch-Conversation-API-Errors.patch} | 0 ....patch => 0012-Player-Collision-API.patch} | 0 ...> 0013-Expand-Boolean-Prompt-Values.patch} | 0 ...d-Getter-for-Entity-Invulnerability.patch} | 0 ...n-API.patch => 0015-Add-respawn-API.patch} | 0 ...-Fix-Plugin-Message-API-Disconnects.patch} | 0 ...ix-Tab-Completion-for-Some-Commands.patch} | 0 ...Implement-Locale-Getter-for-Players.patch} | 0 Bukkit-Patches/0019-Add-Spigot-Links.patch | 27 -- ...support-for-fetching-hidden-players.patch} | 0 ...h => 0020-Silenceable-Lightning-API.patch} | 0 ...ation-on-some-player-lookup-methods.patch} | 0 ...team-API-to-allow-arbitrary-strings.patch} | 0 ... => 0023-Add-Score.isScoreSet-Z-API.patch} | 0 ...> 0024-Add-PlayerSpawnLocationEvent.patch} | 0 ...lassLoader-Deadlocks-Where-Possible.patch} | 0 ...slow-tab-complete-for-some-commands.patch} | 0 ...ndeprecate-Player-updateInventory-V.patch} | 0 ...able-and-setUnbreakable-to-ItemMeta.patch} | 0 ...I.patch => 0029-BungeeCord-Chat-API.patch} | 4 +- CraftBukkit-Patches/0001-POM-Changes.patch | 9 +- CraftBukkit-Patches/0002-mc-dev-imports.patch | 338 ------------------ .../0003-Skeleton-API-Implementations.patch | 8 +- ...-team-API-to-allow-arbitrary-strings.patch | 4 +- .../0127-Better-item-validation.patch | 6 +- ...-modifiers-which-cause-the-attribute.patch | 2 +- ...kable-and-setUnbreakable-to-ItemMeta.patch | 27 +- 31 files changed, 36 insertions(+), 439 deletions(-) rename Bukkit-Patches/{0010-InventoryClickEvent-getClickedInventory.patch => 0009-InventoryClickEvent-getClickedInventory.patch} (100%) delete mode 100644 Bukkit-Patches/0009-Update-Depends.patch rename Bukkit-Patches/{0011-Added-getAllSessionData-to-the-Conversation-API.patch => 0010-Added-getAllSessionData-to-the-Conversation-API.patch} (100%) rename Bukkit-Patches/{0012-Catch-Conversation-API-Errors.patch => 0011-Catch-Conversation-API-Errors.patch} (100%) rename Bukkit-Patches/{0013-Player-Collision-API.patch => 0012-Player-Collision-API.patch} (100%) rename Bukkit-Patches/{0014-Expand-Boolean-Prompt-Values.patch => 0013-Expand-Boolean-Prompt-Values.patch} (100%) rename Bukkit-Patches/{0015-Add-Getter-for-Entity-Invulnerability.patch => 0014-Add-Getter-for-Entity-Invulnerability.patch} (100%) rename Bukkit-Patches/{0016-Add-respawn-API.patch => 0015-Add-respawn-API.patch} (100%) rename Bukkit-Patches/{0017-Fix-Plugin-Message-API-Disconnects.patch => 0016-Fix-Plugin-Message-API-Disconnects.patch} (100%) rename Bukkit-Patches/{0018-Fix-Tab-Completion-for-Some-Commands.patch => 0017-Fix-Tab-Completion-for-Some-Commands.patch} (100%) rename Bukkit-Patches/{0020-Implement-Locale-Getter-for-Players.patch => 0018-Implement-Locale-Getter-for-Players.patch} (100%) delete mode 100644 Bukkit-Patches/0019-Add-Spigot-Links.patch rename Bukkit-Patches/{0021-Add-support-for-fetching-hidden-players.patch => 0019-Add-support-for-fetching-hidden-players.patch} (100%) rename Bukkit-Patches/{0022-Silenceable-Lightning-API.patch => 0020-Silenceable-Lightning-API.patch} (100%) rename Bukkit-Patches/{0023-Remove-deprecation-on-some-player-lookup-methods.patch => 0021-Remove-deprecation-on-some-player-lookup-methods.patch} (100%) rename Bukkit-Patches/{0024-Expand-team-API-to-allow-arbitrary-strings.patch => 0022-Expand-team-API-to-allow-arbitrary-strings.patch} (100%) rename Bukkit-Patches/{0025-Add-Score.isScoreSet-Z-API.patch => 0023-Add-Score.isScoreSet-Z-API.patch} (100%) rename Bukkit-Patches/{0026-Add-PlayerSpawnLocationEvent.patch => 0024-Add-PlayerSpawnLocationEvent.patch} (100%) rename Bukkit-Patches/{0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch => 0025-Ease-ClassLoader-Deadlocks-Where-Possible.patch} (100%) rename Bukkit-Patches/{0028-Fix-slow-tab-complete-for-some-commands.patch => 0026-Fix-slow-tab-complete-for-some-commands.patch} (100%) rename Bukkit-Patches/{0029-Undeprecate-Player-updateInventory-V.patch => 0027-Undeprecate-Player-updateInventory-V.patch} (100%) rename Bukkit-Patches/{0030-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch => 0028-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch} (100%) rename Bukkit-Patches/{0031-BungeeCord-Chat-API.patch => 0029-BungeeCord-Chat-API.patch} (99%) diff --git a/Bukkit-Patches/0006-Add-Particle-API.patch b/Bukkit-Patches/0006-Add-Particle-API.patch index bb75e8a3e0..aaa051bab1 100644 --- a/Bukkit-Patches/0006-Add-Particle-API.patch +++ b/Bukkit-Patches/0006-Add-Particle-API.patch @@ -329,8 +329,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Spigot end + /** - * Represents various map environment types that a world may be - */ + * Gets the world border for this world. + * diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/entity/Player.java diff --git a/Bukkit-Patches/0010-InventoryClickEvent-getClickedInventory.patch b/Bukkit-Patches/0009-InventoryClickEvent-getClickedInventory.patch similarity index 100% rename from Bukkit-Patches/0010-InventoryClickEvent-getClickedInventory.patch rename to Bukkit-Patches/0009-InventoryClickEvent-getClickedInventory.patch diff --git a/Bukkit-Patches/0009-Update-Depends.patch b/Bukkit-Patches/0009-Update-Depends.patch deleted file mode 100644 index ddfabd3f6b..0000000000 --- a/Bukkit-Patches/0009-Update-Depends.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: md_5 -Date: Thu, 4 Jul 2013 20:05:19 +1000 -Subject: [PATCH] Update Depends - -- All of these changes have been reviewed to be binary compatible and in general contract compatible with previous versions of the libraries. - -diff --git a/pom.xml b/pom.xml -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -0,0 +0,0 @@ - - org.yaml - snakeyaml -- 1.9 -+ 1.12 - jar - compile - - - com.googlecode.json-simple - json-simple -- 1.1 -+ 1.1.1 - jar - compile - - - org.avaje - ebean -- 2.7.3 -+ 2.8.1 - jar - compile - -@@ -0,0 +0,0 @@ - - commons-lang - commons-lang -- 2.3 -+ 2.6 - - - --- \ No newline at end of file diff --git a/Bukkit-Patches/0011-Added-getAllSessionData-to-the-Conversation-API.patch b/Bukkit-Patches/0010-Added-getAllSessionData-to-the-Conversation-API.patch similarity index 100% rename from Bukkit-Patches/0011-Added-getAllSessionData-to-the-Conversation-API.patch rename to Bukkit-Patches/0010-Added-getAllSessionData-to-the-Conversation-API.patch diff --git a/Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch b/Bukkit-Patches/0011-Catch-Conversation-API-Errors.patch similarity index 100% rename from Bukkit-Patches/0012-Catch-Conversation-API-Errors.patch rename to Bukkit-Patches/0011-Catch-Conversation-API-Errors.patch diff --git a/Bukkit-Patches/0013-Player-Collision-API.patch b/Bukkit-Patches/0012-Player-Collision-API.patch similarity index 100% rename from Bukkit-Patches/0013-Player-Collision-API.patch rename to Bukkit-Patches/0012-Player-Collision-API.patch diff --git a/Bukkit-Patches/0014-Expand-Boolean-Prompt-Values.patch b/Bukkit-Patches/0013-Expand-Boolean-Prompt-Values.patch similarity index 100% rename from Bukkit-Patches/0014-Expand-Boolean-Prompt-Values.patch rename to Bukkit-Patches/0013-Expand-Boolean-Prompt-Values.patch diff --git a/Bukkit-Patches/0015-Add-Getter-for-Entity-Invulnerability.patch b/Bukkit-Patches/0014-Add-Getter-for-Entity-Invulnerability.patch similarity index 100% rename from Bukkit-Patches/0015-Add-Getter-for-Entity-Invulnerability.patch rename to Bukkit-Patches/0014-Add-Getter-for-Entity-Invulnerability.patch diff --git a/Bukkit-Patches/0016-Add-respawn-API.patch b/Bukkit-Patches/0015-Add-respawn-API.patch similarity index 100% rename from Bukkit-Patches/0016-Add-respawn-API.patch rename to Bukkit-Patches/0015-Add-respawn-API.patch diff --git a/Bukkit-Patches/0017-Fix-Plugin-Message-API-Disconnects.patch b/Bukkit-Patches/0016-Fix-Plugin-Message-API-Disconnects.patch similarity index 100% rename from Bukkit-Patches/0017-Fix-Plugin-Message-API-Disconnects.patch rename to Bukkit-Patches/0016-Fix-Plugin-Message-API-Disconnects.patch diff --git a/Bukkit-Patches/0018-Fix-Tab-Completion-for-Some-Commands.patch b/Bukkit-Patches/0017-Fix-Tab-Completion-for-Some-Commands.patch similarity index 100% rename from Bukkit-Patches/0018-Fix-Tab-Completion-for-Some-Commands.patch rename to Bukkit-Patches/0017-Fix-Tab-Completion-for-Some-Commands.patch diff --git a/Bukkit-Patches/0020-Implement-Locale-Getter-for-Players.patch b/Bukkit-Patches/0018-Implement-Locale-Getter-for-Players.patch similarity index 100% rename from Bukkit-Patches/0020-Implement-Locale-Getter-for-Players.patch rename to Bukkit-Patches/0018-Implement-Locale-Getter-for-Players.patch diff --git a/Bukkit-Patches/0019-Add-Spigot-Links.patch b/Bukkit-Patches/0019-Add-Spigot-Links.patch deleted file mode 100644 index f4b9a5b931..0000000000 --- a/Bukkit-Patches/0019-Add-Spigot-Links.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: md_5 -Date: Thu, 23 Jan 2014 13:17:38 +1100 -Subject: [PATCH] Add Spigot Links - - -diff --git a/README.md b/README.md -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/README.md -+++ b/README.md -@@ -0,0 +0,0 @@ --Bukkit -+Spigot-API - ====== - - A Minecraft Server API. - --Website: [http://bukkit.org](http://bukkit.org) --Bugs/Suggestions: [http://leaky.bukkit.org](http://leaky.bukkit.org) --Contributing Guidelines: [CONTRIBUTING.md](https://github.com/Bukkit/Bukkit/blob/master/CONTRIBUTING.md) -+Website: [http://spigotmc.org](http://spigotmc.org) -+Bugs/Suggestions: [http://www.spigotmc.org/forums/bugs-feature-requests.8/](http://www.spigotmc.org/forums/bugs-feature-requests.8/) -+Contributing Guidelines: [CONTRIBUTING.md](https://github.com/SpigotMC/Spigot-API/blob/master/CONTRIBUTING.md) - - Compilation - ----------- --- \ No newline at end of file diff --git a/Bukkit-Patches/0021-Add-support-for-fetching-hidden-players.patch b/Bukkit-Patches/0019-Add-support-for-fetching-hidden-players.patch similarity index 100% rename from Bukkit-Patches/0021-Add-support-for-fetching-hidden-players.patch rename to Bukkit-Patches/0019-Add-support-for-fetching-hidden-players.patch diff --git a/Bukkit-Patches/0022-Silenceable-Lightning-API.patch b/Bukkit-Patches/0020-Silenceable-Lightning-API.patch similarity index 100% rename from Bukkit-Patches/0022-Silenceable-Lightning-API.patch rename to Bukkit-Patches/0020-Silenceable-Lightning-API.patch diff --git a/Bukkit-Patches/0023-Remove-deprecation-on-some-player-lookup-methods.patch b/Bukkit-Patches/0021-Remove-deprecation-on-some-player-lookup-methods.patch similarity index 100% rename from Bukkit-Patches/0023-Remove-deprecation-on-some-player-lookup-methods.patch rename to Bukkit-Patches/0021-Remove-deprecation-on-some-player-lookup-methods.patch diff --git a/Bukkit-Patches/0024-Expand-team-API-to-allow-arbitrary-strings.patch b/Bukkit-Patches/0022-Expand-team-API-to-allow-arbitrary-strings.patch similarity index 100% rename from Bukkit-Patches/0024-Expand-team-API-to-allow-arbitrary-strings.patch rename to Bukkit-Patches/0022-Expand-team-API-to-allow-arbitrary-strings.patch diff --git a/Bukkit-Patches/0025-Add-Score.isScoreSet-Z-API.patch b/Bukkit-Patches/0023-Add-Score.isScoreSet-Z-API.patch similarity index 100% rename from Bukkit-Patches/0025-Add-Score.isScoreSet-Z-API.patch rename to Bukkit-Patches/0023-Add-Score.isScoreSet-Z-API.patch diff --git a/Bukkit-Patches/0026-Add-PlayerSpawnLocationEvent.patch b/Bukkit-Patches/0024-Add-PlayerSpawnLocationEvent.patch similarity index 100% rename from Bukkit-Patches/0026-Add-PlayerSpawnLocationEvent.patch rename to Bukkit-Patches/0024-Add-PlayerSpawnLocationEvent.patch diff --git a/Bukkit-Patches/0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch b/Bukkit-Patches/0025-Ease-ClassLoader-Deadlocks-Where-Possible.patch similarity index 100% rename from Bukkit-Patches/0027-Ease-ClassLoader-Deadlocks-Where-Possible.patch rename to Bukkit-Patches/0025-Ease-ClassLoader-Deadlocks-Where-Possible.patch diff --git a/Bukkit-Patches/0028-Fix-slow-tab-complete-for-some-commands.patch b/Bukkit-Patches/0026-Fix-slow-tab-complete-for-some-commands.patch similarity index 100% rename from Bukkit-Patches/0028-Fix-slow-tab-complete-for-some-commands.patch rename to Bukkit-Patches/0026-Fix-slow-tab-complete-for-some-commands.patch diff --git a/Bukkit-Patches/0029-Undeprecate-Player-updateInventory-V.patch b/Bukkit-Patches/0027-Undeprecate-Player-updateInventory-V.patch similarity index 100% rename from Bukkit-Patches/0029-Undeprecate-Player-updateInventory-V.patch rename to Bukkit-Patches/0027-Undeprecate-Player-updateInventory-V.patch diff --git a/Bukkit-Patches/0030-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch b/Bukkit-Patches/0028-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch similarity index 100% rename from Bukkit-Patches/0030-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch rename to Bukkit-Patches/0028-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch diff --git a/Bukkit-Patches/0031-BungeeCord-Chat-API.patch b/Bukkit-Patches/0029-BungeeCord-Chat-API.patch similarity index 99% rename from Bukkit-Patches/0031-BungeeCord-Chat-API.patch rename to Bukkit-Patches/0029-BungeeCord-Chat-API.patch index d013013393..5e6207bed7 100644 --- a/Bukkit-Patches/0031-BungeeCord-Chat-API.patch +++ b/Bukkit-Patches/0029-BungeeCord-Chat-API.patch @@ -80,4 +80,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } Spigot spigot(); --- \ No newline at end of file +-- +1.9.4.msysgit.2 + diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index 4dcbd09d3f..ebea56d1d5 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -37,11 +37,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + ../pom.xml + + - - - repobo-snap -@@ -0,0 +0,0 @@ - - org.bukkit @@ -125,4 +120,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Properties properties = new Properties(); if (stream != null) { --- \ No newline at end of file +-- +1.9.4.msysgit.2 + diff --git a/CraftBukkit-Patches/0002-mc-dev-imports.patch b/CraftBukkit-Patches/0002-mc-dev-imports.patch index 9482b83963..a28f916b8b 100644 --- a/CraftBukkit-Patches/0002-mc-dev-imports.patch +++ b/CraftBukkit-Patches/0002-mc-dev-imports.patch @@ -140,344 +140,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this(usercache); + } +} -diff --git a/src/main/java/net/minecraft/server/BiomeDecorator.java b/src/main/java/net/minecraft/server/BiomeDecorator.java -deleted file mode 100644 -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 ---- a/src/main/java/net/minecraft/server/BiomeDecorator.java -+++ /dev/null -@@ -0,0 +0,0 @@ --package net.minecraft.server; -- --import java.util.Random; -- --public class BiomeDecorator { -- -- protected World a; -- protected Random b; -- protected BlockPosition c; -- protected CustomWorldSettingsFinal d; -- protected WorldGenerator e = new WorldGenClay(4); -- protected WorldGenerator f; -- protected WorldGenerator g; -- protected WorldGenerator h; -- protected WorldGenerator i; -- protected WorldGenerator j; -- protected WorldGenerator k; -- protected WorldGenerator l; -- protected WorldGenerator m; -- protected WorldGenerator n; -- protected WorldGenerator o; -- protected WorldGenerator p; -- protected WorldGenerator q; -- protected WorldGenerator r; -- protected WorldGenFlowers s; -- protected WorldGenerator t; -- protected WorldGenerator u; -- protected WorldGenerator v; -- protected WorldGenerator w; -- protected WorldGenerator x; -- protected WorldGenerator y; -- protected int z; -- protected int A; -- protected int B; -- protected int C; -- protected int D; -- protected int E; -- protected int F; -- protected int G; -- protected int H; -- protected int I; -- protected int J; -- protected int K; -- public boolean L; -- -- public BiomeDecorator() { -- this.f = new WorldGenSand(Blocks.SAND, 7); -- this.g = new WorldGenSand(Blocks.GRAVEL, 6); -- this.s = new WorldGenFlowers(Blocks.YELLOW_FLOWER, EnumFlowerVarient.DANDELION); -- this.t = new WorldGenMushrooms(Blocks.BROWN_MUSHROOM); -- this.u = new WorldGenMushrooms(Blocks.RED_MUSHROOM); -- this.v = new WorldGenHugeMushroom(); -- this.w = new WorldGenReed(); -- this.x = new WorldGenCactus(); -- this.y = new WorldGenWaterLily(); -- this.B = 2; -- this.C = 1; -- this.H = 1; -- this.I = 3; -- this.J = 1; -- this.L = true; -- } -- -- public void a(World world, Random random, BiomeBase biomebase, BlockPosition blockposition) { -- if (this.a != null) { -- throw new RuntimeException("Already decorating"); -- } else { -- this.a = world; -- String s = world.getWorldData().getGeneratorOptions(); -- -- if (s != null) { -- this.d = CustomWorldSettings.a(s).b(); -- } else { -- this.d = CustomWorldSettings.a("").b(); -- } -- -- this.b = random; -- this.c = blockposition; -- this.h = new WorldGenMinable(Blocks.DIRT.getBlockData(), this.d.I); -- this.i = new WorldGenMinable(Blocks.GRAVEL.getBlockData(), this.d.M); -- this.j = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.GRANITE), this.d.Q); -- this.k = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.DIORITE), this.d.U); -- this.l = new WorldGenMinable(Blocks.STONE.getBlockData().set(BlockStone.VARIANT, EnumStoneVariant.ANDESITE), this.d.Y); -- this.m = new WorldGenMinable(Blocks.COAL_ORE.getBlockData(), this.d.ac); -- this.n = new WorldGenMinable(Blocks.IRON_ORE.getBlockData(), this.d.ag); -- this.o = new WorldGenMinable(Blocks.GOLD_ORE.getBlockData(), this.d.ak); -- this.p = new WorldGenMinable(Blocks.REDSTONE_ORE.getBlockData(), this.d.ao); -- this.q = new WorldGenMinable(Blocks.DIAMOND_ORE.getBlockData(), this.d.as); -- this.r = new WorldGenMinable(Blocks.LAPIS_ORE.getBlockData(), this.d.aw); -- this.a(biomebase); -- this.a = null; -- this.b = null; -- } -- } -- -- protected void a(BiomeBase biomebase) { -- this.a(); -- -- int i; -- int j; -- int k; -- -- for (i = 0; i < this.I; ++i) { -- j = this.b.nextInt(16) + 8; -- k = this.b.nextInt(16) + 8; -- this.f.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k))); -- } -- -- for (i = 0; i < this.J; ++i) { -- j = this.b.nextInt(16) + 8; -- k = this.b.nextInt(16) + 8; -- this.e.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k))); -- } -- -- for (i = 0; i < this.H; ++i) { -- j = this.b.nextInt(16) + 8; -- k = this.b.nextInt(16) + 8; -- this.g.generate(this.a, this.b, this.a.r(this.c.a(j, 0, k))); -- } -- -- i = this.A; -- if (this.b.nextInt(10) == 0) { -- ++i; -- } -- -- int l; -- BlockPosition blockposition; -- -- for (j = 0; j < i; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- WorldGenTreeAbstract worldgentreeabstract = biomebase.a(this.b); -- -- worldgentreeabstract.e(); -- blockposition = this.getHighestBlockYAt(this.c.a(k, 0, l)); // CraftBukkit - Prevent crash -- if (worldgentreeabstract.generate(this.a, this.b, blockposition)) { -- worldgentreeabstract.a(this.a, this.b, blockposition); -- } -- } -- -- for (j = 0; j < this.K; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- this.v.generate(this.a, this.b, this.getHighestBlockYAt(this.c.a(k, 0, l ))); // CraftBukkit - Prevent crash -- } -- -- int i1; -- -- for (j = 0; j < this.B; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() + 32); // CraftBukkit - Prevent crash -- blockposition = this.c.a(k, i1, l); -- EnumFlowerVarient enumflowervarient = biomebase.a(this.b, blockposition); -- BlockFlowers blockflowers = enumflowervarient.a().a(); -- -- if (blockflowers.getMaterial() != Material.AIR) { -- this.s.a(blockflowers, enumflowervarient); -- this.s.generate(this.a, this.b, blockposition); -- } -- } -- -- for (j = 0; j < this.C; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- biomebase.b(this.b).generate(this.a, this.b, this.c.a(k, i1, l)); -- } -- -- for (j = 0; j < this.D; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- (new WorldGenDeadBush()).generate(this.a, this.b, this.c.a(k, i1, l)); -- } -- -- j = 0; -- -- while (j < this.z) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- blockposition = this.c.a(k, i1, l); -- -- while (true) { -- if (blockposition.getY() > 0) { -- BlockPosition blockposition1 = blockposition.down(); -- -- if (this.a.isEmpty(blockposition1)) { -- blockposition = blockposition1; -- continue; -- } -- } -- -- this.y.generate(this.a, this.b, blockposition); -- ++j; -- break; -- } -- } -- -- for (j = 0; j < this.E; ++j) { -- if (this.b.nextInt(4) == 0) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- BlockPosition blockposition2 = this.getHighestBlockYAt(this.c.a(k, 0, l)); // CraftBukkit - Prevent crash -- -- this.t.generate(this.a, this.b, blockposition2); -- } -- -- if (this.b.nextInt(8) == 0) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- blockposition = this.c.a(k, i1, l); -- this.u.generate(this.a, this.b, blockposition); -- } -- } -- -- if (this.b.nextInt(4) == 0) { -- j = this.b.nextInt(16) + 8; -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(this.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2); // CraftBukkit - Prevent crash -- this.t.generate(this.a, this.b, this.c.a(j, l, k)); -- } -- -- if (this.b.nextInt(8) == 0) { -- j = this.b.nextInt(16) + 8; -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(this.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2); // CraftBukkit - Prevent crash -- this.u.generate(this.a, this.b, this.c.a(j, l, k)); -- } -- -- for (j = 0; j < this.F; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- this.w.generate(this.a, this.b, this.c.a(k, i1, l)); -- } -- -- for (j = 0; j < 10; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- this.w.generate(this.a, this.b, this.c.a(k, i1, l)); -- } -- -- if (this.b.nextInt(32) == 0) { -- j = this.b.nextInt(16) + 8; -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(this.getHighestBlockYAt(this.c.a(j, 0, k)).getY() * 2); // CraftBukkit - Prevent crash -- (new WorldGenPumpkin()).generate(this.a, this.b, this.c.a(j, l, k)); -- } -- -- for (j = 0; j < this.G; ++j) { -- k = this.b.nextInt(16) + 8; -- l = this.b.nextInt(16) + 8; -- i1 = this.b.nextInt(this.getHighestBlockYAt(this.c.a(k, 0, l)).getY() * 2); // CraftBukkit - Prevent crash -- this.x.generate(this.a, this.b, this.c.a(k, i1, l)); -- } -- -- if (this.L) { -- BlockPosition blockposition3; -- -- for (j = 0; j < 50; ++j) { -- blockposition3 = this.c.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(248) + 8), this.b.nextInt(16) + 8); -- (new WorldGenLiquids(Blocks.FLOWING_WATER)).generate(this.a, this.b, blockposition3); -- } -- -- for (j = 0; j < 20; ++j) { -- blockposition3 = this.c.a(this.b.nextInt(16) + 8, this.b.nextInt(this.b.nextInt(this.b.nextInt(240) + 8) + 8), this.b.nextInt(16) + 8); -- (new WorldGenLiquids(Blocks.FLOWING_LAVA)).generate(this.a, this.b, blockposition3); -- } -- } -- -- } -- -- // CraftBukkit start - The heightMap can be wrong calculated and return Y = 0 which will crash the Server -- private BlockPosition getHighestBlockYAt( BlockPosition blockPosition ) { -- BlockPosition returnBlockPosition = this.a.getHighestBlockYAt( blockPosition ); -- if ( returnBlockPosition.getY() == 0 ) { -- returnBlockPosition = returnBlockPosition.up( 1 ); -- } -- return returnBlockPosition; -- } -- // CraftBukkit end -- -- protected void a(int i, WorldGenerator worldgenerator, int j, int k) { -- int l; -- -- if (k < j) { -- l = j; -- j = k; -- k = l; -- } else if (k == j) { -- if (j < 255) { -- ++k; -- } else { -- --j; -- } -- } -- -- for (l = 0; l < i; ++l) { -- BlockPosition blockposition = this.c.a(this.b.nextInt(16), this.b.nextInt(k - j) + j, this.b.nextInt(16)); -- -- worldgenerator.generate(this.a, this.b, blockposition); -- } -- -- } -- -- protected void b(int i, WorldGenerator worldgenerator, int j, int k) { -- for (int l = 0; l < i; ++l) { -- BlockPosition blockposition = this.c.a(this.b.nextInt(16), this.b.nextInt(k) + this.b.nextInt(k) + j - k, this.b.nextInt(16)); -- -- worldgenerator.generate(this.a, this.b, blockposition); -- } -- -- } -- -- protected void a() { -- this.a(this.d.J, this.h, this.d.K, this.d.L); -- this.a(this.d.N, this.i, this.d.O, this.d.P); -- this.a(this.d.V, this.k, this.d.W, this.d.X); -- this.a(this.d.R, this.j, this.d.S, this.d.T); -- this.a(this.d.Z, this.l, this.d.aa, this.d.ab); -- this.a(this.d.ad, this.m, this.d.ae, this.d.af); -- this.a(this.d.ah, this.n, this.d.ai, this.d.aj); -- this.a(this.d.al, this.o, this.d.am, this.d.an); -- this.a(this.d.ap, this.p, this.d.aq, this.d.ar); -- this.a(this.d.at, this.q, this.d.au, this.d.av); -- this.b(this.d.ax, this.r, this.d.ay, this.d.az); -- } --} diff --git a/src/main/java/net/minecraft/server/BlockAnvil.java b/src/main/java/net/minecraft/server/BlockAnvil.java new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 diff --git a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch index 2cf264dd71..f937bdb419 100644 --- a/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch +++ b/CraftBukkit-Patches/0003-Skeleton-API-Implementations.patch @@ -128,8 +128,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { - public final String toString() { - return SerializableMeta.classMap.get(getClass()) + "_META:" + serialize(); // TODO: cry + } + return HANDLED_TAGS; } + + // Spigot start @@ -165,8 +165,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -0,0 +0,0 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { - scoreboard.teams.remove(team.getName()); - setUnregistered(); + throw new IllegalArgumentException("Unknown visibility level " + visibility); + } } + + // Spigot start diff --git a/CraftBukkit-Patches/0109-Expand-team-API-to-allow-arbitrary-strings.patch b/CraftBukkit-Patches/0109-Expand-team-API-to-allow-arbitrary-strings.patch index 76dba7efe5..199a63b205 100644 --- a/CraftBukkit-Patches/0109-Expand-team-API-to-allow-arbitrary-strings.patch +++ b/CraftBukkit-Patches/0109-Expand-team-API-to-allow-arbitrary-strings.patch @@ -84,8 +84,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override @@ -0,0 +0,0 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { - scoreboard.teams.remove(team.getName()); - setUnregistered(); + throw new IllegalArgumentException("Unknown visibility level " + visibility); + } } - - // Spigot start diff --git a/CraftBukkit-Patches/0127-Better-item-validation.patch b/CraftBukkit-Patches/0127-Better-item-validation.patch index 6d08b4458c..1ef6003390 100644 --- a/CraftBukkit-Patches/0127-Better-item-validation.patch +++ b/CraftBukkit-Patches/0127-Better-item-validation.patch @@ -105,9 +105,9 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -0,0 +0,0 @@ import com.google.common.base.Strings; - import com.google.common.collect.ImmutableList; - import com.google.common.collect.ImmutableMap; +@@ -0,0 +0,0 @@ import com.google.common.collect.Sets; + import java.util.Arrays; + import java.util.Set; +// Spigot start +import static org.spigotmc.ValidateUtils.*; diff --git a/CraftBukkit-Patches/0145-Filter-attribute-modifiers-which-cause-the-attribute.patch b/CraftBukkit-Patches/0145-Filter-attribute-modifiers-which-cause-the-attribute.patch index befdde3beb..9e8c87c00a 100644 --- a/CraftBukkit-Patches/0145-Filter-attribute-modifiers-which-cause-the-attribute.patch +++ b/CraftBukkit-Patches/0145-Filter-attribute-modifiers-which-cause-the-attribute.patch @@ -9,7 +9,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -0,0 +0,0 @@ import com.google.common.collect.ImmutableMap; +@@ -0,0 +0,0 @@ import java.util.Set; // Spigot start import static org.spigotmc.ValidateUtils.*; diff --git a/CraftBukkit-Patches/0153-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch b/CraftBukkit-Patches/0153-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch index b3f763cd49..65f31859e6 100644 --- a/CraftBukkit-Patches/0153-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch +++ b/CraftBukkit-Patches/0153-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch @@ -17,16 +17,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private String displayName; private List lore; @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { - this.repairCost = meta.repairCost; this.attributes = meta.attributes; + this.unhandledTags.putAll(meta.unhandledTags); + spigot.setUnbreakable( meta.spigot.isUnbreakable() ); // Spigot } CraftMetaItem(NBTTagCompound tag) { @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { - } else { - attributes = null; + unhandledTags.put(key, tag.get(key)); + } } + // Spigot start + if ( tag.hasKey( UNBREAKABLE.NBT ) ) @@ -69,24 +69,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Overridden boolean isEmpty() { -- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost()); -+ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || spigot.isUnbreakable()); // Spigot +- return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty()); ++ return !(hasDisplayName() || hasEnchants() || hasLore() || hasAttributes() || hasRepairCost() || !unhandledTags.isEmpty() || spigot.isUnbreakable()); // Spigot } public String getDisplayName() { @@ -0,0 +0,0 @@ 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()) -- && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()); -+ && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) && this.spigot.isUnbreakable() == that.spigot.isUnbreakable(); // Spigot + && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) +- && (this.unhandledTags.equals(that.unhandledTags)); ++ && (this.unhandledTags.equals(that.unhandledTags)) ++ && this.spigot.isUnbreakable() == that.spigot.isUnbreakable(); // Spigot } /** @@ -0,0 +0,0 @@ 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); + hash = 61 * hash + unhandledTags.hashCode(); + hash = 61 * hash + (spigot.isUnbreakable() ? 1231 : 1237); // Spigot return hash; } @@ -105,6 +106,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return builder; } +@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { + public static Set getHandledTags() { + if (HANDLED_TAGS.isEmpty()) { + HANDLED_TAGS.addAll(Arrays.asList( ++ UNBREAKABLE.NBT, // Spigot + DISPLAY.NBT, + REPAIR.NBT, + ATTRIBUTES.NBT, @@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Repairable { // Spigot start private final Spigot spigot = new Spigot()