From a9b3e95f53b539834067f59c2b173c5b95e571ec Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Sat, 20 Dec 2014 19:09:49 -0600 Subject: [PATCH] Update from upstream SpigotMC 3beb7729816 a77ed5758a7 52c130fc6d9 --- Bukkit-Patches/0029-BungeeCord-Chat-API.patch | 4 +--- CraftBukkit-Patches/0001-POM-Changes.patch | 4 +--- .../0015-Entity-Activation-Range.patch | 5 +++-- CraftBukkit-Patches/0049-Watchdog-Thread.patch | 2 +- CraftBukkit-Patches/0061-Particle-API.patch | 11 +++++++++++ .../0064-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch | 2 +- .../0152-Limit-TNT-Detonations-per-tick.patch | 2 +- 7 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Bukkit-Patches/0029-BungeeCord-Chat-API.patch b/Bukkit-Patches/0029-BungeeCord-Chat-API.patch index 5e6207bed..d01301339 100644 --- a/Bukkit-Patches/0029-BungeeCord-Chat-API.patch +++ b/Bukkit-Patches/0029-BungeeCord-Chat-API.patch @@ -80,6 +80,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } Spigot spigot(); --- -1.9.4.msysgit.2 - +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index ebea56d1d..778897912 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -120,6 +120,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 Properties properties = new Properties(); if (stream != null) { --- -1.9.4.msysgit.2 - +-- \ No newline at end of file diff --git a/CraftBukkit-Patches/0015-Entity-Activation-Range.patch b/CraftBukkit-Patches/0015-Entity-Activation-Range.patch index d74eaa21c..7594c8171 100644 --- a/CraftBukkit-Patches/0015-Entity-Activation-Range.patch +++ b/CraftBukkit-Patches/0015-Entity-Activation-Range.patch @@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot + public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); + public final boolean defaultActivationState; -+ public long activatedTick = 0; ++ public long activatedTick = Integer.MIN_VALUE; + public void inactiveTick() { } + // Spigot end @@ -455,7 +455,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static boolean checkIfActive(Entity entity) + { + SpigotTimings.checkIfActiveTimer.startTiming(); -+ if ( !entity.isAddedToChunk() ) { ++ // Never safe to skip fireworks or entities not yet added to chunk ++ if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks ) { + SpigotTimings.checkIfActiveTimer.stopTiming(); + return true; + } diff --git a/CraftBukkit-Patches/0049-Watchdog-Thread.patch b/CraftBukkit-Patches/0049-Watchdog-Thread.patch index 261af25dd..57a51c414 100644 --- a/CraftBukkit-Patches/0049-Watchdog-Thread.patch +++ b/CraftBukkit-Patches/0049-Watchdog-Thread.patch @@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java new file mode 100644 -index 0000000000000000000000000000000000000000..00000000000000000000000000000000000000000 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 --- /dev/null +++ b/src/main/java/org/spigotmc/RestartCommand.java @@ -0,0 +0,0 @@ diff --git a/CraftBukkit-Patches/0061-Particle-API.patch b/CraftBukkit-Patches/0061-Particle-API.patch index bc8f5e430..0bfd7716e 100644 --- a/CraftBukkit-Patches/0061-Particle-API.patch +++ b/CraftBukkit-Patches/0061-Particle-API.patch @@ -135,6 +135,17 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { + public void playEffect(Location loc, Effect effect, int data) { + if (getHandle().playerConnection == null) return; + +- int packetData = effect.getId(); +- PacketPlayOutWorldEvent packet = new PacketPlayOutWorldEvent(packetData, new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), data, false); +- getHandle().playerConnection.sendPacket(packet); ++ spigot().playEffect(loc, effect, data, 0, 0, 0, 0, 1, 1, Integer.MAX_VALUE); + } + + @Override @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player { server.getServer().getPlayerList().moveToWorld( getHandle(), 0, false ); } diff --git a/CraftBukkit-Patches/0064-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch b/CraftBukkit-Patches/0064-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch index 8f18b87ba..3da86b1fb 100644 --- a/CraftBukkit-Patches/0064-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch +++ b/CraftBukkit-Patches/0064-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; - public long activatedTick = 0; + public long activatedTick = Integer.MIN_VALUE; + public boolean fromMobSpawner; public void inactiveTick() { } // Spigot end diff --git a/CraftBukkit-Patches/0152-Limit-TNT-Detonations-per-tick.patch b/CraftBukkit-Patches/0152-Limit-TNT-Detonations-per-tick.patch index c26a9f80e..f79524b9f 100644 --- a/CraftBukkit-Patches/0152-Limit-TNT-Detonations-per-tick.patch +++ b/CraftBukkit-Patches/0152-Limit-TNT-Detonations-per-tick.patch @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.lastY = this.locY; this.lastZ = this.locZ; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 0000000000000000000000000000000000000000..00000000000000000000000000000000000000004 100644 +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {