Skip to content

Commit

Permalink
Add configurable region format framework & linear v2 region
Browse files Browse the repository at this point in the history
 format support
  • Loading branch information
MrHua269 committed Dec 15, 2024
1 parent 38e4a96 commit 2b5bedf
Show file tree
Hide file tree
Showing 34 changed files with 1,180 additions and 21 deletions.
1,159 changes: 1,159 additions & 0 deletions patches/server/0018-Add-configurable-region-format-framework-linear-v2-r.patch

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..01f8c6ff3662569be5a4ff998bcd4fbb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index e58e754534fc37f276e66cbd771d10f0d6d26706..76752263eba927fba482280680c011738247dbaa 100644
index 93c038ba1fd216fd11ab8b5cec5807453f34e152..c72bda7413d9a7ce763743d0efbd85257262477e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1162,9 +1162,24 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..0e51d465db3554ac80d00c6b85cc1f01
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index eeb094265756e5440c0cdd0784f725f7de536493..4c95fb042b42e3acb7ec5fa93f5284434bf82196 100644
index 8e1a75e56cc373a9ec9b563666af0864eee99479..4fdbdd1c5c937c20026afe555fa1c8371b4eaa16 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1181,6 +1181,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ index 48604e7f96adc9e226e034054c5e2bad0b024eb5..99f0c1e4d3437154a1062b0a8f94b7a0
return;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e7879b3d3 100644
index 88be8a6232bc3311cc0bdb7c697f7a78ce33e38d..c7390e0341cd19fa5e0b21882f27943174f718d0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -809,8 +809,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -41,7 +41,7 @@ index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e
this.server.disablePlugins();
this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown
}
@@ -1323,7 +1323,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1324,7 +1324,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
this.status = this.buildServerStatus();

Expand All @@ -50,7 +50,7 @@ index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e
// Folia start - region threading
if (true) {
io.papermc.paper.threadedregions.RegionizedServer.getInstance().init(); // Folia - region threading - only after loading worlds
@@ -1728,7 +1728,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1729,7 +1729,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

if (this.emptyTicks >= j) {
Expand All @@ -59,7 +59,7 @@ index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e
if (this.emptyTicks == j) {
MinecraftServer.LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhileEmptySeconds());
this.autoSave();
@@ -1747,7 +1747,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1748,7 +1748,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - avoid issues with certain tasks not processing during sleep
// Folia - region threading
this.tickConnection();
Expand All @@ -69,7 +69,7 @@ index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e
return;
}
}
@@ -1772,7 +1773,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1773,7 +1774,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
// Folia end - region threading

Expand All @@ -78,7 +78,7 @@ index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e
new com.destroystokyo.paper.event.server.ServerTickStartEvent((int)region.getCurrentTick()).callEvent(); // Paper - Server Tick Events // Folia - region threading
// Folia start - region threading
if (region != null) {
@@ -1843,7 +1844,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1844,7 +1845,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long remaining = scheduledEnd - endTime; // Folia - region ticking
new com.destroystokyo.paper.event.server.ServerTickEndEvent((int)io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(), ((double)(endTime - startTime) / 1000000D), remaining).callEvent(); // Folia - region ticking
// Paper end - Server Tick Events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Kaiiju Vanilla end portal teleportation


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 81ebab98107675483c16f2a489cb01e1a925adf4..1651a6ba49d0683cd505251fdcdc5a2fd29725c3 100644
index 4fdbdd1c5c937c20026afe555fa1c8371b4eaa16..bd3f0c807c36ecfb8a89a0ca68ffa0c3640b7423 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -114,6 +114,7 @@ import net.minecraft.world.level.block.Rotation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Kaiiju Entity tick and removal limiter


diff --git a/build.gradle.kts b/build.gradle.kts
index 017dc1ff0a7c6f7c50a57bf615fc31947ed49639..021b59d19d1af866fbbe7d68c700365b098cabdf 100644
index 8f23bf19618382ccf5fd10a0b17b57cd445dea58..4b79f96103c98896332113ffe5f0e22cf08ffdd1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -27,6 +27,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ index 5503d506c595296ecad09a3ce4497a365f216af5..98aef7a3cfc759e4415df3a56b5fe01e
if (!tickratemanager.isEntityFrozen(entity)) {
gameprofilerfiller.push("checkDespawn");
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1651a6ba49d0683cd505251fdcdc5a2fd29725c3..4e1ffa09617ec1cec7117264d7d665e17eead4b8 100644
index bd3f0c807c36ecfb8a89a0ca68ffa0c3640b7423..821fcf2bd1dacda191d7c8c17199069ebb9e73d3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -390,6 +390,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..acc032f727e605e79b688efb4873ff47
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index d5a205ecb5bd52d37ba867d7542b53331623cb5a..05d11b562e12c1d22df39856b32b3049c50d06b6 100644
index 80756e96faed0e0ca239f58f63522b9f15822c07..4e587a5c59eb271ed31c5584bd665953ae82aa8a 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -231,11 +231,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Pufferfish SIMD Utilities


diff --git a/build.gradle.kts b/build.gradle.kts
index 021b59d19d1af866fbbe7d68c700365b098cabdf..97c1116fd2695cf4061f428910d4fcb4b605edcc 100644
index 4b79f96103c98896332113ffe5f0e22cf08ffdd1..fbf51f738e98ac6e8358a7fa81b7fc545469a5a6 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -89,6 +89,14 @@ paperweight {
@@ -94,6 +94,14 @@ paperweight {
craftBukkitPackageVersion.set("v1_21_R3") // also needs to be updated in MappingEnvironment
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Gale Skip entity move if movement is zero


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8a6b3488360f8e64697a7bb80bb7284119658cce..160952e149bc5582a946b96e1456e595e86216f8 100644
index 9c29f99c9426db12231d7423ca24ca6fecf9c868..3b2bce1b5261a0efbbfcd7d38bf7f093d97df3a6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -283,6 +283,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ index aafb2f5052c7c8e5971a47308253badb3027093c..9fe7ac7ba83bbcc9a2a851a5cace4764
public static int updateInterval = 15;

diff --git a/src/main/java/me/earthme/luminol/functions/GlobalServerTpsBar.java b/src/main/java/me/earthme/luminol/functions/GlobalServerTpsBar.java
index ff503ab69dce8f034500e64ce31556d721395732..fab8c7f1f527e8a9986cdbeab473a4c389a87587 100644
index de2f03d6e771c09e8da2da454b7ec4a16c0a17ab..0b7347e8fdf995900221ee4aa4e97a4d260c6f9f 100644
--- a/src/main/java/me/earthme/luminol/functions/GlobalServerTpsBar.java
+++ b/src/main/java/me/earthme/luminol/functions/GlobalServerTpsBar.java
@@ -128,7 +128,8 @@ public class GlobalServerTpsBar {
Expand Down Expand Up @@ -179,10 +179,10 @@ index ff503ab69dce8f034500e64ce31556d721395732..fab8c7f1f527e8a9986cdbeab473a4c3
if (mspt == -1){
return BossBar.Color.valueOf(TpsBarConfig.tpsColors.get(3));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1c052f730d834187c6645dd9530c8a6e7879b3d3..af904418f6977c253ada47bc6a58bae054e38c2c 100644
index c7390e0341cd19fa5e0b21882f27943174f718d0..19e1dfbcd69e3f960d148b014e9e9248072918a2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1801,6 +1801,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1802,6 +1802,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} finally { foliaProfiler.stopTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ENTITY_SCHEDULER_TICK); } // Folia - profiler
}
// Folia end - region threading
Expand Down Expand Up @@ -212,7 +212,7 @@ index 1c052f730d834187c6645dd9530c8a6e7879b3d3..af904418f6977c253ada47bc6a58bae0
if (region == null) this.tickRateManager.tick(); // Folia - region threading
this.tickChildren(shouldKeepTicking, region); // Folia - region threading
if (region == null && i - this.lastServerStatus >= MinecraftServer.STATUS_EXPIRE_TIME_NANOS) { // Folia - region threading
@@ -1809,6 +1832,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1810,6 +1833,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}

// Folia - region threading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Fix-MC-2025


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e5aab785087942a0e0356b9b9fa70613222810f0..35bc21ba9baf92b80cb67247908f4af8ff8d3aec 100644
index 2d9f75526240689facba1a4fbef7d40ef8299a1d..76f7479798b72cc9219ccb97b5c99e4645ce43d2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2774,6 +2774,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] FoliaPR Add TPS From Region


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ac180d082b05f2a5fa557b49e3d34e81e4957766..5cc71c882dba16034c976f8e6eb98a1616b67030 100644
index 20cf4ce4f73f681bdbe092d4693812800c953be9..4fe9d348b6f14224d4095dcd8ff0a16a1d61589c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -3105,6 +3105,42 @@ public final class CraftServer implements Server {
Expand Down

0 comments on commit 2b5bedf

Please sign in to comment.