Update upstream CB/S

--- work/CraftBukkit
Submodule work/CraftBukkit ba575a5a..b7fea427:
  > SPIGOT-5010: World.getEntities returns entities in border chunks
  > Show incorrect size passed into createInventory

--- work/Spigot
Submodule work/Spigot 093165d1..01d0f046:
  > SPIGOT-4986: EntityActivationRange - Raiders
  > SPIGOT-4988: Setting "mob-spawn-range" in spigot.yml also effects random block ticks
This commit is contained in:
Zach Brown 2019-05-30 18:54:25 -05:00
parent 550e5f8eaf
commit 9f01a14531
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
7 changed files with 62 additions and 63 deletions

View File

@ -1,4 +1,4 @@
From 240f6462bb931964a95582e3e71a7b008507afef Mon Sep 17 00:00:00 2001 From 6c5300f5e220776d2f6e96245979d2f44ea13c04 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600 Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2 Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644 new file mode 100644
index 0000000000..3f9fb6f906 index 000000000..3f9fb6f90
--- /dev/null --- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,133 @@ @@ -0,0 +1,133 @@
@ -145,7 +145,7 @@ index 0000000000..3f9fb6f906
+} +}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644 new file mode 100644
index 0000000000..d5d3b2a20c index 000000000..d5d3b2a20
--- /dev/null --- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,105 @@ @@ -0,0 +1,105 @@
@ -255,7 +255,7 @@ index 0000000000..d5d3b2a20c
+ } + }
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 5518ec1e54..0c65afccfd 100644 index 5518ec1e5..0c65afccf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; @@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -302,7 +302,7 @@ index 5518ec1e54..0c65afccfd 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index b2e5bcf57c..78b0e78474 100644 index b2e5bcf57..78b0e7847 100644
--- a/src/main/java/net/minecraft/server/Block.java --- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java
@@ -31,6 +31,15 @@ public class Block implements IMaterial { @@ -31,6 +31,15 @@ public class Block implements IMaterial {
@ -322,7 +322,7 @@ index b2e5bcf57c..78b0e78474 100644
private final float frictionFactor; private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList; protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8075cc4827..3de0f69758 100644 index 8075cc482..3de0f6975 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -573,6 +573,7 @@ public class Chunk implements IChunkAccess { @@ -573,6 +573,7 @@ public class Chunk implements IChunkAccess {
@ -342,7 +342,7 @@ index 8075cc4827..3de0f69758 100644
} }
} }
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index e278dc6366..8d183de2fc 100644 index ea142d76a..cc7556d93 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -245,7 +245,9 @@ public class ChunkProviderServer extends IChunkProvider { @@ -245,7 +245,9 @@ public class ChunkProviderServer extends IChunkProvider {
@ -378,7 +378,7 @@ index e278dc6366..8d183de2fc 100644
@Override @Override
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 2e09900f45..1ebb16f0f6 100644 index 2e09900f4..1ebb16f0f 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -416,7 +416,7 @@ index 2e09900f45..1ebb16f0f6 100644
} }
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index 46e7737ca3..a3ef943066 100644 index 46e7737ca..a3ef94306 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java --- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java +++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -13,12 +13,22 @@ public class CustomFunction { @@ -13,12 +13,22 @@ public class CustomFunction {
@ -443,7 +443,7 @@ index 46e7737ca3..a3ef943066 100644
return this.b; return this.b;
} }
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index 9c9eef0ad9..b42fbf2c65 100644 index 9c9eef0ad..b42fbf2c6 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java --- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener { @@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener {
@ -456,7 +456,7 @@ index 9c9eef0ad9..b42fbf2c65 100644
int j = 0; int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b(); CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b60956218d..19e2df3098 100644 index b60956218..19e2df309 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java --- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -31,7 +31,7 @@ import org.apache.logging.log4j.Level; @@ -31,7 +31,7 @@ import org.apache.logging.log4j.Level;
@ -509,7 +509,7 @@ index b60956218d..19e2df3098 100644
return waitable.get(); return waitable.get();
} catch (java.util.concurrent.ExecutionException e) { } 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 947469217e..dedcce4c2c 100644 index 4afee193c..3819f8d2e 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -529,7 +529,7 @@ index 947469217e..dedcce4c2c 100644
- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot - public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
+ public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper + public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -487,7 +488,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -487,7 +488,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
@ -548,7 +548,7 @@ index 947469217e..dedcce4c2c 100644
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index cca9da1746..4830c0bd73 100644 index cca9da174..4830c0bd7 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -624,7 +624,7 @@ index cca9da1746..4830c0bd73 100644
} }
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 64318e6e78..c76620f2b3 100644 index 64318e6e7..c76620f2b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -752,7 +752,7 @@ index 64318e6e78..c76620f2b3 100644
this.methodProfiler.exit(); this.methodProfiler.exit();
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index c186d27786..44e3340773 100644 index ceb2eba78..d6020c677 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@ -799,7 +799,7 @@ index c186d27786..44e3340773 100644
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index ae194b981f..d20037bd00 100644 index ae194b981..d20037bd0 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -854,7 +854,7 @@ index ae194b981f..d20037bd00 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index cb6d50ea70..9ba03f8ed0 100644 index cb6d50ea7..9ba03f8ed 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
@ -880,7 +880,7 @@ index cb6d50ea70..9ba03f8ed0 100644
throw CancelledPacketHandleException.INSTANCE; throw CancelledPacketHandleException.INSTANCE;
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 59752dcd47..1ee1df0757 100644 index 59752dcd4..1ee1df075 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -904,7 +904,7 @@ index 59752dcd47..1ee1df0757 100644
public WhiteList getWhitelist() { public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index 061730c560..c5890f5dcc 100644 index 061730c56..c5890f5dc 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java --- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -28,13 +28,18 @@ public class TickListServer<T> implements TickList<T> { @@ -28,13 +28,18 @@ public class TickListServer<T> implements TickList<T> {
@ -954,7 +954,7 @@ index 061730c560..c5890f5dcc 100644
this.g.clear(); this.g.clear();
} }
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 382498d193..a833781e59 100644 index 382498d19..a833781e5 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java --- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; @@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
@ -973,7 +973,7 @@ index 382498d193..a833781e59 100644
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); public final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 69c704a429..d7b3b4b8c8 100644 index 69c704a42..d7b3b4b8c 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1040,7 +1040,7 @@ index 69c704a429..d7b3b4b8c8 100644
} }
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 508cdc6a0c..089468835b 100644 index 508cdc6a0..089468835 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1132,7 +1132,7 @@ index 508cdc6a0c..089468835b 100644
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 30a0c396ca..59db8018da 100644 index 4413066ee..834c16172 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1926,12 +1926,31 @@ public final class CraftServer implements Server { @@ -1926,12 +1926,31 @@ public final class CraftServer implements Server {
@ -1169,7 +1169,7 @@ index 30a0c396ca..59db8018da 100644
org.spigotmc.RestartCommand.restart(); org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644 deleted file mode 100644
index 38f211526b..0000000000 index 38f211526..000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null +++ /dev/null
@@ -1,166 +0,0 @@ @@ -1,166 +0,0 @@
@ -1340,7 +1340,7 @@ index 38f211526b..0000000000
- } - }
-} -}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5b58b1a96f..8980de8203 100644 index 5b58b1a96..8980de820 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1728,6 +1728,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1728,6 +1728,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1359,7 +1359,7 @@ index 5b58b1a96f..8980de8203 100644
public Player.Spigot spigot() public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index b90979c7ba..8823f94f7b 100644 index b90979c7b..8823f94f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -1425,7 +1425,7 @@ index b90979c7ba..8823f94f7b 100644
private boolean isReady(final int currentTick) { private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 3f55381c15..0d9a466809 100644 index 3f55381c1..0d9a46680 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
@ -1510,7 +1510,7 @@ index 3f55381c15..0d9a466809 100644
- // Spigot end - // Spigot end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b78..3d90b34268 100644 index e52ef47b7..3d90b3426 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon; @@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1522,7 +1522,7 @@ index e52ef47b78..3d90b34268 100644
this.value = value; this.value = value;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 7fa66d338f..667cbb500b 100644 index 328679fba..60a5e7148 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -271,6 +271,13 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -271,6 +271,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
@ -1540,10 +1540,10 @@ index 7fa66d338f..667cbb500b 100644
* This helper class represents the different NBT Tags. * This helper class represents the different NBT Tags.
* <p> * <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 76b060a126..2daecf5049 100644 index 4c947a935..106e9d7e2 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither; @@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither;
import net.minecraft.server.MathHelper; import net.minecraft.server.MathHelper;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.server.World; import net.minecraft.server.World;
@ -1552,27 +1552,27 @@ index 76b060a126..2daecf5049 100644
public class ActivationRange public class ActivationRange
{ {
@@ -64,8 +64,8 @@ public class ActivationRange @@ -75,8 +75,8 @@ public class ActivationRange
/** /**
* These entities are excluded from Activation range checks. * These entities are excluded from Activation range checks.
* *
- * @param entity - * @param entity
- * @param world - * @param config
+ * @param entity Entity to initialize + * @param entity Entity to initialize
+ * @param config Spigot config to determine ranges + * @param config Spigot config to determine ranges
* @return boolean If it should always tick. * @return boolean If it should always tick.
*/ */
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config) public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
@@ -99,7 +99,7 @@ public class ActivationRange @@ -111,7 +111,7 @@ public class ActivationRange
*/ */
public static void activateEntities(World world) public static void activateEntities(World world)
{ {
- SpigotTimings.entityActivationCheckTimer.startTiming(); - SpigotTimings.entityActivationCheckTimer.startTiming();
+ MinecraftTimings.entityActivationCheckTimer.startTiming(); + MinecraftTimings.entityActivationCheckTimer.startTiming();
final int miscActivationRange = world.spigotConfig.miscActivationRange; final int miscActivationRange = world.spigotConfig.miscActivationRange;
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
final int animalActivationRange = world.spigotConfig.animalActivationRange; final int animalActivationRange = world.spigotConfig.animalActivationRange;
final int monsterActivationRange = world.spigotConfig.monsterActivationRange; @@ -148,7 +148,7 @@ public class ActivationRange
@@ -133,7 +133,7 @@ public class ActivationRange
} }
} }
} }
@ -1581,7 +1581,7 @@ index 76b060a126..2daecf5049 100644
} }
/** /**
@@ -247,10 +247,8 @@ public class ActivationRange @@ -245,10 +245,8 @@ public class ActivationRange
*/ */
public static boolean checkIfActive(Entity entity) public static boolean checkIfActive(Entity entity)
{ {
@ -1592,7 +1592,7 @@ index 76b060a126..2daecf5049 100644
return true; return true;
} }
@@ -274,7 +272,6 @@ public class ActivationRange @@ -272,7 +270,6 @@ public class ActivationRange
{ {
isActive = false; isActive = false;
} }

View File

@ -1,11 +1,11 @@
From c248766e22ec223907e3f01f655ed9914681bdf3 Mon Sep 17 00:00:00 2001 From 40c3d38fd6f36e6bbee006591547e3dbf8864ee9 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600 Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 899e6af69..de57289fe 100644 index 0a17a16c5..34285a99b 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -14,7 +14,7 @@ index 899e6af69..de57289fe 100644
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
+ public Location origin; // Paper + public Location origin; // Paper
// Spigot start // Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
@@ -1546,6 +1547,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1546,6 +1547,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.bukkitEntity.storeBukkitValues(nbttagcompound); this.bukkitEntity.storeBukkitValues(nbttagcompound);
@ -101,7 +101,7 @@ index ce510c486..b7c94fe23 100644
if (i >= 0 && i < this.list.size()) { if (i >= 0 && i < this.list.size()) {
NBTBase nbtbase = (NBTBase) this.list.get(i); NBTBase nbtbase = (NBTBase) this.list.get(i);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 5a0d940be..4710b79af 100644 index 089468835..fc582fead 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1095,6 +1095,11 @@ public class WorldServer extends World { @@ -1095,6 +1095,11 @@ public class WorldServer extends World {

View File

@ -1,11 +1,11 @@
From bd7cb7fab75815ba9677495b140c3d279c54245b Mon Sep 17 00:00:00 2001 From 3682a27d416cb1560d436216474921fa3af40743 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 2 Mar 2016 00:32:25 -0600 Date: Wed, 2 Mar 2016 00:32:25 -0600
Subject: [PATCH] Always tick falling blocks Subject: [PATCH] Always tick falling blocks
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 2daecf504..77f1563af 100644 index 106e9d7e2..7341dc2c1 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature; @@ -13,6 +13,7 @@ import net.minecraft.server.EntityCreature;
@ -16,7 +16,7 @@ index 2daecf504..77f1563af 100644
import net.minecraft.server.EntityFireball; import net.minecraft.server.EntityFireball;
import net.minecraft.server.EntityFireworks; import net.minecraft.server.EntityFireworks;
import net.minecraft.server.EntityHuman; import net.minecraft.server.EntityHuman;
@@ -81,6 +82,7 @@ public class ActivationRange @@ -93,6 +94,7 @@ public class ActivationRange
|| entity instanceof EntityFireball || entity instanceof EntityFireball
|| entity instanceof EntityLightning || entity instanceof EntityLightning
|| entity instanceof EntityTNTPrimed || entity instanceof EntityTNTPrimed

View File

@ -1,4 +1,4 @@
From 34fa65b40e1f673ac19f014c92f5dd72a133d32f Mon Sep 17 00:00:00 2001 From e27ae28fa9c01ce1867832c3452849b3b05a7290 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 17:36:02 -0500 Date: Sun, 14 Jan 2018 17:36:02 -0500
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
@ -9,24 +9,23 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 6a49251cc7..de50740e62 100644 index c2f442051..5d6d6a5a5 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -761,12 +761,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -762,11 +762,17 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
int chunkRange = world.spigotConfig.mobSpawnRange;
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange;
-
- double blockRange = Math.pow(chunkRange << 4, 2); - double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D;
+ final int finalChunkRange = chunkRange; // Paper for lambda below + final int finalChunkRange = chunkRange; // Paper for lambda below
+ //double blockRange = Math.pow(chunkRange << 4, 2); // Paper - use the range from the event + //double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event
// Spigot end // Spigot end
return this.playerMap.a(chunkcoordintpair.pair()).noneMatch((entityplayer) -> { return this.playerMap.a(chunkcoordintpair.pair()).noneMatch((entityplayer) -> {
- return !entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange; // Spigot - return !entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange; // Spigot
+ // Paper start - + // Paper start -
+ com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event + com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event
+ = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityplayer.getBukkitEntity(), (byte)finalChunkRange); + = new com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent(entityplayer.getBukkitEntity(), (byte) finalChunkRange);
+ final double blockRange = (double)((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4)); + final double blockRange = (double)((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4));
+ return event.isCancelled() || (!entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange); // Spigot + return event.isCancelled() || (!entityplayer.isSpectator() && a(chunkcoordintpair, (Entity) entityplayer) < blockRange); // Spigot
+ // Paper end + // Paper end

View File

@ -1,4 +1,4 @@
From 63a345e583d816502a0feef9d2d8ca8f0a34e5ba Mon Sep 17 00:00:00 2001 From 47ed7330a0622394ccfddab469d7e2036c27e100 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 08:25:40 -0400 Date: Sat, 21 Jul 2018 08:25:40 -0400
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 868e5dd56d..15315a43e7 100644 index 6b33c1c41..c97421721 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -75,6 +75,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -75,6 +75,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -19,10 +19,10 @@ index 868e5dd56d..15315a43e7 100644
if (bukkitEntity == null) { if (bukkitEntity == null) {
bukkitEntity = CraftEntity.getEntity(world.getServer(), this); bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index de50740e62..9a65c98b9f 100644 index 5d6d6a5a5..45ba357f8 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -923,6 +923,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -924,6 +924,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
} else { } else {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking()); PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking());
@ -30,7 +30,7 @@ index de50740e62..9a65c98b9f 100644
this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker);
playerchunkmap_entitytracker.track(this.world.getPlayers()); playerchunkmap_entitytracker.track(this.world.getPlayers());
if (entity instanceof EntityPlayer) { if (entity instanceof EntityPlayer) {
@@ -965,7 +966,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -966,7 +967,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (playerchunkmap_entitytracker1 != null) { if (playerchunkmap_entitytracker1 != null) {
playerchunkmap_entitytracker1.a(); playerchunkmap_entitytracker1.a();
} }
@ -40,7 +40,7 @@ index de50740e62..9a65c98b9f 100644
protected void g() { protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d7229f100b..5cf3aea4fc 100644 index d7229f100..5cf3aea4f 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -68,6 +68,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -68,6 +68,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
@ -52,7 +52,7 @@ index d7229f100b..5cf3aea4fc 100644
public boolean captureBlockStates = false; public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false; public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8cffbabfb6..f6ba51d14a 100644 index 8cffbabfb..f6ba51d14 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java --- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -69,6 +69,9 @@ public class WorldServer extends World { @@ -69,6 +69,9 @@ public class WorldServer extends World {

@ -1 +1 @@
Subproject commit ba575a5a41a12dbe0d0626f7ad7e25384d0d9885 Subproject commit b7fea42777bc65e64b5c22ffcb9018dcd707e928

@ -1 +1 @@
Subproject commit 093165d1b54392a8d8d33e77e74a7f67adc56e9a Subproject commit 01d0f0464a469946c49219f99ab9e617c77f72c4