Skip to content

Commit

Permalink
Updated Upstream (Folia)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Dec 9, 2024
1 parent fa959bf commit 1445e46
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group = me.earthme.luminol
version = 1.21.4-R0.1-SNAPSHOT

foliaCommit = d4bc33870b263650b9a023c439fbca92f8623992
foliaCommit = 1c0ecd3d18b5d83534913ccefa2f1d93305864cf

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0005-Pufferfish-SIMD-Utilities.patch
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 e29e5024fa693baae469d47fe77b57118f14627c..46a4af5eb9a12a3263e6d73867f6a905a6c85e64 100644
index 571534b42cd9c33d6a7bb6fe3bf3a28e33f8e5de..1aa76451f9129b578d6887b1239966eb67f5ee1b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -148,6 +148,13 @@ val generateApiVersioningFile by tasks.registering {
@@ -150,6 +150,13 @@ val generateApiVersioningFile by tasks.registering {
}
}

Expand All @@ -22,7 +22,7 @@ index e29e5024fa693baae469d47fe77b57118f14627c..46a4af5eb9a12a3263e6d73867f6a905
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -207,6 +214,7 @@ tasks.withType<Javadoc> {
@@ -209,6 +216,7 @@ tasks.withType<Javadoc> {
into("build/docs/javadoc")
}
}
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0002-Rebrand-to-Luminol.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ index dd6cc4972a209e58313a2b6c6fe87c3605fe34ae..17d2d18d7898e4f0898cc18c930b7cb2
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
index cb60d58d4a7556dd896f31d0cd249f860bb3ef84..b52a805150e95d7d27403d3c18088b335a355011 100644
index f5ff71e31516327be71924926938f1c9f0e503df..1ea251a202dc6386a110ee515d3329902f14e08e 100644
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
@@ -593,7 +593,7 @@ public class Metrics {
@@ -592,7 +592,7 @@ public class Metrics {
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
// Only start Metrics, if it's enabled in the config
if (config.getBoolean("enabled", true)) {
Expand All @@ -41,7 +41,7 @@ index cb60d58d4a7556dd896f31d0cd249f860bb3ef84..b52a805150e95d7d27403d3c18088b33

metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
String minecraftVersion = Bukkit.getVersion();
@@ -611,7 +611,7 @@ public class Metrics {
@@ -610,7 +610,7 @@ public class Metrics {
} else {
paperVersion = "unknown";
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0004-Add-config-for-server-mod-name.patch
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ index 0000000000000000000000000000000000000000..94e7c8910e3623163528a844fd7a08b3
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index be6dc4c066efd66279301f5796451105e323089a..a99a275655ec8374c62cecbf00df6cddab00d6b9 100644
index 1676c4abb3f6f71bb7b25351aa58b4e127786fca..8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2122,7 +2122,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2121,7 +2121,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0008-Add-a-simple-tpsbar.patch
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ index e3c8deea68ef49bcd07359e243a12afb57cbcf52..279bc6eede3a1ae77b810f0553efe36a
//Util.shutdownExecutors(); // Paper - moved into super
SkullBlockEntity.clear();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index b6f3078fa688ca61cfd45d856b95c160cfe7b2da..3eded95f44f2d421f23a6daf4550240b8646f070 100644
index 23f852ede94bce4d000c8fcaa8fba5d4800b533c..0752d13febc5f1831ae58f7216fba89e1290c780 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -327,7 +327,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand All @@ -371,10 +371,10 @@ index b6f3078fa688ca61cfd45d856b95c160cfe7b2da..3eded95f44f2d421f23a6daf4550240b
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
private final ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder viewDistanceHolder = new ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 95047bf77be54af6968a6e77f13dd01aa989b4d8..7a585ce7ed7e489f0186a0a7c2370e0c439e3710 100644
index e88f197dfc0e4ec06f0360ebe18914cf57d5bdf8..b0bb884ec35945ecb56ad486ef29ac64d4ece873 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2405,6 +2405,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2406,6 +2406,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
handle.expToDrop = data.getInt("expToDrop");
handle.keepLevel = data.getBoolean("keepLevel");
}
Expand All @@ -384,7 +384,7 @@ index 95047bf77be54af6968a6e77f13dd01aa989b4d8..7a585ce7ed7e489f0186a0a7c2370e0c
}
}

@@ -2426,6 +2429,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2427,6 +2430,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

Expand Down
8 changes: 4 additions & 4 deletions patches/server/0009-Add-a-simple-membar.patch
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ index 279bc6eede3a1ae77b810f0553efe36adeeefaa4..4ff5105d32c41a8ea145e7833ea6a3ce
//Util.shutdownExecutors(); // Paper - moved into super
SkullBlockEntity.clear();
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 3eded95f44f2d421f23a6daf4550240b8646f070..e58e754534fc37f276e66cbd771d10f0d6d26706 100644
index 0752d13febc5f1831ae58f7216fba89e1290c780..93c038ba1fd216fd11ab8b5cec5807453f34e152 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -328,6 +328,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
Expand All @@ -330,10 +330,10 @@ index 3eded95f44f2d421f23a6daf4550240b8646f070..e58e754534fc37f276e66cbd771d10f0
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
private final ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder viewDistanceHolder = new ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7a585ce7ed7e489f0186a0a7c2370e0c439e3710..c8bdb67cf7e94523a6e6942cb552221be37482d4 100644
index b0bb884ec35945ecb56ad486ef29ac64d4ece873..8bcb931863dd844a38769f75ec87431547f07258 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2408,6 +2408,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2409,6 +2409,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
//Luminol start - Tpsbar
getHandle().isTpsBarVisible = data.getBoolean("tpsbarVisible");
//Luminol end
Expand All @@ -343,7 +343,7 @@ index 7a585ce7ed7e489f0186a0a7c2370e0c439e3710..c8bdb67cf7e94523a6e6942cb552221b
}
}

@@ -2432,6 +2435,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2433,6 +2436,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
//Luminol start - Tpsbar
data.putBoolean("tpsbarVisible",handle.isTpsBarVisible);
//Luminol end
Expand Down
26 changes: 13 additions & 13 deletions patches/server/0021-Force-disable-builtin-spark-plugin.patch
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 a99a275655ec8374c62cecbf00df6cddab00d6b9..67245811b15d6dfc0626e1d6ca874a901e565c3c 100644
index 8cc0c01a19fc71753d7c3ed4fa7e9992aaf93b5a..1c052f730d834187c6645dd9530c8a6e7879b3d3 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,16 +41,16 @@ index a99a275655ec8374c62cecbf00df6cddab00d6b9..67245811b15d6dfc0626e1d6ca874a90
this.server.disablePlugins();
this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown
}
@@ -1346,7 +1346,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// tasks are default scheduled at -1 + delay, and first tick will tick at 1
final long actualDoneTimeMs = System.currentTimeMillis() - org.bukkit.craftbukkit.Main.BOOT_TIME.toEpochMilli(); // Paper - Add total time
LOGGER.info("Done ({})! For help, type \"help\"", String.format(java.util.Locale.ROOT, "%.3fs", actualDoneTimeMs / 1000.00D)); // Paper - Add total time
@@ -1323,7 +1323,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
this.status = this.buildServerStatus();

- this.server.spark.enableBeforePlugins(); // Paper - spark
+ if (false) this.server.spark.enableBeforePlugins(); // Paper - spark // Luminol - Force disable builtin spark
org.spigotmc.WatchdogThread.tick();
// Paper end - Improved Watchdog Support
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
@@ -1729,7 +1729,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// 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
}

if (this.emptyTicks >= j) {
Expand All @@ -59,7 +59,7 @@ index a99a275655ec8374c62cecbf00df6cddab00d6b9..67245811b15d6dfc0626e1d6ca874a90
if (this.emptyTicks == j) {
MinecraftServer.LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhileEmptySeconds());
this.autoSave();
@@ -1748,7 +1748,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1747,7 +1747,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 a99a275655ec8374c62cecbf00df6cddab00d6b9..67245811b15d6dfc0626e1d6ca874a90
return;
}
}
@@ -1773,7 +1774,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1772,7 +1773,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
// Folia end - region threading

Expand All @@ -78,7 +78,7 @@ index a99a275655ec8374c62cecbf00df6cddab00d6b9..67245811b15d6dfc0626e1d6ca874a90
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) {
@@ -1844,7 +1845,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1843,7 +1844,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 Expand Up @@ -110,7 +110,7 @@ index 295504dab771c8bb8c668545fe5d62eae0561b76..49b4ef6457743b5f955bff70694378d4
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a8975cee866cf2c617b6d4976df71e5c20cf0e3d..ac180d082b05f2a5fa557b49e3d34e81e4957766 100644
index 567e12e24ece2cd823b73e7337b10eb89995da21..20cf4ce4f73f681bdbe092d4693812800c953be9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -312,7 +312,7 @@ public final class CraftServer implements Server {
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 4c95fb042b42e3acb7ec5fa93f5284434bf82196..ea45436e27f3d6c831d3e5fc11587e5e185304e0 100644
index 81ebab98107675483c16f2a489cb01e1a925adf4..1651a6ba49d0683cd505251fdcdc5a2fd29725c3 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 All @@ -16,7 +16,7 @@ index 4c95fb042b42e3acb7ec5fa93f5284434bf82196..ea45436e27f3d6c831d3e5fc11587e5e
import net.minecraft.world.level.entity.EntityAccess;
import net.minecraft.world.level.entity.EntityInLevelCallback;
import net.minecraft.world.level.gameevent.DynamicGameEventListener;
@@ -4456,13 +4457,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4458,13 +4459,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
targetPos, 16, // load 16 blocks to be safe from block physics
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
(chunks) -> {
Expand All @@ -37,7 +37,7 @@ index 4c95fb042b42e3acb7ec5fa93f5284434bf82196..ea45436e27f3d6c831d3e5fc11587e5e
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
)
@@ -4658,6 +4664,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4660,6 +4666,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (!this.canPortalAsync(destination, takePassengers)) {
return false;
}
Expand All @@ -48,7 +48,7 @@ index 4c95fb042b42e3acb7ec5fa93f5284434bf82196..ea45436e27f3d6c831d3e5fc11587e5e

Vec3 initialPosition = this.position();
ChunkPos initialPositionChunk = new ChunkPos(
@@ -4722,9 +4732,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -4724,9 +4734,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
info.postTeleportTransition().onTransition(teleported);
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0025-Petal-Reduce-sensor-work.patch
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ index 0000000000000000000000000000000000000000..dd45cf1fde5ee4cf8347064f106c64b8
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 92bda33a8d42150e66f3d2c24bdcce6b7c42471b..4f5048b8b892fa5bd4132fbd74d3b404f2795ad6 100644
index e48728723e9f765099fc1cea8e6a2baa48d7fc75..6b66d73daa0145829cd964403e7958335ef0aa9a 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -928,12 +928,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -930,12 +930,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
return;
}
// Paper end - Allow nerfed mobs to jump and float
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 ea45436e27f3d6c831d3e5fc11587e5e185304e0..88a6896afe118a7ea8092fac36e163b534715344 100644
index 1651a6ba49d0683cd505251fdcdc5a2fd29725c3..4e1ffa09617ec1cec7117264d7d665e17eead4b8 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 All @@ -108,7 +108,7 @@ index 635c9c7a8c8307c2bc845a8e1f24aacb526a3c92..c824e8a540dccffd848ae0a0624ce034
private Component description;
private final Optional<ResourceKey<LootTable>> lootTable;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 4f5048b8b892fa5bd4132fbd74d3b404f2795ad6..d5a205ecb5bd52d37ba867d7542b53331623cb5a 100644
index 6b66d73daa0145829cd964403e7958335ef0aa9a..80756e96faed0e0ca239f58f63522b9f15822c07 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -235,10 +235,10 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
Expand All @@ -124,7 +124,7 @@ index 4f5048b8b892fa5bd4132fbd74d3b404f2795ad6..d5a205ecb5bd52d37ba867d7542b5333
this.targetSelector.tick();
}
}
@@ -937,16 +937,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@@ -939,16 +939,20 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab

if (i % 2 != 0 && this.tickCount > 1) {
gameprofilerfiller.push("targetSelector");
Expand Down
Loading

0 comments on commit 1445e46

Please sign in to comment.