Update to 1.12-pre6

This commit is contained in:
Shane Freeder 2017-05-31 09:04:52 +01:00 committed by Zach Brown
parent a7d4bd3735
commit adab11a1f7
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
38 changed files with 191 additions and 189 deletions

View file

@ -1,11 +1,11 @@
From 8c171d927b531952ea64b04d2871c4d221b9222a Mon Sep 17 00:00:00 2001
From c40d302beea8a6ad8805ddf604afe2aed7552b9c 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 66bb7a12..0899a127 100644
index df62fbd8..31991487 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,35 +4,36 @@
@ -24,7 +24,7 @@ index 66bb7a12..0899a127 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.12-pre5-SNAPSHOT</version>
<version>1.12-pre6-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -132,5 +132,5 @@ index 66bb7a12..0899a127 100644
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
--
2.13.0.windows.1
2.13.0

View file

@ -1,11 +1,11 @@
From f89b79a21ed04e7a9e81ecc8108f808f659927c0 Mon Sep 17 00:00:00 2001
From ede9fd5f7e5e6b8d0a3069fa2568782e553502bd 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 31cb11194..167bc0ac2 100644
index ed0ddbd86..fce7fe4d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
@ -17,7 +17,7 @@ index 31cb11194..167bc0ac2 100644
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.12-pre5-SNAPSHOT</version>
<version>1.12-pre6-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.windows.1
2.13.0

View file

@ -1,11 +1,11 @@
From c38af80b4c744cd4877516ef69de70fe34f6360c Mon Sep 17 00:00:00 2001
From eaf49214e8b2bffc9e6aeb7890b660b23d5d9baf 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 167bc0ac2..6b73c55f9 100644
index fce7fe4d0..ad910df98 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 7c39edca8..6c1c5e566 100644
index 4cb71b294..ec406644c 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 b23de7663..fe64ee4aa 100644
index 80a5b2013..403a2cb2e 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 b23de7663..fe64ee4aa 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 70fde368f..c56aa5c19 100644
index 6abbc3bc3..11f62b9b9 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 70fde368f..c56aa5c19 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 48fb9662f..c7b8ae636 100644
index 0138ac4ab..5d47bc459 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;
@ -663,7 +663,7 @@ index 48fb9662f..c7b8ae636 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 bf2761d53..5a2dbe5ff 100644
index cb483dc2a..9e31db26d 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 249fccce9..3629cbc47 100644
index 3961a5fe6..8dbbab3ad 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 fb5eefc11..9eaa3a2ac 100644
index 1bcf74400..4c08373ba 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 fb5eefc11..9eaa3a2ac 100644
// CraftBukkit end
public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1359,7 +1360,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1366,7 +1367,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end
private void handleCommand(String s) {
@ -1032,7 +1032,7 @@ index fb5eefc11..9eaa3a2ac 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1370,22 +1371,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1377,22 +1378,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -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 35f421164..4a8927798 100644
index 4798dd4f5..acdc68c8f 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 41f0ac2bf..919f041d9 100644
index 17255e2d5..e51a288a8 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,7 +1256,7 @@ index 41f0ac2bf..919f041d9 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1623,7 +1628,6 @@ public abstract class World implements IBlockAccess {
@@ -1627,7 +1632,6 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end
@ -1264,15 +1264,15 @@ index 41f0ac2bf..919f041d9 100644
entity.M = entity.locX;
entity.N = entity.locY;
entity.O = entity.locZ;
@@ -1631,6 +1635,7 @@ public abstract class World implements IBlockAccess {
@@ -1635,6 +1639,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
+ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper
if (entity.isPassenger()) {
entity.leaveVehicle();
entity.aC();
} else {
@@ -1690,8 +1695,6 @@ public abstract class World implements IBlockAccess {
@@ -1694,8 +1699,6 @@ public abstract class World implements IBlockAccess {
}
}
}
@ -1935,5 +1935,5 @@ index be23631b2..9eb36f3e9 100644
}
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,11 +1,11 @@
From 5f6d630fe3b1899af917a1e947075da6b44c693c Mon Sep 17 00:00:00 2001
From c5a7c0ba9574716e0b6f153425fd55d873a4c8b5 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 186e2df8b..dcd2ac6ab 100644
index 995a9ddb1..d7061ce01 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -64,6 +64,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -30,7 +30,7 @@ index bb27f5dd8..65b7b33be 100644
double d1 = entityhuman.locY - this.locY;
double d2 = entityhuman.locZ - this.locZ;
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index dcc251e31..d8344ddc9 100644
index 130aafc83..7d486f1ca 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -99,8 +99,7 @@ public class EntitySilverfish extends EntityMonster {
@ -57,10 +57,10 @@ index a599a043d..1c7c187c7 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 6b404e385..3d114cfea 100644
index 2ba929100..4fc95c86b 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2730,7 +2730,7 @@ public abstract class World implements IBlockAccess {
@@ -2734,7 +2734,7 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@ -91,5 +91,5 @@ index d10177669..4f80d0443 100644
// Spigot start
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From f797679452ee445be2471755636f140cd3688c13 Mon Sep 17 00:00:00 2001
From e32cd6dae671845a2b59511787b802cadcb60222 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,10 +20,10 @@ 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 0d16f65c8..9a5b8f083 100644
index e2369e7f2..efce9048b 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -57,7 +57,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private long cn = System.currentTimeMillis();
private Entity co;
public boolean worldChangeInvuln;
@ -32,7 +32,7 @@ index 0d16f65c8..9a5b8f083 100644
private final RecipeBookServer cr = new RecipeBookServer();
private Vec3D cs;
private int ct;
@@ -604,6 +604,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -603,6 +603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.world.kill(this);
if (!this.viewingCredits) {
this.viewingCredits = true;
@ -41,5 +41,5 @@ index 0d16f65c8..9a5b8f083 100644
this.cq = true;
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,14 +1,14 @@
From c70ff5f64d1980e151179042c3d8b10b512da6a1 Mon Sep 17 00:00:00 2001
From 2f1f22b6f64f1784e0b7863c8a87bd65728cabeb Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 14:35:27 -0600
Subject: [PATCH] Add player view distance API
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 9a5b8f083..a8038881d 100644
index efce9048b..76588e4a2 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -67,6 +67,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -66,6 +66,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public boolean f;
public int ping;
public boolean viewingCredits;
@ -215,5 +215,5 @@ index b451be916..3c39751a0 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From 4e403d7a2bd2d0fd6da83dab1e55fed43e9b38da Mon Sep 17 00:00:00 2001
From 3c5718edd8cc3b77c2644b9006e135a1944b9429 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 23:34:44 -0600
Subject: [PATCH] Configurable container update tick rate
@ -19,10 +19,10 @@ index 1bb956515..e6aae7317 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index a8038881d..6fdde5c07 100644
index 76588e4a2..59967e81e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -76,6 +76,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.viewDistance = viewDistance;
}
// Paper end
@ -30,7 +30,7 @@ index a8038881d..6fdde5c07 100644
// CraftBukkit start
public String displayName;
@@ -267,7 +268,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -266,7 +267,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
--this.noDamageTicks;
}
@ -45,5 +45,5 @@ index a8038881d..6fdde5c07 100644
this.closeInventory();
this.activeContainer = this.defaultContainer;
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From adef50ccad5032eebdd7cc3019cda836b625609f Mon Sep 17 00:00:00 2001
From 16bfa6e0fdd0da9269469690c4f2bd0193350299 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 7c4fe706a..9be557062 100644
index 4c08373ba..a8c10d3b0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1292,6 +1292,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1299,6 +1299,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
if (!async && s.startsWith("/")) {
@ -82,5 +82,5 @@ index 42b3df58e..37de0d907 100644
return true;
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,14 +1,14 @@
From 1e08f53824449b8f1d616390f0fd67273bcd740b Mon Sep 17 00:00:00 2001
From 6760ed6dd99f5c9b6b3d710f2b5eea76714b5408 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 8bd9f2113..8dc7b1893 100644
index a8c10d3b0..cef07eb1b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1053,7 +1053,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1060,7 +1060,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.x());
@ -71,5 +71,5 @@ index eb7bdd222..ab164c11e 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From bc65ae40e324298b8ab016670f728b7731197a31 Mon Sep 17 00:00:00 2001
From 0417cbd32cabe9da9575c5a0e01ba1f49bda5d91 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -99,7 +99,7 @@ index 3d784d0dc..afdc4a779 100644
private NibbleArray skyLight;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 20bdf4055..1cd81e533 100644
index b34af0ffc..c3fbbab09 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -275,12 +275,12 @@ public abstract class World implements IBlockAccess {
@ -228,7 +228,7 @@ index 20bdf4055..1cd81e533 100644
public boolean D() {
return this.L < 4;
@@ -2020,7 +2029,7 @@ public abstract class World implements IBlockAccess {
@@ -2024,7 +2033,7 @@ public abstract class World implements IBlockAccess {
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
@Nullable
public TileEntity getTileEntity(BlockPosition blockposition) {
@ -237,7 +237,7 @@ index 20bdf4055..1cd81e533 100644
return null;
} else {
// CraftBukkit start
@@ -2061,7 +2070,7 @@ public abstract class World implements IBlockAccess {
@@ -2065,7 +2074,7 @@ public abstract class World implements IBlockAccess {
}
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
@ -246,7 +246,7 @@ index 20bdf4055..1cd81e533 100644
if (tileentity != null && !tileentity.y()) {
// CraftBukkit start
if (captureBlockStates) {
@@ -2124,7 +2133,7 @@ public abstract class World implements IBlockAccess {
@@ -2128,7 +2137,7 @@ public abstract class World implements IBlockAccess {
}
public boolean d(BlockPosition blockposition, boolean flag) {

View file

@ -1,4 +1,4 @@
From c894ad4e12e050a34ade6ec41eeb11deefca9fab Mon Sep 17 00:00:00 2001
From a107799aea60397b9784f188af71bf2c2f4399d1 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 3b4b5cf8c..81f8e0fd0 100644
index cef07eb1b..e20a166b7 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1638,6 +1638,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1645,6 +1645,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
}
}
@ -39,5 +39,5 @@ index 3b4b5cf8c..81f8e0fd0 100644
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From d8d0481ba7ddd832f206131c6453ab09ddb574c4 Mon Sep 17 00:00:00 2001
From 84a75a7e512b3b03a76c8c037d941d764f70b17f 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 cf2c4ea3b..0ce50541c 100644
index 0e819a43c..fce7774fd 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 cf2c4ea3b..0ce50541c 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 fee13283f..33776d905 100644
index 16b825884..54076b4bc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3203,8 +3203,9 @@ public abstract class World implements IBlockAccess {
@@ -3207,8 +3207,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.windows.1
2.13.0

View file

@ -1,14 +1,14 @@
From f087f637f551c289f26ad3f4a625b78f1451f747 Mon Sep 17 00:00:00 2001
From e06cfd125b1f04920cc48fa9d18f84be882bb1d1 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 85cd83c35..364cfe885 100644
index 65f84b419..958af4121 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3199,6 +3199,7 @@ public abstract class World implements IBlockAccess {
@@ -3203,6 +3203,7 @@ public abstract class World implements IBlockAccess {
return this.P;
}
@ -29,5 +29,5 @@ index d0265f960..35d8d1a6e 100644
}
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From 60d656282916a149f91cc19d99609e62805faf32 Mon Sep 17 00:00:00 2001
From 78d09b01059f7df6a117d4020bf8633f8cbdaaa2 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 5428220a0..3177c17c4 100644
index 9a47d00c0..f6d04c3d5 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 5428220a0..3177c17c4 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 81f8e0fd0..b5284cecd 100644
index e20a166b7..76784a3af 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1371,7 +1371,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1378,7 +1378,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
return;
}
@ -51,5 +51,5 @@ index 81f8e0fd0..b5284cecd 100644
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
for (Object recipient : minecraftServer.getPlayerList().players) {
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From fed630f23449d74c70787fc317255c14d8a5329f Mon Sep 17 00:00:00 2001
From 82c7dc3bfbfca450a60aae93d60424c42f48d038 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e301eaf9d..0ddc03507 100644
index 958af4121..755e7a0d8 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -68,7 +68,7 @@ public abstract class World implements IBlockAccess {
@ -57,7 +57,7 @@ index e301eaf9d..0ddc03507 100644
this.tileEntityListTick.add(tileentity);
}
@@ -2117,7 +2117,7 @@ public abstract class World implements IBlockAccess {
@@ -2121,7 +2121,7 @@ public abstract class World implements IBlockAccess {
} else {
if (tileentity != null) {
this.b.remove(tileentity);

View file

@ -1,4 +1,4 @@
From a6a5cd3d5aa8345b01724eb5073e1182ea389c06 Mon Sep 17 00:00:00 2001
From b8c7bcb5f11570adba7ff9fd94cf116edfdd0a6a Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 13 Apr 2016 20:21:38 -0700
Subject: [PATCH] Add handshake event to allow plugins to handle client
@ -6,11 +6,11 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index a46df4b7f..f02263c34 100644
index 8bac1e161..9640df356 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -72,8 +72,33 @@ public class HandshakeListener implements PacketHandshakingInListener {
this.b.close(chatcomponenttext);
this.b.close(chatmessage);
} else {
this.b.setPacketListener(new LoginListener(this.a, this.b));
+ // Paper start - handshake event
@ -22,9 +22,9 @@ index a46df4b7f..f02263c34 100644
+ if (event.callEvent()) {
+ // If we've failed somehow, let the client know so and go no further.
+ if (event.isFailed()) {
+ chatcomponenttext = new ChatComponentText(event.getFailMessage());
+ this.b.sendPacket(new PacketLoginOutDisconnect(chatcomponenttext));
+ this.b.close(chatcomponenttext);
+ chatmessage = new ChatMessage(event.getFailMessage());
+ this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage));
+ this.b.close(chatmessage);
+ return;
+ }
+
@ -45,5 +45,5 @@ index a46df4b7f..f02263c34 100644
if ( split.length == 3 || split.length == 4 ) {
packethandshakinginsetprotocol.hostname = split[0];
--
2.12.2
2.13.0

View file

@ -1,23 +1,23 @@
From ddf7fe9b14aa6ad4a511f9f9ae8071d52d5723e8 Mon Sep 17 00:00:00 2001
From dc30c4873ce988137729023b1eb33b068e7cc2e7 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 6fdde5c07..33f34ed0e 100644
index 59967e81e..49795c588 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -32,7 +32,7 @@ import org.bukkit.inventory.MainHand;
@@ -31,7 +31,7 @@ import org.bukkit.inventory.MainHand;
public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bV = LogManager.getLogger();
- public String locale = "en_us"; // PAIL: private -> public
- public String locale = "en_us"; // CraftBukkit - lowercase
+ public String locale = null; // PAIL: private -> public // Paper - default to null
public PlayerConnection playerConnection;
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
@@ -1224,12 +1224,24 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1223,12 +1223,24 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainHand() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
@ -60,5 +60,5 @@ index 71034f945..171e0f7bb 100644
@Override
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From 76311e2cf535fc498b5e98604d1ea28dc7e6356f Mon Sep 17 00:00:00 2001
From c3dd4a6a7983efc266830dec7e308ec425dee334 Mon Sep 17 00:00:00 2001
From: Martin Panzer <postremus1996@googlemail.com>
Date: Fri, 3 Jun 2016 23:13:39 +0200
Subject: [PATCH] Fix FallingBlocks being stuck on fences
@ -25,7 +25,7 @@ index d2a542354..c74071eb1 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockFalling.java b/src/main/java/net/minecraft/server/BlockFalling.java
index db5c0deae..9bcfc336f 100644
index 674395756..1086e3117 100644
--- a/src/main/java/net/minecraft/server/BlockFalling.java
+++ b/src/main/java/net/minecraft/server/BlockFalling.java
@@ -71,6 +71,12 @@ public class BlockFalling extends Block {
@ -34,7 +34,7 @@ index db5c0deae..9bcfc336f 100644
+ // Paper start - OBFHELPER
+ public static boolean canMoveThrough(IBlockData blockdata) {
+ return BlockFalling.i(blockdata);
+ return BlockFalling.x(blockdata);
+ }
+ // Paper end
+
@ -42,7 +42,7 @@ index db5c0deae..9bcfc336f 100644
public void a_(World world, BlockPosition blockposition) {}
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
index 18e7cf2ad..6a22dce51 100644
index 70a196461..3c7bdccc4 100644
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
@ -53,11 +53,13 @@ index 18e7cf2ad..6a22dce51 100644
import javax.annotation.Nullable;
import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
@@ -121,9 +122,9 @@ public class EntityFallingBlock extends Entity {
@@ -120,10 +121,10 @@ public class EntityFallingBlock extends Entity {
}
} else {
IBlockData iblockdata = this.world.getType(blockposition);
- if (!flag1 && BlockFalling.i(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) {
-
- if (!flag1 && BlockFalling.x(this.world.getType(new BlockPosition(this.locX, this.locY - 0.009999999776482582D, this.locZ)))) {
+
+ if (!isOnGround()) {
this.onGround = false;
- // return; // CraftBukkit

View file

@ -1,14 +1,14 @@
From c07deef294fa84147dfaf65f385f3ed3e78fc82c Mon Sep 17 00:00:00 2001
From 0a06a96e7ac7411e2c10b3f154219e9b3725fa43 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Jul 2016 17:58:53 -0500
Subject: [PATCH] More informative vehicle moved wrongly message
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 353e73b15..b8ec71a93 100644
index 76784a3af..a99edb869 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -343,7 +343,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -350,7 +350,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
flag1 = true;

View file

@ -1,14 +1,14 @@
From fe1f57baf7f591205d60163a69066067ce4487a6 Mon Sep 17 00:00:00 2001
From ed8147558b5a5dffb0dac7b6b73071ec1473d9ea Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 31 Jul 2016 16:33:03 -0500
Subject: [PATCH] Re-track players that dismount from other players
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 33f34ed0e..fff461e3c 100644
index 49795c588..628597330 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -716,6 +716,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -715,6 +715,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
if (entity1 != entity && this.playerConnection != null) {
this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
}
@ -23,5 +23,5 @@ index 33f34ed0e..fff461e3c 100644
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,14 +1,14 @@
From ab9671b2d2930a60b6bf51241fdc3c34f66f0af8 Mon Sep 17 00:00:00 2001
From 62cbfc0f2fb9d45c45ba9012c9748d513ed410c9 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 c2e93bb45..73baf015b 100644
index a99edb869..28a83ce3d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1830,7 +1830,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1837,7 +1837,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
case CLONE:
if (packetplayinwindowclick.c() == 2) {
click = ClickType.MIDDLE;
@ -18,5 +18,5 @@ index c2e93bb45..73baf015b 100644
} else {
Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b());
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From b78b3c09164a097af3331b5285165dd6423fb0d9 Mon Sep 17 00:00:00 2001
From c8d2d3aba2f86067815fe8ed2cbe1a691c326b1f 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
@ -23,10 +23,10 @@ index cf06f8ac3..2001175bf 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 73baf015b..de8c9a3a5 100644
index 28a83ce3d..c5e89997e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -895,13 +895,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -902,13 +902,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;
@ -44,5 +44,5 @@ index 73baf015b..de8c9a3a5 100644
limitedPackets = 0;
return true;
--
2.13.0.windows.1
2.13.0

View file

@ -1,11 +1,11 @@
From 6e44ed8bac401fbec4992cd29181c000a1473c51 Mon Sep 17 00:00:00 2001
From d5e43c8b2417c55528ab097c6171de59ee530bb6 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 20 Sep 2016 00:58:01 +0000
Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index d765607c0..5b4d715a4 100644
index 2001175bf..621c585e7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -244,4 +244,11 @@ public class PaperConfig {
@ -21,14 +21,14 @@ index d765607c0..5b4d715a4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 7b8e7f343..d2742df61 100644
index c5e89997e..94953307b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -143,7 +143,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
if (this.B) {
if (++this.C > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating too long!", this.player.getName());
- this.disconnect("Flying is not enabled on this server");
- this.disconnect(new ChatMessage("multiplayer.disconnect.flying", new Object[0]));
+ this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickPlayerMessage); // Paper - use configurable kick message
return;
}
@ -37,7 +37,7 @@ index 7b8e7f343..d2742df61 100644
if (this.D && this.player.getVehicle().bC() == this.player) {
if (++this.E > 80) {
PlayerConnection.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName());
- this.disconnect("Flying is not enabled on this server");
- this.disconnect(new ChatMessage("multiplayer.disconnect.flying", new Object[0]));
+ this.disconnect(com.destroystokyo.paper.PaperConfig.flyingKickVehicleMessage); // Paper - use configurable kick message
return;
}

View file

@ -1,4 +1,4 @@
From dae2dec377b431508465b4d4350453c14f8d3857 Mon Sep 17 00:00:00 2001
From 268a04666c34b1bb383f02eb2786e4d335a696f4 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,10 +96,10 @@ 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 fff461e3c..39311e1d1 100644
index 628597330..c4eabc0e4 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -33,6 +33,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -32,6 +32,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private static final Logger bV = LogManager.getLogger();
public String locale = null; // PAIL: private -> public // Paper - default to null
@ -108,7 +108,7 @@ index fff461e3c..39311e1d1 100644
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 374ab7294..6f6cc49c0 100644
index aab89ac47..0ee5a7b64 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 374ab7294..6f6cc49c0 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 a6576841b..f40bd1f46 100644
index 1fc107b53..fb59fecc4 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 {
@ -215,5 +215,5 @@ index 9f297f8de..a49e2302c 100644
timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag);
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From 940009e3c1babcdad40a0d1b62e2188e4022d432 Mon Sep 17 00:00:00 2001
From 4fb13f9812fdc172bd5561560c27d1bc17c52a97 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 28c249718..b12d464dc 100644
index 45484a813..36c22911a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1767,7 +1767,7 @@ public abstract class World implements IBlockAccess {
@@ -1771,7 +1771,7 @@ public abstract class World implements IBlockAccess {
}
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
i = MathHelper.floor(entity.locX / 16.0D);
- j = MathHelper.floor(entity.locY / 16.0D);
+ 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 != i || entity.ac != j || entity.ad != k) {
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From 52a6f852507486ee9db350b6669b4e62387c7064 Mon Sep 17 00:00:00 2001
From 7e6c5f900c8a633d7d737f9b545db845c2d2cf22 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 23:48:39 -0400
Subject: [PATCH] Auto fix bad Y levels on player login
@ -6,10 +6,10 @@ Subject: [PATCH] Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 39311e1d1..04c36d36e 100644
index c4eabc0e4..dac698614 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -132,6 +132,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -131,6 +131,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
@ -18,5 +18,5 @@ index 39311e1d1..04c36d36e 100644
if (this.C_().getForceGamemode()) {
this.playerInteractManager.setGameMode(this.C_().getGamemode());
--
2.13.0.windows.1
2.13.0

View file

@ -1,14 +1,14 @@
From 6dfeaccf94937055658d2d3e6114747d74de1c0c Mon Sep 17 00:00:00 2001
From 8c94a93f297d56ce5c8524b59511bde525d661cd Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Wed, 23 Nov 2016 08:31:45 -0500
Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index fe390feb9..350ec0323 100644
index 57f728567..2158fcd32 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -84,6 +84,12 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@@ -96,6 +96,12 @@ public class LoginListener implements PacketLoginInListener, ITickable {
}
@ -21,7 +21,7 @@ index fe390feb9..350ec0323 100644
// Spigot start
public void initUUID()
{
@@ -166,8 +172,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@@ -178,8 +184,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
this.networkManager.sendPacket(new PacketLoginOutEncryptionBegin("", this.server.O().getPublic(), this.e));
} else {
// Spigot start
@ -32,7 +32,7 @@ index fe390feb9..350ec0323 100644
@Override
public void run() {
try {
@@ -179,7 +185,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@@ -191,7 +197,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
}
}
@ -42,7 +42,7 @@ index fe390feb9..350ec0323 100644
// Spigot end
}
@@ -195,7 +202,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@@ -207,7 +214,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
this.loginKey = packetlogininencryptionbegin.a(privatekey);
this.g = LoginListener.EnumProtocolState.AUTHENTICATING;
this.networkManager.a(this.loginKey);
@ -52,7 +52,7 @@ index fe390feb9..350ec0323 100644
public void run() {
GameProfile gameprofile = LoginListener.this.i;
@@ -242,7 +250,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@@ -254,7 +262,8 @@ public class LoginListener implements PacketLoginInListener, ITickable {
return LoginListener.this.server.ac() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
}
@ -63,5 +63,5 @@ index fe390feb9..350ec0323 100644
}
--
2.12.2
2.13.0

View file

@ -1,11 +1,11 @@
From f4386bf9889ec25011969dbd83bf9b4fafba8d6d Mon Sep 17 00:00:00 2001
From bbd1294e53495ea5c25f53e8e5826da55d3b096a Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 20:35:05 +0000
Subject: [PATCH] Optimise NetworkManager
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 58011bb2f..fb118e90b 100644
index d583cced6..89743d2be 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -62,8 +62,8 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -76,7 +76,7 @@ index 58011bb2f..fb118e90b 100644
public void a() {
@@ -320,7 +289,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
} else if (this.i() != null) {
this.i().a(new ChatComponentText("Disconnected"));
this.i().a(new ChatMessage("multiplayer.disconnect.generic", new Object[0]));
}
- this.i.clear(); // Free up packet queue.
+ // this.i.clear(); // Free up packet queue. // Paper - remove unneeded packet queue

View file

@ -1,11 +1,11 @@
From ead97748d3e8508b9d6f43872697804248e10878 Mon Sep 17 00:00:00 2001
From e854876cbd6ff1a305643100e33a28703368d05c 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 04c36d36e..2ee3fb782 100644
index dac698614..5e17a13e6 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;
@ -18,8 +18,8 @@ index 04c36d36e..2ee3fb782 100644
+import java.util.Deque; // Paper
import java.util.Iterator;
import java.util.List;
import javax.annotation.Nonnull;
@@ -39,7 +41,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
import javax.annotation.Nullable;
@@ -38,7 +40,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public final PlayerInteractManager playerInteractManager;
public double d;
public double e;
@ -28,7 +28,7 @@ index 04c36d36e..2ee3fb782 100644
private final AdvancementDataPlayer bY;
private final ServerStatisticManager bZ;
private float ca = Float.MIN_VALUE;
@@ -287,10 +289,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -286,10 +288,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
Iterator iterator = this.removeQueue.iterator();
int j = 0;
@ -47,7 +47,7 @@ index 04c36d36e..2ee3fb782 100644
this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(aint));
}
@@ -1098,7 +1107,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1097,7 +1106,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.lastHealthSent = -1.0F;
this.ch = -1;
// this.cr.a((RecipeBook) entityplayer.cr); // CraftBukkit
@ -61,5 +61,5 @@ index 04c36d36e..2ee3fb782 100644
this.cv = entityplayer.cv;
this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft());
--
2.13.0.windows.1
2.13.0

View file

@ -1,11 +1,11 @@
From 01a1d911ecb592b44ce8101f58c243b4ebf71643 Mon Sep 17 00:00:00 2001
From 940c75c0c08c0e3c92926e372f40d310fb0a6e52 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 c5c701f08..902df7ac6 100644
index 9be8c6ff5..09b2042e1 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,10 +31,10 @@ 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 7c12338a5..8537f65fd 100644
index 391282afc..b4ef1d6af 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 {
@@ -1806,6 +1806,33 @@ public abstract class World implements IBlockAccess {
return this.a(axisalignedbb, (Entity) null);
}
@ -68,7 +68,7 @@ index 7c12338a5..8537f65fd 100644
public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) {
List list = this.getEntities((Entity) null, axisalignedbb);
@@ -2692,7 +2719,7 @@ public abstract class World implements IBlockAccess {
@@ -2696,7 +2723,7 @@ public abstract class World implements IBlockAccess {
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition);
// CraftBukkit start - store default return
@ -96,5 +96,5 @@ index 09f009522..2596c2fa0 100644
return event;
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From 1a257238cc3385b3f23de66f8bd516e30665c32e Mon Sep 17 00:00:00 2001
From 5eaab7e0b29e7ba7fd97cf88a328333d9047477a 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 2c29bc634..8c18f1413 100644
index 94953307b..98880f980 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 2c29bc634..8c18f1413 100644
import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end
@@ -2329,8 +2330,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2336,8 +2337,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit
}
} catch (Exception exception) {
@ -27,7 +27,7 @@ index 2c29bc634..8c18f1413 100644
}
} else {
String s1;
@@ -2379,8 +2379,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2386,8 +2386,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
CraftEventFactory.handleEditBookEvent(player, itemstack2); // CraftBukkit
}
} catch (Exception exception1) {
@ -37,7 +37,7 @@ index 2c29bc634..8c18f1413 100644
}
} else if ("MC|TrSel".equals(s)) {
try {
@@ -2391,8 +2390,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2398,8 +2397,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
((ContainerMerchant) container).d(j);
}
} catch (Exception exception2) {
@ -47,7 +47,7 @@ index 2c29bc634..8c18f1413 100644
}
} else {
TileEntity tileentity;
@@ -2533,8 +2531,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2540,8 +2538,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
iinventory.update();
}
} catch (Exception exception5) {
@ -57,7 +57,7 @@ index 2c29bc634..8c18f1413 100644
}
}
} else if ("MC|ItemName".equals(s)) {
@@ -2633,8 +2630,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2640,8 +2637,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 2c29bc634..8c18f1413 100644
}
// CraftBukkit start
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From d0fd46413d9192119722ce88d9dfcae48cd11fda Mon Sep 17 00:00:00 2001
From abd49c11cf42484fb6e16b88edabeb290fa5ac47 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,10 +6,10 @@ 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 2ee3fb782..93f0dfedf 100644
index 5e17a13e6..e05d65728 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1486,7 +1486,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@@ -1485,7 +1485,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
protected boolean isFrozen() {
@ -19,10 +19,10 @@ index 2ee3fb782..93f0dfedf 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 8c18f1413..41ad0cc2b 100644
index 98880f980..387cfa753 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2673,6 +2673,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2680,6 +2680,6 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start - Add "isDisconnected" method
public final boolean isDisconnected() {
@ -31,5 +31,5 @@ index 8c18f1413..41ad0cc2b 100644
}
}
--
2.13.0.windows.1
2.13.0

View file

@ -1,14 +1,14 @@
From c4c3457c08758c625450547b3101b2ddcc7425ac Mon Sep 17 00:00:00 2001
From 8497b1b84e4930f0b5a7280fee3d2af8e047a533 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 32baff5e2..9b78df95c 100644
index 387cfa753..624d4be8f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -854,6 +854,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -861,6 +861,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
if (d3 > 36.0D) {
@ -17,5 +17,5 @@ index 32baff5e2..9b78df95c 100644
} else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) {
return;
--
2.13.0.windows.1
2.13.0

View file

@ -1,4 +1,4 @@
From a7a6064230e51b4e3861257a0e3c6c5402f80c32 Mon Sep 17 00:00:00 2001
From bc82dac0ad93868c9966291d0574540ad5f0ae81 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 7d79e4625..a977a6775 100644
index 2bfbfcb9e..f5e55eaf0 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -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() || this.isPassenger())) {
if (!this.world.isClientSide && (this.fallDistance > 0.5F || this.isInWater() || this.isPassenger()) || this.abilities.isFlying) {
- 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 9b78df95c..3c59a2f40 100644
index 624d4be8f..7551ebf55 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1495,6 +1495,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1502,6 +1502,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
switch (packetplayinentityaction.b()) {
case START_SNEAKING:
this.player.setSneaking(true);
@ -57,5 +57,5 @@ index 9b78df95c..3c59a2f40 100644
case STOP_SNEAKING:
--
2.13.0.windows.1
2.13.0

@ -1 +1 @@
Subproject commit ceb1b906afeaa302a4038f73c2d2029914c6a6b2
Subproject commit c93ef25131651aa8eb956e2397f7784e91ee7d93

@ -1 +1 @@
Subproject commit c62b9cd3e2ca0b73957eac0696447c79b6fe389f
Subproject commit 80c927a7496c4a4c0085ca84668ea458a03e055e

@ -1 +1 @@
Subproject commit c155d8dd32556a197ab73c437760e6194ae4e04a
Subproject commit e13d1196863d5dcfea3d17b79238427dfb2c61b2

@ -1 +1 @@
Subproject commit ea4525e6830e7545c5315fc557a6fc6dcdf3f4ae
Subproject commit ac83d698d48a362995bcebe48ab89ab71bcf4d18