From 52b0f26ce83d486c4e86604a44b33e5214b586bf Mon Sep 17 00:00:00 2001 From: gsand Date: Sat, 20 Dec 2014 19:22:28 -0600 Subject: [PATCH] Allow the first spawn location "fuzziness" to be configured --- ...rable-initial-player-spawn-fuzziness.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Spigot-Server-Patches/0043-Configurable-initial-player-spawn-fuzziness.patch diff --git a/Spigot-Server-Patches/0043-Configurable-initial-player-spawn-fuzziness.patch b/Spigot-Server-Patches/0043-Configurable-initial-player-spawn-fuzziness.patch new file mode 100644 index 0000000000..159d9a00c6 --- /dev/null +++ b/Spigot-Server-Patches/0043-Configurable-initial-player-spawn-fuzziness.patch @@ -0,0 +1,38 @@ +From 8606f4d764d901a7103dab5e915372be79c6a78b Mon Sep 17 00:00:00 2001 +From: gsand +Date: Sat, 20 Dec 2014 16:25:18 -0800 +Subject: [PATCH] Configurable-initial-player-spawn-fuzziness + + +diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java +index 42b68e5..2730001 100644 +--- a/src/main/java/net/minecraft/server/EntityPlayer.java ++++ b/src/main/java/net/minecraft/server/EntityPlayer.java +@@ -85,7 +85,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { + BlockPosition blockposition = worldserver.getSpawn(); + + if (!worldserver.worldProvider.o() && worldserver.getWorldData().getGameType() != EnumGamemode.ADVENTURE) { +- int i = Math.max(5, minecraftserver.getSpawnProtection() - 6); ++ int i = Math.max(org.github.paperspigot.PaperSpigotConfig.initialPlayerSpawnLocationRange, minecraftserver.getSpawnProtection() - 6); + int j = MathHelper.floor(worldserver.af().b((double) blockposition.getX(), (double) blockposition.getZ())); + + if (j < i) { +diff --git a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +index 01cd24a..9081ea1 100644 +--- a/src/main/java/org/github/paperspigot/PaperSpigotConfig.java ++++ b/src/main/java/org/github/paperspigot/PaperSpigotConfig.java +@@ -175,4 +175,11 @@ public class PaperSpigotConfig + dataValueAllowedItems = new HashSet( getList( "data-value-allowed-items", Collections.emptyList() ) ); + Bukkit.getLogger().info( "Data value allowed items: " + StringUtils.join(dataValueAllowedItems, ", ") ); + } ++ ++ public int initialPlayerSpawnLocationRange; ++ private void initialPlayerSpawnLocationRange() ++ { ++ initialPlayerSpawnLocationRange = getInt( "player-spawning.initial-location-range", 5 ); ++ log( "Max fuzziness for the initial player spawn " + initialPlayerSpawnLocationRange); ++ } + } +-- +1.9.5.msysgit.0 +