From 451ede36cf9f23838ce05bb1b329578983e2e788 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 25 Mar 2016 18:21:38 -0500 Subject: [PATCH] Merge upstream changes and rebuild patches --- Bukkit | 2 +- CraftBukkit | 2 +- Spigot | 2 +- Spigot-Server-Patches/0004-Timings-v2.patch | 8 ++++---- ...le-cactus-and-reed-natural-growth-heights.patch | 12 ++++++------ .../0018-Player-affects-spawning-API.patch | 6 +++--- .../0040-Add-player-view-distance-API.patch | 8 ++++---- .../0080-Complete-resource-pack-API.patch | 8 ++++---- .../0093-Optimized-Light-Level-Comparisons.patch | 14 +++++++------- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Bukkit b/Bukkit index db1761e3c..67851e79b 160000 --- a/Bukkit +++ b/Bukkit @@ -1 +1 @@ -Subproject commit db1761e3c9dd2a74cda188145a5d3dc9da57f712 +Subproject commit 67851e79b65efb980c2bd44a3560cff39540d370 diff --git a/CraftBukkit b/CraftBukkit index 8e5eab265..955489455 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit 8e5eab26554f734da63ff4deb13068a69873e949 +Subproject commit 95548945533d8572a7cb911b33c8ef4a823be49b diff --git a/Spigot b/Spigot index 90839e622..5d4e372f4 160000 --- a/Spigot +++ b/Spigot @@ -1 +1 @@ -Subproject commit 90839e6224403fb7f32e6eeba704623a3121d541 +Subproject commit 5d4e372f482b9291a1255c62a6b02c754b66d5f8 diff --git a/Spigot-Server-Patches/0004-Timings-v2.patch b/Spigot-Server-Patches/0004-Timings-v2.patch index 3c5f4855f..4cf89f779 100644 --- a/Spigot-Server-Patches/0004-Timings-v2.patch +++ b/Spigot-Server-Patches/0004-Timings-v2.patch @@ -1,4 +1,4 @@ -From 516d534d631e3e9950b2c834555fb819f6ffac1e Mon Sep 17 00:00:00 2001 +From be7d3cc0654179afcab12bc8e1d79b5b79f78e47 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -289,7 +289,7 @@ index dd3abb8..a0186ef 100644 import org.bukkit.craftbukkit.util.Waitable; import org.bukkit.event.server.RemoteServerCommandEvent; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fd3983f..f4b9481 100644 +index 3665f8a..146223a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -24,7 +24,8 @@ import org.bukkit.block.BlockFace; @@ -931,7 +931,7 @@ index 41d2d87..0000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 377633e..90de39a 100644 +index c137882..c9c30eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -37,15 +37,9 @@ import org.bukkit.configuration.serialization.DelegateDeserialization; @@ -951,7 +951,7 @@ index 377633e..90de39a 100644 import org.bukkit.craftbukkit.map.CraftMapView; import org.bukkit.craftbukkit.map.RenderData; import org.bukkit.craftbukkit.scoreboard.CraftScoreboard; -@@ -1532,6 +1526,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1531,6 +1525,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } diff --git a/Spigot-Server-Patches/0007-Configurable-cactus-and-reed-natural-growth-heights.patch b/Spigot-Server-Patches/0007-Configurable-cactus-and-reed-natural-growth-heights.patch index 551ef5a4d..1697c139b 100644 --- a/Spigot-Server-Patches/0007-Configurable-cactus-and-reed-natural-growth-heights.patch +++ b/Spigot-Server-Patches/0007-Configurable-cactus-and-reed-natural-growth-heights.patch @@ -1,4 +1,4 @@ -From 093b3d298966008bdb1075c4147a2459f56300d5 Mon Sep 17 00:00:00 2001 +From 8fdb8ce2c7e89fe02d216c7c46050b1aac7b3e1d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 1 Mar 2016 13:02:51 -0600 Subject: [PATCH] Configurable cactus and reed natural growth heights @@ -23,7 +23,7 @@ index fe9502c..22b643e 100644 + } } diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java -index c00d874..37b7e54 100644 +index 6f0af4e..e994692 100644 --- a/src/main/java/net/minecraft/server/BlockCactus.java +++ b/src/main/java/net/minecraft/server/BlockCactus.java @@ -28,7 +28,7 @@ public class BlockCactus extends Block { @@ -34,9 +34,9 @@ index c00d874..37b7e54 100644 + if (i < world.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height int j = ((Integer) iblockdata.get(BlockCactus.AGE)).intValue(); - if (j >= (byte) range(3, ((100 / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot + if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java -index fb19f19..6e0fa5f 100644 +index 4a79cf4..4c69376 100644 --- a/src/main/java/net/minecraft/server/BlockReed.java +++ b/src/main/java/net/minecraft/server/BlockReed.java @@ -27,7 +27,7 @@ public class BlockReed extends Block { @@ -47,7 +47,7 @@ index fb19f19..6e0fa5f 100644 + if (i < world.paperConfig.reedMaxHeight) { // Paper - Configurable growth height int j = ((Integer) iblockdata.get(BlockReed.AGE)).intValue(); - if (j >= (byte) range(3, ((100 / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot + if (j >= (byte) range(3, ((100.0F / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot -- -2.7.1.windows.2 +2.7.4 diff --git a/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch index e869c14a2..ed1cfcc90 100644 --- a/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0018-Player-affects-spawning-API.patch @@ -1,4 +1,4 @@ -From 93881570845dac907b09471b5dbdefec903fbdf2 Mon Sep 17 00:00:00 2001 +From e8ded4caea493383b25a22cc8de1d8f59ce2533b Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Tue, 1 Mar 2016 14:47:52 -0600 Subject: [PATCH] Player affects spawning API @@ -123,10 +123,10 @@ index 17c0b00..9124558 100644 return this.a(entity.locX, entity.locY, entity.locZ, d0, false); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 90de39a..4bf9c71 100644 +index c9c30eb..56bdaa1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1406,6 +1406,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1405,6 +1405,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } diff --git a/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch b/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch index eb0bc672b..6442209cf 100644 --- a/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch +++ b/Spigot-Server-Patches/0040-Add-player-view-distance-API.patch @@ -1,4 +1,4 @@ -From d19b0fb9806803c96a09e9b463c653f14d22106d Mon Sep 17 00:00:00 2001 +From cd242a9551a73a6e3cd0d3fd844b0db333f59dd3 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 2 Mar 2016 14:35:27 -0600 Subject: [PATCH] Add player view distance API @@ -88,10 +88,10 @@ index 8ef7eb2..5421026 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5ae6fe9..582ab4c 100644 +index 471ad38..fe5768a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1417,6 +1417,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1416,6 +1416,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setAffectsSpawning(boolean affects) { getHandle().affectsSpawning = affects; } @@ -109,5 +109,5 @@ index 5ae6fe9..582ab4c 100644 // Spigot start -- -2.7.1.windows.2 +2.7.4 diff --git a/Spigot-Server-Patches/0080-Complete-resource-pack-API.patch b/Spigot-Server-Patches/0080-Complete-resource-pack-API.patch index aecb39d33..27460e165 100644 --- a/Spigot-Server-Patches/0080-Complete-resource-pack-API.patch +++ b/Spigot-Server-Patches/0080-Complete-resource-pack-API.patch @@ -1,4 +1,4 @@ -From 8deb8c6b91025b9a8d39fdb3f5245c3f06066ff6 Mon Sep 17 00:00:00 2001 +From 6b2584f4899da3022070748e261dafb89401a19c Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Sat, 4 Apr 2015 23:17:52 -0400 Subject: [PATCH] Complete resource pack API @@ -37,7 +37,7 @@ index 27f78ab..1b16b54 100644 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ca48442..46533fb 100644 +index 8827119..da99440 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -72,6 +72,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -51,7 +51,7 @@ index ca48442..46533fb 100644 public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); -@@ -1522,6 +1526,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1521,6 +1525,33 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setViewDistance(int viewDistance) { ((WorldServer) getHandle().world).getPlayerChunkMap().updateViewDistance(getHandle(), viewDistance); } @@ -86,5 +86,5 @@ index ca48442..46533fb 100644 // Spigot start -- -2.7.2 +2.7.4 diff --git a/Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch b/Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch index f3456bf38..dee45a2fd 100644 --- a/Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch +++ b/Spigot-Server-Patches/0093-Optimized-Light-Level-Comparisons.patch @@ -1,4 +1,4 @@ -From 5b08a9f1fa943eb16b203d050770c32a286b180e Mon Sep 17 00:00:00 2001 +From 823b6ce3c72305580163aadb8d1222492ae95064 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 18 Mar 2016 21:22:56 -0400 Subject: [PATCH] Optimized Light Level Comparisons @@ -8,7 +8,7 @@ Use an optimized method to test if a block position meets a desired light level. This method benefits from returning as soon as the desired light level matches. diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java -index 7c909d8..5d6e6cb 100644 +index 5f8bffe..ab8d18e 100644 --- a/src/main/java/net/minecraft/server/BlockCrops.java +++ b/src/main/java/net/minecraft/server/BlockCrops.java @@ -48,7 +48,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @@ -65,20 +65,20 @@ index fe55848..8fc736d 100644 // world.setTypeUpdate(blockposition1, Blocks.GRASS.getBlockData()); org.bukkit.World bworld = world.getWorld(); diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java -index 8b34250..b6de103 100644 +index 76b13a3..b7776fb 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -34,7 +34,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) { if (!world.isClientSide) { super.b(world, blockposition, iblockdata, random); -- if (world.getLightLevel(blockposition.up()) >= 9 && random.nextInt(Math.max(2, (int) (((100 / world.spigotConfig.saplingModifier) * 7) + 0.5F))) == 0) { // Spigot -+ if (world.isLightLevel(blockposition.up(), 9) && random.nextInt(Math.max(2, (int) (((100 / world.spigotConfig.saplingModifier) * 7) + 0.5F))) == 0) { // Spigot // Paper +- if (world.getLightLevel(blockposition.up()) >= 9 && random.nextInt(Math.max(2, (int) (((100.0F / world.spigotConfig.saplingModifier) * 7) + 0.5F))) == 0) { // Spigot ++ if (world.isLightLevel(blockposition.up(), 9) && random.nextInt(Math.max(2, (int) (((100.0F / world.spigotConfig.saplingModifier) * 7) + 0.5F))) == 0) { // Spigot // Paper // CraftBukkit start world.captureTreeGeneration = true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java -index 097d11e..d0fa4ae 100644 +index 73e68d8..439a77e 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java @@ -47,7 +47,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement { @@ -89,7 +89,7 @@ index 097d11e..d0fa4ae 100644 + if (world.isLightLevel(blockposition.up(), 9)) { // Paper float f = BlockCrops.a((Block) this, world, blockposition); - if (random.nextInt((int) ((100 / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot + if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java index 64f4754..05eb5f9 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java