Remove leftover line from spigots tick limiters

Looking over the code, this appears to be one "high risk but hopefully
unlikely that plugins are causing this to break", this line is however
redundant leftovers from spigots tick limiter patch, which should be
doing nothing as-is.
This commit is contained in:
Shane Freeder 2019-05-15 22:53:13 +01:00
parent 1183f1aa1e
commit 17fe7a1b43
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
21 changed files with 117 additions and 116 deletions

View file

@ -1,14 +1,14 @@
From 66294924c12de6f6629939c1f80582f443480e83 Mon Sep 17 00:00:00 2001 From bd7b275c123243666ca49a450f3b5e2146f2fedd 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 23:45:17 -0600 Date: Wed, 2 Mar 2016 23:45:17 -0600
Subject: [PATCH] Disable spigot tick limiters Subject: [PATCH] Disable spigot tick limiters
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 5788ec6f6..5ff06d247 100644 index 20990cbfd..3012580e8 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
@@ -1124,10 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1124,11 +1124,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// CraftBukkit start - Use field for loop variable // CraftBukkit start - Use field for loop variable
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
int entitiesThisCycle = 0; int entitiesThisCycle = 0;
@ -16,14 +16,15 @@ index 5788ec6f6..5ff06d247 100644
- for (entityLimiter.initTick(); - for (entityLimiter.initTick();
- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue()); - entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue());
- tickPosition++, entitiesThisCycle++) { - tickPosition++, entitiesThisCycle++) {
- tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
+ // Paper start - Disable tick limiters + // Paper start - Disable tick limiters
+ //if (tickPosition < 0) tickPosition = 0; + //if (tickPosition < 0) tickPosition = 0;
+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) { + for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) {
+ // Paper end + // Paper end
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition); entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end // CraftBukkit end
@@ -1191,9 +1191,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc Entity entity1 = entity.getVehicle();
@@ -1191,9 +1190,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
// Spigot start // Spigot start
// Iterator iterator = this.tileEntityListTick.iterator(); // Iterator iterator = this.tileEntityListTick.iterator();
int tilesThisCycle = 0; int tilesThisCycle = 0;
@ -35,5 +36,5 @@ index 5788ec6f6..5ff06d247 100644
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition); TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start // Spigot start
-- --
2.20.1 2.21.0

View file

@ -1,4 +1,4 @@
From 0f1c8615e262b38dcdde638ce67cf87eaa8175bb Mon Sep 17 00:00:00 2001 From d617197c2a04fee2ea3d2884bf00f3a2e5cb609c Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600 Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event Subject: [PATCH] Add exception reporting event
@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644 new file mode 100644
index 0000000000..f699ce18ca index 000000000..f699ce18c
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java +++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
@ -49,7 +49,7 @@ index 0000000000..f699ce18ca
+ } + }
+} +}
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 cb56d067b9..67cd4af4f5 100644 index cb56d067b..67cd4af4f 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
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -88,7 +88,7 @@ index cb56d067b9..67cd4af4f5 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 c2ecc034e8..1ed7c7e2c9 100644 index c2ecc034e..1ed7c7e2c 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
@@ -13,6 +13,7 @@ import java.util.concurrent.CompletableFuture; @@ -13,6 +13,7 @@ import java.util.concurrent.CompletableFuture;
@ -119,7 +119,7 @@ index c2ecc034e8..1ed7c7e2c9 100644
} }
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 09ef8729d9..bf67dbf54a 100644 index 09ef8729d..bf67dbf54 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -146,7 +146,7 @@ index 09ef8729d9..bf67dbf54a 100644
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index ab151a14d0..0f1c74dd33 100644 index ab151a14d..0f1c74dd3 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java --- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -173,7 +173,7 @@ index ab151a14d0..0f1c74dd33 100644
} }
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index c5ca896919..e507a996f1 100644 index c5ca89691..e507a996f 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java --- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@ -192,7 +192,7 @@ index c5ca896919..e507a996f1 100644
} }
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 6720a9648e..2aa0db5c22 100644 index 6720a9648..2aa0db5c2 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java --- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager; @@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager;
@ -220,7 +220,7 @@ index 6720a9648e..2aa0db5c22 100644
} }
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index 58122b18eb..0ac1fb53a4 100644 index 58122b18e..0ac1fb53a 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java --- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -240,7 +240,7 @@ index 58122b18eb..0ac1fb53a4 100644
} }
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 09cf98ccdd..6e7c0c9da4 100644 index e6539846b..3714017cc 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,6 +1,8 @@ @@ -1,6 +1,8 @@
@ -252,7 +252,7 @@ index 09cf98ccdd..6e7c0c9da4 100644
import com.google.common.base.MoreObjects; import com.google.common.base.MoreObjects;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import it.unimi.dsi.fastutil.longs.LongSet; import it.unimi.dsi.fastutil.longs.LongSet;
@@ -1151,8 +1153,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1150,8 +1152,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} catch (Throwable throwable1) { } catch (Throwable throwable1) {
entity.tickTimer.stopTiming(); entity.tickTimer.stopTiming();
// Paper start - Prevent tile entity and entity crashes // Paper start - Prevent tile entity and entity crashes
@ -264,7 +264,7 @@ index 09cf98ccdd..6e7c0c9da4 100644
entity.dead = true; entity.dead = true;
continue; continue;
// Paper end // Paper end
@@ -1217,8 +1221,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1216,8 +1220,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.methodProfiler.exit(); this.methodProfiler.exit();
} catch (Throwable throwable2) { } catch (Throwable throwable2) {
// Paper start - Prevent tile entity and entity crashes // Paper start - Prevent tile entity and entity crashes
@ -277,7 +277,7 @@ index 09cf98ccdd..6e7c0c9da4 100644
this.tileEntityListTick.remove(tileTickPosition--); this.tileEntityListTick.remove(tileTickPosition--);
continue; continue;
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 478bf49976..8d51af2867 100644 index 478bf4997..8d51af286 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java --- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -138,6 +138,7 @@ public class WorldPersistentData { @@ -138,6 +138,7 @@ public class WorldPersistentData {
@ -289,7 +289,7 @@ index 478bf49976..8d51af2867 100644
throw throwable1; throw throwable1;
} finally { } finally {
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 d75cc42e11..0e9d5fe3a7 100644 index d75cc42e1..0e9d5fe3a 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
@@ -17,6 +17,9 @@ import java.util.function.Consumer; @@ -17,6 +17,9 @@ import java.util.function.Consumer;

View file

@ -1,4 +1,4 @@
From e97a654e918381c5b2eb07cf6d632fb55c457fa6 Mon Sep 17 00:00:00 2001 From c494d0736329d1bb4be277151e34a0bfe64b3341 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600 Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
Optimize getType and getBlockData to manually inline and optimize the calls Optimize getType and getBlockData to manually inline and optimize the calls
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 5843ef65af..4c7793f86d 100644 index 5843ef65a..4c7793f86 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java --- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java +++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> { @@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -31,7 +31,7 @@ index 5843ef65af..4c7793f86d 100644
public BaseBlockPosition(int i, int j, int k) { public BaseBlockPosition(int i, int j, int k) {
this.a = i; this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 9bb7c9c652..bc364ce371 100644 index 9bb7c9c65..bc364ce37 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java --- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java +++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -300,6 +300,16 @@ public class BlockPosition extends BaseBlockPosition { @@ -300,6 +300,16 @@ public class BlockPosition extends BaseBlockPosition {
@ -52,7 +52,7 @@ index 9bb7c9c652..bc364ce371 100644
public MutableBlockPosition() { public MutableBlockPosition() {
this(0, 0, 0); this(0, 0, 0);
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 3f9de7e55a..b76c1579ea 100644 index 3f9de7e55..b76c1579e 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
@@ -425,12 +425,24 @@ public class Chunk implements IChunkAccess { @@ -425,12 +425,24 @@ public class Chunk implements IChunkAccess {
@ -84,7 +84,7 @@ index 3f9de7e55a..b76c1579ea 100644
IBlockData iblockdata = null; IBlockData iblockdata = null;
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 3c5f10ad4d..621ed1fc53 100644 index 3c5f10ad4..621ed1fc5 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java --- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java +++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -7,7 +7,7 @@ public class ChunkSection { @@ -7,7 +7,7 @@ public class ChunkSection {
@ -97,7 +97,7 @@ index 3c5f10ad4d..621ed1fc53 100644
private NibbleArray skyLight; private NibbleArray skyLight;
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 fd45090685..f4e91db7c6 100644 index 160341d6d..69d2f067b 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
@@ -257,11 +257,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -257,11 +257,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -173,7 +173,7 @@ index fd45090685..f4e91db7c6 100644
return FluidTypes.EMPTY.i(); return FluidTypes.EMPTY.i();
} else { } else {
Chunk chunk = this.getChunkAtWorldCoords(blockposition); Chunk chunk = this.getChunkAtWorldCoords(blockposition);
@@ -1767,7 +1767,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1766,7 +1766,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap(); public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
@Nullable @Nullable
public TileEntity getTileEntity(BlockPosition blockposition) { public TileEntity getTileEntity(BlockPosition blockposition) {
@ -182,7 +182,7 @@ index fd45090685..f4e91db7c6 100644
return null; return null;
} else { } else {
// CraftBukkit start // CraftBukkit start
@@ -1808,7 +1808,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1807,7 +1807,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) { public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
@ -191,7 +191,7 @@ index fd45090685..f4e91db7c6 100644
if (tileentity != null && !tileentity.x()) { if (tileentity != null && !tileentity.x()) {
// CraftBukkit start // CraftBukkit start
if (captureBlockStates) { if (captureBlockStates) {
@@ -1869,7 +1869,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1868,7 +1868,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
public boolean p(BlockPosition blockposition) { public boolean p(BlockPosition blockposition) {

View file

@ -1,4 +1,4 @@
From f4e4fe03783d2f79376e0dfb9254d398d1635a2f Mon Sep 17 00:00:00 2001 From 00c1a50483d196c47548593f019bdd92e1068652 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400 Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -63,10 +63,10 @@ index ee45d3705..01c5d3c57 100644
} }
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 34b5ca3a7..8a445a1fa 100644 index 98f98c35e..dbb00434f 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
@@ -2853,8 +2853,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2852,8 +2852,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
int k = i * 16 + 8 - blockposition.getX(); int k = i * 16 + 8 - blockposition.getX();
int l = j * 16 + 8 - blockposition.getZ(); int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true; boolean flag = true;

View file

@ -1,14 +1,14 @@
From e967f3bcc7b0a00d5282d2a2d5976e1e48107238 Mon Sep 17 00:00:00 2001 From ae41855e7de88db8a2656b3ebe137344425a0bce Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400 Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b595536648..5fc2da0d92 100644 index cf3e9a6c6..be99425bf 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
@@ -2849,6 +2849,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2848,6 +2848,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return this.K; return this.K;
} }
@ -17,7 +17,7 @@ index b595536648..5fc2da0d92 100644
BlockPosition blockposition = this.getSpawn(); BlockPosition blockposition = this.getSpawn();
int k = i * 16 + 8 - blockposition.getX(); int k = i * 16 + 8 - blockposition.getX();
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index 5e87e537e4..3911e4947e 100644 index 5e87e537e..3911e4947 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java --- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java +++ b/src/main/java/net/minecraft/server/WorldProvider.java
@@ -69,7 +69,7 @@ public abstract class WorldProvider { @@ -69,7 +69,7 @@ public abstract class WorldProvider {

View file

@ -1,4 +1,4 @@
From 509bc747e1d9431854cb6956c0fc1d1c95e072ed Mon Sep 17 00:00:00 2001 From 207e691dacdbfaf3763928e98ec9e2824a066ea1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400 Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List 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. 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 diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 5fc2da0d92..04ec2a0399 100644 index be99425bf..79e8470b6 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
@@ -71,7 +71,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -71,7 +71,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -18,7 +18,7 @@ index 5fc2da0d92..04ec2a0399 100644
public final List<TileEntity> tileEntityListTick = Lists.newArrayList(); public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
private final List<TileEntity> c = Lists.newArrayList(); private final List<TileEntity> c = Lists.newArrayList();
private final Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper private final Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
@@ -1269,7 +1269,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1268,7 +1268,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
timings.tileEntityTick.startTiming(); // Spigot timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) { if (!this.tileEntityListUnload.isEmpty()) {
this.tileEntityListTick.removeAll(this.tileEntityListUnload); this.tileEntityListTick.removeAll(this.tileEntityListUnload);
@ -27,7 +27,7 @@ index 5fc2da0d92..04ec2a0399 100644
this.tileEntityListUnload.clear(); this.tileEntityListUnload.clear();
} }
@@ -1322,7 +1322,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1321,7 +1321,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
if (tileentity.x()) { if (tileentity.x()) {
tilesThisCycle--; tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--); this.tileEntityListTick.remove(tileTickPosition--);
@ -36,7 +36,7 @@ index 5fc2da0d92..04ec2a0399 100644
if (this.isLoaded(tileentity.getPosition())) { if (this.isLoaded(tileentity.getPosition())) {
this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition()); this.getChunkAtWorldCoords(tileentity.getPosition()).d(tileentity.getPosition());
} }
@@ -1352,7 +1352,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1351,7 +1351,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3); this.notify(tileentity1.getPosition(), iblockdata, iblockdata, 3);
// CraftBukkit start // CraftBukkit start
// From above, don't screw this up - SPIGOT-1746 // From above, don't screw this up - SPIGOT-1746
@ -45,7 +45,7 @@ index 5fc2da0d92..04ec2a0399 100644
this.a(tileentity1); this.a(tileentity1);
} }
// CraftBukkit end // CraftBukkit end
@@ -1372,9 +1372,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1371,9 +1371,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
protected void p_() {} protected void p_() {}
public boolean a(TileEntity tileentity) { public boolean a(TileEntity tileentity) {
@ -57,7 +57,7 @@ index 5fc2da0d92..04ec2a0399 100644
this.tileEntityListTick.add(tileentity); this.tileEntityListTick.add(tileentity);
} }
@@ -1855,7 +1855,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1854,7 +1854,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} else { } else {
if (tileentity != null) { if (tileentity != null) {
this.c.remove(tileentity); this.c.remove(tileentity);

View file

@ -1,4 +1,4 @@
From 2fbf2c556d7840198741959940696a14c7e3c26a Mon Sep 17 00:00:00 2001 From 743d95053dad6291fa08b2cd3a8e35d32bf0eb14 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 18 Jun 2016 23:22:12 -0400 Date: Sat, 18 Jun 2016 23:22:12 -0400
Subject: [PATCH] Delay Chunk Unloads based on Player Movement Subject: [PATCH] Delay Chunk Unloads based on Player Movement
@ -20,7 +20,7 @@ This also makes the Chunk GC System useless, by auto scheduling unload as soon a
a spare chunk is added to the server thats outside of view distance. a spare chunk is added to the server thats outside of view distance.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index bcc2ecaa3a..c70771614d 100644 index bcc2ecaa3..c70771614 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -310,4 +310,18 @@ public class PaperWorldConfig { @@ -310,4 +310,18 @@ public class PaperWorldConfig {
@ -43,7 +43,7 @@ index bcc2ecaa3a..c70771614d 100644
+ } + }
} }
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 c74176daa5..bdf922db50 100644 index c74176daa..bdf922db5 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
@@ -40,6 +40,7 @@ public class Chunk implements IChunkAccess { @@ -40,6 +40,7 @@ public class Chunk implements IChunkAccess {
@ -55,7 +55,7 @@ index c74176daa5..bdf922db50 100644
public final int locZ; public final int locZ;
private boolean l; private boolean l;
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 8b3738c8f7..2021c0d02e 100644 index 8b3738c8f..2021c0d02 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java --- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java +++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -48,6 +48,15 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> { @@ -48,6 +48,15 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -75,7 +75,7 @@ index 8b3738c8f7..2021c0d02e 100644
// CraftBukkit end // CraftBukkit end
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 c54df45837..d0bf0f72da 100644 index c54df4583..d0bf0f72d 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
@@ -307,6 +307,19 @@ public class ChunkProviderServer implements IChunkProvider { @@ -307,6 +307,19 @@ public class ChunkProviderServer implements IChunkProvider {
@ -99,7 +99,7 @@ index c54df45837..d0bf0f72da 100644
this.chunkScheduler.a(booleansupplier); this.chunkScheduler.a(booleansupplier);
} }
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index e47aae2f8b..b9d90c4fb8 100644 index e47aae2f8..b9d90c4fb 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java --- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -29,8 +29,23 @@ public class PlayerChunk { @@ -29,8 +29,23 @@ public class PlayerChunk {
@ -153,7 +153,7 @@ index e47aae2f8b..b9d90c4fb8 100644
} }
} }
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 2064576501..ab4f3b7223 100644 index 206457650..ab4f3b722 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
@@ -452,7 +452,13 @@ public class PlayerChunkMap { @@ -452,7 +452,13 @@ public class PlayerChunkMap {
@ -172,10 +172,10 @@ index 2064576501..ab4f3b7223 100644
} }
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 32ee298648..dcff6c8d8a 100644 index 636d8b820..2aa252fef 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
@@ -1293,7 +1293,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1292,7 +1292,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
if (!tileentity.x() && tileentity.hasWorld()) { if (!tileentity.x() && tileentity.hasWorld()) {
BlockPosition blockposition = tileentity.getPosition(); BlockPosition blockposition = tileentity.getPosition();
@ -191,7 +191,7 @@ index 32ee298648..dcff6c8d8a 100644
this.methodProfiler.a(() -> { this.methodProfiler.a(() -> {
return String.valueOf(TileEntityTypes.a(tileentity.C())); return String.valueOf(TileEntityTypes.a(tileentity.C()));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a8c7e7931e..f7883e7085 100644 index a8c7e7931..f7883e708 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1772,7 +1772,7 @@ public class CraftWorld implements World { @@ -1772,7 +1772,7 @@ public class CraftWorld implements World {
@ -204,7 +204,7 @@ index a8c7e7931e..f7883e7085 100644
} }
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 d08ef3fe10..081789a8fe 100644 index d08ef3fe1..081789a8f 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
@@ -323,6 +323,11 @@ public class ActivationRange @@ -323,6 +323,11 @@ public class ActivationRange

View file

@ -1,4 +1,4 @@
From 3b58205c29904e995b9ea750ec5d41de9427897b Mon Sep 17 00:00:00 2001 From 7a4ba4be907fc92d45e7ca3fc6e8986b5d6837e9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 22:54:28 -0400 Date: Wed, 21 Sep 2016 22:54:28 -0400
Subject: [PATCH] Chunk registration fixes Subject: [PATCH] Chunk registration fixes
@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent Keep them consistent
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 336e6aeef6..282d6ae84c 100644 index ef4564045..ad1dcf52e 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
@@ -1473,7 +1473,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1472,7 +1472,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
i = MathHelper.floor(entity.locX / 16.0D); i = MathHelper.floor(entity.locX / 16.0D);

View file

@ -1,14 +1,14 @@
From 15cd669dcb33567293742d5942ca735b544822d1 Mon Sep 17 00:00:00 2001 From 11cb88149b598d003438e6e1b8e430640a012185 Mon Sep 17 00:00:00 2001
From: mezz <tehgeek@gmail.com> From: mezz <tehgeek@gmail.com>
Date: Wed, 9 Aug 2017 17:51:22 -0500 Date: Wed, 9 Aug 2017 17:51:22 -0500
Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
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 5e1ab431dc..cdb430ef4f 100644 index 7c9b4e875..829ab845f 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
@@ -1274,7 +1274,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1273,7 +1273,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.methodProfiler.exitEnter("blockEntities"); this.methodProfiler.exitEnter("blockEntities");
timings.tileEntityTick.startTiming(); // Spigot timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) { if (!this.tileEntityListUnload.isEmpty()) {

View file

@ -1,4 +1,4 @@
From bc5d4dcd27553b19ebbd6f37ba6281fc26c5f2be Mon Sep 17 00:00:00 2001 From 2419083c0b4fd0a0f99df2c3c0fbb40cf3530960 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 03:39:51 -0400 Date: Wed, 4 Jul 2018 03:39:51 -0400
Subject: [PATCH] Avoid Chunk Lookups for Entity/TileEntity Current Chunk Subject: [PATCH] Avoid Chunk Lookups for Entity/TileEntity Current Chunk
@ -10,7 +10,7 @@ to the object directly on the Entity/TileEntity object we can directly grab.
Use that local value instead to reduce lookups in many hot places. Use that local value instead to reduce lookups in many hot places.
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 d87b08a49e..c7712d2e71 100644 index 24d169eee..bf563df53 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
@@ -1110,9 +1110,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1110,9 +1110,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -37,7 +37,7 @@ index d87b08a49e..c7712d2e71 100644
//} // Paper - merge //} // Paper - merge
//for (Entity e : this.g) { // Paper - merge //for (Entity e : this.g) { // Paper - merge
@@ -1262,9 +1260,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1261,9 +1259,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
j = entity.chunkX; j = entity.chunkX;
int l = entity.chunkZ; int l = entity.chunkZ;
@ -51,7 +51,7 @@ index d87b08a49e..c7712d2e71 100644
guardEntityList = false; // Spigot guardEntityList = false; // Spigot
this.entityList.remove(this.tickPosition--); // CraftBukkit - Use field for loop variable this.entityList.remove(this.tickPosition--); // CraftBukkit - Use field for loop variable
@@ -1309,7 +1308,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1308,7 +1307,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
BlockPosition blockposition = tileentity.getPosition(); BlockPosition blockposition = tileentity.getPosition();
// Paper start - Skip ticking in chunks scheduled for unload // Paper start - Skip ticking in chunks scheduled for unload
@ -60,7 +60,7 @@ index d87b08a49e..c7712d2e71 100644
boolean shouldTick = chunk != null; boolean shouldTick = chunk != null;
if(this.paperConfig.skipEntityTickingInChunksScheduledForUnload) if(this.paperConfig.skipEntityTickingInChunksScheduledForUnload)
shouldTick = shouldTick && chunk.scheduledForUnload == null; shouldTick = shouldTick && chunk.scheduledForUnload == null;
@@ -1345,8 +1344,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1344,8 +1343,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
tilesThisCycle--; tilesThisCycle--;
this.tileEntityListTick.remove(tileTickPosition--); this.tileEntityListTick.remove(tileTickPosition--);
//this.tileEntityList.remove(tileentity); // Paper - remove unused list //this.tileEntityList.remove(tileentity); // Paper - remove unused list

View file

@ -1,11 +1,11 @@
From 6244aa55134ca674298f84bd72c07d62cc31a54d Mon Sep 17 00:00:00 2001 From da60a332e0cf990fc91f7aa70d22488ea37b2297 Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com> From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 12:57:39 +0200 Date: Mon, 23 Jul 2018 12:57:39 +0200
Subject: [PATCH] Option to prevent armor stands from doing entity lookups Subject: [PATCH] Option to prevent armor stands from doing entity lookups
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 8c4ff18868..6c4cb61dc5 100644 index 8c4ff1886..6c4cb61dc 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -375,6 +375,11 @@ public class PaperWorldConfig { @@ -375,6 +375,11 @@ public class PaperWorldConfig {
@ -21,10 +21,10 @@ index 8c4ff18868..6c4cb61dc5 100644
private void maxEntityCollision() { private void maxEntityCollision() {
maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) );
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 a5f4b9ad94..28fca165cd 100644 index 7234a92d4..4cb26b842 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
@@ -1539,6 +1539,14 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1538,6 +1538,14 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
} }

View file

@ -1,11 +1,11 @@
From 8230851068dc6fdb84a1ea3aa2f993f196bfc02c Mon Sep 17 00:00:00 2001 From c21feadc49b87354d016a8837c2af1b617698f36 Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com> From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 14:22:26 +0200 Date: Mon, 23 Jul 2018 14:22:26 +0200
Subject: [PATCH] Vanished players don't have rights 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 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 6598b87eef..539273afbc 100644 index 6598b87ee..539273afb 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
@@ -92,7 +92,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -92,7 +92,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -18,7 +18,7 @@ index 6598b87eef..539273afbc 100644
protected int k; protected int k;
private Entity vehicle; private Entity vehicle;
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index f27d565e1e..49ad201c6e 100644 index f27d565e1..49ad201c6 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java --- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java +++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -70,7 +70,8 @@ public class ItemBlock extends Item { @@ -70,7 +70,8 @@ public class ItemBlock extends Item {
@ -32,10 +32,10 @@ index f27d565e1e..49ad201c6e 100644
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn); BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn);
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 28fca165cd..1929e9d2ae 100644 index 4cb26b842..da0da1f43 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
@@ -1521,6 +1521,37 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1520,6 +1520,37 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
} }
@ -74,7 +74,7 @@ index 28fca165cd..1929e9d2ae 100644
if (voxelshape.isEmpty()) { if (voxelshape.isEmpty()) {
return true; return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 2cfe8afe13..0a3a121cbc 100644 index 2cfe8afe1..0a3a121cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1000,6 +1000,14 @@ public class CraftEventFactory { @@ -1000,6 +1000,14 @@ public class CraftEventFactory {

View file

@ -1,4 +1,4 @@
From 9668175b9daf82f6d0646d0b3a3569a0ff38cfd9 Mon Sep 17 00:00:00 2001 From d56b8e342642b04ba0e3d1aa97ad38442f621c95 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 28 Jul 2018 12:18:27 -0400 Date: Sat, 28 Jul 2018 12:18:27 -0400
Subject: [PATCH] Ignore Dead Entities in entityList iteration Subject: [PATCH] Ignore Dead Entities in entityList iteration
@ -11,7 +11,7 @@ This will ensure that dead entities are skipped from iteration since
they shouldn't of been in the list in the first place. they shouldn't of been in the list in the first place.
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index f38179e983..8e1bda4de9 100644 index f38179e98..8e1bda4de 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java --- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java +++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -176,6 +176,7 @@ public class PaperCommand extends Command { @@ -176,6 +176,7 @@ public class PaperCommand extends Command {
@ -23,7 +23,7 @@ index f38179e983..8e1bda4de9 100644
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
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 ead5af991c..cf69a4d8a4 100644 index ead5af991..cf69a4d8a 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
@@ -121,6 +121,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -121,6 +121,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -35,7 +35,7 @@ index ead5af991c..cf69a4d8a4 100644
public float length; public float length;
public float J; public float J;
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 1cbe6e17b7..5d60b36678 100644 index e2068c33f..c32fb50f1 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
@@ -1046,6 +1046,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1046,6 +1046,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -54,7 +54,7 @@ index 1cbe6e17b7..5d60b36678 100644
if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above
// CraftBukkit start - Decrement loop variable field if we've already ticked this entity // CraftBukkit start - Decrement loop variable field if we've already ticked this entity
@@ -2316,6 +2318,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2315,6 +2317,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -62,7 +62,7 @@ index 1cbe6e17b7..5d60b36678 100644
if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) { // CraftBukkit - decompile error if (oclass.isAssignableFrom(entity.getClass()) && predicate.test((T) entity)) { // CraftBukkit - decompile error
list.add((T) entity); // CraftBukkit - decompile error list.add((T) entity); // CraftBukkit - decompile error
@@ -2402,6 +2405,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2401,6 +2404,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
@ -71,7 +71,7 @@ index 1cbe6e17b7..5d60b36678 100644
if (entity instanceof EntityInsentient) { if (entity instanceof EntityInsentient) {
EntityInsentient entityinsentient = (EntityInsentient) entity; EntityInsentient entityinsentient = (EntityInsentient) entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 609b911265..4594bab465 100644 index 609b91126..4594bab46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -634,6 +634,7 @@ public class CraftWorld implements World { @@ -634,6 +634,7 @@ public class CraftWorld implements World {

View file

@ -1,11 +1,11 @@
From df9635bc942ea00aedd136fdea9d06027e38b337 Mon Sep 17 00:00:00 2001 From 5e13b150ff63da8a5292f35e1276759b514a1dde Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com> From: willies952002 <admin@domnian.com>
Date: Mon, 30 Jul 2018 02:42:49 -0400 Date: Mon, 30 Jul 2018 02:42:49 -0400
Subject: [PATCH] World EntityHuman Lookup Optimizations Subject: [PATCH] World EntityHuman Lookup Optimizations
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 5d60b36678..3acea908c2 100644 index c32fb50f1..632b2aeb3 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
@@ -76,6 +76,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -76,6 +76,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -41,7 +41,7 @@ index 5d60b36678..3acea908c2 100644
this.everyoneSleeping(); this.everyoneSleeping();
} }
@@ -2667,6 +2672,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2666,6 +2671,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@Nullable @Nullable
public EntityHuman a(String s) { public EntityHuman a(String s) {
@ -50,7 +50,7 @@ index 5d60b36678..3acea908c2 100644
for (int i = 0; i < this.players.size(); ++i) { for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i); EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@@ -2676,10 +2683,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2675,10 +2682,15 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
return null; return null;
@ -66,7 +66,7 @@ index 5d60b36678..3acea908c2 100644
for (int i = 0; i < this.players.size(); ++i) { for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i); EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@@ -2689,6 +2701,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2688,6 +2700,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
} }
return null; return null;

View file

@ -1,4 +1,4 @@
From caaa22ced1e3cc9e7c6c79192259a5436f1783e3 Mon Sep 17 00:00:00 2001 From dba6487c2a1a44c29456f3b29a2c3f611758526b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 3 Aug 2018 22:47:46 -0400 Date: Fri, 3 Aug 2018 22:47:46 -0400
Subject: [PATCH] Entity add to world fixes Subject: [PATCH] Entity add to world fixes
@ -14,7 +14,7 @@ Fix this by differing entity add to world for all entities at the same time
the original entity is dead, overwrite it as the logic does for unloaod queued entities. the original entity is dead, overwrite it as the logic does for unloaod queued entities.
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 01abe5e376..4502ece4dd 100644 index 01abe5e37..4502ece4d 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
@@ -2,6 +2,8 @@ package net.minecraft.server; @@ -2,6 +2,8 @@ package net.minecraft.server;
@ -53,7 +53,7 @@ index 01abe5e376..4502ece4dd 100644
} }
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 3acea908c2..e31e366249 100644 index 632b2aeb3..7f6a56ff6 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
@@ -1037,6 +1037,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1037,6 +1037,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -64,7 +64,7 @@ index 3acea908c2..e31e366249 100644
this.entityList.add(entity); this.entityList.add(entity);
this.b(entity); this.b(entity);
return true; return true;
@@ -2434,9 +2435,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2433,9 +2434,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return j; return j;
} }
@ -79,7 +79,7 @@ index 3acea908c2..e31e366249 100644
this.b(entity); this.b(entity);
}); });
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 293818b196..4cda6cee2b 100644 index 293818b19..4cda6cee2 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
@@ -967,7 +967,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { @@ -967,7 +967,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {

View file

@ -1,4 +1,4 @@
From c630ddd10b4711ffcd5318829821fb44f48294df Mon Sep 17 00:00:00 2001 From 368ac6d9fa82a95c89036c5496a65826897a8995 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 29 Aug 2018 21:59:22 -0400 Date: Wed, 29 Aug 2018 21:59:22 -0400
Subject: [PATCH] Optimize getChunkIfLoaded type calls Subject: [PATCH] Optimize getChunkIfLoaded type calls
@ -10,7 +10,7 @@ Will improve inlining across many hot methods.
Improve getBrightness to not do double chunk map lookups. Improve getBrightness to not do double chunk map lookups.
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 41926a361b..186cfda7e4 100644 index 41926a361..186cfda7e 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
@@ -379,7 +379,7 @@ public class ChunkProviderServer implements IChunkProvider { @@ -379,7 +379,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -23,7 +23,7 @@ index 41926a361b..186cfda7e4 100644
neighbor.setNeighborUnloaded(-x, -z); neighbor.setNeighborUnloaded(-x, -z);
chunk.setNeighborUnloaded(x, z); chunk.setNeighborUnloaded(x, z);
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 14f419deb8..630ebfb37c 100644 index 79dea3c85..6d60262c6 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
@@ -162,7 +162,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -162,7 +162,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -45,7 +45,7 @@ index 14f419deb8..630ebfb37c 100644
} }
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) { public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
@@ -1959,7 +1960,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1958,7 +1959,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
if (blockposition.isInvalidYLocation()) { // Paper if (blockposition.isInvalidYLocation()) { // Paper
return false; return false;
} else { } else {
@ -55,7 +55,7 @@ index 14f419deb8..630ebfb37c 100644
return chunk != null && !chunk.isEmpty(); return chunk != null && !chunk.isEmpty();
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 72eb8ed4f4..7e52859c1d 100644 index 72eb8ed4f..7e52859c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -218,7 +218,7 @@ public class CraftWorld implements World { @@ -218,7 +218,7 @@ public class CraftWorld implements World {

View file

@ -1,4 +1,4 @@
From 68d53d355f81300b2cbd41c12ef16efe87a3d8fb Mon Sep 17 00:00:00 2001 From 699542a90b5f91b625a0980d76abafd22a0ec5e4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 20:46:29 -0400 Date: Fri, 28 Sep 2018 20:46:29 -0400
Subject: [PATCH] Optimize Light Recalculations Subject: [PATCH] Optimize Light Recalculations
@ -7,7 +7,7 @@ Optimizes to not repeatedly look up the same chunk for
light lookups. light lookups.
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 4f64072a7b..966879a894 100644 index 4f64072a7..966879a89 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
@@ -353,7 +353,7 @@ public class Chunk implements IChunkAccess { @@ -353,7 +353,7 @@ public class Chunk implements IChunkAccess {
@ -20,7 +20,7 @@ index 4f64072a7b..966879a894 100644
this.x = true; this.x = true;
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 97a0fbd55c..fb71879ac0 100644 index 261567ecc..586a5a990 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
@@ -591,8 +591,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -591,8 +591,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -35,7 +35,7 @@ index 97a0fbd55c..fb71879ac0 100644
} }
} }
@@ -2220,6 +2221,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2219,6 +2220,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) { public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
// CraftBukkit start - Use neighbor cache instead of looking up // CraftBukkit start - Use neighbor cache instead of looking up
Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);

View file

@ -1,4 +1,4 @@
From 54fce61ce9cd7da50f7fa8d635f7364ee724b6d8 Mon Sep 17 00:00:00 2001 From f024322cc4a13259eb12770728b7e0d20953d836 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 21:49:53 -0400 Date: Fri, 28 Sep 2018 21:49:53 -0400
Subject: [PATCH] Fix issues with entity loss due to unloaded chunks Subject: [PATCH] Fix issues with entity loss due to unloaded chunks
@ -18,7 +18,7 @@ This change ensures the chunks are always loaded when entities are
added to the world, or a valid entity moves between chunks. added to the world, or a valid entity moves between chunks.
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 fb71879ac0..728319968b 100644 index 586a5a990..8d20f6d05 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
@@ -1081,7 +1081,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1081,7 +1081,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -30,7 +30,7 @@ index fb71879ac0..728319968b 100644
// Paper start - Set origin location when the entity is being added to the world // Paper start - Set origin location when the entity is being added to the world
if (entity.origin == null) { if (entity.origin == null) {
@@ -1577,7 +1577,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1576,7 +1576,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY);
} }

View file

@ -1,4 +1,4 @@
From 6e73e08568141499f1c97c1574d249495b32a2cf Mon Sep 17 00:00:00 2001 From 1a5d05cb2c1a7eda1f6eec4a99175f40f1fbc001 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1> From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600 Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm Subject: [PATCH] Optimize redstone algorithm
@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 61ad2cef7b..a70a64070e 100644 index 61ad2cef7..a70a64070 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -588,4 +588,14 @@ public class PaperWorldConfig { @@ -588,4 +588,14 @@ public class PaperWorldConfig {
@ -39,7 +39,7 @@ index 61ad2cef7b..a70a64070e 100644
} }
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644 new file mode 100644
index 0000000000..21d9d6d7ed index 000000000..21d9d6d7e
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java +++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,910 @@ @@ -0,0 +1,910 @@
@ -954,7 +954,7 @@ index 0000000000..21d9d6d7ed
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 2e30270bb7..72d2617071 100644 index 2e30270bb..72d261707 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java --- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -1122,7 +1122,7 @@ index 2e30270bb7..72d2617071 100644
iblockdata.a(world, blockposition, 0); iblockdata.a(world, blockposition, 0);
world.setAir(blockposition); world.setAir(blockposition);
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 027bb64acc..645af17a58 100644 index 94e189a55..d790fd89f 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
@@ -648,6 +648,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -648,6 +648,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -1133,7 +1133,7 @@ index 027bb64acc..645af17a58 100644
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) { if (!this.isClientSide) {
IBlockData iblockdata = this.getType(blockposition); IBlockData iblockdata = this.getType(blockposition);
@@ -2593,6 +2594,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2592,6 +2593,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
} }

View file

@ -1,4 +1,4 @@
From a55362012ae6439bd007bf980dc0e094b7e9257a Mon Sep 17 00:00:00 2001 From b8d0b1dc65c1afec931ebcbe8f196c7ecc92fefe Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 13 Nov 2018 14:01:00 +0000 Date: Tue, 13 Nov 2018 14:01:00 +0000
Subject: [PATCH] limit the range at which we'll consider an attackable target Subject: [PATCH] limit the range at which we'll consider an attackable target
@ -12,10 +12,10 @@ decrease when set, allowing us to skip further checks earlier on
when looking for an attackable entity when looking for an attackable entity
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 645af17a58..7721dfee65 100644 index d790fd89f..c9a65f7a6 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
@@ -2721,8 +2721,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -2720,8 +2720,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
for (int i = 0; i < this.players.size(); ++i) { for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman1 = (EntityHuman) this.players.get(i); EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);

View file

@ -1,4 +1,4 @@
From fd269acdf74f64fba07aebd29ec472cd6f597c70 Mon Sep 17 00:00:00 2001 From bbf5a5ff04d56b217118ab54e6c2d91bb16ce7bb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 6 Apr 2019 10:16:48 -0400 Date: Sat, 6 Apr 2019 10:16:48 -0400
Subject: [PATCH] Optimize Captured TileEntity Lookup Subject: [PATCH] Optimize Captured TileEntity Lookup
@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null. just do a get call since the value can never be null.
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 0e8025d311..b940f95bdb 100644 index aa04b9564..f5156a89a 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
@@ -1935,12 +1935,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1934,12 +1934,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return null; return null;
} else { } else {
// CraftBukkit start // CraftBukkit start