Archiviert
13
0

[ci skip] Cleanup Timings v2 diff (#6523)

Dieser Commit ist enthalten in:
Jason 2021-08-30 02:02:24 -05:00 committet von GitHub
Ursprung cf27619809
Commit 6e9f38ea91
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
19 geänderte Dateien mit 107 neuen und 135 gelöschten Zeilen

Datei anzeigen

@ -1049,7 +1049,7 @@ index fac993d58bd6e3bb19fd69881092a863c8952c65..2b062beaad39f2e86801fdd5b0cc84b2
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 2b62f4664f439808661d559dc99762bfbac09b16..4788946d7fb25c1b0f26e6a038924c4a62978d53 100644
index 2b62f4664f439808661d559dc99762bfbac09b16..d5067a9a4931e0bf267dbacc925bef80df1d64cc 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,7 +1,9 @@
@ -1113,7 +1113,7 @@ index 2b62f4664f439808661d559dc99762bfbac09b16..4788946d7fb25c1b0f26e6a038924c4a
for (objectiterator = this.entityMap.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.serverEntity.sendChanges()) {
playerchunkmap_entitytracker = (ChunkMap.TrackedEntity) objectiterator.next();
@@ -1206,16 +1214,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1206,14 +1214,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.lastSectionPos = sectionposition1;
}
}
@ -1130,10 +1130,7 @@ index 2b62f4664f439808661d559dc99762bfbac09b16..4788946d7fb25c1b0f26e6a038924c4a
+ level.timings.tracker2.stopTiming(); // Paper
}
+
}
public void broadcast(Entity entity, Packet<?> packet) {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 48c876381d75c66f24d59bd2c415dd7de293afee..e11b4be6e6990101ce77b6349ab8c70453e835a5 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@ -1240,7 +1237,7 @@ index 48c876381d75c66f24d59bd2c415dd7de293afee..e11b4be6e6990101ce77b6349ab8c704
private void getFullChunk(long pos, Consumer<LevelChunk> chunkConsumer) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index f9fde3155944bb44ecb14524c585ed8eb9eac78c..0db1607dc6bbf0def58bdc14fca33dbaa48a8e40 100644
index f9fde3155944bb44ecb14524c585ed8eb9eac78c..e8184b64a0a8807f898deffc913adfd3a54d79fc 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,6 +1,8 @@
@ -1308,16 +1305,15 @@ index f9fde3155944bb44ecb14524c585ed8eb9eac78c..0db1607dc6bbf0def58bdc14fca33dba
if (randomTickSpeed > 0) {
LevelChunkSection[] achunksection = chunk.getSections();
int l = achunksection.length;
@@ -629,7 +635,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -630,6 +636,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
}
-
+ timings.chunkTicksBlocks.stopTiming(); // Paper
gameprofilerfiller.pop();
}
@@ -755,14 +761,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -755,14 +762,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public void tickNonPassenger(Entity entity) {
@ -1341,12 +1337,11 @@ index f9fde3155944bb44ecb14524c585ed8eb9eac78c..0db1607dc6bbf0def58bdc14fca33dba
entity.setOldPosAndRot();
ProfilerFiller gameprofilerfiller = this.getProfiler();
@@ -781,7 +795,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -781,7 +796,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(entity, entity1);
}
- entity.tickTimer.stopTiming(); // Spigot
+
+ } finally { timer.stopTiming(); } // Paper - timings
}
@ -1486,32 +1481,25 @@ index 89ed84d2e3ac8f25785a2d39b4fd37e50497e49e..96f8a886f348c1e18b4b1b97579ea44d
protected void tryCheckInsideBlocks() {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 7f3d83d3d071f6b441ad119b1c93be035e911e70..8d5c61a77bea2f2f5dbff26cb479f855945f9541 100644
index 7f3d83d3d071f6b441ad119b1c93be035e911e70..28f1a53a2b9ebe9948509dabbf1a4ae84d8e147c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -294,17 +294,29 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -294,7 +294,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
return Registry.ENTITY_TYPE.getOptional(ResourceLocation.tryParse(id));
}
- public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval) {
- this.factory = factory;
- this.category = spawnGroup;
- this.canSpawnFarFromPlayer = spawnableFarFromPlayer;
- this.serialize = saveable;
- this.summon = summonable;
- this.fireImmune = fireImmune;
+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval) { this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, maxTrackDistance, trackTickInterval, "custom"); } // Paper - old signature
+
+ // Paper start - add id
+ public final String id;
+
+ public EntityType(EntityType.EntityFactory<T> entitytypes_b, MobCategory enumcreaturetype, boolean flag, boolean flag1, boolean flag2, boolean flag3, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, String id) { // Paper - add id
+ this.factory = entitytypes_b;
+ this.category = enumcreaturetype;
+ this.canSpawnFarFromPlayer = flag3;
+ this.serialize = flag;
+ this.summon = flag1;
+ this.fireImmune = flag2;
this.immuneTo = canSpawnInside;
public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval) {
+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, maxTrackDistance, trackTickInterval, "custom");
+ }
+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, int maxTrackDistance, int trackTickInterval, String id) {
+ // Paper end
this.factory = factory;
this.category = spawnGroup;
this.canSpawnFarFromPlayer = spawnableFarFromPlayer;
@@ -305,6 +312,14 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
this.dimensions = dimensions;
this.clientTrackingRange = maxTrackDistance;
this.updateInterval = trackTickInterval;
@ -1526,7 +1514,7 @@ index 7f3d83d3d071f6b441ad119b1c93be035e911e70..8d5c61a77bea2f2f5dbff26cb479f855
}
@Nullable
@@ -567,6 +579,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -567,6 +582,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
return this.updateInterval;
}
@ -1539,7 +1527,7 @@ index 7f3d83d3d071f6b441ad119b1c93be035e911e70..8d5c61a77bea2f2f5dbff26cb479f855
public boolean trackDeltas() {
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
}
@@ -659,7 +677,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -659,7 +680,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
Util.fetchChoiceType(References.ENTITY_TREE, id);
}
@ -1674,33 +1662,26 @@ index 03b87448628f41699336245cbf0f882d3fe20f7e..64bf654a622e2b5e79c45d288c812e32
CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
diff --git a/src/main/java/net/minecraft/world/level/ServerTickList.java b/src/main/java/net/minecraft/world/level/ServerTickList.java
index 0be0c9a9f29f29e2622df49861d30a7edbaf0515..702203f4a4fa4fc03c35ec974a97e08ed0f3c67c 100644
index 0be0c9a9f29f29e2622df49861d30a7edbaf0515..bcce5f1f8940e6fb8f398afd540bcbe2286ed0c2 100644
--- a/src/main/java/net/minecraft/world/level/ServerTickList.java
+++ b/src/main/java/net/minecraft/world/level/ServerTickList.java
@@ -37,12 +37,17 @@ public class ServerTickList<T> implements TickList<T> {
@@ -37,7 +37,14 @@ public class ServerTickList<T> implements TickList<T> {
private final List<TickNextTickData<T>> alreadyTicked = Lists.newArrayList();
private final Consumer<TickNextTickData<T>> ticker;
- public ServerTickList(ServerLevel world, Predicate<T> invalidObjPredicate, Function<T, ResourceLocation> idToName, Consumer<TickNextTickData<T>> tickConsumer) {
- this.ignore = invalidObjPredicate;
- this.toId = idToName;
- this.level = world;
- this.ticker = tickConsumer;
+ public ServerTickList(ServerLevel worldserver, Predicate<T> predicate, Function<T, ResourceLocation> function, Consumer<TickNextTickData<T>> consumer, String timingsType) {
+ this.ignore = predicate;
+ this.toId = function;
+ this.level = worldserver;
+ this.ticker = consumer;
+ this.timingCleanup = co.aikar.timings.WorldTimingsHandler.getTickList(worldserver, timingsType + " - Cleanup");
+ this.timingTicking = co.aikar.timings.WorldTimingsHandler.getTickList(worldserver, timingsType + " - Ticking");
}
+ // Paper start - timings
+ private final co.aikar.timings.Timing timingCleanup; // Paper
+ private final co.aikar.timings.Timing timingTicking; // Paper
+
+ public ServerTickList(ServerLevel world, Predicate<T> invalidObjPredicate, Function<T, ResourceLocation> idToName, Consumer<TickNextTickData<T>> tickConsumer, String timingsType) {
+ this.timingCleanup = co.aikar.timings.WorldTimingsHandler.getTickList(world, timingsType + " - Cleanup");
+ this.timingTicking = co.aikar.timings.WorldTimingsHandler.getTickList(world, timingsType + " - Ticking");
+ // Paper end
public void tick() {
int i = this.tickNextTickList.size();
@@ -64,6 +69,7 @@ public class ServerTickList<T> implements TickList<T> {
this.ignore = invalidObjPredicate;
this.toId = idToName;
this.level = world;
@@ -64,6 +71,7 @@ public class ServerTickList<T> implements TickList<T> {
this.level.getProfiler().push("cleaning");
@ -1708,7 +1689,7 @@ index 0be0c9a9f29f29e2622df49861d30a7edbaf0515..702203f4a4fa4fc03c35ec974a97e08e
TickNextTickData nextticklistentry;
while (i > 0 && iterator.hasNext()) {
@@ -79,7 +85,9 @@ public class ServerTickList<T> implements TickList<T> {
@@ -79,7 +87,9 @@ public class ServerTickList<T> implements TickList<T> {
--i;
}
}
@ -1718,7 +1699,7 @@ index 0be0c9a9f29f29e2622df49861d30a7edbaf0515..702203f4a4fa4fc03c35ec974a97e08e
this.level.getProfiler().popPush("ticking");
while ((nextticklistentry = (TickNextTickData) this.currentlyTicking.poll()) != null) {
@@ -99,6 +107,7 @@ public class ServerTickList<T> implements TickList<T> {
@@ -99,6 +109,7 @@ public class ServerTickList<T> implements TickList<T> {
}
}
@ -1785,18 +1766,10 @@ index e9a04017df42312e4e0e7e414c9ccc95c71ddae1..4a13b18ce609fc6a86da48b0673ccf9d
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index b645a2fc839dbf922ce73b23b7d53e9a5fe1a2ee..1b478ebfe6792a157772a5812d0daa1a3ccc4776 100644
index b645a2fc839dbf922ce73b23b7d53e9a5fe1a2ee..03190535999d30aea0428631ae576b18f5d10eb7 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -1,5 +1,7 @@
package net.minecraft.world.level.chunk.storage;
+
+import co.aikar.timings.Timings;
import com.google.common.collect.Maps;
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
import it.unimi.dsi.fastutil.longs.LongSet;
@@ -433,7 +435,6 @@ public class ChunkSerializer {
@@ -433,7 +433,6 @@ public class ChunkSerializer {
private static void postLoadChunk(ServerLevel world, CompoundTag nbt, LevelChunk chunk) {
ListTag nbttaglist;
@ -1804,7 +1777,7 @@ index b645a2fc839dbf922ce73b23b7d53e9a5fe1a2ee..1b478ebfe6792a157772a5812d0daa1a
if (nbt.contains("Entities", 9)) {
nbttaglist = nbt.getList("Entities", 10);
if (!nbttaglist.isEmpty()) {
@@ -441,8 +442,6 @@ public class ChunkSerializer {
@@ -441,8 +440,6 @@ public class ChunkSerializer {
}
}
@ -1813,15 +1786,14 @@ index b645a2fc839dbf922ce73b23b7d53e9a5fe1a2ee..1b478ebfe6792a157772a5812d0daa1a
nbttaglist = nbt.getList("TileEntities", 10);
for (int i = 0; i < nbttaglist.size(); ++i) {
@@ -460,8 +459,6 @@ public class ChunkSerializer {
@@ -460,7 +457,6 @@ public class ChunkSerializer {
}
}
}
- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
-
}
private static CompoundTag packStructureData(ServerLevel world, ChunkPos chunkcoordintpair, Map<StructureFeature<?>, StructureStart<?>> map, Map<StructureFeature<?>, LongSet> map1) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index dee1bf692a2c13d280b54a46137e24376f5b7772..0c430583e4bdc4050e3a278ff500bea3b07c40ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java

Datei anzeigen

@ -15,10 +15,10 @@ instead and save a lot of server resources.
See: https://github.com/PaperMC/Paper/issues/917
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 8d5c61a77bea2f2f5dbff26cb479f855945f9541..f38ccdecbade43983358dfbeadca86be7d15a68c 100644
index 28f1a53a2b9ebe9948509dabbf1a4ae84d8e147c..345ecbc7fc080e8581d285b638db1ee6e684010a 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -332,6 +332,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -335,6 +335,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@Nullable
public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {

Datei anzeigen

@ -2344,7 +2344,7 @@ index 24f72050229031898fd9da585ad2ceec835f83f9..2b235508ffd01de14714de1a31c2139e
ChunkHolder.FullChunkStatus playerchunk_state1 = ChunkHolder.getFullChunkStatus(this.ticketLevel);
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index db4dac607cf24d3d2cd407255c60678ae4be1a1b..ed208c058f5e22111284ffa6985b223565c83f67 100644
index 5ec46f8f39b36333c33b179db91c17d79337e2e1..fffeb068a432c0cf1d7d52ff7c4dca60ff6a9664 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -408,6 +408,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -2614,7 +2614,7 @@ index db4dac607cf24d3d2cd407255c60678ae4be1a1b..ed208c058f5e22111284ffa6985b2235
@Nullable
private CompoundTag readChunk(ChunkPos pos) throws IOException {
CompoundTag nbttagcompound = this.read(pos);
@@ -1312,6 +1435,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1311,6 +1434,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
@ -2802,7 +2802,7 @@ index a778eff06a24a665874a315704f00dc5996420c9..13313635e994f848edbe3e3fe607a21f
} finally {
chunkMap.callbackExecutor.run();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9d4552eed81570e6329e036ac122b21f72000d96..80e440d7397c0155213109a2ad0e1edeb49bbc59 100644
index 22402247d82cfe722254289f0905f5e01e8c800d..6c4411d621ff60ed44fba00f14ef4c1735ed56f7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -206,6 +206,79 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -3019,10 +3019,10 @@ index 3af31dc2c82c11ee78d497c5777615c17cb13c7a..3b8c04f6ffd7e6c197465aa1caf633ba
this.type = t;
this.triggerTick = time;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff821b30c24 100644
index 03190535999d30aea0428631ae576b18f5d10eb7..b8bdd69bda00ba0eb72c161d3b49101b8221ac41 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -69,7 +69,30 @@ public class ChunkSerializer {
@@ -67,7 +67,30 @@ public class ChunkSerializer {
public ChunkSerializer() {}
@ -3053,7 +3053,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
BiomeSource worldchunkmanager = chunkgenerator.getBiomeSource();
CompoundTag nbttagcompound1 = nbt.getCompound("Level");
@@ -96,7 +119,9 @@ public class ChunkSerializer {
@@ -94,7 +117,9 @@ public class ChunkSerializer {
LevelLightEngine lightengine = chunkproviderserver.getLightEngine();
if (flag) {
@ -3063,7 +3063,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
}
for (int j = 0; j < nbttaglist.size(); ++j) {
@@ -112,16 +137,28 @@ public class ChunkSerializer {
@@ -110,16 +135,28 @@ public class ChunkSerializer {
achunksection[world.getSectionIndexFromSectionY(b0)] = chunksection;
}
@ -3094,7 +3094,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
}
}
}
@@ -235,7 +272,7 @@ public class ChunkSerializer {
@@ -233,7 +270,7 @@ public class ChunkSerializer {
}
if (chunkstatus_type == ChunkStatus.ChunkType.LEVELCHUNK) {
@ -3103,7 +3103,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
} else {
ProtoChunk protochunk1 = (ProtoChunk) object;
@@ -274,11 +311,92 @@ public class ChunkSerializer {
@@ -272,11 +309,92 @@ public class ChunkSerializer {
protochunk1.setCarvingMask(worldgenstage_features, BitSet.valueOf(nbttagcompound5.getByteArray(s1)));
}
@ -3197,7 +3197,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
ChunkPos chunkcoordintpair = chunk.getPos();
CompoundTag nbttagcompound = new CompoundTag();
CompoundTag nbttagcompound1 = new CompoundTag();
@@ -287,7 +405,7 @@ public class ChunkSerializer {
@@ -285,7 +403,7 @@ public class ChunkSerializer {
nbttagcompound.put("Level", nbttagcompound1);
nbttagcompound1.putInt("xPos", chunkcoordintpair.x);
nbttagcompound1.putInt("zPos", chunkcoordintpair.z);
@ -3206,7 +3206,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
nbttagcompound1.putLong("InhabitedTime", chunk.getInhabitedTime());
nbttagcompound1.putString("Status", chunk.getStatus().getName());
UpgradeData chunkconverter = chunk.getUpgradeData();
@@ -306,9 +424,17 @@ public class ChunkSerializer {
@@ -304,9 +422,17 @@ public class ChunkSerializer {
LevelChunkSection chunksection = (LevelChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> {
return chunksection1 != null && SectionPos.blockToSectionCoord(chunksection1.bottomBlockY()) == finalI; // CraftBukkit - decompile errors
}).findFirst().orElse(LevelChunk.EMPTY_SECTION);
@ -3227,7 +3227,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
if (chunksection != LevelChunk.EMPTY_SECTION || nibblearray != null || nibblearray1 != null) {
CompoundTag nbttagcompound2 = new CompoundTag();
@@ -340,8 +466,17 @@ public class ChunkSerializer {
@@ -338,8 +464,17 @@ public class ChunkSerializer {
nbttagcompound1.putIntArray("Biomes", biomestorage.writeBiomes());
}
@ -3247,7 +3247,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
CompoundTag nbttagcompound3;
@@ -384,6 +519,10 @@ public class ChunkSerializer {
@@ -382,6 +517,10 @@ public class ChunkSerializer {
nbttagcompound1.put("ToBeTicked", ((ProtoTickList) ticklist).save());
} else if (ticklist instanceof ChunkTickList) {
nbttagcompound1.put("TileTicks", ((ChunkTickList) ticklist).save());
@ -3258,7 +3258,7 @@ index 1b478ebfe6792a157772a5812d0daa1a3ccc4776..9e9ffb575c68c7044ab289e1f3f79ff8
} else {
nbttagcompound1.put("TileTicks", world.getBlockTicks().save(chunkcoordintpair));
}
@@ -394,6 +533,10 @@ public class ChunkSerializer {
@@ -392,6 +531,10 @@ public class ChunkSerializer {
nbttagcompound1.put("LiquidsToBeTicked", ((ProtoTickList) ticklist1).save());
} else if (ticklist1 instanceof ChunkTickList) {
nbttagcompound1.put("LiquidTicks", ((ChunkTickList) ticklist1).save());

Datei anzeigen

@ -32,7 +32,7 @@ index 7af33e8c470e499b7ec47467cce7df699c96873a..2720f4a51ffc8c9748932be55cebd507
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getFutureIfPresentUnchecked(ChunkStatus leastStatus) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index ed208c058f5e22111284ffa6985b223565c83f67..10a4939b1169dfc3012a66d7af2f4a36616e5fb9 100644
index fffeb068a432c0cf1d7d52ff7c4dca60ff6a9664..a3155ea07a204d0d03bb61113fb76a96d7deb826 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -84,6 +84,7 @@ import net.minecraft.world.level.chunk.ProtoChunk;
@ -142,10 +142,10 @@ index 6e0cf8ee76143301c939fc4af5eeb091abdcbc5c..1c7b18db0053bca6e7750225a79f7d95
return (ChunkStatus) Registry.CHUNK_STATUS.get(ResourceLocation.tryParse(id));
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 9e9ffb575c68c7044ab289e1f3f79ff821b30c24..ea3279113358b41281ee2e92f2371a0f1e36b472 100644
index b8bdd69bda00ba0eb72c161d3b49101b8221ac41..1eaedda19b05e1ec429fa505c72c9e2743eb32b7 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -563,6 +563,17 @@ public class ChunkSerializer {
@@ -561,6 +561,17 @@ public class ChunkSerializer {
return nbttagcompound;
}

Datei anzeigen

@ -20,7 +20,7 @@ index 4c177a383b277debe8a7c02a70d029d862e6b048..0c336a794d21d5084b9ea39308379b2f
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 6f5e1f7c23b19257c89b7c5a992ad76623bf4006..a2eecfaf54921423f803d759c06789e5e8a38d33 100644
index a3155ea07a204d0d03bb61113fb76a96d7deb826..6f6e6bda65b4382b59107aa1807545a6128a0254 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -677,7 +677,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -119,10 +119,10 @@ index 873fea54aecca411b6dee1ed3566f93c4fb9670f..7dc3d806a680150c6a2fffa1436fd63b
this.upgradeData = upgradeData;
this.blockTicks = blockTickScheduler;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index ea3279113358b41281ee2e92f2371a0f1e36b472..575f0bcb4db4bd58c949acc3b6a15bbeb7f842a0 100644
index 1eaedda19b05e1ec429fa505c72c9e2743eb32b7..83fa00de1a7cb690c763cec9c8d4b3fcd44e7c74 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -210,7 +210,7 @@ public class ChunkSerializer {
@@ -208,7 +208,7 @@ public class ChunkSerializer {
// CraftBukkit end
});
} else {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate
Should help if something dumb happens
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 575f0bcb4db4bd58c949acc3b6a15bbeb7f842a0..79a7221b0462931e94f31ccd7c6dc2720ddfb752 100644
index 83fa00de1a7cb690c763cec9c8d4b3fcd44e7c74..670e4f65680ca36fba1c84cb334c470ea8fa9b60 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -69,6 +69,13 @@ public class ChunkSerializer {
@@ -67,6 +67,13 @@ public class ChunkSerializer {
public ChunkSerializer() {}
@ -23,7 +23,7 @@ index 575f0bcb4db4bd58c949acc3b6a15bbeb7f842a0..79a7221b0462931e94f31ccd7c6dc272
// Paper start
public static final class InProgressChunkHolder {
@@ -95,8 +102,8 @@ public class ChunkSerializer {
@@ -93,8 +100,8 @@ public class ChunkSerializer {
// Paper end
ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
BiomeSource worldchunkmanager = chunkgenerator.getBiomeSource();

Datei anzeigen

@ -14,7 +14,7 @@ Adds flying monsters to control ghast and phantoms
Adds villagers as separate config
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 993617e87c71320fe51adf24bef691aa978d42e3..7eec9afc5782d5d588f029cf7451c354a52f176a 100644
index fbd79aa102328e2738199c1da5a88e0a9ca76ce6..6ef50417e73709fbf50e93ad41638c03360afc87 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2,7 +2,6 @@ package net.minecraft.server.level;
@ -41,7 +41,7 @@ index 993617e87c71320fe51adf24bef691aa978d42e3..7eec9afc5782d5d588f029cf7451c354
import net.minecraft.world.level.entity.EntityPersistentStorage;
import net.minecraft.world.level.entity.EntityTickList;
import net.minecraft.world.level.entity.EntityTypeTest;
@@ -852,17 +849,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -853,17 +850,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
++TimingHistory.entityTicks; // Paper - timings
// Spigot start
co.aikar.timings.Timing timer; // Paper
@ -63,7 +63,7 @@ index 993617e87c71320fe51adf24bef691aa978d42e3..7eec9afc5782d5d588f029cf7451c354
try {
// Paper end - timings
entity.setOldPosAndRot();
@@ -873,9 +870,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -874,9 +871,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
return Registry.ENTITY_TYPE.getKey(entity.getType()).toString();
});
gameprofilerfiller.incrementCounter("tickNonPassenger");
@ -78,9 +78,9 @@ index 993617e87c71320fe51adf24bef691aa978d42e3..7eec9afc5782d5d588f029cf7451c354
while (iterator.hasNext()) {
@@ -884,13 +885,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(entity, entity1);
}
- } finally { timer.stopTiming(); } // Paper - timings
+ // } finally { timer.stopTiming(); } // Paper - timings - move up
@ -336,7 +336,7 @@ index 44b88af588f233943ab183ad45b97b051db73aab..fac722d2f5bbd86cbeacc7da4bb45155
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
index 9b631698d1c736f61e07a5a1253127f4081dc90d..f18b20f94b4d2d7f07a70414834b3b284f65da78 100644
index 9b631698d1c736f61e07a5a1253127f4081dc90d..54020a3f2b18c4f42008f5d5f4541ef1a1efbcd7 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
@@ -140,6 +140,10 @@ public class PistonMovingBlockEntity extends BlockEntity {

Datei anzeigen

@ -1091,10 +1091,10 @@ index c28879f32b004f36ff746ea2274f91ddd9501e71..60d72e488bc77cd913328be400ca374a
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 6ddb24ae627b9bfdfd82b19b1a746f32bb8d0532..5e7fe43d1b27bed51f8a7c0fcddb8604d40f6954 100644
index 4f435e462069e73e68dce74b02a233553266dd90..e38e40fb9327e27e2344f76e0975b12d26bb8884 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1486,7 +1486,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1485,7 +1485,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void playerLoadedChunk(ServerPlayer player, Packet<?>[] packets, LevelChunk chunk) {
if (packets[0] == null) {
@ -1104,7 +1104,7 @@ index 6ddb24ae627b9bfdfd82b19b1a746f32bb8d0532..5e7fe43d1b27bed51f8a7c0fcddb8604
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 7eec9afc5782d5d588f029cf7451c354a52f176a..afb62f6d7d0c4dc80e9ceea6c6fe420f551b40b6 100644
index 6ef50417e73709fbf50e93ad41638c03360afc87..275f292cc6b2f6576367ccc8603555ccebda1955 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -288,7 +288,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -1392,10 +1392,10 @@ index bb8fd88aebb550edec8c679622a02a595cbc6694..ac51089aae57a5f1d2411367ff177e05
if (this.palette == this.globalPalette) {
Palette<T> palette = new HashMapPalette<>(this.registry, i, this.dummyPaletteResize, this.reader, this.writer);
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 79a7221b0462931e94f31ccd7c6dc2720ddfb752..afbb42595afeb151208880dcf48b94d7c00a8733 100644
index 670e4f65680ca36fba1c84cb334c470ea8fa9b60..79f2b3942a3ccccd8fe8719db12de458212e8659 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -136,7 +136,7 @@ public class ChunkSerializer {
@@ -134,7 +134,7 @@ public class ChunkSerializer {
byte b0 = nbttagcompound2.getByte("Y");
if (nbttagcompound2.contains("Palette", 9) && nbttagcompound2.contains("BlockStates", 12)) {

Datei anzeigen

@ -145,7 +145,7 @@ index 2720f4a51ffc8c9748932be55cebd5072cd4ffb2..1dd1b9afaee38fdc994ad0a069bd63b0
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 5e7fe43d1b27bed51f8a7c0fcddb8604d40f6954..404dcacd14e9fa81c54287216ce7b53dc5bb5c03 100644
index e38e40fb9327e27e2344f76e0975b12d26bb8884..16d956e74711aea7b877329911be031b94dab02b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -127,7 +127,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -447,7 +447,7 @@ index 5e7fe43d1b27bed51f8a7c0fcddb8604d40f6954..404dcacd14e9fa81c54287216ce7b53d
}
public void addEntity(Entity entity) {
@@ -1484,6 +1604,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1483,6 +1603,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
@ -520,7 +520,7 @@ index 45c7ebe67019cdbe88b6617a95d5c40d3a68286c..38eebda226e007c8910e04f502ce218c
if (withinViewDistance) {
DistanceManager.this.ticketThrottlerInput.tell(ChunkTaskPriorityQueueSorter.message(() -> {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index cd5394a0f1b46946b4f1575412c01bfcd86e782f..d234f08782b1a0c50714b8911d048699dc7741d5 100644
index 2a7b0d5de81665a5b899ab85cd1fa30be29f9b3e..7efaf53b4df9d4e7e88020ce4ca41c9222fa8064 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -242,6 +242,7 @@ public class ServerPlayer extends Player {

Datei anzeigen

@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
Also ignores Enderdragon, defaulting it to Mojang's setting
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 404dcacd14e9fa81c54287216ce7b53dc5bb5c03..c7d708cc5c20d46ed085f1f1db7666246614a57d 100644
index 16d956e74711aea7b877329911be031b94dab02b..65bdab2f19bcb03d67a92c0b60d73fc25f3ec5b8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1837,6 +1837,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -1836,6 +1836,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
int j = entity.getType().clientTrackingRange() * 16;

Datei anzeigen

@ -949,7 +949,7 @@ index 19544c9e6393cba361c9cf00d5767a06686426bf..12bf78c993d2360c37b143b51c425fc5
public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureManager structureManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, boolean flag, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier<DimensionDataStorage> supplier) {
this.level = world;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 54008a97cc88ac431c3517c19160903408ee9255..dba04e84015cecd4db36dc5c28f1547f9c2db2e6 100644
index a09415592d1b5b1aab4c4bc0471148f0afa80d8b..5c5fb2abd29718650bd82b0b58ab966c97fda8ae 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -291,6 +291,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -1038,12 +1038,12 @@ index 1a05edf041cf4aeee7c165fec564ce45adbdd5c7..febc837d324cbe2cd83aea6c1e0d298c
}
diff --git a/src/main/java/net/minecraft/world/level/ServerTickList.java b/src/main/java/net/minecraft/world/level/ServerTickList.java
index 702203f4a4fa4fc03c35ec974a97e08ed0f3c67c..609c8ece9e9f151875bf8191cc671206ee1e5f68 100644
index bcce5f1f8940e6fb8f398afd540bcbe2286ed0c2..048c399585d75252f5154cb7e46c394c7184e11c 100644
--- a/src/main/java/net/minecraft/world/level/ServerTickList.java
+++ b/src/main/java/net/minecraft/world/level/ServerTickList.java
@@ -49,6 +49,9 @@ public class ServerTickList<T> implements TickList<T> {
private final co.aikar.timings.Timing timingTicking; // Paper
// Paper end
@@ -51,6 +51,9 @@ public class ServerTickList<T> implements TickList<T> {
this.ticker = tickConsumer;
}
+ // Paper start
+ public void nextTick() {}
@ -1051,7 +1051,7 @@ index 702203f4a4fa4fc03c35ec974a97e08ed0f3c67c..609c8ece9e9f151875bf8191cc671206
public void tick() {
int i = this.tickNextTickList.size();
@@ -190,7 +193,7 @@ public class ServerTickList<T> implements TickList<T> {
@@ -192,7 +195,7 @@ public class ServerTickList<T> implements TickList<T> {
return ServerTickList.saveTickList(this.toId, list, this.level.getGameTime());
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker
Use the distance map to find candidate players for tracking.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 2b4c35d9bd186fd7c3650a7ad791cd67fb64e635..514d859ab0fbd25e2217c27dfbbdba1f688848c1 100644
index 5505094b43635c0388dc83515635a9ab00d9eb7a..2ee704a0851f9fd0408b54bee9fe2700421abc7a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -63,6 +63,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
@ -191,7 +191,7 @@ index 2b4c35d9bd186fd7c3650a7ad791cd67fb64e635..514d859ab0fbd25e2217c27dfbbdba1f
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
@@ -1771,23 +1865,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -1770,23 +1864,31 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos());
List<Entity> list = Lists.newArrayList();
List<Entity> list1 = Lists.newArrayList();
@ -235,7 +235,7 @@ index 2b4c35d9bd186fd7c3650a7ad791cd67fb64e635..514d859ab0fbd25e2217c27dfbbdba1f
Iterator iterator;
Entity entity1;
@@ -1870,6 +1972,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -1869,6 +1971,42 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
this.lastSectionPos = SectionPos.of(entity);
}
@ -278,7 +278,7 @@ index 2b4c35d9bd186fd7c3650a7ad791cd67fb64e635..514d859ab0fbd25e2217c27dfbbdba1f
public boolean equals(Object object) {
return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false;
}
@@ -1955,7 +2093,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -1954,7 +2092,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
int j = entity.getType().clientTrackingRange() * 16;
j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index fd79caa3fd62eb6ef09b1eb63cb569560cd7b9a9..6fdbd1396265d0671bf888e88f516b1c9453a0d4 100644
index 5df3007a4b06d42d56a7d8dcacf7bb1b2809afb7..036c2730d36e3f80cb9b4d5d024e4f2d34833e06 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -2135,9 +2135,14 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
@@ -2134,9 +2134,14 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
public void updatePlayer(ServerPlayer player) {
org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
if (player != this.entity) {

Datei anzeigen

@ -16,10 +16,10 @@ We further improve it by making a copy of the nbt tag with only the memory
it needs, so that we dont have to hold a copy to the entire compound.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index afbb42595afeb151208880dcf48b94d7c00a8733..e850b8db05f4d66aec8eb74a5a48357b90ca77a5 100644
index 79f2b3942a3ccccd8fe8719db12de458212e8659..d113b4835e86a789c0ba124eb839e1c56a5437d2 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -27,6 +27,7 @@ import net.minecraft.nbt.CompoundTag;
@@ -25,6 +25,7 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.LongArrayTag;
import net.minecraft.nbt.ShortTag;
@ -27,7 +27,7 @@ index afbb42595afeb151208880dcf48b94d7c00a8733..e850b8db05f4d66aec8eb74a5a48357b
import net.minecraft.server.level.ServerChunkCache;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ThreadedLevelLightEngine;
@@ -207,15 +208,9 @@ public class ChunkSerializer {
@@ -205,15 +206,9 @@ public class ChunkSerializer {
object2 = protochunkticklist1;
}
@ -46,7 +46,7 @@ index afbb42595afeb151208880dcf48b94d7c00a8733..e850b8db05f4d66aec8eb74a5a48357b
} else {
ProtoChunk protochunk = new ProtoChunk(pos, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, world, world); // Paper - add level
@@ -321,6 +316,50 @@ public class ChunkSerializer {
@@ -319,6 +314,50 @@ public class ChunkSerializer {
return new InProgressChunkHolder(protochunk1, tasksToExecuteOnMain); // Paper - Async chunk loading
}
}

Datei anzeigen

@ -199,10 +199,10 @@ index 689a3bc80e753ecb3194ae81c0c48d2eef61f700..c561d69b4b903cd3625468b239cb1ace
public String toString() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index e850b8db05f4d66aec8eb74a5a48357b90ca77a5..f4cecd000ba4c4595c8db45524ec9d899193abe6 100644
index d113b4835e86a789c0ba124eb839e1c56a5437d2..ed05a11f5038fdac90576ca33a0b710c83ab39a1 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -490,11 +490,11 @@ public class ChunkSerializer {
@@ -488,11 +488,11 @@ public class ChunkSerializer {
}
if (nibblearray != null && !nibblearray.isEmpty()) {

Datei anzeigen

@ -9,10 +9,10 @@ the game, immediately stop the server to prevent data corruption.
You can override this functionality at your own peril.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index f4cecd000ba4c4595c8db45524ec9d899193abe6..9ee2321150d3de7bf1a11c212951bc69872f4dd8 100644
index ed05a11f5038fdac90576ca33a0b710c83ab39a1..80b9f3547bc30cb470d272132e96fcce188efd91 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -98,10 +98,25 @@ public class ChunkSerializer {
@@ -96,10 +96,25 @@ public class ChunkSerializer {
holder.tasks.forEach(Runnable::run);
return holder.protoChunk;
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index f38ccdecbade43983358dfbeadca86be7d15a68c..b50bf044a3cb05b811fd06796a351e6b15b352ad 100644
index 345ecbc7fc080e8581d285b638db1ee6e684010a..8c829066939a4069953097fd268f7c214a555779 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -332,6 +332,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -335,6 +335,12 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@Nullable
public T spawnCreature(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Component ichatbasecomponent, @Nullable Player entityhuman, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
@ -22,7 +22,7 @@ index f38ccdecbade43983358dfbeadca86be7d15a68c..b50bf044a3cb05b811fd06796a351e6b
// Paper start - Call PreCreatureSpawnEvent
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(EntityType.getKey(this).getPath());
if (type != null) {
@@ -347,6 +353,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -350,6 +356,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
}
// Paper end
T t0 = this.create(worldserver, nbttagcompound, ichatbasecomponent, entityhuman, blockposition, enummobspawn, flag, flag1);

Datei anzeigen

@ -65,10 +65,10 @@ index 8047470af6f3a9842ab78c46b8e27a4fa9c961fc..f7cf534e11aef42c3f383fa8e8a62b74
private void keepLoadedRange() {
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index b50bf044a3cb05b811fd06796a351e6b15b352ad..ac99265aacd4a28490705e3079ed04023fb1c54a 100644
index 8c829066939a4069953097fd268f7c214a555779..1c446dba5de89698397041ee38a2e1a00bec8a56 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -560,9 +560,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
@@ -563,9 +563,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
final Spliterator<? extends net.minecraft.nbt.Tag> spliterator = entityNbtList.spliterator();
return StreamSupport.stream(new Spliterator<Entity>() {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index bec580b4523bdd1982e6668481e6cb9d2beb7137..7321e33cbc7d8e92ce4954eb1db8e7d5646d559b 100644
index eab150c9abb6331fc63fe8302e477664a6007e52..6a04d2c660e4b59cdffadc893f56a361135ea885 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -386,8 +386,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -30,7 +30,7 @@ index bec580b4523bdd1982e6668481e6cb9d2beb7137..7321e33cbc7d8e92ce4954eb1db8e7d5
}
this.oThunderLevel = this.thunderLevel;
@@ -834,14 +834,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -835,14 +835,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
private void stopWeather() {
// CraftBukkit start