Update Paper to MC 1.12-pre5

This commit is contained in:
Zach Brown 2017-05-20 23:41:39 -05:00
parent 7ff16c0197
commit c1d0b4b4c6
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
56 changed files with 356 additions and 380 deletions

View File

@ -1,11 +1,11 @@
From fb47b4cfb2bfb00c13f0555b516be68a789659f6 Mon Sep 17 00:00:00 2001
From fb5f733cfceb51c30b4ccc0c63e82c715882c042 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:16:08 -0600
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index e7891169..067d30e8 100644
index 66bb7a12..ea6a710e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,35 +4,37 @@
@ -24,7 +24,7 @@ index e7891169..067d30e8 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.12-pre2-SNAPSHOT</version>
<version>1.12-pre5-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -133,5 +133,5 @@ index e7891169..067d30e8 100644
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
--
2.11.0
2.13.0.windows.1

View File

@ -1,19 +1,19 @@
From eabf0ce918f79ef14c00b9d9c69ba3ddba349feb Mon Sep 17 00:00:00 2001
From bd06f97c046b55140b8feb68b622844e96dc395a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 15 May 2017 10:11:42 -0500
Subject: [PATCH] 1.12-pre2 versioning change and warning
Subject: [PATCH] 1.12 prerelease versioning change and warning
Remove when merged to master
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index aae605e9..d7e3d7f4 100644
index aae605e9..2319d6b5 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -48,6 +48,7 @@ public class VersionCommand extends BukkitCommand {
if (!testPermission(sender)) return true;
if (args.length == 0) {
+ sender.sendMessage("This is pre-release software, and is not necessarily of the same quality as a full release"); // TODO: Remove during merge into master
+ sender.sendMessage("This is pre-release software"); // TODO: Remove during merge into master
sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
sendVersion(sender);
} else {
@ -27,5 +27,5 @@ index aae605e9..d7e3d7f4 100644
try {
HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + BRANCH + "..." + hash).openConnection();
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From 617559d05de68cd645b17492c511e62ae593de4b Mon Sep 17 00:00:00 2001
From f89b79a21ed04e7a9e81ecc8108f808f659927c0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 4f14d6f41..a833892e3 100644
index 31cb11194..167bc0ac2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index 4f14d6f41..a833892e3 100644
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.12-pre2-SNAPSHOT</version>
<version>1.12-pre5-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>Paper</name>
@ -159,5 +159,5 @@ index 93046379d..674096cab 100644
if (stream != null) {
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From 0c6f1973af82e9c39ffe0242f525d1011bbeeff5 Mon Sep 17 00:00:00 2001
From 749d5785a1e24e67652d8abe029784fd73635c4d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
diff --git a/pom.xml b/pom.xml
index 33bbeb2bd..0cbe47cb6 100644
index 167bc0ac2..6b73c55f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,6 +65,12 @@
@ -441,7 +441,7 @@ index 5ab2cf6ee..b5795b6d3 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 0ee47df3f..ba3913667 100644
index 7c39edca8..6c1c5e566 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -35,6 +35,15 @@ public class Block {
@ -531,7 +531,7 @@ index 9dcab42de..c1b0d6cea 100644
this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index fe387e218..6550686ee 100644
index b23de7663..fe64ee4aa 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -571,7 +571,7 @@ index fe387e218..6550686ee 100644
// return chunk; // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 30538d8ec..840ffeb93 100644
index 70fde368f..c56aa5c19 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -24,7 +24,7 @@ import java.io.PrintStream;
@ -624,7 +624,7 @@ index 30538d8ec..840ffeb93 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bae717b18..c6b7d6c22 100644
index ef63b5d3b..0e70cdf6f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace;
@ -646,7 +646,7 @@ index bae717b18..c6b7d6c22 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -525,7 +526,6 @@ public abstract class Entity implements ICommandListener {
@@ -524,7 +525,6 @@ public abstract class Entity implements ICommandListener {
}
public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
@ -654,7 +654,7 @@ index bae717b18..c6b7d6c22 100644
if (this.noclip) {
this.a(this.getBoundingBox().d(d0, d1, d2));
this.recalcPosition();
@@ -919,7 +919,6 @@ public abstract class Entity implements ICommandListener {
@@ -918,7 +918,6 @@ public abstract class Entity implements ICommandListener {
this.world.methodProfiler.b();
}
@ -663,7 +663,7 @@ index bae717b18..c6b7d6c22 100644
public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3a92c468c..2c22b6ca2 100644
index bf2761d53..5a2dbe5ff 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -765,7 +765,7 @@ index c840f6761..14504cbcc 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 39318aaf1..e847f3f1a 100644
index 249fccce9..3629cbc47 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -47,8 +47,8 @@ import org.bukkit.Bukkit;
@ -1012,7 +1012,7 @@ index eeac34998..e4ed2e991 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1dbdcfa57..63ea04fb4 100644
index 3bcabb195..7c4fe706a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -1023,7 +1023,7 @@ index 1dbdcfa57..63ea04fb4 100644
// CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1346,7 +1347,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1359,7 +1360,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end
private void handleCommand(String s) {
@ -1032,7 +1032,7 @@ index 1dbdcfa57..63ea04fb4 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1357,22 +1358,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1370,22 +1371,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -1056,7 +1056,7 @@ index 1dbdcfa57..63ea04fb4 100644
}
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
+ MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
// this.minecraftServer.getCommandHandler().b(this.player, s);
// this.minecraftServer.getCommandHandler().a(this.player, s);
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@ -1090,7 +1090,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index f79683a60..4aaf287ae 100644
index 35f421164..4a8927798 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1176,7 +1176,7 @@ index 591f4ad7f..e02f0c442 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a366b2d70..eafb76003 100644
index 41f0ac2bf..919f041d9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,11 +18,11 @@ import com.google.common.collect.Maps;
@ -1256,15 +1256,15 @@ index a366b2d70..eafb76003 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1621,7 +1626,6 @@ public abstract class World implements IBlockAccess {
entity.ticksLived++;
entity.inactiveTick();
} else {
- entity.tickTimer.startTiming(); // Spigot
@@ -1623,7 +1628,6 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end
- entity.tickTimer.startTiming(); // Spigot
entity.M = entity.locX;
entity.N = entity.locY;
@@ -1630,6 +1634,7 @@ public abstract class World implements IBlockAccess {
entity.O = entity.locZ;
@@ -1631,6 +1635,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
@ -1272,17 +1272,17 @@ index a366b2d70..eafb76003 100644
if (entity.isPassenger()) {
entity.leaveVehicle();
} else {
@@ -1689,8 +1694,6 @@ public abstract class World implements IBlockAccess {
@@ -1690,8 +1695,6 @@ public abstract class World implements IBlockAccess {
}
}
}
-
- entity.tickTimer.stopTiming(); // Spigot
}
-
}
public boolean b(AxisAlignedBB axisalignedbb) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d91de898f..af722bd00 100644
index b924dad97..63c7d4402 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -256,13 +256,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -1935,5 +1935,5 @@ index be23631b2..9eb36f3e9 100644
}
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From a2b70ad6f16f9f9ed468870ddc0e36ad7200ed59 Mon Sep 17 00:00:00 2001
From 2f4bb5350f76ae64af9b869da3322c0726eed973 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
@ -30,8 +30,20 @@ index 4f2fa59ac..8af52a61f 100644
public void b() {
this.b.l(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0e70cdf6f..8a61c2369 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -109,6 +109,7 @@ public abstract class Entity implements ICommandListener {
public boolean noclip;
public float R;
protected Random random;
+ public boolean fromMobSpawner; // Paper
public int ticksLived;
public int fireTicks;
public boolean inWater; // Spigot - protected -> public // PAIL
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 254955156..09e5408ac 100644
index 67f26bd62..6adb38de0 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -42,19 +54,24 @@ index 254955156..09e5408ac 100644
public EntityInsentient(World world) {
super(world);
@@ -641,6 +642,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
@@ -638,6 +639,17 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.a("checkDespawn");
this.L();
this.world.methodProfiler.b();
+ // Paper start - Re-add so we can allow them to float in water
+ if (this.fromMobSpawner) {
+ // Paper start - Allow nerfed mobs to jump and float
+ if (goalFloat != null) {
+ if (goalFloat.validConditions()) goalFloat.update();
+ this.getControllerJump().jumpIfSet();
+ }
+ // Paper end
return;
}
// Spigot End
+ return;
+ }
+ // Spigot End
this.world.methodProfiler.a("sensing");
this.bw.a();
this.world.methodProfiler.b();
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index b3b303b3b..fc8be86fd 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@ -80,6 +97,19 @@ index b3b303b3b..fc8be86fd 100644
public void e() {
if (this.a.getRandom().nextFloat() < 0.8F) {
this.a.getControllerJump().a();
--
2.13.0
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 825ca9346..2f409fe1e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -557,7 +557,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean hasAI() {
- return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAI(): false;
+ return this.getHandle() instanceof EntityInsentient && (!((EntityInsentient) this.getHandle()).isNoAI() || this.getHandle().getWorld().spigotConfig.nerfSpawnerMobs && ((EntityInsentient) this.getHandle()).fromMobSpawner); // Paper
}
@Override
--
2.13.0.windows.1

View File

@ -1,15 +1,15 @@
From 6ca60e1e0afcb2035f962b12d6079ca9a3347d28 Mon Sep 17 00:00:00 2001
From 24fe6438b0705833454275e38f9d629102337881 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
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 fc3d05394..b4507fe0c 100644
index 186e2df8b..dcd2ac6ab 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -65,6 +65,7 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bX;
@@ -64,6 +64,7 @@ public abstract class EntityHuman extends EntityLiving {
private final ItemCooldown bW;
@Nullable
public EntityFishingHook hookedFish;
+ public boolean affectsSpawning = true;
@ -17,7 +17,7 @@ index fc3d05394..b4507fe0c 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 be3422adc..2802cc062 100644
index bb27f5dd8..65b7b33be 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -614,7 +614,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -44,7 +44,7 @@ index dcc251e31..d8344ddc9 100644
return false;
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 4c65dc0a9..c56a8e9c2 100644
index a599a043d..1c7c187c7 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 {
@ -57,10 +57,10 @@ index 4c65dc0a9..c56a8e9c2 100644
j = MathHelper.floor(entityhuman.locZ / 16.0D);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 1ff2263eb..b87273aca 100644
index 6b404e385..3d114cfea 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2724,7 +2724,7 @@ public abstract class World implements IBlockAccess {
@@ -2730,7 +2730,7 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@ -70,7 +70,7 @@ index 1ff2263eb..b87273aca 100644
if (d3 < 0.0D || d4 < d3 * d3) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 433aafb33..c5924a2be 100644
index 06f33f80e..6f042b620 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1456,6 +1456,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -90,5 +90,5 @@ index 433aafb33..c5924a2be 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From 44e197d767a13602fb903ab4dda171ea77898b29 Mon Sep 17 00:00:00 2001
From cfbb5c43d1d8d555373e69582230686d6986197b Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bbbd1689e..3dff98596 100644
index 7ced523cd..2892f31f0 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -148,6 +148,7 @@ public abstract class Entity implements ICommandListener {
@@ -149,6 +149,7 @@ public abstract class Entity implements ICommandListener {
public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
@ -101,7 +101,7 @@ index bc6383669..ca9eb2f3b 100644
if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b87273aca..c6cf7754b 100644
index 3d114cfea..d207092ed 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1023,6 +1023,12 @@ public abstract class World implements IBlockAccess {
@ -118,7 +118,7 @@ index b87273aca..c6cf7754b 100644
flag = true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f849a8148..63154b647 100644
index 6375b5c40..87813d59c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -738,4 +738,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -167,5 +167,5 @@ index c493c9c0c..93843aa50 100644
+ // Paper end
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 3044d2ae539fbe4d31af51351181e00ac6aed4ba Mon Sep 17 00:00:00 2001
From 2c7e1cdf4a07b72caa2816f666edd159c9662141 Mon Sep 17 00:00:00 2001
From: DoctorDark <doctordark11@gmail.com>
Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits
@ -20,26 +20,26 @@ index fd606ee14..c00fa83d5 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3ef2ffd2d..586c4ad0d 100644
index a6f70d846..8b0c126a3 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private long co = System.currentTimeMillis();
private Entity cp;
private long cn = System.currentTimeMillis();
private Entity co;
public boolean worldChangeInvuln;
- private boolean cr;
+ private boolean cr; private void setHasSeenCredits(boolean has) { this.cr = has; } // Paper - OBFHELPER
private final RecipeBookServer cs = new RecipeBookServer();
private Vec3D ct;
private int cu;
- private boolean cq;
+ private boolean cq; private void setHasSeenCredits(boolean has) { this.cq = has; } // Paper - OBFHELPER
private final RecipeBookServer cr = new RecipeBookServer();
private Vec3D cs;
private int ct;
@@ -603,6 +603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this);
if (!this.viewingCredits) {
this.viewingCredits = true;
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cr ? 0.0F : 1.0F));
this.cr = true;
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cq ? 0.0F : 1.0F));
this.cq = true;
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From cb3b208b6f0f2e6cdf717c41809422b39904827c Mon Sep 17 00:00:00 2001
From 7f73885db5574e32c41bbb683755cbe795c0e6f5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 63ea04fb4..65ab76cc5 100644
index 7c4fe706a..9be557062 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1279,6 +1279,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1292,6 +1292,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
if (!async && s.startsWith("/")) {
@ -82,5 +82,5 @@ index 637882f1f..ac7890a56 100644
return true;
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From cbcc5dfe43b8a0f3e379ef3deb74d1fe79713850 Mon Sep 17 00:00:00 2001
From 757684a009e33a1bb24e2b7f71e0bed8fc007870 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Thu, 3 Mar 2016 02:32:10 -0600
Subject: [PATCH] Player Tab List and Title APIs
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
index 5f5b3825d..242efb0b9 100644
index 0663b07ca..f5ef1ba31 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutPlayerListHeaderFooter.java
@@ -4,6 +4,8 @@ import java.io.IOException;
@ -17,7 +17,7 @@ index 5f5b3825d..242efb0b9 100644
private IChatBaseComponent a;
private IChatBaseComponent b;
@@ -19,8 +21,19 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListene
@@ -15,8 +17,19 @@ public class PacketPlayOutPlayerListHeaderFooter implements Packet<PacketListene
}
public void b(PacketDataSerializer packetdataserializer) throws IOException {
@ -78,7 +78,7 @@ index 7bcafa8bb..4f6c1c2e7 100644
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index efcf383e7..b1c06388b 100644
index 21c729026..a7e011404 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1,5 +1,6 @@
@ -175,5 +175,5 @@ index efcf383e7..b1c06388b 100644
public String getDisplayName() {
return getHandle().displayName;
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From be4684520ec4356ba4564281649d047f21d8e4a3 Mon Sep 17 00:00:00 2001
From 08a7a290440f10c9403aa58aa9822f77e2dfb7b5 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e712ab370..e9a7565ae 100644
index a41bfe580..321306cb8 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -122,10 +122,10 @@ public abstract class Entity implements ICommandListener {
@@ -123,10 +123,10 @@ public abstract class Entity implements ICommandListener {
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aD = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
private static final DataWatcherObject<Boolean> aE = DataWatcher.a(Entity.class, DataWatcherRegistry.h);
@ -24,7 +24,7 @@ index e712ab370..e9a7565ae 100644
public boolean impulse;
public int portalCooldown;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 4b49d1976..b7f502ecd 100644
index 07596960b..c3449f94c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -30,6 +30,11 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -84,5 +84,5 @@ index 4b49d1976..b7f502ecd 100644
this.f.clear();
this.l();
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From 276acf46a94df17de9758755ef9aee7b7933c0e2 Mon Sep 17 00:00:00 2001
From 42a77fc1a82c991e0fb75264e059997e0a6ad657 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 65ab76cc5..1bc61ef43 100644
index 9be557062..3b4b5cf8c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1040,7 +1040,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1053,7 +1053,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.x());
@ -23,7 +23,7 @@ index 65ab76cc5..1bc61ef43 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 cf753d362..5839801f5 100644
index 4822071c9..409582d5b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -82,6 +82,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -71,5 +71,5 @@ index cf753d362..5839801f5 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 4db1c6925294438d675336f3f9193cb7f6589de5 Mon Sep 17 00:00:00 2001
From 11e7e276d572aa7ff71afe417b1dc245564d8801 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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 e9c5d1465..9015affc5 100644
index 128096453..fea81de16 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
@ -17,11 +17,11 @@ index e9c5d1465..9015affc5 100644
super.b(world, blockposition, iblockdata, random);
- if (world.getLightLevel(blockposition.up()) >= 9) {
+ if (world.isLightLevel(blockposition.up(), 9)) { // Paper
int i = this.z(iblockdata);
int i = this.y(iblockdata);
if (i < this.g()) {
diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
index fb1bf80b8..8b43e6070 100644
index d0fa96651..62ec2ad31 100644
--- a/src/main/java/net/minecraft/server/BlockGrass.java
+++ b/src/main/java/net/minecraft/server/BlockGrass.java
@@ -29,7 +29,8 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
@ -65,7 +65,7 @@ index fb1bf80b8..8b43e6070 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 f463b7113..89458cd77 100644
index b22949368..cb1e5a2a3 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
@ -78,7 +78,7 @@ index f463b7113..89458cd77 100644
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 c74b6284f..bb96e164e 100644
index 7492110fa..8d1630ac0 100644
--- a/src/main/java/net/minecraft/server/BlockStem.java
+++ b/src/main/java/net/minecraft/server/BlockStem.java
@@ -48,7 +48,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
@ -118,18 +118,18 @@ index 21539ff9b..1585bf3bc 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index bf059a746..003e06156 100644
index 2b619ab93..372890b5d 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster {
int j1 = j + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
- if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).r() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
+ if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).r() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper
- if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && this.world.getLightLevel(new BlockPosition(i1, j1, k1)) < 10) {
+ if (this.world.getType(new BlockPosition(i1, j1 - 1, k1)).q() && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper
entityzombie.setPosition((double) i1, (double) j1, (double) k1);
if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From e8548ec5455f5fb85d3a3d9fdaf9aabad959d2ba Mon Sep 17 00:00:00 2001
From c894ad4e12e050a34ade6ec41eeb11deefca9fab Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 05:09:16 -0400
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
@ -18,10 +18,10 @@ index c67cb54a3..521f46262 100644
private Vec3D c;
private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1bc61ef43..25c02c727 100644
index 3b4b5cf8c..81f8e0fd0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1625,6 +1625,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1638,6 +1638,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
}
}
@ -39,5 +39,5 @@ index 1bc61ef43..25c02c727 100644
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 1932f99dc02044ab955552ac7085246c3be60e2b Mon Sep 17 00:00:00 2001
From e7e4ca28537998b0f6fe1f8ad176868519f7083c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -21,7 +21,7 @@ index 74a49a5fb..3a942c763 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ecdb92397..b55ce6b1a 100644
index cf2c4ea3b..0ce50541c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -356,8 +356,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@ -39,10 +39,10 @@ index ecdb92397..b55ce6b1a 100644
if (i1 - j > 1000L) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 036d96fa7..b3c580836 100644
index fee13283f..33776d905 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3197,8 +3197,9 @@ public abstract class World implements IBlockAccess {
@@ -3203,8 +3203,9 @@ public abstract class World implements IBlockAccess {
int k = i * 16 + 8 - blockposition.getX();
int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true;
@ -83,5 +83,5 @@ index 7c1bbb491..1f88cc94c 100644
loadChunk(chunkCoordX + x, chunkCoordZ + z);
} else {
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From d8fdffcf773a9d75b1b7751a46e1f5bf4e45e56c Mon Sep 17 00:00:00 2001
From f087f637f551c289f26ad3f4a625b78f1451f747 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index fb24b5407..e301eaf9d 100644
index 85cd83c35..364cfe885 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3193,6 +3193,7 @@ public abstract class World implements IBlockAccess {
@@ -3199,6 +3199,7 @@ public abstract class World implements IBlockAccess {
return this.P;
}
@ -29,5 +29,5 @@ index d0265f960..35d8d1a6e 100644
}
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From ff60a18cc8906862956622e06a7b712bf8603d19 Mon Sep 17 00:00:00 2001
From 60d656282916a149f91cc19d99609e62805faf32 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 6 Apr 2016 01:04:23 -0500
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
@ -19,7 +19,7 @@ index 3a942c763..3bd29650c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b3911fa9f..fa940ad31 100644
index 5428220a0..3177c17c4 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2073,6 +2073,7 @@ public abstract class Entity implements ICommandListener {
@ -31,10 +31,10 @@ index b3911fa9f..fa940ad31 100644
public ScoreboardTeamBase aW() {
if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 25c02c727..353e73b15 100644
index 81f8e0fd0..b5284cecd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1358,7 +1358,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1371,7 +1371,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
return;
}
@ -51,5 +51,5 @@ index 25c02c727..353e73b15 100644
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
for (Object recipient : minecraftServer.getPlayerList().players) {
--
2.13.0
2.13.0.windows.1

View File

@ -1,17 +1,17 @@
From ad0cb65019f11a4d6994a21e88fa3b504f60193d Mon Sep 17 00:00:00 2001
From 054a32d7f09e98ed104f49c379a7f1ccdefd53ed Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 42f6b7206..f4a2e748d 100644
index 01adb5807..6024b001f 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -31,7 +31,7 @@ import org.bukkit.inventory.MainHand;
public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bW = LogManager.getLogger();
private static final Logger bV = LogManager.getLogger();
- public String locale = "en_US"; // Spigot private -> public
+ public String locale = null; // Spigot private -> public // Paper - default to null
public PlayerConnection playerConnection;
@ -30,14 +30,14 @@ index 42f6b7206..f4a2e748d 100644
+ new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), oldLocale, this.locale).callEvent();
+ }
+ // Paper end
this.cm = packetplayinsettings.c();
this.cn = packetplayinsettings.d();
this.cl = packetplayinsettings.c();
this.cm = packetplayinsettings.d();
this.getDataWatcher().set(EntityPlayer.br, Byte.valueOf((byte) packetplayinsettings.e()));
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 00f9229f0..d1f70af51 100644
index ca0fd5843..234becfd4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1688,7 +1688,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1688,7 +1688,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale()
{
@ -45,10 +45,9 @@ index 00f9229f0..d1f70af51 100644
+ // Paper start - Locale change event
+ final String locale = getHandle().locale;
+ return locale != null ? locale : "en_US";
+ // Paper end
}
@Override
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From e77006067f56fb55e05d1d378412ef6316111889 Mon Sep 17 00:00:00 2001
From c7ef28c653eb46e86d9daff8fc58fae7a73b42fe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Apr 2016 20:02:00 -0400
Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes
@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index b4507fe0c..29c2fd4c9 100644
index dcd2ac6ab..7d79e4625 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -549,6 +549,12 @@ public abstract class EntityHuman extends EntityLiving {
@@ -548,6 +548,12 @@ public abstract class EntityHuman extends EntityLiving {
return null;
}
// CraftBukkit end
@ -48,7 +48,7 @@ index 10cafe057..1d0d7453a 100644
Iterator iterator = this.trackedPlayers.iterator(); // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0ddc03507..634f1c28c 100644
index 8729a0056..ba554517f 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1222,6 +1222,7 @@ public abstract class World implements IBlockAccess {
@ -145,5 +145,5 @@ index 256a13178..5768cd512 100644
public RenderData() {
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From 08dcbdf8047ae290ac2c4ab36659bf6a1b41823d Mon Sep 17 00:00:00 2001
From ab9671b2d2930a60b6bf51241fdc3c34f66f0af8 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sun, 4 Sep 2016 16:35:43 -0500
Subject: [PATCH] Fix AIOOBE in inventory handling
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b8ec71a93..bac3ba83d 100644
index c2e93bb45..73baf015b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1816,7 +1816,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1830,7 +1830,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
case CLONE:
if (packetplayinwindowclick.c() == 2) {
click = ClickType.MIDDLE;
@ -18,5 +18,5 @@ index b8ec71a93..bac3ba83d 100644
} else {
Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b());
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From ddf7bf9141ddfb1453d79fbe35f88b1cee457219 Mon Sep 17 00:00:00 2001
From b78b3c09164a097af3331b5285165dd6423fb0d9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 11 Sep 2016 14:30:57 -0500
Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c758bde3f..d765607c0 100644
index cf06f8ac3..2001175bf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -235,4 +235,13 @@ public class PaperConfig {
@ -23,10 +23,10 @@ index c758bde3f..d765607c0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index bac3ba83d..7b8e7f343 100644
index 73baf015b..de8c9a3a5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -882,13 +882,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -895,13 +895,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;
@ -44,5 +44,5 @@ index bac3ba83d..7b8e7f343 100644
limitedPackets = 0;
return true;
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From e92d02317cc0d4af25558ecd75a66595adb10e22 Mon Sep 17 00:00:00 2001
From 6c083dc4268feabf71e564d138ea7fbade9eb4ae Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements
@ -96,19 +96,19 @@ index 9836c0c5a..39f0f5a17 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 2b01c5395..42eaef8a1 100644
index 2ee915226..fd7fda511 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -32,6 +32,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bW = LogManager.getLogger();
private static final Logger bV = LogManager.getLogger();
public String locale = null; // Spigot private -> public // Paper - default to null
+ public long lastSave = MinecraftServer.currentTick; // Paper
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 19a66b64c..1f0e79387 100644
index 374ab7294..6f6cc49c0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -118,6 +118,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@ -155,7 +155,7 @@ index 19a66b64c..1f0e79387 100644
this.methodProfiler.a("tallying");
// Spigot start
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index e7017883f..31f2704af 100644
index a6576841b..f40bd1f46 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -339,6 +339,7 @@ public abstract class PlayerList {
@ -192,7 +192,7 @@ index e7017883f..31f2704af 100644
public void addWhitelist(GameProfile gameprofile) {
this.whitelist.add(new WhiteListEntry(gameprofile));
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 36e6fdd16..b1253899c 100644
index 9f297f8de..a49e2302c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1002,8 +1002,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -215,5 +215,5 @@ index 36e6fdd16..b1253899c 100644
timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag);
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 7030da056719aa24e367550279c56f3b5188c17b Mon Sep 17 00:00:00 2001
From 940009e3c1babcdad40a0d1b62e2188e4022d432 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 22:54:28 -0400
Subject: [PATCH] Chunk registration fixes
@ -8,18 +8,18 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 0a473d7d2..888ecce77 100644
index 28c249718..b12d464dc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1766,7 +1766,7 @@ public abstract class World implements IBlockAccess {
@@ -1767,7 +1767,7 @@ public abstract class World implements IBlockAccess {
}
int k = MathHelper.floor(entity.locX / 16.0D);
- int l = MathHelper.floor(entity.locY / 16.0D);
+ int l = Math.min(15, Math.max(0, MathHelper.floor(entity.locY / 16.0D))); // Paper - stay consistent with chunk add/remove behavior
int i1 = MathHelper.floor(entity.locZ / 16.0D);
int i = MathHelper.floor(entity.locX / 16.0D);
- int j = MathHelper.floor(entity.locY / 16.0D);
+ int j = Math.min(15, Math.max(0, MathHelper.floor(entity.locY / 16.0D))); // Paper - stay consistent with chunk add/remove behavior
int k = MathHelper.floor(entity.locZ / 16.0D);
if (!entity.aa || entity.ab != k || entity.ac != l || entity.ad != i1) {
if (!entity.aa || entity.ab != i || entity.ac != j || entity.ad != k) {
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From 5ce7fe5db1d223b1ac36137aff1bd8a1e4461fa2 Mon Sep 17 00:00:00 2001
From 5b0f458a7e9c26380be2663e9ea2b7fd21b276b4 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index c2f4337d0..50629ff33 100644
index cd97aa30f..835fd7461 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -158,6 +158,12 @@ public class EntityPig extends EntityAnimal {
@ -22,7 +22,7 @@ index c2f4337d0..50629ff33 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 67be37ae8..34945598c 100644
index fa7ec707f..2562cc45e 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -622,6 +622,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@ -37,7 +37,7 @@ index 67be37ae8..34945598c 100644
+
entitywitch.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
entitywitch.prepare(this.world.D(new BlockPosition(entitywitch)), (GroupDataEntity) null);
entitywitch.setAI(this.hasAI());
entitywitch.setNoAI(this.isNoAI());
@@ -630,7 +636,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
entitywitch.setCustomNameVisible(this.getCustomNameVisible());
}
@ -67,5 +67,5 @@ index a16694ecc..2ff9cee86 100644
HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power);
horse.getBukkitEntity().getServer().getPluginManager().callEvent(event);
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From 2a0980201b14be31b4fbb88b7a2bb139d0acb07d Mon Sep 17 00:00:00 2001
From c318f830a7efb9c5f4a9cda7c7d0b25841ae3a14 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 13:22:40 +0000
Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index c8183de48..1aa2d2e0a 100644
index 182513efd..3906d4bf7 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -3,8 +3,10 @@ package net.minecraft.server;
@ -25,9 +25,9 @@ index c8183de48..1aa2d2e0a 100644
public double e;
- public final List<Integer> removeQueue = Lists.newLinkedList();
+ public final Deque<Integer> removeQueue = new ArrayDeque<>(); // Paper
private final AdvancementDataPlayer bZ;
private final ServerStatisticManager ca;
private float cb = Float.MIN_VALUE;
private final AdvancementDataPlayer bY;
private final ServerStatisticManager bZ;
private float ca = Float.MIN_VALUE;
@@ -286,10 +288,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
Iterator iterator = this.removeQueue.iterator();
int j = 0;
@ -49,17 +49,17 @@ index c8183de48..1aa2d2e0a 100644
}
@@ -1097,7 +1106,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastHealthSent = -1.0F;
this.ci = -1;
// this.cs.a((RecipeBook) entityplayer.cs); // CraftBukkit
this.ch = -1;
// this.cr.a((RecipeBook) entityplayer.cr); // CraftBukkit
- this.removeQueue.addAll(entityplayer.removeQueue);
+ //this.removeQueue.addAll(entityplayer.removeQueue); // Paper
+ // Paper start - Optimize remove queue
+ //this.removeQueue.addAll(entityplayer.removeQueue);
+ if (this.removeQueue != entityplayer.removeQueue) {
+ this.removeQueue.addAll(entityplayer.removeQueue);
+ }
+ // Paper end
this.cr = entityplayer.cr;
this.cw = entityplayer.cw;
this.cq = entityplayer.cq;
this.cv = entityplayer.cv;
this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft());
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From 23a9480ea73edb509eb133e92e578716a845b593 Mon Sep 17 00:00:00 2001
From 1a83b78d191a6c856d17fc6c5e756af2caa326a7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 16 Dec 2016 16:03:19 -0600
Subject: [PATCH] Don't let fishinghooks use portals
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5476aa5f7..ca05b3310 100644
index 7ced4d196..c5c701f08 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -144,7 +144,7 @@ public abstract class Entity implements ICommandListener {
@@ -145,7 +145,7 @@ public abstract class Entity implements ICommandListener {
public boolean ah;
public boolean impulse;
public int portalCooldown;
@ -18,7 +18,7 @@ index 5476aa5f7..ca05b3310 100644
public int dimension;
protected BlockPosition an;
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index e6a1e5a2a..d905c338f 100644
index 1ef0fbe4d..95cc18716 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -185,6 +185,12 @@ public class EntityFishingHook extends Entity {
@ -35,5 +35,5 @@ index e6a1e5a2a..d905c338f 100644
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From e67671b85aa7f183c588d8c6180081451b532cd8 Mon Sep 17 00:00:00 2001
From 01a1d911ecb592b44ce8101f58c243b4ebf71643 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 16 Dec 2016 22:10:35 -0600
Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ca05b3310..916c63ef7 100644
index c5c701f08..902df7ac6 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -68,7 +68,7 @@ public abstract class Entity implements ICommandListener {
@ -31,7 +31,7 @@ index c0d97f154..363209170 100644
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index cfdd04d8b..42cfbe096 100644
index 7c12338a5..8537f65fd 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1802,6 +1802,33 @@ public abstract class World implements IBlockAccess {
@ -68,8 +68,8 @@ index cfdd04d8b..42cfbe096 100644
public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) {
List list = this.getEntities((Entity) null, axisalignedbb);
@@ -2686,7 +2713,7 @@ public abstract class World implements IBlockAccess {
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().c(this, blockposition);
@@ -2692,7 +2719,7 @@ public abstract class World implements IBlockAccess {
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition);
// CraftBukkit start - store default return
- boolean defaultReturn = axisalignedbb != Block.k && !this.a(axisalignedbb.a(blockposition), entity) ? false : (iblockdata.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : iblockdata.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection));
@ -96,5 +96,5 @@ index 09f009522..2596c2fa0 100644
return event;
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 586ee1ef21797f6f342b7ba3812b8a356d687ef3 Mon Sep 17 00:00:00 2001
From 81ca3b6d928d35962fbd7988186976ebfaa00756 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 23 Jun 2016 23:33:57 -0400
Subject: [PATCH] IllegalPacketEvent
@ -6,7 +6,7 @@ Subject: [PATCH] IllegalPacketEvent
Fired for invalid data from players that represents hacking attempts
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index d2742df61..13cce8904 100644
index 12e07ccc4..9ee2cd17d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -17,7 +17,7 @@ index d2742df61..13cce8904 100644
import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end
@@ -2316,8 +2317,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2330,8 +2331,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit
}
} catch (Exception exception) {
@ -27,7 +27,7 @@ index d2742df61..13cce8904 100644
}
} else {
String s1;
@@ -2366,8 +2366,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2380,8 +2380,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit
}
} catch (Exception exception1) {
@ -37,7 +37,7 @@ index d2742df61..13cce8904 100644
}
} else if ("MC|TrSel".equals(s)) {
try {
@@ -2378,8 +2377,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2392,8 +2391,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
((ContainerMerchant) container).d(j);
}
} catch (Exception exception2) {
@ -47,7 +47,7 @@ index d2742df61..13cce8904 100644
}
} else {
TileEntity tileentity;
@@ -2520,8 +2518,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2534,8 +2532,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
iinventory.update();
}
} catch (Exception exception5) {
@ -57,7 +57,7 @@ index d2742df61..13cce8904 100644
}
}
} else if ("MC|ItemName".equals(s)) {
@@ -2620,8 +2617,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2634,8 +2631,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.player.playerConnection.sendPacket(new PacketPlayOutSetSlot(-2, k, this.player.inventory.getItem(k)));
this.player.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(this.player.inventory.itemInHandIndex));
} catch (Exception exception7) {
@ -68,5 +68,5 @@ index d2742df61..13cce8904 100644
}
// CraftBukkit start
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 0dcf2c05abc7b96dacaeefcfa8bc51bd693f47e5 Mon Sep 17 00:00:00 2001
From 0b2b35012342c40c9c595e7e0b17b907858f51eb Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Tue, 27 Dec 2016 01:57:57 +0000
Subject: [PATCH] Properly fix item duplication bug
@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 8d48d7c0c..eca718513 100644
index 3906d4bf7..0cd711c3e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1477,7 +1477,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -19,10 +19,10 @@ index 8d48d7c0c..eca718513 100644
public void reset() {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 13cce8904..563781256 100644
index 9ee2cd17d..32baff5e2 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2660,6 +2660,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2674,6 +2674,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start - Add "isDisconnected" method
public final boolean isDisconnected() {
@ -31,5 +31,5 @@ index 13cce8904..563781256 100644
}
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,28 +0,0 @@
From 2f323655c172118c9ceacf8e7fc3ef927eb5d8f1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 2 Jan 2017 02:07:24 -0500
Subject: [PATCH] MC-111699: Ignore Improper Anvil Item Name Packets
The client is improperly sending Item Name Packets to the server BEFORE
the click event. This causes the server to reset before the click event is processed
This breaks the ability to rename more than 1 item at a time.
See: https://bugs.mojang.com/browse/MC-111699
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 563781256..dfeadd9b5 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2529,7 +2529,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767));
if (s4.length() <= 30) {
- containeranvil.a(s4);
+ if (!s4.isEmpty() || containeranvil.getSlot(2).getItem().isEmpty()) containeranvil.a(s4); // Paper - Hack Fix for MC-111699
}
} else {
containeranvil.a("");
--
2.13.0

View File

@ -1,4 +1,4 @@
From 70ea5a7f810ccde254307100cb4b3e2468e75b2e Mon Sep 17 00:00:00 2001
From 42c899818ae3a9f16b7da90a314238d331221108 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 2 Jan 2017 16:32:56 -0500
Subject: [PATCH] ShulkerBox Dupe Prevention
@ -7,7 +7,7 @@ This ensures that Shulker Boxes can never drop their contents twice, and
that the inventory is cleared incase it some how also got saved to the world.
diff --git a/src/main/java/net/minecraft/server/BlockShulkerBox.java b/src/main/java/net/minecraft/server/BlockShulkerBox.java
index e4e0eae60..3fe3af1c2 100644
index 717dc3245..96a279cb1 100644
--- a/src/main/java/net/minecraft/server/BlockShulkerBox.java
+++ b/src/main/java/net/minecraft/server/BlockShulkerBox.java
@@ -112,6 +112,7 @@ public class BlockShulkerBox extends BlockTileEntity {
@ -19,5 +19,5 @@ index e4e0eae60..3fe3af1c2 100644
world.updateAdjacentComparators(blockposition, iblockdata.getBlock());
--
2.13.0
2.13.0.windows.1

View File

@ -1,22 +0,0 @@
From e02df5ced19ad774237a5a59e10648bdc4221a27 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 2 Jan 2017 02:43:22 -0500
Subject: [PATCH] MC-112017: Allow 31 instead of 30 for item names
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index dfeadd9b5..20f026eb8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2528,7 +2528,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (packetplayincustompayload.b() != null && packetplayincustompayload.b().readableBytes() >= 1) {
String s4 = SharedConstants.a(packetplayincustompayload.b().e(32767));
- if (s4.length() <= 30) {
+ if (s4.length() <= 31) { // Paper - MC-112017
if (!s4.isEmpty() || containeranvil.getSlot(2).getItem().isEmpty()) containeranvil.a(s4); // Paper - Hack Fix for MC-111699
}
} else {
--
2.13.0

View File

@ -1,4 +1,4 @@
From d8cac48080c65ec26b73eaa47d099a253fc02677 Mon Sep 17 00:00:00 2001
From 4c9841741385aba32d83180b96b697c9a85fc3dd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 15:24:46 -0500
Subject: [PATCH] Provide E/TE/Chunk count stat methods
@ -41,5 +41,5 @@ index 0466a4f00..7e8913794 100644
public CraftWorld(WorldServer world, ChunkGenerator gen, Environment env) {
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 705f3fa5e11e66ad53b063acf48c4ac30c964f3f Mon Sep 17 00:00:00 2001
From 6b831769e307980e82218b51269bb7771119107e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 15:41:58 -0500
Subject: [PATCH] Enforce Sync Player Saves
@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 31f2704af..bc2322e62 100644
index f40bd1f46..772670a03 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1237,6 +1237,7 @@ public abstract class PlayerList {
@ -27,5 +27,5 @@ index 31f2704af..bc2322e62 100644
// Paper end
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 5abfe0bb4d3b82b1e0ae4519f32cd6ad047800da Mon Sep 17 00:00:00 2001
From 9cf1d9a3227e9da7475208a347a6fa6979ad57e8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 7 Jan 2017 16:06:44 -0500
Subject: [PATCH] Enforce Sync Chunk Unloads
@ -27,5 +27,5 @@ index 7e8913794..90565227e 100644
public boolean regenerateChunk(int x, int z) {
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From 41e34cb1a54b0b06cdbee8133a921d5ead9f2d56 Mon Sep 17 00:00:00 2001
From dcc21b45d68b1a0a8f2e60f80db12401e5cb0c76 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Sun, 8 Jan 2017 04:31:36 +0000
Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6915be3f1..b8b1b32df 100644
index 902df7ac6..7339e337b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1932,6 +1932,7 @@ public abstract class Entity implements ICommandListener {
@ -17,5 +17,5 @@ index 6915be3f1..b8b1b32df 100644
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
} else {
--
2.13.0
2.13.0.windows.1

View File

@ -1,14 +1,14 @@
From 04cdbd2f05f55336d24d1c5a7202f432bc1e6fdb Mon Sep 17 00:00:00 2001
From be57fe91e17458a39a5363009979858e460acb8e Mon Sep 17 00:00:00 2001
From: Michael Himing <mhiming@gmail.com>
Date: Sun, 8 Jan 2017 18:50:35 +1100
Subject: [PATCH] Fix block break desync
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 20f026eb8..0b6fd67e7 100644
index 32baff5e2..9b78df95c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -841,6 +841,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -854,6 +854,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
if (d3 > 36.0D) {
@ -17,5 +17,5 @@ index 20f026eb8..0b6fd67e7 100644
} else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) {
return;
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 2584f2a43ff84bf1511982c31e4aa486a7591648 Mon Sep 17 00:00:00 2001
From bc489cba868db887dd685a83b37709c9ae4b4d7e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 14 Jan 2017 01:22:07 -0600
Subject: [PATCH] Assign the World in WorldGenStronghold
@ -17,5 +17,5 @@ index c93754704..a3b958e01 100644
this.c();
this.b = true;
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 63ae5b4d30b267fadb29c296b011b363297ddf3d Mon Sep 17 00:00:00 2001
From a47f1a0fe6de4126bee3b618dea9a818eebf696d Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 14 Jan 2017 16:15:26 -0600
Subject: [PATCH] Add fromBottle flag to Experience Orbs
@ -68,5 +68,5 @@ index 3a09cab3d..61e3c6c3e 100644
public EntityExperienceOrb getHandle() {
return (EntityExperienceOrb) entity;
--
2.13.0
2.13.0.windows.1

View File

@ -1,11 +1,11 @@
From b935b5011a9c2baba9f8e995eef8aca014cd5c5a Mon Sep 17 00:00:00 2001
From 422fc51628abbf451c35a053a7f790458231d0b6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jan 2017 02:00:33 -0500
Subject: [PATCH] Remove the Vanilla Method Profiler
Spigot rebrought this back after it was removed for years due to the performance hit.
It is unknown if the JIT will optimize it out as effeciently with how it was
It is unknown if the JIT will optimize it out as efficiently with how it was
added, so we do not want any risk of performance degredation.
Paper has a proper Timings system that makes the Vanilla Method profiler obsolete and inferior.
@ -79,5 +79,5 @@ index 20aa10c14..ebc324ed1 100644
+ }
+}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 32eddc734b4f69b74edd9273e924dce86dd14dda Mon Sep 17 00:00:00 2001
From 7068d505f0d0666e4ebdeab8cbf002d43aa8d934 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 22 Jan 2017 18:07:56 -0500
Subject: [PATCH] Cap Entity Collisions
@ -27,19 +27,19 @@ index 70af657f5..af953dda4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b8b1b32df..2794ffa5b 100644
index 7339e337b..883777223 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -169,6 +169,7 @@ public abstract class Entity implements ICommandListener {
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
public long activatedTick = Integer.MIN_VALUE;
public boolean fromMobSpawner;
+ protected int numCollisions = 0; // Paper
public void inactiveTick() { }
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index f59c67b79..096d56026 100644
index 75dbd8cf1..e5c7ee17f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2182,8 +2182,11 @@ public abstract class EntityLiving extends Entity {
@ -56,5 +56,5 @@ index f59c67b79..096d56026 100644
this.C(entity);
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From ad7da1f8a8c69dde2730efb96e7c0a74c3cd591d Mon Sep 17 00:00:00 2001
From 8347022cb32d2db6581062434ad5b4027a6344a2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 23 Jan 2017 15:10:25 -0600
Subject: [PATCH] Do not allow a zero max height in BiomeJungle
@ -34,5 +34,5 @@ index 6a0b3a62d..38a7af58c 100644
return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2);
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 7378d1bef77bee51e3373b4f298aebe65af66e38 Mon Sep 17 00:00:00 2001
From e900c91cb908ebd1d4ea8e794a8eae011817b56d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 5 Feb 2017 00:04:04 -0500
Subject: [PATCH] Remove CraftScheduler Async Task Debugger
@ -58,5 +58,5 @@ index e30cfb7b7..448c27cc7 100644
@Deprecated
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 8c35d14fbafa84a274e7547697ab5e4a3e60fb5a Mon Sep 17 00:00:00 2001
From 8977f9030e587bde981819fe3d98de12f20b9f52 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 5 Feb 2017 19:17:28 -0500
Subject: [PATCH] Shame on you Mojang
@ -55,5 +55,5 @@ index f07ac0186..21075974d 100644
}
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 58c7b942a8da27964a169fa592b4946437e0819e Mon Sep 17 00:00:00 2001
From 44eb22893b71a17924d64f097e0f0017b700074e Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 7 Feb 2017 16:55:35 -0600
Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
@ -18,5 +18,5 @@ index 9159ed023..e54f4f47f 100644
Iterator iterator = this.unloadQueue.iterator();
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From c2a37eb20a4c9821e051f945c3b199f60cd8823d Mon Sep 17 00:00:00 2001
From 73392ce2b1ba0373336cc35cdddf20dffd927980 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 18 Feb 2017 19:29:58 -0600
Subject: [PATCH] Do not let armorstands drown
@ -20,7 +20,7 @@ index 091c96411..693f157ea 100644
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 1277ba3c2..ff2fe1b9d 100644
index e5c7ee17f..00201988f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -189,6 +189,7 @@ public abstract class EntityLiving extends Entity {
@ -41,5 +41,5 @@ index 1277ba3c2..ff2fe1b9d 100644
if (this.getAirTicks() == -20) {
this.setAirTicks(0);
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From f2985676a15e56d1c909b738f04c5c039296546b Mon Sep 17 00:00:00 2001
From 08133ff898c0aa88964c4b9584089cc9ab44c107 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Sun, 9 Apr 2017 23:50:15 -0700
Subject: [PATCH] Fix NFE when attempting to read EMPTY ItemStack
@ -6,7 +6,7 @@ Subject: [PATCH] Fix NFE when attempting to read EMPTY ItemStack
Thanks @gabizou
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 4de2e2b25..b8ac7479d 100644
index 3aefb023e..8c7f57bc7 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -103,7 +103,7 @@ public final class ItemStack {
@ -19,5 +19,5 @@ index 4de2e2b25..b8ac7479d 100644
// CraftBukkit start - Route through setData for filtering
// this.damage = Math.max(0, nbttagcompound.getShort("Damage"));
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From be5defaa5ff4f435f770d33606670e0271d1cf32 Mon Sep 17 00:00:00 2001
From b181211ad3bd0a7823863febec582c4f38cb219e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 12 May 2017 23:34:11 -0500
Subject: [PATCH] Properly handle async calls to restart the server
@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 40514d042..f0743e6cc 100644
index 42769d164..6c5b40f32 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -70,6 +70,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
@ -78,7 +78,7 @@ index 40514d042..f0743e6cc 100644
return this.serverThread;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 072de1f71..4483beeba 100644
index 772670a03..34f113ee5 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1361,10 +1361,15 @@ public abstract class PlayerList {
@ -107,14 +107,16 @@ index 072de1f71..4483beeba 100644
// CraftBukkit start
public void sendMessage(IChatBaseComponent[] iChatBaseComponents) {
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index 49768734d..d51636c8e 100644
index 49768734d..e1bc3e64e 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -45,88 +45,123 @@ public class RestartCommand extends Command
@@ -45,88 +45,119 @@ public class RestartCommand extends Command
AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us
try
{
- if ( script.isFile() )
- {
- System.out.println( "Attempting to restart with " + SpigotConfig.restartScript );
+ // Paper - extract method and cleanup
+ boolean isRestarting = addShutdownHook(script);
+ if (isRestarting) {
@ -122,39 +124,11 @@ index 49768734d..d51636c8e 100644
+ } else {
+ System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." );
+ }
+
+ // Stop the watchdog
+ WatchdogThread.doStop();
+
+ shutdownServer(isRestarting);
+ } catch ( Exception ex )
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ // Paper start - sync copied from above with minor changes, async added
+ private static void shutdownServer(boolean isRestarting)
+ {
+ if (MinecraftServer.getServer().isMainThread())
+ {
+ // Kick all players
+ for ( EntityPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) )
+ {
+ p.playerConnection.disconnect(SpigotConfig.restartMessage);
+ }
+ // Give the socket a chance to send the packets
+ try
+ {
+ Thread.sleep( 100 );
+ } catch ( InterruptedException ex )
{
- System.out.println( "Attempting to restart with " + SpigotConfig.restartScript );
+ }
- // Disable Watchdog
- WatchdogThread.doStop();
+ closeSocket();
+ // Stop the watchdog
+ WatchdogThread.doStop();
- // Kick all players
- for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players )
@ -170,14 +144,7 @@ index 49768734d..d51636c8e 100644
- }
- // Close the socket so we can rebind with the new process
- MinecraftServer.getServer().getServerConnection().b();
+ // Actually shutdown
+ try
+ {
+ MinecraftServer.getServer().stop();
+ } catch ( Throwable t )
+ {
+ }
-
- // Give time for it to kick in
- try
- {
@ -185,8 +152,12 @@ index 49768734d..d51636c8e 100644
- } catch ( InterruptedException ex )
- {
- }
+ // Actually stop the JVM
+ System.exit(0);
+ shutdownServer(isRestarting);
+ } catch ( Exception ex )
+ {
+ ex.printStackTrace();
+ }
+ }
- // Actually shutdown
- try
@ -195,10 +166,23 @@ index 49768734d..d51636c8e 100644
- } catch ( Throwable t )
- {
- }
+ } else
+ // Paper start - sync copied from above with minor changes, async added
+ private static void shutdownServer(boolean isRestarting)
+ {
+ // Mark the server to shutdown at the end of the tick
+ MinecraftServer.getServer().safeShutdown(isRestarting);
+ if (MinecraftServer.getServer().isMainThread())
+ {
+ // Kick all players
+ for ( EntityPlayer p : com.google.common.collect.ImmutableList.copyOf( MinecraftServer.getServer().getPlayerList().players ) )
+ {
+ p.playerConnection.disconnect(SpigotConfig.restartMessage);
+ }
+ // Give the socket a chance to send the packets
+ try
+ {
+ Thread.sleep( 100 );
+ } catch ( InterruptedException ex )
+ {
+ }
- // This will be done AFTER the server has completely halted
- Thread shutdownHook = new Thread()
@ -225,19 +209,24 @@ index 49768734d..d51636c8e 100644
- }
- }
- };
+ closeSocket();
- shutdownHook.setDaemon( true );
- Runtime.getRuntime().addShutdownHook( shutdownHook );
- } else
+ // wait 10 seconds to see if we're actually going to try shutdown
+ // Actually shutdown
+ try
+ {
+ Thread.sleep(10000);
+ }
+ catch (InterruptedException ignored)
{
- System.out.println( "Startup script '" + SpigotConfig.restartScript + "' does not exist! Stopping server." );
-
+ MinecraftServer.getServer().stop();
+ } catch ( Throwable t )
+ {
+ }
+ } else
+ {
+ // Mark the server to shutdown at the end of the tick
+ MinecraftServer.getServer().safeShutdown(isRestarting);
- // Actually shutdown
- try
- {
@ -245,6 +234,14 @@ index 49768734d..d51636c8e 100644
- } catch ( Throwable t )
- {
- }
+
+ // wait 10 seconds to see if we're actually going to try shutdown
+ try
+ {
+ Thread.sleep(10000);
+ }
+ catch (InterruptedException ignored)
+ {
}
+
+ // Check if we've actually hit a state where the server is going to safely shutdown
@ -306,5 +303,5 @@ index 49768734d..d51636c8e 100644
}
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 3070c87a6a11d298b3182731b7f1f48ffaa0c1e1 Mon Sep 17 00:00:00 2001
From e0c1617d10bbfc473598b7e10abaccd1a1cc3086 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 13 May 2017 20:11:21 -0500
Subject: [PATCH] Add system property to disable book size limits
@ -57,5 +57,5 @@ index 5d971f07b..6a7d10344 100644
}
--
2.13.0
2.13.0.windows.1

View File

@ -1,4 +1,4 @@
From 20de43ace6818d683b68d70a87343a9760b7a720 Mon Sep 17 00:00:00 2001
From efc2c4c5cf777c6d3586b5edbb388853de234d86 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 16 May 2017 21:29:08 -0500
Subject: [PATCH] Add option to make parrots stay on shoulders despite movement
@ -26,23 +26,23 @@ index af953dda4..1ce3aaa8c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 29c2fd4c9..02f3c001b 100644
index 7d79e4625..a977a6775 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -400,7 +400,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -399,7 +399,7 @@ public abstract class EntityHuman extends EntityLiving {
this.j(this.getShoulderEntityLeft());
this.j(this.getShoulderEntityRight());
if (!this.world.isClientSide && (!this.onGround || this.isInWater())) {
if (!this.world.isClientSide && (!this.onGround || this.isInWater() || this.isPassenger())) {
- this.releaseShoulderEntities();
+ if (!this.world.paperConfig.parrotsHangOnBetter) this.releaseShoulderEntities(); // Paper - Hang on!
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0b6fd67e7..7a4673278 100644
index 9b78df95c..3c59a2f40 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1482,6 +1482,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1495,6 +1495,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
switch (packetplayinentityaction.b()) {
case START_SNEAKING:
this.player.setSneaking(true);

View File

@ -1,4 +1,4 @@
From 7515b0a14c40747bdfd29e56590134b090e76521 Mon Sep 17 00:00:00 2001
From 949514e1e5cf558538e8676bcf8c858034539483 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Wed, 17 May 2017 17:45:19 -0500
Subject: [PATCH] Workaround for jansi bug with Windows
@ -25,5 +25,5 @@ index dab983481..20902dc38 100644
} else {
// This ensures the terminal literal will always match the jline implementation
--
2.13.0
2.13.0.windows.1

View File

@ -17,7 +17,7 @@ update Bukkit
update CraftBukkit
update Spigot
if [[ "$2" = "all" ]] ; then
if [[ "$2" = "all" || "$2" = "a" ]] ; then
update BuildData
update Paperclip
fi

@ -1 +1 @@
Subproject commit f4d4fd9c0ff899191e17fb7f7a3673f5529c0e05
Subproject commit ceb1b906afeaa302a4038f73c2d2029914c6a6b2

@ -1 +1 @@
Subproject commit 211c15e44665dd0365460fb3330411dca6dbbe53
Subproject commit 60a4fa84ba7a6254d77017501a900b148aad2bfe

@ -1 +1 @@
Subproject commit 3ecbb59cbb9e20064d04628d26387742705ab9ac
Subproject commit c7920f4302bce2042aa9c5d1d121e488cb88f7f0

@ -1 +1 @@
Subproject commit 1ffab67d68300a10e9c01d0ae2f87fba30e82a92
Subproject commit 662916298a344f788a6e3cafaa90f06ad48232d2