From 4c8a717466feb55fdc606ae605dd5b834af5fe51 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 18 May 2015 18:41:57 -0500 Subject: [PATCH] Update PaperSpigot to 1.8.4 --- Spigot-API-Patches/0001-POM-changes.patch | 8 +- Spigot-Server-Patches/0001-POM-Changes.patch | 8 +- .../0003-mc-dev-imports.patch | 6 +- .../0012-Allow-nerfed-mobs-to-jump.patch | 8 +- ...3-Toggle-for-player-interact-limiter.patch | 8 +- ...-despawn-distances-for-living-entiti.patch | 8 +- .../0019-Player-affects-spawning-API.patch | 91 +++++++++++++++---- ...-in-client-crashes-server-lists-and-.patch | 8 +- .../0023-Optimize-TileEntity-Ticking.patch | 20 ++-- ...ntities-that-fly-through-unloaded-ch.patch | 10 +- ...028-Further-improve-server-tick-loop.patch | 10 +- ...029-Only-refresh-abilities-if-needed.patch | 8 +- .../0030-Player-lookup-improvements.patch | 10 +- ...event-tile-entity-and-entity-crashes.patch | 10 +- ...043-Configurable-async-light-updates.patch | 32 ++++--- 15 files changed, 151 insertions(+), 94 deletions(-) diff --git a/Spigot-API-Patches/0001-POM-changes.patch b/Spigot-API-Patches/0001-POM-changes.patch index e691bddc69..af9200ce13 100644 --- a/Spigot-API-Patches/0001-POM-changes.patch +++ b/Spigot-API-Patches/0001-POM-changes.patch @@ -1,11 +1,11 @@ -From 64c05befc1e1204e32698b10f45283dad6affb62 Mon Sep 17 00:00:00 2001 +From 28f77537223157f9bd5c5f6849eb763c9db72e86 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 6 Jan 2015 22:12:31 -0600 Subject: [PATCH] POM changes diff --git a/pom.xml b/pom.xml -index 3e52a20..20a2cc9 100644 +index 989f030..c91f2c1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,18 +4,18 @@ @@ -24,7 +24,7 @@ index 3e52a20..20a2cc9 100644 - spigot-api + org.github.paperspigot + paperspigot-api - 1.8.3-R0.1-SNAPSHOT + 1.8.4-R0.1-SNAPSHOT jar - Spigot-API @@ -35,5 +35,5 @@ index 3e52a20..20a2cc9 100644 -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 8b280ad616..3360efc805 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From d3b5c90ffd39747dff09972ed7cf9c5e6a8b9327 Mon Sep 17 00:00:00 2001 +From 0975c9110ce278a67e0df5457ca2cc22a8779f33 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 19 Mar 2015 19:41:15 -0500 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 1c8d4ea..9d5b419 100644 +index 333f528..b3982e1 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ @@ -17,7 +17,7 @@ index 1c8d4ea..9d5b419 100644 + org.github.paperspigot + paperspigot jar - 1.8.3-R0.1-SNAPSHOT + 1.8.4-R0.1-SNAPSHOT - Spigot - http://www.spigotmc.org + PaperSpigot @@ -94,5 +94,5 @@ index 9304637..3a4b142 100644 if (stream != null) { -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0003-mc-dev-imports.patch b/Spigot-Server-Patches/0003-mc-dev-imports.patch index 1fd8459385..295e7d8343 100644 --- a/Spigot-Server-Patches/0003-mc-dev-imports.patch +++ b/Spigot-Server-Patches/0003-mc-dev-imports.patch @@ -1,6 +1,6 @@ -From 87f7b6f12d357afe2d1cffc42baaa726e3fbd95d Mon Sep 17 00:00:00 2001 +From 70713e64a607952dc3ffc9a7d5cda1fb3d281877 Mon Sep 17 00:00:00 2001 From: Zach Brown -Date: Sat, 7 Mar 2015 19:44:29 -0600 +Date: Mon, 18 May 2015 17:32:46 -0500 Subject: [PATCH] mc-dev imports @@ -918,5 +918,5 @@ index 0000000..f75e2de + } +} -- -1.9.4.msysgit.2 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0012-Allow-nerfed-mobs-to-jump.patch b/Spigot-Server-Patches/0012-Allow-nerfed-mobs-to-jump.patch index 8c2e9df3ad..0ef243d02c 100644 --- a/Spigot-Server-Patches/0012-Allow-nerfed-mobs-to-jump.patch +++ b/Spigot-Server-Patches/0012-Allow-nerfed-mobs-to-jump.patch @@ -1,14 +1,14 @@ -From 3f8f70c97cbdcc1ecc64d7ae417b98e11bdd72fe Mon Sep 17 00:00:00 2001 +From 9031da4fcbb0a318f997e732acb6d366f1f66b39 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 7 Mar 2015 21:03:06 -0600 Subject: [PATCH] Allow nerfed mobs to jump diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 9621ce0..261bfb7 100644 +index 73cdd41..120e75b 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -461,6 +461,12 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -460,6 +460,12 @@ public abstract class EntityInsentient extends EntityLiving { // Spigot Start if ( this.fromMobSpawner ) { @@ -22,5 +22,5 @@ index 9621ce0..261bfb7 100644 } // Spigot End -- -2.3.5 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0013-Toggle-for-player-interact-limiter.patch b/Spigot-Server-Patches/0013-Toggle-for-player-interact-limiter.patch index 7009711be0..e89e5d393f 100644 --- a/Spigot-Server-Patches/0013-Toggle-for-player-interact-limiter.patch +++ b/Spigot-Server-Patches/0013-Toggle-for-player-interact-limiter.patch @@ -1,14 +1,14 @@ -From 3f91d9981a23c8842f7102035900b7944af4afc9 Mon Sep 17 00:00:00 2001 +From d55f015904ac32180e82497bc90fa5e491e1e831 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 7 Mar 2015 21:07:10 -0600 Subject: [PATCH] Toggle for player interact limiter diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 3108938..0c8dda6 100644 +index 9e50ad7..9a82f3b 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java -@@ -642,7 +642,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList +@@ -638,7 +638,8 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList PlayerConnectionUtils.ensureMainThread(packetplayinblockplace, this, this.player.u()); WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension); boolean throttled = false; @@ -38,5 +38,5 @@ index bff794a..02c4004 100644 + } } -- -2.3.5 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0015-Add-configurable-despawn-distances-for-living-entiti.patch b/Spigot-Server-Patches/0015-Add-configurable-despawn-distances-for-living-entiti.patch index d633d03222..a5537cb008 100644 --- a/Spigot-Server-Patches/0015-Add-configurable-despawn-distances-for-living-entiti.patch +++ b/Spigot-Server-Patches/0015-Add-configurable-despawn-distances-for-living-entiti.patch @@ -1,14 +1,14 @@ -From 0a3b20f045f56f1d5f879b9cb76e87eab1ab8ee6 Mon Sep 17 00:00:00 2001 +From d2087b8499048bc411ed3d619cb73f344b8fc800 Mon Sep 17 00:00:00 2001 From: Suddenly Date: Sat, 7 Mar 2015 21:40:48 -0600 Subject: [PATCH] Add configurable despawn distances for living entities diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index 261bfb7..b0cae5b 100644 +index 120e75b..fdca016 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -439,13 +439,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -438,13 +438,13 @@ public abstract class EntityInsentient extends EntityLiving { double d2 = entityhuman.locZ - this.locZ; double d3 = d0 * d0 + d1 * d1 + d2 * d2; @@ -52,5 +52,5 @@ index ac2f470..7ad9bb3 100644 + } } -- -2.3.5 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch b/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch index 1722cf6ed1..544454e1b5 100644 --- a/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch +++ b/Spigot-Server-Patches/0019-Player-affects-spawning-API.patch @@ -1,11 +1,11 @@ -From 869dbe46052c9b5bc254f32bac1dfd06e5c005bf Mon Sep 17 00:00:00 2001 -From: Jedediah Smith -Date: Sat, 7 Mar 2015 22:52:21 -0600 +From 2a8b0ca92aee9d8899acdf6ea483e9d16e4da532 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Mon, 18 May 2015 17:52:45 -0500 Subject: [PATCH] Player affects spawning API diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java -index e7fd331..4aa8096 100644 +index 0fac7c9..9fd8b3c 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -61,6 +61,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -17,10 +17,10 @@ index e7fd331..4aa8096 100644 // CraftBukkit start public boolean fauxSleeping; diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index b0cae5b..e4c1cd8 100644 +index fdca016..2a57b24 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -431,7 +431,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -430,7 +430,7 @@ public abstract class EntityInsentient extends EntityLiving { if (this.persistent) { this.ticksFarFromPlayer = 0; } else { @@ -30,7 +30,7 @@ index b0cae5b..e4c1cd8 100644 if (entityhuman != null) { double d0 = entityhuman.locX - this.locX; diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java -index df71db5..00754cd 100644 +index 1680918..eca4679 100644 --- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java @@ -52,7 +52,7 @@ public abstract class MobSpawnerAbstract { @@ -43,15 +43,15 @@ index df71db5..00754cd 100644 public void c() { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index aeb0a44..7df5b84 100644 +index 3964e3f..6c8e4df 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -52,7 +52,7 @@ public final class SpawnerCreature { while (iterator.hasNext()) { EntityHuman entityhuman = (EntityHuman) iterator.next(); -- if (!entityhuman.v()) { -+ if (!entityhuman.v() || !entityhuman.affectsSpawning) { // PaperSpigot +- if (!entityhuman.isSpectator()) { ++ if (!entityhuman.isSpectator() || !entityhuman.affectsSpawning) { // PaperSpigot) { int l = MathHelper.floor(entityhuman.locX / 16.0D); j = MathHelper.floor(entityhuman.locZ / 16.0D); @@ -65,14 +65,57 @@ index aeb0a44..7df5b84 100644 biomebase_biomemeta = worldserver.a(enumcreaturetype, blockposition2); if (biomebase_biomemeta == null) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 05f9351..cf4bf4e 100644 +index e1757c0..d30b406 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -3137,4 +3137,50 @@ public abstract class World implements IBlockAccess { +@@ -2,35 +2,23 @@ package net.minecraft.server; - return k >= -short0 && k <= short0 && l >= -short0 && l <= short0 && this.keepSpawnInMemory; // CraftBukkit - Added 'this.keepSpawnInMemory' - } + import com.google.common.base.Predicate; + import com.google.common.collect.Lists; +-import com.google.common.collect.Sets; +-import java.util.ArrayList; +-import java.util.Calendar; +-import java.util.Collection; +-import java.util.Iterator; +-import java.util.List; +-import java.util.Random; +-import java.util.Set; +-import java.util.UUID; +-import java.util.concurrent.Callable; +- +-// CraftBukkit start + import com.google.common.collect.Maps; +-import java.util.Map; +- + import org.bukkit.Bukkit; + import org.bukkit.block.BlockState; +-import org.bukkit.craftbukkit.util.CraftMagicNumbers; +-import org.bukkit.craftbukkit.util.LongHashSet; +-import org.bukkit.craftbukkit.SpigotTimings; // Spigot +-import org.bukkit.generator.ChunkGenerator; + import org.bukkit.craftbukkit.CraftServer; + import org.bukkit.craftbukkit.CraftWorld; ++import org.bukkit.craftbukkit.SpigotTimings; + import org.bukkit.craftbukkit.event.CraftEventFactory; ++import org.bukkit.craftbukkit.util.CraftMagicNumbers; + import org.bukkit.event.block.BlockCanBuildEvent; + import org.bukkit.event.block.BlockPhysicsEvent; + import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; +-import org.bukkit.event.weather.WeatherChangeEvent; +-import org.bukkit.event.weather.ThunderChangeEvent; ++import org.bukkit.generator.ChunkGenerator; + ++import java.util.*; ++import java.util.concurrent.Callable; ++ ++// CraftBukkit start + // CraftBukkit end + + public abstract class World implements IBlockAccess { +@@ -2816,6 +2804,53 @@ public abstract class World implements IBlockAccess { + return false; + } + + // PaperSpigot start - Modified methods for affects spawning + public EntityHuman findNearbyPlayerWhoAffectsSpawning(Entity entity, double d0) { + return this.findNearbyPlayerWhoAffectsSpawning(entity.locX, entity.locY, entity.locZ, d0); @@ -118,12 +161,24 @@ index 05f9351..cf4bf4e 100644 + + return false; + } - } ++ // PaperSpigot end ++ + public EntityHuman a(String s) { + for (int i = 0; i < this.players.size(); ++i) { + EntityHuman entityhuman = (EntityHuman) this.players.get(i); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 06e014c..5d5f987 100644 +index 40ee4d3..130dcce 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1443,6 +1443,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -6,6 +6,7 @@ import io.netty.buffer.Unpooled; + + import java.io.ByteArrayOutputStream; + import java.io.IOException; ++import java.lang.Override; + import java.net.InetSocketAddress; + import java.net.SocketAddress; + import java.util.ArrayList; +@@ -1443,6 +1444,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { packet.components = components; getHandle().playerConnection.sendPacket(packet); } @@ -143,5 +198,5 @@ index 06e014c..5d5f987 100644 public Player.Spigot spigot() -- -2.4.0.windows.2 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0020-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch b/Spigot-Server-Patches/0020-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch index 79f2b713b9..ae441a1fcf 100644 --- a/Spigot-Server-Patches/0020-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch +++ b/Spigot-Server-Patches/0020-Show-PaperSpigot-in-client-crashes-server-lists-and-.patch @@ -1,4 +1,4 @@ -From 7df449f2b44f1e7781f120053506b5b290b04fe2 Mon Sep 17 00:00:00 2001 +From e1282376a286df21f984c03807f8aa4bf0b4a172 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 7 Mar 2015 22:55:25 -0600 Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and @@ -6,10 +6,10 @@ Subject: [PATCH] Show 'PaperSpigot' in client crashes, server lists, and diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b189c19..e0d7998 100644 +index 7580b47..1ded833 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1020,7 +1020,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -1026,7 +1026,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs } public String getServerModName() { @@ -19,5 +19,5 @@ index b189c19..e0d7998 100644 public CrashReport b(CrashReport crashreport) { -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0023-Optimize-TileEntity-Ticking.patch b/Spigot-Server-Patches/0023-Optimize-TileEntity-Ticking.patch index dc21a6ea53..ef76d842ea 100644 --- a/Spigot-Server-Patches/0023-Optimize-TileEntity-Ticking.patch +++ b/Spigot-Server-Patches/0023-Optimize-TileEntity-Ticking.patch @@ -1,4 +1,4 @@ -From 1ed5764045977352072c7a6d34aee8c824d3fae8 Mon Sep 17 00:00:00 2001 +From 3f4d3ad27f80c5b292f11e816613384de6ff640a Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 8 Mar 2015 01:56:22 -0600 Subject: [PATCH] Optimize TileEntity Ticking @@ -35,7 +35,7 @@ index da43134..88e4fa9 100644 } diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java -index a2bd9e1..8af9e32 100644 +index 189fa93..07891ec 100644 --- a/src/main/java/net/minecraft/server/TileEntityChest.java +++ b/src/main/java/net/minecraft/server/TileEntityChest.java @@ -246,7 +246,7 @@ public class TileEntityChest extends TileEntityContainer implements IUpdatePlaye @@ -74,10 +74,10 @@ index f75e2de..7119612 100644 if (this.e instanceof BlockDaylightDetector) { ((BlockDaylightDetector) this.e).f(this.world, this.position); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index cf4bf4e..15fe976 100644 +index d30b406..dcfceed 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -65,7 +65,7 @@ public abstract class World implements IBlockAccess { +@@ -53,7 +53,7 @@ public abstract class World implements IBlockAccess { // Spigot end protected final List g = Lists.newArrayList(); public final List h = Lists.newArrayList(); @@ -86,7 +86,7 @@ index cf4bf4e..15fe976 100644 private final List b = Lists.newArrayList(); private final List c = Lists.newArrayList(); public final List players = Lists.newArrayList(); -@@ -138,8 +138,10 @@ public abstract class World implements IBlockAccess { +@@ -126,8 +126,10 @@ public abstract class World implements IBlockAccess { public static boolean haveWeSilencedAPhysicsCrash; public static String blockLocation; private org.spigotmc.TickLimiter entityLimiter; @@ -99,7 +99,7 @@ index cf4bf4e..15fe976 100644 public static long chunkToKey(int x, int z) { -@@ -233,7 +235,7 @@ public abstract class World implements IBlockAccess { +@@ -221,7 +223,7 @@ public abstract class World implements IBlockAccess { this.keepSpawnInMemory = this.paperSpigotConfig.keepSpawnInMemory; // PaperSpigot timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); @@ -108,7 +108,7 @@ index cf4bf4e..15fe976 100644 } public World b() { -@@ -1467,6 +1469,12 @@ public abstract class World implements IBlockAccess { +@@ -1455,6 +1457,12 @@ public abstract class World implements IBlockAccess { } // CraftBukkit end @@ -121,7 +121,7 @@ index cf4bf4e..15fe976 100644 // Spigot start int tilesThisCycle = 0; for (tileLimiter.initTick(); -@@ -1474,11 +1482,12 @@ public abstract class World implements IBlockAccess { +@@ -1462,11 +1470,12 @@ public abstract class World implements IBlockAccess { tileTickPosition++, tilesThisCycle++) { tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0; TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition); @@ -136,7 +136,7 @@ index cf4bf4e..15fe976 100644 continue; } // Spigot end -@@ -1506,8 +1515,7 @@ public abstract class World implements IBlockAccess { +@@ -1494,8 +1503,7 @@ public abstract class World implements IBlockAccess { } if (tileentity.x()) { @@ -322,5 +322,5 @@ index 0000000..5af5dcc +} \ No newline at end of file -- -2.4.0.windows.2 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0025-Remove-certain-entities-that-fly-through-unloaded-ch.patch b/Spigot-Server-Patches/0025-Remove-certain-entities-that-fly-through-unloaded-ch.patch index 77efb99afe..cfe3b818a6 100644 --- a/Spigot-Server-Patches/0025-Remove-certain-entities-that-fly-through-unloaded-ch.patch +++ b/Spigot-Server-Patches/0025-Remove-certain-entities-that-fly-through-unloaded-ch.patch @@ -1,4 +1,4 @@ -From aeaa678d95303de968269960a3c48dc0ac0fd46b Mon Sep 17 00:00:00 2001 +From afecc5fd9057398210f7a48af97affbefd84e1b0 Mon Sep 17 00:00:00 2001 From: Iceee Date: Sun, 8 Mar 2015 03:34:15 -0500 Subject: [PATCH] Remove certain entities that fly through unloaded chunks @@ -70,10 +70,10 @@ index 2d22327..50423eb 100644 this.motY *= 0.9800000190734863D; this.motZ *= 0.9800000190734863D; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 15fe976..7425bbf 100644 +index dcfceed..431fc0d 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1174,6 +1174,7 @@ public abstract class World implements IBlockAccess { +@@ -1162,6 +1162,7 @@ public abstract class World implements IBlockAccess { { if ( !this.isChunkLoaded( chunkx, chunkz, true ) ) { @@ -81,7 +81,7 @@ index 15fe976..7425bbf 100644 continue; } int cz = chunkz << 4; -@@ -1603,6 +1604,14 @@ public abstract class World implements IBlockAccess { +@@ -1591,6 +1592,14 @@ public abstract class World implements IBlockAccess { if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { entity.ticksLived++; entity.inactiveTick(); @@ -116,5 +116,5 @@ index 31dedce..ac02b90 100644 + } } -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0028-Further-improve-server-tick-loop.patch b/Spigot-Server-Patches/0028-Further-improve-server-tick-loop.patch index 32035bd6cc..449ae50069 100644 --- a/Spigot-Server-Patches/0028-Further-improve-server-tick-loop.patch +++ b/Spigot-Server-Patches/0028-Further-improve-server-tick-loop.patch @@ -1,4 +1,4 @@ -From 6bcd687996b2504fa884f0f50aac658a5bc4d425 Mon Sep 17 00:00:00 2001 +From 4d8ac043bb719036af19ff4b5b64cd5727f50b03 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 8 Mar 2015 03:47:32 -0500 Subject: [PATCH] Further improve server tick loop @@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly. Switch to a realistic rolling average and factor in std deviation as an extra reporting variable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b9b8bba..9a9de19 100644 +index 1ded833..07422b8 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -115,17 +115,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs @@ -34,7 +34,7 @@ index b9b8bba..9a9de19 100644 public MinecraftServer(OptionSet options, Proxy proxy, File file1) { io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable -@@ -510,12 +504,53 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -516,12 +510,53 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs this.isRunning = false; } @@ -93,7 +93,7 @@ index b9b8bba..9a9de19 100644 public void run() { try { -@@ -528,26 +563,43 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs +@@ -534,26 +569,43 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs this.a(this.r); // Spigot start @@ -212,5 +212,5 @@ index be2e31d..21fd7ef 100644 return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString() + ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 ); -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0029-Only-refresh-abilities-if-needed.patch b/Spigot-Server-Patches/0029-Only-refresh-abilities-if-needed.patch index 55c25ad043..cc88d603ac 100644 --- a/Spigot-Server-Patches/0029-Only-refresh-abilities-if-needed.patch +++ b/Spigot-Server-Patches/0029-Only-refresh-abilities-if-needed.patch @@ -1,14 +1,14 @@ -From 5cff72e10eb8de4fb44661db5cb083957cd0bbeb Mon Sep 17 00:00:00 2001 +From fac3d26d0a1927d84ab379d24c2fdef18f955979 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 28 Nov 2014 13:20:22 -0600 Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5d5f987..20287d2 100644 +index 130dcce..3c5d90d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1146,12 +1146,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1147,12 +1147,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { @@ -24,5 +24,5 @@ index 5d5f987..20287d2 100644 @Override -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0030-Player-lookup-improvements.patch b/Spigot-Server-Patches/0030-Player-lookup-improvements.patch index 0c3ca48654..9677fec501 100644 --- a/Spigot-Server-Patches/0030-Player-lookup-improvements.patch +++ b/Spigot-Server-Patches/0030-Player-lookup-improvements.patch @@ -1,4 +1,4 @@ -From f1976dd6704c5cad38c48a61834c781cad708264 Mon Sep 17 00:00:00 2001 +From d48be99422100816e1b6a67a4332ad055d970ca3 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 8 Mar 2015 04:03:56 -0500 Subject: [PATCH] Player lookup improvements @@ -13,7 +13,7 @@ By using a map based approach for player lookups, player lookup should be consistent in performance regardless of how many players are online. diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index 49a14ea..74741cd 100644 +index a88be23..f4f78e8 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -49,6 +49,31 @@ public abstract class PlayerList { @@ -153,10 +153,10 @@ index 6aa57ae..6150255 100644 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 20287d2..af71b8e 100644 +index 3c5d90d..ae75b36 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -104,13 +104,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -105,13 +105,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public boolean isOnline() { @@ -172,5 +172,5 @@ index 20287d2..af71b8e 100644 public InetSocketAddress getAddress() { -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0035-Prevent-tile-entity-and-entity-crashes.patch b/Spigot-Server-Patches/0035-Prevent-tile-entity-and-entity-crashes.patch index 7b9c3bee48..6c125e0403 100644 --- a/Spigot-Server-Patches/0035-Prevent-tile-entity-and-entity-crashes.patch +++ b/Spigot-Server-Patches/0035-Prevent-tile-entity-and-entity-crashes.patch @@ -1,4 +1,4 @@ -From e441393dd8fc9d33934c0fde7733cd91aee6be4e Mon Sep 17 00:00:00 2001 +From 1fb4dc33fce6c03c3f59247be6ea2115b9ac41a2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 8 Mar 2015 04:37:23 -0500 Subject: [PATCH] Prevent tile entity and entity crashes @@ -23,10 +23,10 @@ index 0a21872..bbcca2a 100644 public String a() throws Exception { int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock()); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 7425bbf..c6d82db 100644 +index 431fc0d..7d90de2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -1432,10 +1432,13 @@ public abstract class World implements IBlockAccess { +@@ -1420,10 +1420,13 @@ public abstract class World implements IBlockAccess { this.g(entity); SpigotTimings.tickEntityTimer.stopTiming(); // Spigot } catch (Throwable throwable1) { @@ -44,7 +44,7 @@ index 7425bbf..c6d82db 100644 } } -@@ -1501,11 +1504,13 @@ public abstract class World implements IBlockAccess { +@@ -1489,11 +1492,13 @@ public abstract class World implements IBlockAccess { tileentity.tickTimer.startTiming(); // Spigot ((IUpdatePlayerListBox) tileentity).c(); } catch (Throwable throwable2) { @@ -64,5 +64,5 @@ index 7425bbf..c6d82db 100644 // Spigot start finally { -- -1.9.1 +2.4.1.windows.1 diff --git a/Spigot-Server-Patches/0043-Configurable-async-light-updates.patch b/Spigot-Server-Patches/0043-Configurable-async-light-updates.patch index a11c4813f8..81fffcc296 100644 --- a/Spigot-Server-Patches/0043-Configurable-async-light-updates.patch +++ b/Spigot-Server-Patches/0043-Configurable-async-light-updates.patch @@ -1,15 +1,15 @@ -From 2dc93d418d81b29b876d6453dea3e316eb970dcc Mon Sep 17 00:00:00 2001 +From 3e2edfd6cf5378a589da51fab5094ad02a55ecb0 Mon Sep 17 00:00:00 2001 From: Roman Alexander Date: Wed, 25 Mar 2015 20:27:13 -0500 Subject: [PATCH] Configurable async light updates diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index e5d1c2b..7c63d9b 100644 +index 7d90de2..d49e833 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java -@@ -13,6 +13,12 @@ import java.util.Set; - import java.util.UUID; +@@ -18,6 +18,12 @@ import org.bukkit.generator.ChunkGenerator; + import java.util.*; import java.util.concurrent.Callable; +// PaperSpigot start @@ -19,27 +19,27 @@ index e5d1c2b..7c63d9b 100644 +// PaperSpigot end + // CraftBukkit start - import com.google.common.collect.Maps; - import java.util.Map; -@@ -732,22 +738,26 @@ public abstract class World implements IBlockAccess { + // CraftBukkit end + +@@ -720,22 +726,26 @@ public abstract class World implements IBlockAccess { blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ()); } -+ // PaperSpigot start - Configurable async light updates ++ // PaperSpigot start - configurable async light updates if (!this.isValidLocation(blockposition)) { return enumskyblock.c; - } else if (!this.isLoaded(blockposition)) { + } + + Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); -+ if (chunk == null) { ++ if (chunk != null) { return enumskyblock.c; } else { - Chunk chunk = this.getChunkAtWorldCoords(blockposition); - ++ // PaperSpigot end return chunk.getBrightness(enumskyblock, blockposition); } -+ // PaperSpigot end } public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { @@ -54,13 +54,15 @@ index e5d1c2b..7c63d9b 100644 chunk.a(enumskyblock, blockposition, i); this.n(blockposition); } -@@ -2354,10 +2364,11 @@ public abstract class World implements IBlockAccess { +@@ -2342,10 +2352,13 @@ public abstract class World implements IBlockAccess { } private int a(BlockPosition blockposition, EnumSkyBlock enumskyblock) { - if (enumskyblock == EnumSkyBlock.SKY && this.i(blockposition)) { -+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); // PaperSpigot - Configurable async light updates ++ // PaperSpigot start - Configurable async light updates ++ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); + if (chunk == null || (enumskyblock == EnumSkyBlock.SKY && chunk.d(blockposition))) { ++ // PaperSpigot end return 15; } else { - Block block = this.getType(blockposition).getBlock(); @@ -68,7 +70,7 @@ index e5d1c2b..7c63d9b 100644 int i = enumskyblock == EnumSkyBlock.SKY ? 0 : block.r(); int j = block.p(); -@@ -2396,131 +2407,154 @@ public abstract class World implements IBlockAccess { +@@ -2384,131 +2397,154 @@ public abstract class World implements IBlockAccess { } } @@ -139,7 +141,7 @@ index e5d1c2b..7c63d9b 100644 + public boolean c(final EnumSkyBlock enumskyblock, final BlockPosition blockposition) { + Callable callable = new Callable() { + @Override -+ public Boolean call() { ++ public Boolean call() throws Exception { + // CraftBukkit start - Use neighbor cache instead of looking up + Chunk chunk = World.this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); + if (chunk == null || !chunk.areNeighborsLoaded(1) /*!this.areChunksLoaded(blockposition, 17, false)*/) { @@ -347,5 +349,5 @@ index e00581c..dc8bebd 100644 + } } -- -2.3.5 +2.4.1.windows.1