Updated Upstream and Sidestream(s) (Paper/Tuinity) (#430)

* Updated Upstream and Sidestream(s) (Paper)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
808bd9198 Add fast alternative constructor for Vector3f (#5339)
e849c51da fix #5336
0b25bacfc fix patch 'Remove streams from SensorNearest' (fixes #5330)
4d287e31c Use Adventure for `/version` command feedback, add copy to clipboard click event (#5333)

* Updated Upstream and Sidestream(s) (Tuinity)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Tuinity Changes:
19ac660 Move region chunk unload & poi unload hook up
38ad5a1 Do not run close logic for inventories on chunk unload
fb75a6f Do not allow the server to unload chunks at request of plugins
This commit is contained in:
Simon Gardling 2021-03-11 11:56:46 -05:00 committed by GitHub
parent e101824422
commit 15bf6a2103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 339 additions and 437 deletions

View File

@ -149,9 +149,11 @@ # Patches
| server | Dispenser curse of binding protection | William Blake Galbreath | | | server | Dispenser curse of binding protection | William Blake Galbreath | |
| server | Dispensers place anvils option | William Blake Galbreath | | | server | Dispensers place anvils option | William Blake Galbreath | |
| server | Distance manager tick timings | Spottedleaf | | | server | Distance manager tick timings | Spottedleaf | |
| server | Do not allow the server to unload chunks at request of | Spottedleaf | |
| server | Do not allow ticket level changes while unloading | Spottedleaf | | | server | Do not allow ticket level changes while unloading | Spottedleaf | |
| server | Do not load chunks during a crash report | Spottedleaf | | | server | Do not load chunks during a crash report | Spottedleaf | |
| server | Do not retain playerchunkmap instance in light thread factory | Spottedleaf | | | server | Do not retain playerchunkmap instance in light thread factory | Spottedleaf | |
| server | Do not run close logic for inventories on chunk unload | Spottedleaf | |
| server | Do not run raytrace logic for AIR | Spottedleaf | | | server | Do not run raytrace logic for AIR | Spottedleaf | |
| server | Don't allow StructureLocateEvent to change worlds | Spottedleaf | | | server | Don't allow StructureLocateEvent to change worlds | Spottedleaf | |
| server | Don't get entity equipment if not needed | Paul Sauve | | | server | Don't get entity equipment if not needed | Paul Sauve | |
@ -319,7 +321,6 @@ # Patches
| server | Reduce allocs & improve perf of StructureManager | Paul Sauve | | | server | Reduce allocs & improve perf of StructureManager | Paul Sauve | |
| server | Reduce chunk loading & lookups | Paul Sauve | | | server | Reduce chunk loading & lookups | Paul Sauve | |
| server | Reduce iterator allocation from chunk gen | Spottedleaf | | | server | Reduce iterator allocation from chunk gen | Spottedleaf | |
| server | Reduce memory allocations | Paul Sauve | |
| server | Reduce pathfinder branches | Spottedleaf | | | server | Reduce pathfinder branches | Spottedleaf | |
| server | Reduce projectile chunk loading | Paul Sauve | | | server | Reduce projectile chunk loading | Paul Sauve | |
| server | Remove some streams and object allocations | Phoenix616 | | | server | Remove some streams and object allocations | Phoenix616 | |

2
Paper

@ -1 +1 @@
Subproject commit eb11845f87197d08a68bf083e509679bead010ab Subproject commit 808bd9198664938af58e98e622c41902343587e0

View File

@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
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 5d92398369862881d997c270671ddb6b78ed2cb4..6694a669f9fbae0dce857e97651ed527f5481427 100644 index 2c73ddae3df32eea175fb1779104441b49796939..9ae0d37d41700f9fb1e13d1b61b07c7bc09b9d75 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
@@ -1134,7 +1134,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1134,7 +1134,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -65,10 +65,10 @@ index 8fda4702764e80dae93ef9c0eb53abc198642ab1..0924f6b484468f3cf3c2d405101c0158
public org.bukkit.Chunk bukkitChunk; public org.bukkit.Chunk bukkitChunk;
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 18270d44185b0ec41b9b6e1d2135e7aae3b33261..e8a6bc2654e840395fee70d79695c5a395a4fc1b 100644 index e26389d8d9ee4fedb32767fce3aed071af412304..9cf3cd69661a140d34d17195c2cd6dc299c95ddf 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
@@ -973,6 +973,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -974,6 +974,7 @@ public class ChunkProviderServer extends IChunkProvider {
} }
// Paper end - optimize isOutisdeRange // Paper end - optimize isOutisdeRange
this.world.getMethodProfiler().enter("pollingChunks"); this.world.getMethodProfiler().enter("pollingChunks");
@ -77,7 +77,7 @@ index 18270d44185b0ec41b9b6e1d2135e7aae3b33261..e8a6bc2654e840395fee70d79695c5a3
boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit
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 6694a669f9fbae0dce857e97651ed527f5481427..dd9ae27a208b5e55a1c473eda6e068a0fc3eb64f 100644 index 9ae0d37d41700f9fb1e13d1b61b07c7bc09b9d75..fe6611e480c18e97061268690d067a811b13bb1b 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
@@ -1124,6 +1124,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1124,6 +1124,8 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -1,209 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Tue, 9 Feb 2021 19:05:58 -0600
Subject: [PATCH] Reduce memory allocations
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
index 7b29d47dfdef7611db58068af285f76d92a9f12a..6c5d96853d47850b81ce85e56a516c554819ef25 100644
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
@@ -43,8 +43,14 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
if (worldserver.getLightLevel(blockposition.up()) >= 9) {
IBlockData iblockdata1 = this.getBlockData();
+ // Airplane start - use mutable position
+ BlockPosition.MutableBlockPosition blockposition1 = new BlockPosition.MutableBlockPosition();
for (int i = 0; i < 4; ++i) {
+ blockposition1.setValues(blockposition).addValues(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
+ /*
BlockPosition blockposition1 = blockposition.b(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
+ */
+ // Airplane end
if (worldserver.getType(blockposition1).a(Blocks.DIRT) && c(iblockdata1, (IWorldReader) worldserver, blockposition1)) {
org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.set(BlockDirtSnowSpreadable.a, worldserver.getType(blockposition1.up()).a(Blocks.SNOW))); // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index bc61aaff65a7dc1e7534452b285953b83adb7000..f38382cc681f03d9a6a0efa85f045e3770398739 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -438,6 +438,14 @@ public class BlockPosition extends BaseBlockPosition {
public BlockPosition b(int i, int j, int k) {
return super.b(i, j, k).immutableCopy();
}
+ // Airplane start - version of b that doesn't copy
+ public BlockPosition addValues(int x, int y, int z) {
+ ((BaseBlockPosition)this).a += x;
+ ((BaseBlockPosition)this).b += y;
+ ((BaseBlockPosition)this).e += z;
+ return this;
+ }
+ // Airplane end
@Override
public BlockPosition shift(EnumDirection enumdirection, int i) {
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
index 730b91680b226df624180d64019c2984d0e29422..60ddae95c287aea071a8f277e570c2b0f25f9feb 100644
--- a/src/main/java/net/minecraft/server/EntityTypes.java
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
@@ -140,6 +140,8 @@ public class EntityTypes<T extends Entity> {
public void setEntitySize(EntitySize entitySize) { this.br = entitySize; } // Purpur - OBFHELPER
private EntitySize br; // Purpur - remove final
+ public java.util.function.Supplier<String> getEntityName = () -> IRegistry.ENTITY_TYPE.getKey(this).toString(); // Airplane - create lambda ones
+
private static <T extends Entity> EntityTypes<T> a(String s, EntityTypes.Builder entitytypes_builder) { // CraftBukkit - decompile error
return (EntityTypes) IRegistry.a((IRegistry) IRegistry.ENTITY_TYPE, s, (Object) entitytypes_builder.a(s));
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index f9482f19549074e04fc4c1e4d05612a2ea23354c..e7c373e28054c49459a44faee77301e448baea44 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -642,7 +642,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return d2 * d2 + d3 * d3;
}
- private static int b(ChunkCoordIntPair chunkcoordintpair, EntityPlayer entityplayer, boolean flag) {
+ // Airplane start - create copy that accepts x/z instead of allocating pair
+ private static int b(ChunkCoordIntPair chunkcoordintpair, EntityPlayer entityplayer, boolean flag) { return someDistanceCalculation(chunkcoordintpair.x, chunkcoordintpair.z, entityplayer, flag); }
+ private static int someDistanceCalculation(int x, int z, EntityPlayer entityplayer, boolean flag) {
int i;
int j;
@@ -656,12 +658,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
j = MathHelper.floor(entityplayer.locZ() / 16.0D);
}
- return a(chunkcoordintpair, i, j);
+ return someOtherDistanceCalculation(x, z, i, j);
+ // Airplane end
}
- private static int a(ChunkCoordIntPair chunkcoordintpair, int i, int j) {
- int k = chunkcoordintpair.x - i;
- int l = chunkcoordintpair.z - j;
+ // Airplane start - create copy that accepts x/z instead of allocating pair
+ private static int a(ChunkCoordIntPair chunkcoordintpair, int i, int j) { return someOtherDistanceCalculation(chunkcoordintpair.x, chunkcoordintpair.z, i, j); }
+ private static int someOtherDistanceCalculation(int x, int z, int i, int j) {
+ int k = x - i;
+ int l = z - j;
+ // Airplane end
return Math.max(Math.abs(k), Math.abs(l));
}
@@ -2500,11 +2506,17 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
boolean flag1 = this.tracker.attachedToPlayer;
if (!flag1) {
+ // Airplane start - use int/longs instead of ChunkCoordIntPair
+ /*
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ);
- PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair());
+ */
+ int x = this.tracker.chunkX, z = this.tracker.chunkZ;
+ long chunkcoordintpair = ChunkCoordIntPair.pair(x, z);
+ PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair);
if (playerchunk != null && playerchunk.getSendingChunk() != null) { // Paper - no-tick view distance
- flag1 = PlayerChunkMap.b(chunkcoordintpair, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
+ flag1 = PlayerChunkMap.someDistanceCalculation(x, z, entityplayer, false) <= PlayerChunkMap.this.viewDistance;
+ // Airplane end
}
}
@@ -2534,8 +2546,10 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
}
private int b() {
+ // Airplane start
+ int i = this.trackingDistance; // move out of if statement
+ if (!this.tracker.passengers.isEmpty()) {
Collection<Entity> collection = this.tracker.getAllPassengers();
- int i = this.trackingDistance;
Iterator iterator = collection.iterator();
while (iterator.hasNext()) {
@@ -2547,6 +2561,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
i = j;
}
}
+ }
+ // Airplane end
return this.a(i);
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 44f52fb6e3aedeadec4be3979ad1c625643cf9fa..8c162c5fdeaffccc9a28b592e030971fe51cafb3 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1086,19 +1086,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public void a(Consumer<Entity> consumer, Entity entity) {
try {
- consumer.accept(entity);
+ consumer.accept(entity); // Airplane - error on change
} catch (Throwable throwable) {
if (throwable instanceof ThreadDeath) throw throwable; // Paper
// Paper start - Prevent tile entity and entity crashes
String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ();
System.err.println(msg);
throwable.printStackTrace();
- getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable)));
+ getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Airplane - error on change
entity.dead = true;
return;
// Paper end
}
- MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick
+ MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick // Airplane - error on change
}
// Paper start - Prevent armor stands from doing entity lookups
@Override
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index dd9ae27a208b5e55a1c473eda6e068a0fc3eb64f..d4672e7fa899a39bae2d9179472b22db28a58f19 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1012,7 +1012,28 @@ public class WorldServer extends World implements GeneratorAccessSeed {
gameprofilerfiller.enter("tick");
if (!entity.dead && !(entity instanceof EntityComplexPart)) {
+ // Airplane start - inline this.a to prevent creation of lambda
+ /*
this.a(this::entityJoinedWorld, entity);
+ */
+ boolean doMidTick = false; // usually there's a returns in the catch, so treat it like that
+ try {
+ this.entityJoinedWorld(entity);
+ doMidTick = true;
+ } catch (Throwable throwable) {
+ if (throwable instanceof ThreadDeath) throw throwable; // Paper
+ // Paper start - Prevent tile entity and entity crashes
+ String msg = "Entity threw exception at " + entity.world.getWorld().getName() + ":" + entity.locX() + "," + entity.locY() + "," + entity.locZ();
+ System.err.println(msg);
+ throwable.printStackTrace();
+ getServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable)));
+ entity.dead = true;
+ // Paper end
+ }
+ if (doMidTick) {
+ MinecraftServer.getServer().executeMidTickTasks(); // Tuinity - execute chunk tasks mid tick
+ }
+ // Airplane end
}
gameprofilerfiller.exit();
@@ -1376,9 +1397,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {
++entity.ticksLived;
GameProfilerFiller gameprofilerfiller = this.getMethodProfiler();
+ // Airplane start - create debug lambda once, todo do we even WANT the method profiler?
+ /*
gameprofilerfiller.a(() -> {
return IRegistry.ENTITY_TYPE.getKey(entity.getEntityType()).toString();
});
+ */
+ gameprofilerfiller.a(entity.getEntityType().getEntityName);
+ // Airplane end
gameprofilerfiller.c("tickNonPassenger");
if (isActive) { // Paper - EAR 2
TimingHistory.activatedEntityTicks++; // Paper

View File

@ -181,7 +181,7 @@ index 0924f6b484468f3cf3c2d405101c0158c12d69e6..1d65d884d1f31a73333e4cf6a9ce30d7
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null); this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index bf81977bfef4ddfed10f4bf4422e230d67e8199f..4c42d7fb44e2c82f516e37556b7c20e7380c7f13 100644 index 93bca6a52dd01d9ad524a03d90c7ec79d00d2c56..d6c6a389cf214f2f8cbb343fc8106ab7d0845950 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -52,7 +52,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -52,7 +52,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -287,10 +287,10 @@ index 2f758b3d3eaf5d5781a2072d0f3f7442b73cb9a8..63bcd1b61d0485b064d619ddfa0e2010
if (this.tracker instanceof EntityPlayer) { if (this.tracker instanceof EntityPlayer) {
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet); ((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
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 e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc0f4a10cd 100644 index 285e976d4a655fb61e70883ae89f974812be7152..5c3e0cadb02fd6e4d55ae0faa4618d78f0433a52 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
@@ -728,6 +728,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -722,6 +722,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i)); return (PlayerChunk) (this.hasPendingVisibleUpdate ? this.pendingVisibleChunks.get(i) : ((ProtectedVisibleChunksMap)this.visibleChunks).safeGet(i));
// Paper end // Paper end
} }
@ -302,7 +302,7 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER protected final IntSupplier getPrioritySupplier(long i) { return c(i); } // Paper - OBFHELPER
protected IntSupplier c(long i) { protected IntSupplier c(long i) {
@@ -2127,10 +2132,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -2124,10 +2129,30 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entity.tracker = null; // Paper - We're no longer tracked entity.tracker = null; // Paper - We're no longer tracked
} }
@ -333,7 +333,7 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator(); com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator<Chunk> iterator = this.world.getChunkProvider().entityTickingChunks.iterator();
try { try {
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -2392,7 +2417,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2389,7 +2414,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
public class EntityTracker { public class EntityTracker {
final EntityTrackerEntry trackerEntry; // Paper - private -> package private final EntityTrackerEntry trackerEntry; // Paper - private -> package private
@ -342,7 +342,7 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
private final int trackingDistance; private final int trackingDistance;
private SectionPosition e; private SectionPosition e;
// Paper start // Paper start
@@ -2411,7 +2436,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2408,7 +2433,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
// Paper start - use distance map to optimise tracker // Paper start - use distance map to optimise tracker
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> lastTrackerCandidates; com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> lastTrackerCandidates;
@ -353,7 +353,7 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> oldTrackerCandidates = this.lastTrackerCandidates; com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<EntityPlayer> oldTrackerCandidates = this.lastTrackerCandidates;
this.lastTrackerCandidates = newTrackerCandidates; this.lastTrackerCandidates = newTrackerCandidates;
@@ -2452,7 +2479,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2449,7 +2476,13 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
return this.tracker.getId(); return this.tracker.getId();
} }
@ -368,7 +368,7 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
Iterator iterator = this.trackedPlayers.iterator(); Iterator iterator = this.trackedPlayers.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@@ -2464,6 +2497,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2461,6 +2494,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
} }
public void broadcastIncludingSelf(Packet<?> packet) { public void broadcastIncludingSelf(Packet<?> packet) {
@ -381,7 +381,7 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
this.broadcast(packet); this.broadcast(packet);
if (this.tracker instanceof EntityPlayer) { if (this.tracker instanceof EntityPlayer) {
((EntityPlayer) this.tracker).playerConnection.sendPacket(packet); ((EntityPlayer) this.tracker).playerConnection.sendPacket(packet);
@@ -2490,8 +2529,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2487,8 +2526,8 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
} }
@ -392,12 +392,12 @@ index e7c373e28054c49459a44faee77301e448baea44..60aa3813361947721e847ff11e50bfbc
if (entityplayer != this.tracker) { if (entityplayer != this.tracker) {
// Paper start - remove allocation of Vec3D here // Paper start - remove allocation of Vec3D here
//Vec3D vec3d = entityplayer.getPositionVector().d(this.tracker.getPositionVector()); // MC-155077, SPIGOT-5113 //Vec3D vec3d = entityplayer.getPositionVector().d(this.tracker.getPositionVector()); // MC-155077, SPIGOT-5113
@@ -2512,7 +2551,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2504,7 +2543,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
*/
int x = this.tracker.chunkX, z = this.tracker.chunkZ; if (!flag1) {
long chunkcoordintpair = ChunkCoordIntPair.pair(x, z); ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ);
- PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair); - PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair());
+ PlayerChunk playerchunk = PlayerChunkMap.this.trackerGetVisibleChunk(chunkcoordintpair); // Airplane + PlayerChunk playerchunk = PlayerChunkMap.this.trackerGetVisibleChunk(chunkcoordintpair.pair()); // Airplane
if (playerchunk != null && playerchunk.getSendingChunk() != null) { // Paper - no-tick view distance if (playerchunk != null && playerchunk.getSendingChunk() != null) { // Paper - no-tick view distance
flag1 = PlayerChunkMap.someDistanceCalculation(x, z, entityplayer, false) <= PlayerChunkMap.this.viewDistance; flag1 = PlayerChunkMap.b(chunkcoordintpair, entityplayer, false) <= PlayerChunkMap.this.viewDistance;

View File

@ -19,7 +19,7 @@ index 657885cdaa086293f6b5aa6f3058acd16df0ba35..8724ad342bec7c733b3c825bd62dbfa5
Block.a(iblockdata, iblockdata1, generatoraccess, blockposition_mutableblockposition, i, j); Block.a(iblockdata, iblockdata1, generatoraccess, blockposition_mutableblockposition, i, 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 8c162c5fdeaffccc9a28b592e030971fe51cafb3..bfc7a1c234b5fe4aa58b48c3673f473d26561077 100644 index 44f52fb6e3aedeadec4be3979ad1c625643cf9fa..0856d7389f9fec20885ee38bac242fb91834c66c 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
@@ -805,7 +805,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -805,7 +805,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -129,7 +129,7 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78
+} +}
\ No newline at end of file \ No newline at end of file
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 bfc7a1c234b5fe4aa58b48c3673f473d26561077..4ffaf36b40b32be25bd1944d8b8ddbc342256947 100644 index 0856d7389f9fec20885ee38bac242fb91834c66c..6007121ca9791bfc8e68b0354ad9005a7369d389 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
@@ -97,6 +97,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -97,6 +97,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -380,10 +380,10 @@ index 9db0056ab94145819628b3ad8d8d26130d117fcf..680410d8404a6d3b0ac91aa5fc4cd9d7
public static void sneaky(@NotNull Throwable exception) { public static void sneaky(@NotNull Throwable exception) {
diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
index 2a2651299e8dc631938ba4b4078dc694764d784c..62fafc206e7f1d8fdc0b0dfa2c1c6f1d280f4f5e 100644 index a736d7bcdc5861a01b66ba36158db1c716339346..4825c9ca2191d3bf1440b986827fc32e230a3280 100644
--- a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java --- a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java +++ b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java
@@ -3,6 +3,9 @@ package com.destroystokyo.paper.util; @@ -5,6 +5,9 @@ import net.kyori.adventure.text.format.NamedTextColor;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
@ -393,9 +393,9 @@ index 2a2651299e8dc631938ba4b4078dc694764d784c..62fafc206e7f1d8fdc0b0dfa2c1c6f1d
public interface VersionFetcher { public interface VersionFetcher {
/** /**
* Amount of time to cache results for in milliseconds * Amount of time to cache results for in milliseconds
@@ -25,6 +28,9 @@ public interface VersionFetcher { @@ -26,6 +29,9 @@ public interface VersionFetcher {
@NotNull @NotNull
String getVersionMessage(@NotNull String serverVersion); Component getVersionMessage(@NotNull String serverVersion);
+ /** + /**
+ * Dummy version fetcher + * Dummy version fetcher

View File

@ -5,7 +5,7 @@ Subject: [PATCH] AFK API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index cc2127b26e41182c14fa95afde878e9b5100a117..7cacaae4ec8b09d12d35f0f22c0e9ec5a48d46a4 100644 index f034977f4666385d6e7c7288e453d058c270be01..390aae2733e397ac5c6c457c76bf75f9c8dcd873 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -84,6 +84,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -84,6 +84,15 @@ public abstract class EntityHuman extends EntityLiving {
@ -25,10 +25,10 @@ index cc2127b26e41182c14fa95afde878e9b5100a117..7cacaae4ec8b09d12d35f0f22c0e9ec5
super(EntityTypes.PLAYER, world); super(EntityTypes.PLAYER, world);
this.bL = ItemStack.b; this.bL = ItemStack.b;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index cf14b83ec3c2b9a2812f50f3bca991e029bf7c67..5affcd13a9376e68ddeba467c4ed07b6002fdee8 100644 index f40c24b6e2f7bea21d1cb2b58ed3da45ffcfc866..9315a9f157de3a549c419f8193dc7896a098b472 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1929,8 +1929,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1940,8 +1940,54 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void resetIdleTimer() { public void resetIdleTimer() {
this.ca = SystemUtils.getMonotonicMillis(); this.ca = SystemUtils.getMonotonicMillis();
@ -193,7 +193,7 @@ index 9146b60cff0aa06e2f6b6003bfe9e2be9d2f0d56..bba8dc8fd10dc34179ca3c8cf471fbb3
if (from.getX() != Double.MAX_VALUE) { if (from.getX() != Double.MAX_VALUE) {
Location oldTo = to.clone(); Location oldTo = to.clone();
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 d2b50cdc43c737d9fdfdcd7838de24cbca2017e4..9759e5cba57d14c15f78f12985a516131800d004 100644 index 9c77be805eb71c409a5d41c2730338583527e447..d8e39d29a792bf8a65884f18743befe29a86791e 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
@@ -887,7 +887,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -887,7 +887,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Player invulnerabilities
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 5affcd13a9376e68ddeba467c4ed07b6002fdee8..633a33e19e41c56369bc18f7af5c91a5b69be3b7 100644 index 9315a9f157de3a549c419f8193dc7896a098b472..abe8670ec7b0ef4a93418a5e9cf23a1a536cbc96 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -154,6 +154,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -154,6 +154,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -47,7 +47,7 @@ index 5affcd13a9376e68ddeba467c4ed07b6002fdee8..633a33e19e41c56369bc18f7af5c91a5
return this; return this;
} }
} }
@@ -2347,9 +2356,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -2358,9 +2367,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override @Override
public boolean isFrozen() { // Paper - protected > public public boolean isFrozen() { // Paper - protected > public

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Zombie horse naturally spawn
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 9759e5cba57d14c15f78f12985a516131800d004..76058d466cf256298ea6439fffbd8d661c159f58 100644 index d8e39d29a792bf8a65884f18743befe29a86791e..428f43a37d5aa6e0bf363baeef02b0fa01951590 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
@@ -1101,12 +1101,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1101,12 +1101,18 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Signs allow color codes
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 633a33e19e41c56369bc18f7af5c91a5b69be3b7..0c384641dd840b3b04b93d2e33df7d75293d9351 100644 index abe8670ec7b0ef4a93418a5e9cf23a1a536cbc96..cdc559a8330d804a269f942f5bcba84ab9ea4289 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1449,6 +1449,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1449,6 +1449,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -106,7 +106,7 @@ index be859a1b41254b299a507d03e453dc8efee6f3dd..4de2877f30a9b231a5c8bbd173941699
this.move(EnumMoveType.SELF, this.getMot()); this.move(EnumMoveType.SELF, this.getMot());
if (!this.onGround) { if (!this.onGround) {
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 0c384641dd840b3b04b93d2e33df7d75293d9351..64de6be4f9e740a2a036b202789be0a28b175575 100644 index cdc559a8330d804a269f942f5bcba84ab9ea4289..320719bcc43b69a4dcca53d431a1eb4af0034c71 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1002,6 +1002,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1002,6 +1002,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Players should not cram to death
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 64de6be4f9e740a2a036b202789be0a28b175575..a609d62b6ad8b3be8fc6ae85dc3b1bcc0513a121 100644 index 320719bcc43b69a4dcca53d431a1eb4af0034c71..572a2546acb6decc9fabfc77a2073bab3e0f5abf 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1426,7 +1426,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1426,7 +1426,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add player death exp control options
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 7cacaae4ec8b09d12d35f0f22c0e9ec5a48d46a4..10365180f518042d56929d0c0061e5297b73cf9b 100644 index 390aae2733e397ac5c6c457c76bf75f9c8dcd873..ab2ad054ce8d896e38ab4eb6ed38d8ea73d42954 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -85,6 +85,8 @@ public abstract class EntityHuman extends EntityLiving { @@ -85,6 +85,8 @@ public abstract class EntityHuman extends EntityLiving {
@ -17,7 +17,7 @@ index 7cacaae4ec8b09d12d35f0f22c0e9ec5a48d46a4..10365180f518042d56929d0c0061e529
public void setAfk(boolean setAfk){ public void setAfk(boolean setAfk){
} }
@@ -1710,9 +1712,18 @@ public abstract class EntityHuman extends EntityLiving { @@ -1716,9 +1718,18 @@ public abstract class EntityHuman extends EntityLiving {
@Override @Override
protected int getExpValue(EntityHuman entityhuman) { protected int getExpValue(EntityHuman entityhuman) {
if (!this.world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY) && !this.isSpectator()) { if (!this.world.getGameRules().getBoolean(GameRules.KEEP_INVENTORY) && !this.isSpectator()) {

View File

@ -17,10 +17,10 @@ index 8bc0fb58ef18ce7828451857a97460bbde567c6b..a8cd7f0abf58e69d276e469bd7d5ef6a
} }
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index a609d62b6ad8b3be8fc6ae85dc3b1bcc0513a121..3f071154ad6b44f9fc9791addd7605bf0860d9a6 100644 index 572a2546acb6decc9fabfc77a2073bab3e0f5abf..6052643bbe1ee12bcf98126e36fc09bd2593dfa6 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -2414,4 +2414,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -2425,4 +2425,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return (CraftPlayer) super.getBukkitEntity(); return (CraftPlayer) super.getBukkitEntity();
} }
// CraftBukkit end // CraftBukkit end

View File

@ -22,7 +22,7 @@ index 829d4a7508e1656dbdc912096b7eafcf30cbb5b2..6aea156d7c7a9ca8a357aad6a6781d72
} }
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 76058d466cf256298ea6439fffbd8d661c159f58..dc15d19fb75cd0988235ce193ac7f03c35d713c7 100644 index 428f43a37d5aa6e0bf363baeef02b0fa01951590..59301aad8c257758cb0fe9709901847925d60be4 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
@@ -418,14 +418,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -418,14 +418,14 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -2125,10 +2125,10 @@ index 0e98173607c810e0e74552a2ba8febf292357c39..559ba50977147b8e2a0e7c1e7dc281fa
+ protected void eV() { if (world.purpurConfig.zombieHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur + protected void eV() { if (world.purpurConfig.zombieHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur
} }
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 10365180f518042d56929d0c0061e5297b73cf9b..9266a37f66337a6051c8472934e2e396e1131736 100644 index ab2ad054ce8d896e38ab4eb6ed38d8ea73d42954..3a7dc584bd2b88415a238f9c0cb7f85968fb8dfb 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -2149,4 +2149,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -2155,4 +2155,15 @@ public abstract class EntityHuman extends EntityLiving {
return this.g; return this.g;
} }
} }
@ -3194,7 +3194,7 @@ index a3a428da99574c485fcf2b8c7944e0d8354146ee..cf7de0127166f6175a6246062c8664e6
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true));
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false));
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 3f071154ad6b44f9fc9791addd7605bf0860d9a6..71f37abf27edb79b81dfb7651674fc84698e3f23 100644 index 6052643bbe1ee12bcf98126e36fc09bd2593dfa6..dbc7ca05503dd3de6d4ffe50433d9f2284016191 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -512,6 +512,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -512,6 +512,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -5015,7 +5015,7 @@ index d3b3b771640a46ce9a898f645cf50007e25ae7c2..34e5f8b3bf1b0045856ec0d06ec6d62d
// Purpur end // Purpur end
} }
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 dc15d19fb75cd0988235ce193ac7f03c35d713c7..9163ee821cc91f6ceb317fb4914e0394564a821b 100644 index 59301aad8c257758cb0fe9709901847925d60be4..33b41dc393e302c114f2ea69e789505b7ec77935 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
@@ -102,6 +102,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -102,6 +102,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -42,7 +42,7 @@ index 34e5f8b3bf1b0045856ec0d06ec6d62d0b976862..d72580deaa50617b5b6a991777f4b36c
this.generator = gen; this.generator = gen;
this.world = new CraftWorld((WorldServer) this, gen, env); this.world = new CraftWorld((WorldServer) this, gen, env);
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 9163ee821cc91f6ceb317fb4914e0394564a821b..ae3ec2eca3130943536b80bd1296eba67aa08e3c 100644 index 33b41dc393e302c114f2ea69e789505b7ec77935..adc6420b63730929de491cb0a57d898ef02bb7e8 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
@@ -436,7 +436,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -436,7 +436,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -18,7 +18,7 @@ index 1b9b43ee696575d986c25cafec07d863acb951a7..e837db171545ceacbc84a2b360cf0d95
public PacketPlayOutUpdateTime() {} public PacketPlayOutUpdateTime() {}
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 ae3ec2eca3130943536b80bd1296eba67aa08e3c..5d92398369862881d997c270671ddb6b78ed2cb4 100644 index adc6420b63730929de491cb0a57d898ef02bb7e8..2c73ddae3df32eea175fb1779104441b49796939 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
@@ -94,6 +94,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -94,6 +94,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add tablist suffix option for afk
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 71f37abf27edb79b81dfb7651674fc84698e3f23..ee91832c0e2cad32c5bfe1baad2aeab9228535c0 100644 index dbc7ca05503dd3de6d4ffe50433d9f2284016191..6071e5f141c04813d0f8af07d82d80bec7f0c194 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1980,7 +1980,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1991,7 +1991,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} }
if (world.purpurConfig.idleTimeoutUpdateTabList) { if (world.purpurConfig.idleTimeoutUpdateTabList) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add critical hit check to EntityDamagedByEntityEvent
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 9266a37f66337a6051c8472934e2e396e1131736..4e55f64f8da344bdd5fe142f87cc6ea129bdeabe 100644 index 3a7dc584bd2b88415a238f9c0cb7f85968fb8dfb..7ce46b53ad9fbaf7baf198557565b2467ab43c09 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -73,6 +73,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -73,6 +73,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -16,7 +16,7 @@ index 9266a37f66337a6051c8472934e2e396e1131736..4e55f64f8da344bdd5fe142f87cc6ea1
// CraftBukkit start // CraftBukkit start
public boolean fauxSleeping; public boolean fauxSleeping;
@@ -1060,6 +1061,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -1066,6 +1067,7 @@ public abstract class EntityHuman extends EntityLiving {
flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting(); flag2 = flag2 && !this.isSprinting();
if (flag2) { if (flag2) {
@ -24,7 +24,7 @@ index 9266a37f66337a6051c8472934e2e396e1131736..4e55f64f8da344bdd5fe142f87cc6ea1
f *= 1.5F; f *= 1.5F;
} }
@@ -1096,6 +1098,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -1102,6 +1104,7 @@ public abstract class EntityHuman extends EntityLiving {
Vec3D vec3d = entity.getMot(); Vec3D vec3d = entity.getMot();
boolean flag5 = entity.damageEntity(DamageSource.playerAttack(this), f); boolean flag5 = entity.damageEntity(DamageSource.playerAttack(this), f);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add boat fall damage config
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index ee91832c0e2cad32c5bfe1baad2aeab9228535c0..0031fef270d36234e1675ccd494a87cf33ad9ed0 100644 index 6071e5f141c04813d0f8af07d82d80bec7f0c194..44a10c656c9b131c8889da81b7999dc492077e58 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1011,7 +1011,16 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1011,7 +1011,16 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Full netherite armor grants fire resistance
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4e55f64f8da344bdd5fe142f87cc6ea129bdeabe..c2e0f449400d7477be6310c8d59efe21a517afb3 100644 index 7ce46b53ad9fbaf7baf198557565b2467ab43c09..5581e9f1b8656bd2ee0dd338ffd17ac8297df94f 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -236,6 +236,16 @@ public abstract class EntityHuman extends EntityLiving { @@ -236,6 +236,16 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -25,7 +25,7 @@ index 85ffb2e72dbf08604c004732f17aee9ec7e1ff9d..49a1447bae91294a23ccab27c2809bea
this.inPortal = true; this.inPortal = true;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 0031fef270d36234e1675ccd494a87cf33ad9ed0..912952ff7c50b416bddd63469a592cf563e8a2cd 100644 index 44a10c656c9b131c8889da81b7999dc492077e58..ac9238e1de65efe9fea7d9e623478c61066e8d68 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1161,6 +1161,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1161,6 +1161,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Config to ignore nearby mobs when sleeping
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 912952ff7c50b416bddd63469a592cf563e8a2cd..bf81977bfef4ddfed10f4bf4422e230d67e8199f 100644 index ac9238e1de65efe9fea7d9e623478c61066e8d68..93bca6a52dd01d9ad524a03d90c7ec79d00d2c56 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1311,7 +1311,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1311,7 +1311,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -2408,7 +2408,7 @@ index 904c6a7d0a36b57bb4f693fc4fd0dd5b17adcbac..b03865a932d341ae2fdad6c9447979fa
// Paper start - raise IO/load priority if priority changes, use our preferred priority // Paper start - raise IO/load priority if priority changes, use our preferred priority
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 00d0a5fd7c5d2db19756f3c6cfb2381868af51fd..2630de4a807062f1c455352801c65567e7e86208 100644 index 00d0a5fd7c5d2db19756f3c6cfb2381868af51fd..2b2920a5602e23dd766ddbbf10b4fed90a1a21bc 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
@@ -278,6 +278,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -278,6 +278,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -2451,7 +2451,7 @@ index 00d0a5fd7c5d2db19756f3c6cfb2381868af51fd..2630de4a807062f1c455352801c65567
} }
this.updatingChunks.put(i, playerchunk); this.updatingChunks.put(i, playerchunk);
@@ -1021,7 +1040,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1021,7 +1040,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (completablefuture1 != completablefuture) { if (completablefuture1 != completablefuture) {
this.a(i, playerchunk); this.a(i, playerchunk);
} else { } else {
@ -2459,18 +2459,22 @@ index 00d0a5fd7c5d2db19756f3c6cfb2381868af51fd..2630de4a807062f1c455352801c65567
+ // Tuinity start + // Tuinity start
+ boolean removed; + boolean removed;
+ if ((removed = this.pendingUnload.remove(i, playerchunk)) && ichunkaccess != null) { // Tuinity end + if ((removed = this.pendingUnload.remove(i, playerchunk)) && ichunkaccess != null) { // Tuinity end
+ this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity
if (ichunkaccess instanceof Chunk) { if (ichunkaccess instanceof Chunk) {
((Chunk) ichunkaccess).setLoaded(false); ((Chunk) ichunkaccess).setLoaded(false);
} }
@@ -1045,6 +1066,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1044,7 +1066,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.lightEngine.a(ichunkaccess.getPos());
this.lightEngine.queueUpdate(); this.lightEngine.queueUpdate();
this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null); this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null);
} - }
+ if (removed) this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity + } else if (removed) { // Tuinity start
+ this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z);
+ } // Tuinity end
} }
}; };
@@ -1711,6 +1733,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1711,6 +1735,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return chunkHolder == null ? null : chunkHolder.getAvailableChunkNow(); return chunkHolder == null ? null : chunkHolder.getAvailableChunkNow();
} }
// Paper end // Paper end

View File

@ -224,7 +224,7 @@ index f2a9396c2ec64c79391782249db7507f12a69a9e..798ebfdcd8e06ffb576964da006e77bd
if (!list.equals(this.p)) { if (!list.equals(this.p)) {
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 2630de4a807062f1c455352801c65567e7e86208..fc1138b3be832231b075151518a2493e1623ddfc 100644 index 2b2920a5602e23dd766ddbbf10b4fed90a1a21bc..bf1a1e7e6fd01b2e600c758f900e5fdb08e74930 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
@@ -201,6 +201,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -201,6 +201,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -259,7 +259,7 @@ index 2630de4a807062f1c455352801c65567e7e86208..fc1138b3be832231b075151518a2493e
if (k > PlayerChunkMap.GOLDEN_TICKET && j > PlayerChunkMap.GOLDEN_TICKET) { if (k > PlayerChunkMap.GOLDEN_TICKET && j > PlayerChunkMap.GOLDEN_TICKET) {
return playerchunk; return playerchunk;
} else { } else {
@@ -1082,6 +1086,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1084,6 +1088,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
} }
protected boolean b() { protected boolean b() {
@ -267,7 +267,7 @@ index 2630de4a807062f1c455352801c65567e7e86208..fc1138b3be832231b075151518a2493e
if (!this.updatingChunksModified) { if (!this.updatingChunksModified) {
return false; return false;
} else { } else {
@@ -1521,6 +1526,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1523,6 +1528,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
} }
public void setViewDistance(int i) { // Paper - public public void setViewDistance(int i) { // Paper - public
@ -275,7 +275,7 @@ index 2630de4a807062f1c455352801c65567e7e86208..fc1138b3be832231b075151518a2493e
int j = MathHelper.clamp(i + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32 int j = MathHelper.clamp(i + 1, 3, 33); // Paper - diff on change, these make the lower view distance limit 2 and the upper 32
if (j != this.viewDistance) { if (j != this.viewDistance) {
@@ -1534,6 +1540,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1536,6 +1542,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Paper start - no-tick view distance // Paper start - no-tick view distance
public final void setNoTickViewDistance(int viewDistance) { public final void setNoTickViewDistance(int viewDistance) {

View File

@ -6,23 +6,23 @@ Subject: [PATCH] Update version fetcher repo
Sets the target github repo to Tuinity in the version checker. Also disables the jenkins build lookups. Sets the target github repo to Tuinity in the version checker. Also disables the jenkins build lookups.
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
index 49a38c6608b652ff48ef4eaca0dd3ccb1ba570e3..255bbd6e48b95c70fad02ba692c64c7579496827 100644 index dc0ea65ab87255fad0d54dfb509300098a0b4864..7063f1da3654b382e26b0093ad5d0ff04a2b38c2 100644
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java --- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
@@ -24,8 +24,8 @@ public class PaperVersionFetcher implements VersionFetcher { @@ -28,8 +28,8 @@ public class PaperVersionFetcher implements VersionFetcher {
@Nonnull @Nonnull
@Override @Override
public String getVersionMessage(@Nonnull String serverVersion) { public Component getVersionMessage(@Nonnull String serverVersion) {
- String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]"); - String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]");
- String updateMessage = getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]); - final Component updateMessage = getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]);
+ String[] parts = serverVersion.substring("git-Tuinity-".length()).split("[-\\s]"); // Tuinity + String[] parts = serverVersion.substring("git-Tuinity-".length()).split("[-\\s]"); // Tuinity
+ String updateMessage = getUpdateStatusMessage("Spottedleaf/Tuinity", GITHUB_BRANCH_NAME, parts[0]); // Tuinity + final Component updateMessage = getUpdateStatusMessage("Spottedleaf/Tuinity", GITHUB_BRANCH_NAME, parts[0]); // Tuinity
String history = getHistory(); final Component history = getHistory();
return history != null ? history + "\n" + updateMessage : updateMessage; return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
@@ -49,13 +49,10 @@ public class PaperVersionFetcher implements VersionFetcher { @@ -53,13 +53,10 @@ public class PaperVersionFetcher implements VersionFetcher {
private static String getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) { private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
int distance; int distance;
- try { - try {
- int jenkinsBuild = Integer.parseInt(versionInfo); - int jenkinsBuild = Integer.parseInt(versionInfo);

View File

@ -7,7 +7,7 @@ Should limit build up of I/O tasks, or at least properly
indicate to server owners that I/O is falling behind indicate to server owners that I/O is falling behind
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 fc1138b3be832231b075151518a2493e1623ddfc..394029b8b2e0e35f7ada9016c53698cc6164eccb 100644 index bf1a1e7e6fd01b2e600c758f900e5fdb08e74930..8b9e3418cdb90227eee149e25c4e208979aaf8fb 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
@@ -994,7 +994,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -994,7 +994,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -28,7 +28,7 @@ index fc1138b3be832231b075151518a2493e1623ddfc..394029b8b2e0e35f7ada9016c53698cc
asyncSaveData, chunk); asyncSaveData, chunk);
chunk.setLastSaved(this.world.getTime()); chunk.setLastSaved(this.world.getTime());
@@ -1656,7 +1656,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1658,7 +1658,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (Thread.currentThread() != com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE) { if (Thread.currentThread() != com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE) {
com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave( com.destroystokyo.paper.io.PaperFileIOThread.Holder.INSTANCE.scheduleSave(
this.world, chunkcoordintpair.x, chunkcoordintpair.z, null, nbttagcompound, this.world, chunkcoordintpair.x, chunkcoordintpair.z, null, nbttagcompound,

View File

@ -35,7 +35,7 @@ index c8c4d4f3d5a0ca6255473f3f256eeb32f18a9984..e1a17abda657c7eb7aee7cd0763bcb48
} catch (Throwable thr) { } catch (Throwable thr) {
if (thr instanceof ThreadDeath) { if (thr instanceof ThreadDeath) {
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 394029b8b2e0e35f7ada9016c53698cc6164eccb..cd8921c41b2e275746fe63e107fcf52fa39c9e9b 100644 index 8b9e3418cdb90227eee149e25c4e208979aaf8fb..b05683f65a51363672779b5aebdce166743218c8 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
@@ -122,31 +122,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -122,31 +122,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

View File

@ -7,10 +7,10 @@ Should bring us back in-line with tracker performance
before the loaded entity list reversion. before the loaded entity list reversion.
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 cd8921c41b2e275746fe63e107fcf52fa39c9e9b..a6f7ae34a30fb3007bee3c8031a950a2a9026178 100644 index b05683f65a51363672779b5aebdce166743218c8..ef7b76d891b28a2769c910933da91df1d3e9d152 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
@@ -2069,22 +2069,25 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -2071,22 +2071,25 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final void processTrackQueue() { private final void processTrackQueue() {
this.world.timings.tracker1.startTiming(); this.world.timings.tracker1.startTiming();
try { try {

View File

@ -74,10 +74,10 @@ index b03865a932d341ae2fdad6c9447979fa9e95fc14..9a321c8a0a357ca1fd47d0c7fe4fe7af
if (chunk != null) { if (chunk != null) {
playerchunkmap.callbackExecutor.execute(() -> { playerchunkmap.callbackExecutor.execute(() -> {
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 a6f7ae34a30fb3007bee3c8031a950a2a9026178..997e0a6e67966645ab386ca050439b1f3dd3177e 100644 index ef7b76d891b28a2769c910933da91df1d3e9d152..d829feb9f17c5412e63b2481af968391f38298d2 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
@@ -1271,7 +1271,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1273,7 +1273,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
} }
// Paper end // Paper end
this.mailboxWorldGen.a(ChunkTaskQueueSorter.a(playerchunk, runnable)); this.mailboxWorldGen.a(ChunkTaskQueueSorter.a(playerchunk, runnable));

View File

@ -20,7 +20,7 @@ index 0e5e7a321dc7066444d92387968a7c41cb3a8470..ce0bb4d228a73d8353d67828529879e1
boolean flag = this.chunkMapDistance.a(this.playerChunkMap); boolean flag = this.chunkMapDistance.a(this.playerChunkMap);
boolean flag1 = this.playerChunkMap.b(); boolean flag1 = this.playerChunkMap.b();
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 997e0a6e67966645ab386ca050439b1f3dd3177e..32c384dad5201987fe2545526efa6551e538e388 100644 index d829feb9f17c5412e63b2481af968391f38298d2..94da0b4cb9a790f866bcd3b11a61ae0c0faa1dc5 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
@@ -776,6 +776,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -776,6 +776,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -53,10 +53,10 @@ index 997e0a6e67966645ab386ca050439b1f3dd3177e..32c384dad5201987fe2545526efa6551
// Tuinity start // Tuinity start
boolean removed; boolean removed;
if ((removed = this.pendingUnload.remove(i, playerchunk)) && ichunkaccess != null) { // Tuinity end if ((removed = this.pendingUnload.remove(i, playerchunk)) && ichunkaccess != null) { // Tuinity end
@@ -1068,6 +1077,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1070,6 +1079,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null); } else if (removed) { // Tuinity start
} this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z);
if (removed) this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity } // Tuinity end
+ } finally { this.unloadingPlayerChunk = unloadingBefore; } // Tuinity - do not allow ticket level changes while unloading chunks + } finally { this.unloadingPlayerChunk = unloadingBefore; } // Tuinity - do not allow ticket level changes while unloading chunks
} }

View File

@ -185,7 +185,7 @@ index 48976b1f07aeb0d588d0856f18b6fd07b2d18e05..a22021766b3bffa4f96d1d4ee546b12e
// Paper end - optimise isOutsideOfRange // Paper end - optimise isOutsideOfRange
// Paper start - optimize chunk status progression without jumping through thread pool // Paper start - optimize chunk status progression without jumping through thread pool
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 32c384dad5201987fe2545526efa6551e538e388..952bae3101323e40da0fb03e962c2d5cbca6d1ca 100644 index 94da0b4cb9a790f866bcd3b11a61ae0c0faa1dc5..2d15a4ea2958c4597269ba50bcd82282ee8e3bf0 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
@@ -196,6 +196,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -196,6 +196,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

View File

@ -7,7 +7,7 @@ The executor returned is finalizable and of course
that causes issues. that causes issues.
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 952bae3101323e40da0fb03e962c2d5cbca6d1ca..1ac744eb0bd90d6ffd57adfdfb1e54d6bb67992a 100644 index 2d15a4ea2958c4597269ba50bcd82282ee8e3bf0..8c4a350d59b20efb3f3c6c19e0ae0b676465de70 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
@@ -341,9 +341,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -341,9 +341,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

View File

@ -5297,10 +5297,10 @@ index a22021766b3bffa4f96d1d4ee546b12e96b5ca58..3127fc9dd87e82243e167862cae83ac8
} }
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 1ac744eb0bd90d6ffd57adfdfb1e54d6bb67992a..a5bc387980b229c61b416fc1f31235a9e65ed4b5 100644 index 8c4a350d59b20efb3f3c6c19e0ae0b676465de70..44c04a0a0c744402edb5f6054919a3c181818c27 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
@@ -1320,6 +1320,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1322,6 +1322,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Tuinity end - force competion on the main thread // Tuinity end - force competion on the main thread
} }

View File

@ -44,7 +44,7 @@ index 55fa3911703f96cf1f97c82b19d8e2d0d220016b..b92ca4a6de01f3f86367fb8dfe3591b0
Vec3D vec3d = new Vec3D(((double) pathpoint.a + this.a.locX()) / 2.0D, ((double) pathpoint.b + this.a.locY()) / 2.0D, ((double) pathpoint.c + this.a.locZ()) / 2.0D); Vec3D vec3d = new Vec3D(((double) pathpoint.a + this.a.locX()) / 2.0D, ((double) pathpoint.b + this.a.locY()) / 2.0D, ((double) pathpoint.c + this.a.locZ()) / 2.0D);
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 a5bc387980b229c61b416fc1f31235a9e65ed4b5..754780b1d15aecd84d725a16b8ea41a498efcb4b 100644 index 44c04a0a0c744402edb5f6054919a3c181818c27..3ef3c05be2241c43bbef096b00c4b68141af3924 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
@@ -295,7 +295,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -295,7 +295,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {

View File

@ -25,7 +25,7 @@ index 13d067f48647dea63ef1bf3a2a3e0868074ba75f..04afd7f285db2f281a038e0be6f557b8
this.a(Long.MAX_VALUE, i, j, flag); this.a(Long.MAX_VALUE, i, j, flag);
} }
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 754780b1d15aecd84d725a16b8ea41a498efcb4b..f9844f3a939c29a635fe56fcb1759c279efb0627 100644 index 3ef3c05be2241c43bbef096b00c4b68141af3924..36418fb2ede9e98c021c5e62150c46d91e5e3e01 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
@@ -842,6 +842,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -842,6 +842,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -45,15 +45,23 @@ index 754780b1d15aecd84d725a16b8ea41a498efcb4b..f9844f3a939c29a635fe56fcb1759c27
protected void unloadChunks(BooleanSupplier booleansupplier) { protected void unloadChunks(BooleanSupplier booleansupplier) {
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler(); GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
@@ -1118,6 +1119,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1095,6 +1096,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
boolean removed;
if ((removed = this.pendingUnload.remove(i, playerchunk)) && ichunkaccess != null) { // Tuinity end
this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity
+ this.getVillagePlace().queueUnload(playerchunk.location.pair(), MinecraftServer.currentTickLong + 1); // Tuinity - unload POI data
if (ichunkaccess instanceof Chunk) {
((Chunk) ichunkaccess).setLoaded(false);
}
@@ -1119,6 +1121,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null); this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null);
} } else if (removed) { // Tuinity start
if (removed) this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z); // Tuinity this.dataRegionManager.removeChunk(playerchunk.location.x, playerchunk.location.z);
+ if (removed) this.getVillagePlace().queueUnload(playerchunk.location.pair(), MinecraftServer.currentTickLong + 1); // Tuinity - unload POI data + this.getVillagePlace().queueUnload(playerchunk.location.pair(), MinecraftServer.currentTickLong + 1); // Tuinity - unload POI data
} // Tuinity end
} finally { this.unloadingPlayerChunk = unloadingBefore; } // Tuinity - do not allow ticket level changes while unloading chunks } finally { this.unloadingPlayerChunk = unloadingBefore; } // Tuinity - do not allow ticket level changes while unloading chunks
} @@ -1212,6 +1215,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1210,6 +1212,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.getVillagePlace().loadInData(chunkcoordintpair, chunkHolder.poiData); this.getVillagePlace().loadInData(chunkcoordintpair, chunkHolder.poiData);
chunkHolder.tasks.forEach(Runnable::run); chunkHolder.tasks.forEach(Runnable::run);

View File

@ -10,10 +10,10 @@ chunk future to complete. We can simply schedule to the immediate
executor to get this effect, rather than the main mailbox. executor to get this effect, rather than the main mailbox.
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 f9844f3a939c29a635fe56fcb1759c279efb0627..3fe03b92658b157d6c7875dcaae6bbd41952ccd5 100644 index 36418fb2ede9e98c021c5e62150c46d91e5e3e01..391b1db2d457daeed0c3276d2e408a86f1f2e866 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
@@ -1498,9 +1498,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1501,9 +1501,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
chunk.B(); chunk.B();
return chunk; return chunk;
}); });

View File

@ -36,10 +36,10 @@ index 50c61b633faaa47a86172315b53899d3747c8e27..2ec48858be8eb2c522c9685b43bd36b3
// Paper end - optimise entity tracking // Paper end - optimise entity tracking
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 3fe03b92658b157d6c7875dcaae6bbd41952ccd5..f9482f19549074e04fc4c1e4d05612a2ea23354c 100644 index 391b1db2d457daeed0c3276d2e408a86f1f2e866..285e976d4a655fb61e70883ae89f974812be7152 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
@@ -2543,7 +2543,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially @@ -2546,7 +2546,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
int j = entity.getEntityType().getChunkRange() * 16; int j = entity.getEntityType().getChunkRange() * 16;
j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper

View File

@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Thu, 11 Mar 2021 02:32:30 -0800
Subject: [PATCH] Do not allow the server to unload chunks at request of
plugins
In general the chunk system is not well suited for this behavior,
especially if it is called during a chunk load. The chunks pushed
to be unloaded will simply be unloaded next tick, rather than
immediately.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 18270d44185b0ec41b9b6e1d2135e7aae3b33261..e26389d8d9ee4fedb32767fce3aed071af412304 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -901,6 +901,7 @@ public class ChunkProviderServer extends IChunkProvider {
// CraftBukkit start - modelled on below
public void purgeUnload() {
+ if (true) return; // Tuinity - tickets will be removed later, this behavior isn't really well accounted for by the chunk system
this.world.getMethodProfiler().enter("purge");
this.chunkMapDistance.purgeTickets();
this.tickDistanceManager();

View File

@ -0,0 +1,68 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Thu, 11 Mar 2021 03:03:32 -0800
Subject: [PATCH] Do not run close logic for inventories on chunk unload
Still call the event and change the active container though. We
want to avoid close logic because it's possible to load the
chunk through it. This should also be OK from a leak prevention/
state desync POV because the TE is getting unloaded anyways.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index cc2127b26e41182c14fa95afde878e9b5100a117..f034977f4666385d6e7c7288e453d058c270be01 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -356,6 +356,12 @@ public abstract class EntityHuman extends EntityLiving {
this.activeContainer = this.defaultContainer;
}
// Paper end
+ // Tuinity start - special close for unloaded inventory
+ public void closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
+ closeInventory();
+ this.activeContainer = this.defaultContainer;
+ }
+ // Tuinity end - special close for unloaded inventory
public void closeInventory() {
this.activeContainer = this.defaultContainer;
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index cf14b83ec3c2b9a2812f50f3bca991e029bf7c67..f40c24b6e2f7bea21d1cb2b58ed3da45ffcfc866 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1588,6 +1588,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId));
this.o();
}
+ // Tuinity start - special close for unloaded inventory
+ public void closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
+ // copied from above
+ CraftEventFactory.handleInventoryCloseEvent(this, reason); // CraftBukkit
+ // Paper end
+ // copied from below
+ this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId));
+ this.activeContainer = this.defaultContainer;
+ // do not run close logic
+ }
+ // Tuinity end - special close for unloaded inventory
public void broadcastCarriedItem() {
if (!this.e) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d2b50cdc43c737d9fdfdcd7838de24cbca2017e4..9c77be805eb71c409a5d41c2730338583527e447 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1792,9 +1792,13 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// Spigot Start
for (TileEntity tileentity : chunk.getTileEntities().values()) {
if (tileentity instanceof IInventory) {
+ // Tuinity start - this area looks like it can load chunks, change the behavior
+ // chests for example can apply physics to the world
+ // so instead we just change the active container and call the event
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) {
- h.closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity)h).getHandle().closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason.UNLOADED); // Paper
}
+ // Tuiniy end
}
}
// Spigot End

View File

@ -159,133 +159,140 @@ index 089ddda8892c3660c5dcb62d0fd56544857a2eba..8ee165d1c752e53601254f734507370b
} }
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java diff --git a/src/main/java/net/pl3x/purpur/PurpurVersionFetcher.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java
new file mode 100644 similarity index 57%
index 0000000000000000000000000000000000000000..2898bfb109c63a93971bd38cc4778da1dc37c445 rename from src/main/java/net/pl3x/purpur/PurpurVersionFetcher.java
--- /dev/null rename to src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java
index d8b408f061d96e2fa8e2e587462e2221aaee80ce..5857bf9fc07ebb51b85bee7c65e65846ae28fca8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurVersionFetcher.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java +++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaVersionFetcher.java
@@ -0,0 +1,123 @@ @@ -1,65 +1,74 @@
-package net.pl3x.purpur;
+package org.yatopiamc.yatopia.server; +package org.yatopiamc.yatopia.server;
+
+import com.destroystokyo.paper.VersionHistoryManager; import com.destroystokyo.paper.VersionHistoryManager;
+import com.google.common.base.Charsets; -import com.destroystokyo.paper.util.VersionFetcher;
+import com.google.common.io.Resources; import com.google.common.base.Charsets;
+import com.google.gson.Gson; import com.google.common.io.Resources;
+import com.google.gson.JsonObject; import com.google.gson.Gson;
+import com.google.gson.JsonSyntaxException; import com.google.gson.JsonObject;
+import java.io.BufferedReader; import com.google.gson.JsonSyntaxException;
+import java.io.IOException; -
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStream; +import java.io.InputStream;
+import java.io.InputStreamReader; import java.io.InputStreamReader;
+import java.net.HttpURLConnection; import java.net.HttpURLConnection;
+import java.net.URL; import java.net.URL;
+import java.net.URLEncoder; +import java.net.URLEncoder;
+import java.util.Arrays; +import java.util.Arrays;
+import java.util.Objects; +import java.util.Objects;
+import java.util.jar.Manifest; +import java.util.jar.Manifest;
+import javax.annotation.Nonnull; +import javax.annotation.Nonnull;
+
-public class PurpurVersionFetcher implements VersionFetcher {
- private static final String JENKINS_URL = "https://ci.pl3x.net/job/Purpur/lastSuccessfulBuild/buildNumber";
- private static final String GITHUB_BRANCH_NAME = "master";
+import com.destroystokyo.paper.util.VersionFetcher; +import com.destroystokyo.paper.util.VersionFetcher;
+import javax.annotation.Nullable; +import javax.annotation.Nullable;
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import net.kyori.adventure.text.TextComponent;
+import net.kyori.adventure.text.format.TextDecoration;
+ +
+public class YatopiaVersionFetcher implements VersionFetcher { +public class YatopiaVersionFetcher implements VersionFetcher {
+
+ @Override @Override
+ public long getCacheTime() { public long getCacheTime() {
- return 720000;
+ return 3600000; + return 3600000;
+ } }
+
+ @Nonnull @Nonnull
+ @Override @Override
+ public String getVersionMessage(@Nonnull String serverVersion) { - public String getVersionMessage(@Nonnull String serverVersion) {
+ if(serverVersion.equals("null")) return "Custom build"; - String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]");
- String updateMessage = getUpdateStatusMessage("pl3xgaming/Purpur", GITHUB_BRANCH_NAME, parts[0]);
- String history = getHistory();
-
- return history != null ? history + "\n" + updateMessage : updateMessage;
+ public Component getVersionMessage(@Nonnull String serverVersion) {
+ if (serverVersion.equals("null")) return Component.text("Custom build");
+ String[] parts = serverVersion.substring("git-Yatopia-".length()).split("[-\\s]"); + String[] parts = serverVersion.substring("git-Yatopia-".length()).split("[-\\s]");
+ String branch = String.join("-", Arrays.copyOfRange(parts, 0, parts.length - 3)); + String branch = String.join("-", Arrays.copyOfRange(parts, 0, parts.length - 3));
+ String version = parts[parts.length - 3]; + String version = parts[parts.length - 3];
+ String updateMessage = getUpdateStatusMessage("YatopiaMC/Yatopia", branch, version); + final Component updateMessage = getUpdateStatusMessage("YatopiaMC/Yatopia", branch, version);
+ String history = getHistory(); + final Component history = getHistory();
+ return history != null ? history + "\n" + updateMessage : updateMessage; + return history != null ? TextComponent.ofChildren(history, Component.newline(), updateMessage) : updateMessage;
+ } }
+
+ private String getUpdateStatusMessage(String repo, String branch, String versionInfo) { - private static String getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
+ int distance; + private Component getUpdateStatusMessage(String repo, String branch, String versionInfo) {
+ try { int distance;
+ int jenkinsBuild = Integer.parseInt(versionInfo); try {
int jenkinsBuild = Integer.parseInt(versionInfo);
- distance = fetchDistanceFromJenkins(jenkinsBuild);
+ distance = fetchDistanceFromJenkins(branch, jenkinsBuild); + distance = fetchDistanceFromJenkins(branch, jenkinsBuild);
+ } catch (NumberFormatException ignored) { } catch (NumberFormatException ignored) {
- versionInfo = versionInfo.replace("\"", "");
- distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo.replace("\"", "")); + distance = fetchDistanceFromGitHub(repo, branch, versionInfo.replace("\"", ""));
+ } }
+
+ switch (distance) { switch (distance) {
+ case -1: case -1:
+ return "Error obtaining version information"; - return "Error obtaining version information";
+ case 0: + return Component.text("Error obtaining version information", NamedTextColor.YELLOW);
+ return "You are running the latest version"; case 0:
+ case -2: - return "You are running the latest version";
+ return "\u00AF\\_(\u30C4)_/\u00AF"; + return Component.text("You are running the latest version", NamedTextColor.GREEN);
+ default: case -2:
+ return "You are " + distance + " version(s) behind"; - return "Unknown version";
+ } + return Component.text("\u00AF\\_(\u30C4)_/\u00AF", NamedTextColor.YELLOW);
+ } default:
+ - return "You are " + distance + " version(s) behind";
+ return Component.text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW);
}
}
- private static int fetchDistanceFromJenkins(int jenkinsBuild) {
+ // modified from PurpurVersionFetcher + // modified from PurpurVersionFetcher
+ private static int fetchDistanceFromJenkins(String branch, int jenkinsBuild) { + private static int fetchDistanceFromJenkins(String branch, int jenkinsBuild) {
+ try { try {
- try (BufferedReader reader = Resources.asCharSource(new URL(JENKINS_URL), Charsets.UTF_8).openBufferedStream()) {
+ try (BufferedReader reader = Resources.asCharSource(new URL("https://ci.codemc.io/job/YatopiaMC/job/Yatopia/job/" + URLEncoder.encode(branch, Charsets.UTF_8.name()) + "/lastStableBuild/buildNumber"), Charsets.UTF_8).openBufferedStream()) { + try (BufferedReader reader = Resources.asCharSource(new URL("https://ci.codemc.io/job/YatopiaMC/job/Yatopia/job/" + URLEncoder.encode(branch, Charsets.UTF_8.name()) + "/lastStableBuild/buildNumber"), Charsets.UTF_8).openBufferedStream()) {
+ return Integer.decode(reader.readLine()) - jenkinsBuild; return Integer.decode(reader.readLine()) - jenkinsBuild;
+ } catch (NumberFormatException ex) { } catch (NumberFormatException ex) {
+ ex.printStackTrace(); ex.printStackTrace();
+ return -2; @@ -72,6 +81,7 @@ public class PurpurVersionFetcher implements VersionFetcher {
+ } }
+ } catch (IOException e) {
+ e.printStackTrace(); // Contributed by Techcable <Techcable@outlook.com> in GH-65
+ return -1;
+ }
+ }
+
+ // Contributed by Techcable <Techcable@outlook.com> in GH-65
+ // from PaperVersionFetcher + // from PaperVersionFetcher
+ private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) { private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) {
+ try { try {
+ HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + branch + "..." + hash).openConnection(); HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + branch + "..." + hash).openConnection();
+ connection.connect(); @@ -98,8 +108,9 @@ public class PurpurVersionFetcher implements VersionFetcher {
+ if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) return -2; // Unknown commit }
+ try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), Charsets.UTF_8))) { }
+ JsonObject obj = new Gson().fromJson(reader, JsonObject.class);
+ String status = obj.get("status").getAsString();
+ switch (status) {
+ case "identical":
+ return 0;
+ case "behind":
+ return obj.get("behind_by").getAsInt();
+ default:
+ return -1;
+ }
+ } catch (JsonSyntaxException | NumberFormatException e) {
+ e.printStackTrace();
+ return -1;
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ return -1;
+ }
+ }
+
+ // from PaperVersionFetcher + // from PaperVersionFetcher
+ @Nullable @Nullable
+ private String getHistory() { - private String getHistory() {
+ final VersionHistoryManager.VersionData data = VersionHistoryManager.INSTANCE.getVersionData(); + private Component getHistory() {
+ if (data == null) { final VersionHistoryManager.VersionData data = VersionHistoryManager.INSTANCE.getVersionData();
+ return null; if (data == null) {
+ } return null;
+ @@ -110,6 +121,7 @@ public class PurpurVersionFetcher implements VersionFetcher {
+ final String oldVersion = data.getOldVersion(); return null;
+ if (oldVersion == null) { }
+ return null;
+ } - return "Previous version: " + oldVersion;
+ + return Component.text("Previous version: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC);
+ return "Previous version: " + oldVersion; }
+ } -}
+ +
+} +}
\ No newline at end of file \ No newline at end of file

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Optimize TileEntity load/unload
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 4ffaf36b40b32be25bd1944d8b8ddbc342256947..64195edf7c277d581be4d726675b09bd4a263793 100644 index 6007121ca9791bfc8e68b0354ad9005a7369d389..e6fb68f6e279eb1006f420c37fa408a0cf1fa0f3 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
@@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Optimize some stuff in WorldServer ticking
Replaced some streams and some array lists with glue lists Replaced some streams and some array lists with glue lists
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 d4672e7fa899a39bae2d9179472b22db28a58f19..cca6b3585485162e8158e43dee4f8b45d4e30bea 100644 index fe6611e480c18e97061268690d067a811b13bb1b..68fda6e73db23cc8fb10501b2d84f229ea5afc7f 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
@@ -885,12 +885,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -885,12 +885,21 @@ public class WorldServer extends World implements GeneratorAccessSeed {
@ -48,7 +48,7 @@ index d4672e7fa899a39bae2d9179472b22db28a58f19..cca6b3585485162e8158e43dee4f8b45
long l = this.worldData.getDayTime() + 24000L; long l = this.worldData.getDayTime() + 24000L;
TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (l - l % 24000L) - this.getDayTime()); TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (l - l % 24000L) - this.getDayTime());
if (this.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) { if (this.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) {
@@ -1135,9 +1142,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1114,9 +1121,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
private void wakeupPlayers() { private void wakeupPlayers() {
@ -60,7 +60,7 @@ index d4672e7fa899a39bae2d9179472b22db28a58f19..cca6b3585485162e8158e43dee4f8b45
} }
// Paper start - optimise random block ticking // Paper start - optimise random block ticking
@@ -1930,8 +1937,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1908,8 +1915,9 @@ public class WorldServer extends World implements GeneratorAccessSeed {
// Spigot start // Spigot start
if ( entity instanceof EntityHuman ) if ( entity instanceof EntityHuman )
{ {
@ -71,7 +71,7 @@ index d4672e7fa899a39bae2d9179472b22db28a58f19..cca6b3585485162e8158e43dee4f8b45
for (Object o : worldData.data.values() ) for (Object o : worldData.data.values() )
{ {
if ( o instanceof WorldMap ) if ( o instanceof WorldMap )
@@ -1948,7 +1956,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1926,7 +1934,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
} }
} }

View File

@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..e647624f4c9afe8bc603792ad88c807e
+ } + }
+} +}
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 f38382cc681f03d9a6a0efa85f045e3770398739..97b0aee82e080a1225454317cbf0191ef8b14fca 100644 index bc61aaff65a7dc1e7534452b285953b83adb7000..7fddef0afbcf1f9f391c540b8fce1bebf8faa452 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
@@ -341,6 +341,16 @@ public class BlockPosition extends BaseBlockPosition { @@ -341,6 +341,16 @@ public class BlockPosition extends BaseBlockPosition {

View File

@ -17,7 +17,7 @@ index 8724ad342bec7c733b3c825bd62dbfa5c28c06dd..9907047028b754fe0e314a7d5c5238ce
return this.getBlock().a(tag); return this.getBlock().a(tag);
} }
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 97b0aee82e080a1225454317cbf0191ef8b14fca..c4dd89d9bae1960d25b64e2a715a83adde65719a 100644 index 7fddef0afbcf1f9f391c540b8fce1bebf8faa452..f13b4e6ec815792c2f2b49193707da94df427424 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
@@ -318,7 +318,15 @@ public class BlockPosition extends BaseBlockPosition { @@ -318,7 +318,15 @@ public class BlockPosition extends BaseBlockPosition {

View File

@ -18,10 +18,10 @@ index b2f51a6786d4bb92c9cbbceeea812375b1a49bd6..d16157dcbc6f36fa0c8284784641e544
return this.size == 0 && this.pendingTasks.isEmpty(); return this.size == 0 && this.pendingTasks.isEmpty();
} }
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 cca6b3585485162e8158e43dee4f8b45d4e30bea..68fbbcac7b6b2f24a42c3a63825f940e52f6f51a 100644 index 68fda6e73db23cc8fb10501b2d84f229ea5afc7f..426496ce2f08fc6c7d713267f735964f04eb22f1 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
@@ -1916,6 +1916,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -1894,6 +1894,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
} }
// Paper end // Paper end

View File

@ -111,7 +111,7 @@ index 893d2c1c74ed28dcdb83b71762ccdcbfd50a8f9d..107091a4cae0e4eaba93f69ae91239ab
private static int b(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException { private static int b(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index c2e0f449400d7477be6310c8d59efe21a517afb3..4e95e542fa79a0cf548a939e575ecca55021229a 100644 index 5581e9f1b8656bd2ee0dd338ffd17ac8297df94f..f506a11a1f5774488eebd13fa80cd6eb090f7446 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -78,6 +78,7 @@ public abstract class EntityHuman extends EntityLiving { @@ -78,6 +78,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -122,7 +122,7 @@ index c2e0f449400d7477be6310c8d59efe21a517afb3..4e95e542fa79a0cf548a939e575ecca5
@Override @Override
public CraftHumanEntity getBukkitEntity() { public CraftHumanEntity getBukkitEntity() {
@@ -1917,6 +1918,15 @@ public abstract class EntityHuman extends EntityLiving { @@ -1923,6 +1924,15 @@ public abstract class EntityHuman extends EntityLiving {
return this.getProfile().getName(); return this.getProfile().getName();
} }

View File

@ -6,10 +6,10 @@ Subject: [PATCH] PlayerAttackEntityEvent
Added per request Added per request
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4e95e542fa79a0cf548a939e575ecca55021229a..124802af04f06dfb90d46960975cdad422088dc4 100644 index f506a11a1f5774488eebd13fa80cd6eb090f7446..15a2065abf7c187a9b92bd743240085e2a61a906 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1071,12 +1071,50 @@ public abstract class EntityHuman extends EntityLiving { @@ -1077,12 +1077,50 @@ public abstract class EntityHuman extends EntityLiving {
flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting(); flag2 = flag2 && !this.isSprinting();

View File

@ -8,7 +8,7 @@ In vanilla, statistics that count time spent for an action (i.e. time played or
With an interval of 20, this patch saves roughly 3ms per tick on a server w/ 80 players online. With an interval of 20, this patch saves roughly 3ms per tick on a server w/ 80 players online.
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 124802af04f06dfb90d46960975cdad422088dc4..9452eae41bbad0305b3d66ce2fe20667effd2bdf 100644 index 15a2065abf7c187a9b92bd743240085e2a61a906..1730108aa67802ed15407c45542b6223ca86634f 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -175,18 +175,23 @@ public abstract class EntityHuman extends EntityLiving { @@ -175,18 +175,23 @@ public abstract class EntityHuman extends EntityLiving {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable criterion triggers
This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy. This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy.
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4c42d7fb44e2c82f516e37556b7c20e7380c7f13..a2aa223a3487338591b5135ae6907b6892a87fcb 100644 index d6c6a389cf214f2f8cbb343fc8106ab7d0845950..ee27b814e0ae4eb9867df7fef31671fb23193cb7 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -439,6 +439,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -439,6 +439,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

View File

@ -108,7 +108,7 @@ index 0668d383db1f3a81d1053954d72678c7ac5aecec..7b9f83e63d0f9cd83a246be33af4ab91
ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error"); ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
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 64195edf7c277d581be4d726675b09bd4a263793..bdc85c5026b9d5fe50e709cf6d5c8eb8d5f3653b 100644 index e6fb68f6e279eb1006f420c37fa408a0cf1fa0f3..55238930d8352ccedb963389461f119cd813aff9 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
@@ -1019,6 +1019,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -1019,6 +1019,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

@ -1 +1 @@
Subproject commit f87cb795f6504a7958f2400a456eeb256145d3de Subproject commit 19ac6608f3035459bfbad0059f342d719c9050a3

View File

@ -1 +1 @@
f87cb795f6504a7958f2400a456eeb256145d3de 19ac6608f3035459bfbad0059f342d719c9050a3

View File

@ -1,4 +1,4 @@
name=Airplane name=Airplane
useBlackList=True useBlackList=True
list=server/Airplane-Branding-Changes.patch,server/Disable-Paper-timings-by-default.patch,server/Only-check-for-spooky-season-once-an-hour.patch list=server/Airplane-Branding-Changes.patch,server/Disable-Paper-timings-by-default.patch,server/Only-check-for-spooky-season-once-an-hour.patch,server/Reduce-memory-allocations.patch
branch=origin/master branch=origin/master