Skip to content

Commit

Permalink
Move diffs around to compile without later ones applied
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jan 23, 2024
1 parent e660379 commit c57d1aa
Show file tree
Hide file tree
Showing 772 changed files with 546 additions and 499 deletions.
176 changes: 136 additions & 40 deletions patches/server/0009-MC-Utils.patch

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions patches/server/0014-Timings-v2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ index 813fd87df0dfed8fe46389db8333d1d9f409fbe4..dfb37ddb89c2f43d9f9a34a6b2d38616
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index a4d1136fcd75ecdf2cbd7af591d4acb4dfd248ba..17af50aa1ab310a5f0f221e2cd4e9e902c28a092 100644
index c721642337652ba4cf984ba3c263655b717d3b03..23e830d4cbe94a91c34ebb426311c8f861280b16 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
Expand All @@ -988,31 +988,31 @@ index a4d1136fcd75ecdf2cbd7af591d4acb4dfd248ba..17af50aa1ab310a5f0f221e2cd4e9e90
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -897,6 +899,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -901,6 +903,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkStatus chunkstatus = ChunkLevel.generationStatus(chunkHolder.getTicketLevel());

return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
+ try (Timing ignored = level.timings.chunkPostLoad.startTimingIfSync()) { // Paper
ChunkPos chunkcoordintpair = chunkHolder.getPos();
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
LevelChunk chunk;
@@ -921,6 +924,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -925,6 +928,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}

return chunk;
+ } // Paper
});
}, (runnable) -> {
ProcessorHandle mailbox = this.mainThreadMailbox;
@@ -1472,6 +1476,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1476,6 +1480,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
+ level.timings.tracker1.startTiming(); // Paper

ChunkMap.TrackedEntity playerchunkmap_entitytracker;

@@ -1496,14 +1501,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1500,14 +1505,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
Expand Down Expand Up @@ -1472,7 +1472,7 @@ index b71b702471599fc8f1de42919ade8ee6a4e6247c..2e47008a8ff1bb56b752d4eb880173b9
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
this.hurt(this.damageSources().drown(), 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 32afa096f148ebb546963bae7c9c9b194cb1a99c..6dbc4c74b4d6b8e6c4763366e70ca9292b4a25d5 100644
index d89431b476b032f3ff86097bb91b86016d4e3371..aa22d4024cdd0ecb1c0442ecdeae00822597362e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -91,7 +91,6 @@ import org.bukkit.Bukkit;
Expand Down Expand Up @@ -1501,7 +1501,7 @@ index 32afa096f148ebb546963bae7c9c9b194cb1a99c..6dbc4c74b4d6b8e6c4763366e70ca929
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}
@@ -718,15 +717,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -725,15 +724,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

this.timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false;
Expand Down Expand Up @@ -1557,18 +1557,18 @@ index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index e9670e43a146288ad0e5a33dfc02b90fc1eee95b..93a73367e004979a015704d94a5669d154a2f71b 100644
index 409007f6e6940e5ea92e3cbaa74e55cdee50325b..c2179ea2a16ae0fac0b59d81a57abf13f563843f 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -681,6 +681,7 @@ public class LevelChunk extends ChunkAccess {
@@ -698,6 +698,7 @@ public class LevelChunk extends ChunkAccess {
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));

if (this.needsDecoration) {
+ try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper
this.needsDecoration = false;
java.util.Random random = new java.util.Random();
random.setSeed(this.level.getSeed());
@@ -700,6 +701,7 @@ public class LevelChunk extends ChunkAccess {
@@ -717,6 +718,7 @@ public class LevelChunk extends ChunkAccess {
}
}
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
Expand Down Expand Up @@ -2048,7 +2048,7 @@ index 72c1b7f1468c47ad7053a7ff6b3248324b2bf604..677335c3888adc25fbf3c5ec4d5a6c5e
* This helper class represents the different NBT Tags.
* <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e416547577fd3cc5d 100644
index ff422d4d4f2b764370f0ee2af13034853c1d3fe1..a5da6c1cae0afbde684be250e2fc3c0c32a1265b 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -27,7 +27,7 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
Expand All @@ -2060,7 +2060,7 @@ index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e41654757

public class ActivationRange
{
@@ -71,8 +71,8 @@ public class ActivationRange
@@ -74,8 +74,8 @@ public class ActivationRange
/**
* These entities are excluded from Activation range checks.
*
Expand All @@ -2071,7 +2071,7 @@ index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e41654757
* @return boolean If it should always tick.
*/
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
@@ -107,7 +107,7 @@ public class ActivationRange
@@ -110,7 +110,7 @@ public class ActivationRange
*/
public static void activateEntities(Level world)
{
Expand All @@ -2080,7 +2080,7 @@ index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e41654757
final int miscActivationRange = world.spigotConfig.miscActivationRange;
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
final int animalActivationRange = world.spigotConfig.animalActivationRange;
@@ -134,7 +134,7 @@ public class ActivationRange
@@ -137,7 +137,7 @@ public class ActivationRange

world.getEntities().get(ActivationRange.maxBB, ActivationRange::activateEntity);
}
Expand All @@ -2089,7 +2089,7 @@ index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e41654757
}

/**
@@ -229,10 +229,8 @@ public class ActivationRange
@@ -232,10 +232,8 @@ public class ActivationRange
*/
public static boolean checkIfActive(Entity entity)
{
Expand All @@ -2100,7 +2100,7 @@ index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e41654757
return true;
}

@@ -256,7 +254,6 @@ public class ActivationRange
@@ -259,7 +257,6 @@ public class ActivationRange
{
isActive = false;
}
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0016-Starlight.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4493,7 +4493,7 @@ index facfdbb87e89f4db33ce13233c2ba4366d35c15b..807a6bb1026dac2c4cd0a50afe06fd62
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
public int oldTicketLevel;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 17af50aa1ab310a5f0f221e2cd4e9e902c28a092..5ae30cd3af88c4f4179a4dc0c94906cfbfb7ff29 100644
index 23e830d4cbe94a91c34ebb426311c8f861280b16..ed095afdf8be843b9a608130040739c0b21dbe0a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -125,7 +125,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
Expand Down Expand Up @@ -5037,7 +5037,7 @@ index d5b1fd0ff3f64675f90dd9f7f328a106e0992d51..846ae3fd184a1d63b743aa25e0456045
return (ChunkStatus) BuiltInRegistries.CHUNK_STATUS.get(ResourceLocation.tryParse(id));
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
index ca0991b07def35b4697ba6d5569bf9a080e48a1c..f49cc61840c6588fca301b4c5c3aaeede03a323e 100644
index 2ee1658532cb00d7bcd1d11e03f19d21ca7f2a9e..ac754827172a4de600d0a57a7d11853481a2dbf2 100644
--- a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
@@ -21,6 +21,40 @@ public class EmptyLevelChunk extends LevelChunk {
Expand Down Expand Up @@ -5135,7 +5135,7 @@ index 6bb508105641b5729572736c5c3f9bd6711e309a..60e760b42dd6471a229dfd45490dcf8c
@Override
public BlockEntity getBlockEntity(BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 93a73367e004979a015704d94a5669d154a2f71b..17725dba7cbcdce00cd23c3956eaf1642d9c424f 100644
index c2179ea2a16ae0fac0b59d81a57abf13f563843f..3e51fb9fe05d5b974ae41ccc0acbb516a07c114b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -219,6 +219,12 @@ public class LevelChunk extends ChunkAccess {
Expand All @@ -5160,7 +5160,7 @@ index 93a73367e004979a015704d94a5669d154a2f71b..17725dba7cbcdce00cd23c3956eaf164
this.setLightCorrect(protoChunk.isLightCorrect());
this.unsaved = true;
this.needsDecoration = true; // CraftBukkit
@@ -409,7 +415,7 @@ public class LevelChunk extends ChunkAccess {
@@ -426,7 +432,7 @@ public class LevelChunk extends ChunkAccess {
ProfilerFiller gameprofilerfiller = this.level.getProfiler();

gameprofilerfiller.push("updateSkyLightSources");
Expand Down
Loading

0 comments on commit c57d1aa

Please sign in to comment.