Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c619486da9 | |||
| 5cd355881a | |||
| 5a28a619b7 | |||
| 9b5f3e1bd9 | |||
| 132ee404d4 | |||
| 0e10a8e8b0 | |||
| 24e68fb203 | |||
| 141c226294 | |||
| 1049012aff | |||
| 302825cc7e | |||
| d806e4a423 | |||
| 952c4321d9 | |||
| dd7ef6701a | |||
| 43036f971c | |||
| 25ce58c40d | |||
| 106f1edb09 | |||
| eea830188f | |||
| f517cc0b8a | |||
| d90c8567d3 | |||
| 78b3a8a6e7 | |||
| 2f93769135 | |||
| 4e277ad91e | |||
| 1620687dba | |||
| 7b7eb911c9 | |||
| 0724ba3fa9 | |||
| e6d6562f4f | |||
| 580201740e | |||
| d54b248f27 | |||
| 11b0b05a93 | |||
| 7db058ef56 |
@@ -35,7 +35,7 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set Up JDK
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v5.7.0
|
||||
with:
|
||||
distribution: zulu
|
||||
java-version: 25
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
- 🔬 **生电功能增强** - 在 Folia 上实现更多生电内容(完整生电请使用 Fabric)
|
||||
- 🛠️ **更多实用功能** - 持续添加有用的服务器功能
|
||||
|
||||
### 额外启动参数
|
||||
|
||||
- morninggloryclip.useMojangSource 强制服务端使用mojang源下载文件
|
||||
- morninggloryclip.enable.mixin 启用服务器插件的mixin支持
|
||||
|
||||
## 📥 下载
|
||||
|
||||
### 稳定版本
|
||||
@@ -62,7 +67,11 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("fun.bm.lophine:lophine-api:$VERSION")
|
||||
compileOnly("fun.bm.lophine:lophine-api:26.2.build.+")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
||||
}
|
||||
```
|
||||
|
||||
@@ -79,8 +88,8 @@ dependencies {
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>fun.bm.lophine</groupId>
|
||||
<artifactId>luminol-api</artifactId>
|
||||
<version>$VERSION</version>
|
||||
<artifactId>lophine-api</artifactId>
|
||||
<version>[26.2.build,)</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
|
||||
+12
-3
@@ -29,6 +29,11 @@
|
||||
- 🔬 **Redstone Enhancement** - More redstone functionality on Folia (use Fabric for complete redstone features)
|
||||
- 🛠️ **More Useful Functions** - Continuously adding useful server features
|
||||
|
||||
### Additional Launch Parameters
|
||||
|
||||
- morninggloryclip.useMojangSource - Use Mojang's source for Minecraft Server
|
||||
- morninggloryclip.enable.mixin - Enable mixin support for Leaves Plugin
|
||||
|
||||
## 📥 Download
|
||||
|
||||
### Stable Releases
|
||||
@@ -62,7 +67,11 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("fun.bm.lophine:lophine-api:$VERSION")
|
||||
compileOnly("fun.bm.lophine:lophine-api:26.2.build.+")
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
|
||||
}
|
||||
```
|
||||
|
||||
@@ -79,8 +88,8 @@ dependencies {
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>fun.bm.lophine</groupId>
|
||||
<artifactId>luminol-api</artifactId>
|
||||
<version>$VERSION</version>
|
||||
<artifactId>lophine-api</artifactId>
|
||||
<version>[26.2.build,)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
+65
-5
@@ -1,11 +1,10 @@
|
||||
import groovy.json.JsonSlurper
|
||||
import groovy.json.JsonOutput
|
||||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
||||
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
java // TODO java launcher tasks
|
||||
id("moe.luminolmc.hyacinthusweight.patcher")
|
||||
id("fun.bm.comfreyweight.patcher")
|
||||
}
|
||||
|
||||
paperweight {
|
||||
@@ -132,12 +131,73 @@ tasks.register("sortLangKeys") {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val data = slurper.parse(file) as Map<String, Any?>
|
||||
val sorted = data.toSortedMap()
|
||||
val json = JsonOutput.toJson(sorted)
|
||||
// Pretty print with 2-space indent
|
||||
val pretty = JsonOutput.prettyPrint(json)
|
||||
val pretty = formatJson(sorted)
|
||||
file.writeText(pretty + "\n", charset = Charsets.UTF_8)
|
||||
logger.lifecycle("Processed: ${file.name} (${sorted.size} keys)")
|
||||
}
|
||||
logger.lifecycle("Done.")
|
||||
}
|
||||
}
|
||||
|
||||
// --- Pure-Kotlin JSON serializer that preserves non-ASCII characters (e.g. CJK) ---
|
||||
fun formatJson(value: Any?, indent: Int = 2): String {
|
||||
val sb = StringBuilder()
|
||||
appendJson(sb, value, indent, 0)
|
||||
return sb.toString()
|
||||
}
|
||||
|
||||
private fun appendJson(sb: StringBuilder, value: Any?, indent: Int, level: Int) {
|
||||
when (value) {
|
||||
null -> sb.append("null")
|
||||
is Boolean -> sb.append(value)
|
||||
is Number -> sb.append(value)
|
||||
is String -> sb.append('"').append(escapeJsonString(value)).append('"')
|
||||
is List<*> -> {
|
||||
if (value.isEmpty()) { sb.append("[]"); return }
|
||||
sb.append("[\n")
|
||||
value.forEachIndexed { i, v ->
|
||||
sb.append(" ".repeat(indent * (level + 1)))
|
||||
appendJson(sb, v, indent, level + 1)
|
||||
if (i < value.size - 1) sb.append(',')
|
||||
sb.append('\n')
|
||||
}
|
||||
sb.append(" ".repeat(indent * level)).append(']')
|
||||
}
|
||||
is Map<*, *> -> {
|
||||
if (value.isEmpty()) { sb.append("{}"); return }
|
||||
sb.append("{\n")
|
||||
val entries = value.entries.toList()
|
||||
entries.forEachIndexed { i, (k, v) ->
|
||||
sb.append(" ".repeat(indent * (level + 1)))
|
||||
sb.append('"').append(escapeJsonString(k.toString())).append('"')
|
||||
sb.append(": ")
|
||||
appendJson(sb, v, indent, level + 1)
|
||||
if (i < entries.size - 1) sb.append(',')
|
||||
sb.append('\n')
|
||||
}
|
||||
sb.append(" ".repeat(indent * level)).append('}')
|
||||
}
|
||||
else -> sb.append('"').append(escapeJsonString(value.toString())).append('"')
|
||||
}
|
||||
}
|
||||
|
||||
private fun escapeJsonString(s: String): String {
|
||||
val sb = StringBuilder(s.length)
|
||||
for (c in s) {
|
||||
when (c) {
|
||||
'"' -> sb.append("\\\"")
|
||||
'\\' -> sb.append("\\\\")
|
||||
'\b' -> sb.append("\\b")
|
||||
'\u000C' -> sb.append("\\f")
|
||||
'\n' -> sb.append("\\n")
|
||||
'\r' -> sb.append("\\r")
|
||||
'\t' -> sb.append("\\t")
|
||||
else -> if (c.code < 0x20) {
|
||||
sb.append("\\u").append(String.format("%04x", c.code))
|
||||
} else {
|
||||
sb.append(c) // preserve CJK and all other printable chars as-is
|
||||
}
|
||||
}
|
||||
}
|
||||
return sb.toString()
|
||||
}
|
||||
|
||||
+4
-4
@@ -2,14 +2,14 @@ group=fun.bm.lophine
|
||||
mcVersion=26.2
|
||||
apiVersion=26.2
|
||||
channel=STABLE
|
||||
clipVersion=3.0.18
|
||||
weightVersion=2.0.15
|
||||
clipVersion=1.0.1
|
||||
weightVersion=1.0.0
|
||||
# true for release, false for skip release, pre for pre-release
|
||||
release=pre
|
||||
release=true
|
||||
# true for push to repo, false for skip push repo, auto for detect by release value
|
||||
pushRepo=auto
|
||||
|
||||
foliaRef=602048cb815db2ded68cca8cd43f480b983185a1
|
||||
foliaRef=57f643f10e0a9d01024773232d38ae666067d593
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand to Lophine
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
index 652ff54e7c50412503725d628bfe72ed03059790..1727ea0b873ee4f9a86cca62eac6dc3a5063b4e6 100644
|
||||
index 56a5877181e8d37518b178c95155e892c442e96d..ebe0290bf0235af2ba353ac1f74b29080daebba4 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -19,6 +19,17 @@ public interface ServerBuildInfo {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Luminol Config System
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index fb5ca3ab0ddba433a39e65572beeb955b50d6f72..a139182704a5f147661816d08907be8a7f8f7dde 100644
|
||||
index 067d901c69a54c4b6ae5a00488f0dacc5fde7961..209d1968f4bff3b33785fd8bfbeea5ae231e581a 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2776,6 +2776,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2774,6 +2774,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
|
||||
// Paper end - API to check if the server is sleeping
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 28 Jun 2026 16:40:49 +0800
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Sat, 8 Aug 2026 01:25:33 +0800
|
||||
Subject: [PATCH] KioCG Chunk API
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@ index d873b78f6935a23ff8f6092b80968267b182cc0f..b4323370859dd4d9e86614484cdb9d2e
|
||||
+ long getChunkHotAvg(); // KioCG
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 7a719d31fbc7633a9bb87ea97338190ee3a6047a..b79b9a2ad108c0488d3cc3862f72985059bb4988 100644
|
||||
index 65e83e171ab4c514662b9344e08f7065fa9efaa1..274af6397b5f7c0b6787e2669de80e54858950a2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -4020,4 +4020,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
default ObjectContents asObjectContents() {
|
||||
return this.getPlayerProfile().asObjectContents();
|
||||
}
|
||||
@@ -4050,4 +4050,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* clearing any fixed pose in the process.
|
||||
*/
|
||||
void unsetFixedPose();
|
||||
+
|
||||
+ long getNearbyChunkHot(); // KioCG
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Tick regions api
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index c66cd17fd037b73d8ff04dd2ed328ca25e8b0f1a..b86cd3b37ec3fd63f34acd6bf17f6a91c24b5038 100644
|
||||
index bf2f7c4959f9f2cd43bbd4d4310e7eedf10cf892..bccb33456d84384bd90887822e16cbad65986106 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4708,4 +4708,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4719,4 +4719,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ As part of: Leaves (https://github.com/HyacinthHaru/Leaves/blob/90080d238e2fcfc1
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 8a24b84db656da4cec59e9bccac306467c8155b0..0ac1e049fad85de8365380b03e60d915ee643f16 100644
|
||||
index 325d797766de527268eb18bcf9db594ca3a0c519..e922a0eefb03db5e33f3306aaea558b6ed61b42a 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -3046,4 +3046,10 @@ public final class Bukkit {
|
||||
@@ -3045,4 +3045,10 @@ public final class Bukkit {
|
||||
public static void restart() {
|
||||
server.restart();
|
||||
}
|
||||
@@ -23,10 +23,10 @@ index 8a24b84db656da4cec59e9bccac306467c8155b0..0ac1e049fad85de8365380b03e60d915
|
||||
+ // Leaves end - Feature API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a139182704a5f147661816d08907be8a7f8f7dde..a8c262064e4058f786c62c333130c4cac0ce4b66 100644
|
||||
index 209d1968f4bff3b33785fd8bfbeea5ae231e581a..ac19fd1b6b8e48313c79d9fb26c3df50f67b64b8 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2782,6 +2782,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2780,6 +2780,10 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
me.earthme.luminol.api.config.LuminolConfigBuilder getLuminolConfigBuilder();
|
||||
// Luminol end - Luminol Config API
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] World load/unload APIs
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index a8c262064e4058f786c62c333130c4cac0ce4b66..3c92440fbef6e6970cd800e0038a625a775eda9a 100644
|
||||
index ac19fd1b6b8e48313c79d9fb26c3df50f67b64b8..c037307f926d64bac3b51a91aa61f63d0357770c 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -775,6 +775,17 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
|
||||
@@ -8,10 +8,10 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 0ac1e049fad85de8365380b03e60d915ee643f16..a747fbe107dcc134558ca8ecfbe30e81245a5742 100644
|
||||
index e922a0eefb03db5e33f3306aaea558b6ed61b42a..7120bbea89c1c240b09562c73833f21a9980886f 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -3052,4 +3052,15 @@ public final class Bukkit {
|
||||
@@ -3051,4 +3051,15 @@ public final class Bukkit {
|
||||
return server.getFeatureManager();
|
||||
}
|
||||
// Leaves end - Feature API
|
||||
@@ -28,10 +28,10 @@ index 0ac1e049fad85de8365380b03e60d915ee643f16..a747fbe107dcc134558ca8ecfbe30e81
|
||||
+ // Leaves end - Bot API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 3c92440fbef6e6970cd800e0038a625a775eda9a..c8fc95a85b162cc71aa8dada8f87f4fe6f5dad12 100644
|
||||
index c037307f926d64bac3b51a91aa61f63d0357770c..6c91cabdcacf7a9bf6421fbb7d52aa17516100f8 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2827,4 +2827,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2825,4 +2825,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
double @Nullable [] getRegionTPS(@NotNull World world, int chunkX, int chunkZ);
|
||||
// Folia end - region TPS API
|
||||
|
||||
@@ -8,10 +8,10 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index a747fbe107dcc134558ca8ecfbe30e81245a5742..b09a90f8187a15ddaa15f231f46f51f2b1d2c1ed 100644
|
||||
index 7120bbea89c1c240b09562c73833f21a9980886f..b114df0dde2e5bede7bb2956359fdd4ca25ac3da 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -3063,4 +3063,10 @@ public final class Bukkit {
|
||||
@@ -3062,4 +3062,10 @@ public final class Bukkit {
|
||||
return server.getBotManager();
|
||||
}
|
||||
// Leaves end - Bot API
|
||||
@@ -23,10 +23,10 @@ index a747fbe107dcc134558ca8ecfbe30e81245a5742..b09a90f8187a15ddaa15f231f46f51f2
|
||||
+ // Leaves end - Photographer API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index c8fc95a85b162cc71aa8dada8f87f4fe6f5dad12..5e4da280f7bed1084ebc2814d23901ad072e116d 100644
|
||||
index 6c91cabdcacf7a9bf6421fbb7d52aa17516100f8..e6295c4bb86286aa893b55b77ddbfb2f63fdd05c 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2836,4 +2836,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2834,4 +2834,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull org.leavesmc.leaves.entity.bot.BotManager getBotManager();
|
||||
// Leaves end - Bot API
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
`maven-publish`
|
||||
idea
|
||||
- id("io.papermc.paperweight.core")
|
||||
+ id("moe.luminolmc.hyacinthusweight.core") // TODO Later - rebrand
|
||||
+ id("fun.bm.comfreyweight.core")
|
||||
id("io.papermc.fill.gradle") version "1.0.12"
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
dependencies {
|
||||
mache("io.papermc:mache:26.2+build.1")
|
||||
- paperclip("io.papermc:paperclip:3.0.4")
|
||||
+ hyacinthusclip("moe.luminolmc:hyacinthusclip:${providers.gradleProperty("clipVersion").get()}") // TODO Later - rebrand
|
||||
+ morninggloryclip("fun.bm:morninggloryclip:${providers.gradleProperty("clipVersion").get()}")
|
||||
}
|
||||
|
||||
paperweight {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Luminol Config System
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
||||
index a4d608d64b7d3477c9144d93547fd3b4f39a1b02..2a75f8fbd2e5f41ca138740319d34683915e3b5b 100644
|
||||
index 693ce1c23c7be6406eda22da57aa4a1b86a08f5f..4385488983a7544eb6d9193d913dc55294f4620d 100644
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -107,6 +107,7 @@ public class Main {
|
||||
@@ -110,6 +110,7 @@ public class Main {
|
||||
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ index a4d608d64b7d3477c9144d93547fd3b4f39a1b02..2a75f8fbd2e5f41ca138740319d34683
|
||||
Bootstrap.bootStrap();
|
||||
Bootstrap.validate();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 6f13870a1b463049dd37cf1c65d0bdecfc35b5c4..a49c46eb7df50fc3c5587a2c3668ab6edc887107 100644
|
||||
index be15a671e0b39b455cd5983f4b90f8f3022a2ebc..56d26866cb8f413684e62558e5609b273efb8552 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1169,6 +1169,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1168,6 +1168,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ca.spottedleaf.moonrise.common.util.MoonriseCommon.haltExecutors();
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Correct player respawn place
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index fbe0ef19bfabfc42d9e0e08e17b08159321b3804..44b3dfbf529630d8cca9a4270ae2a7c94c5a077c 100644
|
||||
index 16f49ae6736c475207f31392307e280ec06edbc3..a2e40bc7a15ba0663314a288f4a9b3ec3a39dc4d 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -511,8 +511,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -43,12 +43,3 @@ index fbe0ef19bfabfc42d9e0e08e17b08159321b3804..44b3dfbf529630d8cca9a4270ae2a7c9
|
||||
if (inChunk == null) {
|
||||
continue;
|
||||
}
|
||||
@@ -2018,7 +2030,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
if (newLevel.dimension() == lastDimension) {
|
||||
- this.connection.internalTeleport(PositionMoveRotation.of(transition), transition.relatives()); // CraftBukkit
|
||||
+ this.connection.internalTeleport(PositionMoveRotation.of(transition), transition.relatives()); // CraftBukkit // Luminol - Correct player respawn place
|
||||
this.connection.resetPosition();
|
||||
transition.postTeleportTransition().onTransition(this);
|
||||
return this;
|
||||
|
||||
+59
-56
@@ -1,11 +1,14 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 28 Jun 2026 18:54:50 +0800
|
||||
Subject: [PATCH] Configurable region format framework
|
||||
Subject: [PATCH] Anonymous Object: Configurable region format framework
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java
|
||||
index a814512fcfb85312474ae2c2c21443843bf57831..2e084a5b28cbe4737f48c25e10af589213525362 100644
|
||||
index a814512fcfb85312474ae2c2c21443843bf57831..9d69a022872e06b320bee46329cd8889f74fbbaa 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java
|
||||
@@ -8,9 +8,9 @@ public interface ChunkSystemRegionFileStorage {
|
||||
@@ -13,15 +16,15 @@ index a814512fcfb85312474ae2c2c21443843bf57831..2e084a5b28cbe4737f48c25e10af5892
|
||||
public boolean moonrise$doesRegionFileNotExistNoIO(final int chunkX, final int chunkZ);
|
||||
|
||||
- public RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ);
|
||||
+ public abomination.IRegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ); // Luminol - Configurable region file format
|
||||
+ public io.anonymous.anonymous.data.RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ); // Anonymous - Configurable region file format
|
||||
|
||||
- public RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException;
|
||||
+ public abomination.IRegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; // Luminol - Configurable region file format
|
||||
+ public io.anonymous.anonymous.data.RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; // Anonymous - Configurable region file format
|
||||
|
||||
public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite(
|
||||
final int chunkX, final int chunkZ, final CompoundTag compound
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
index 3bb9b58ee97464687e348e23b99159226415c267..fc264727141c3897e6c06819b9713d4f6395baf0 100644
|
||||
index 3bb9b58ee97464687e348e23b99159226415c267..4c3ad63f17bb4a04f982b36ad3f53d3c0f58bdb5 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
@@ -1273,7 +1273,7 @@ public final class MoonriseRegionFileIO {
|
||||
@@ -29,7 +32,7 @@ index 3bb9b58ee97464687e348e23b99159226415c267..fc264727141c3897e6c06819b9713d4f
|
||||
// Paper start - flush regionfiles on save
|
||||
if (this.world.paperConfig().chunks.flushRegionsOnSave) {
|
||||
- final RegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ);
|
||||
+ final abomination.IRegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ); // Luminol - Add configurable region file
|
||||
+ final io.anonymous.anonymous.data.RegionFile regionFile = this.regionDataController.getCache().moonrise$getRegionFileIfLoaded(this.chunkX, this.chunkZ); // Anonymous - Configurable region file format
|
||||
if (regionFile != null) {
|
||||
regionFile.flush();
|
||||
} // else: evicted from cache, which should have called flush
|
||||
@@ -38,12 +41,12 @@ index 3bb9b58ee97464687e348e23b99159226415c267..fc264727141c3897e6c06819b9713d4f
|
||||
public static interface IORunnable {
|
||||
|
||||
- public void run(final RegionFile regionFile) throws IOException;
|
||||
+ public void run(final abomination.IRegionFile regionFile) throws IOException; // Luminol - Configurable region file format
|
||||
+ public void run(final io.anonymous.anonymous.data.RegionFile regionFile) throws IOException; // Anonymous - Configurable region file format
|
||||
|
||||
}
|
||||
}
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java b/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java
|
||||
index 51c126735ace8fdde89ad97b5cab62f244212db0..c7d4d944eb198ac53a3eeae717a25c7d5815c8c1 100644
|
||||
index 51c126735ace8fdde89ad97b5cab62f244212db0..ea2f45964fb8c617f90938597c230b50d83744aa 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/storage/ChunkSystemChunkBuffer.java
|
||||
@@ -8,5 +8,5 @@ public interface ChunkSystemChunkBuffer {
|
||||
@@ -51,10 +54,10 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..c7d4d944eb198ac53a3eeae717a25c7d
|
||||
public void moonrise$setWriteOnClose(final boolean value);
|
||||
|
||||
- public void moonrise$write(final RegionFile regionFile) throws IOException;
|
||||
+ public void moonrise$write(final abomination.IRegionFile regionFile) throws IOException; // Luminol - Configurable region file format
|
||||
+ public void moonrise$write(final io.anonymous.anonymous.data.RegionFile regionFile) throws IOException; // Anonymous - Configurable region file format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index a49c46eb7df50fc3c5587a2c3668ab6edc887107..83b9aab16124ddcc416f7b4cd95084e1c64fe5b7 100644
|
||||
index 56d26866cb8f413684e62558e5609b273efb8552..dd63f14cf6b857202146348b2242673af1883cb7 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -986,10 +986,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -62,16 +65,16 @@ index a49c46eb7df50fc3c5587a2c3668ab6edc887107..83b9aab16124ddcc416f7b4cd95084e1
|
||||
for (ServerLevel level : this.getAllLevels()) {
|
||||
String storageName = level.getChunkSource().chunkMap.getStorageName();
|
||||
- LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", LEGACY_WORLD_NAMES_FOR_REALMS_LOG.getOrDefault(storageName, storageName));
|
||||
+ LOGGER.info("ThreadedChunkStorage ({}): All chunks are saved", LEGACY_WORLD_NAMES_FOR_REALMS_LOG.getOrDefault(storageName, storageName)); // Luminol - configurable region format
|
||||
+ LOGGER.info("ThreadedChunkStorage ({}): All chunks are saved", LEGACY_WORLD_NAMES_FOR_REALMS_LOG.getOrDefault(storageName, storageName)); // Anonymous - Configurable region format
|
||||
}
|
||||
|
||||
- LOGGER.info("ThreadedAnvilChunkStorage: All dimensions are saved");
|
||||
+ LOGGER.info("ThreadedChunkStorage: All dimensions are saved"); // Luminol - configurable region format
|
||||
+ LOGGER.info("ThreadedChunkStorage: All dimensions are saved"); // Anonymous - configurable region format
|
||||
}
|
||||
|
||||
return result;
|
||||
diff --git a/net/minecraft/util/worldupdate/FileToUpgrade.java b/net/minecraft/util/worldupdate/FileToUpgrade.java
|
||||
index a7f2cfa9277c898038f6b9e0a3401db51012b64c..db4dba8849eb27f8f84acc3297e342da4700d839 100644
|
||||
index a7f2cfa9277c898038f6b9e0a3401db51012b64c..7b96f3ec2738875a3ed7aa34347c0f174b6579c5 100644
|
||||
--- a/net/minecraft/util/worldupdate/FileToUpgrade.java
|
||||
+++ b/net/minecraft/util/worldupdate/FileToUpgrade.java
|
||||
@@ -4,5 +4,5 @@ import java.util.List;
|
||||
@@ -79,10 +82,10 @@ index a7f2cfa9277c898038f6b9e0a3401db51012b64c..db4dba8849eb27f8f84acc3297e342da
|
||||
import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||
|
||||
-public record FileToUpgrade(RegionFile file, List<ChunkPos> chunksToUpgrade) {
|
||||
+public record FileToUpgrade(abomination.IRegionFile file, List<ChunkPos> chunksToUpgrade) { // Luminol - Configurable region file format
|
||||
+public record FileToUpgrade(io.anonymous.anonymous.data.RegionFile file, List<ChunkPos> chunksToUpgrade) { // Anonymous - Configurable region file format
|
||||
}
|
||||
diff --git a/net/minecraft/util/worldupdate/RegionStorageUpgrader.java b/net/minecraft/util/worldupdate/RegionStorageUpgrader.java
|
||||
index b228cd6c54e8c8998923ab332882d99092769c67..140ef4959fa2fe5b9cd251955c93683e8e69d5ba 100644
|
||||
index b228cd6c54e8c8998923ab332882d99092769c67..2dd3d0afd8f58e5e68a361dd38c95da06b4d133b 100644
|
||||
--- a/net/minecraft/util/worldupdate/RegionStorageUpgrader.java
|
||||
+++ b/net/minecraft/util/worldupdate/RegionStorageUpgrader.java
|
||||
@@ -36,7 +36,7 @@ import org.slf4j.Logger;
|
||||
@@ -90,7 +93,7 @@ index b228cd6c54e8c8998923ab332882d99092769c67..140ef4959fa2fe5b9cd251955c93683e
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
private static final String NEW_DIRECTORY_PREFIX = "new_";
|
||||
- private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\.mca$");
|
||||
+ private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\." + me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat.getArgument() + "$"); // Luminol - Configurable region file format
|
||||
+ private static final Pattern REGEX = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\." + me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat.getArgument() + "$"); // Anonymous - Configurable region file format
|
||||
private final DataFixer dataFixer;
|
||||
private final UpgradeProgress upgradeProgress;
|
||||
private final String type;
|
||||
@@ -99,8 +102,8 @@ index b228cd6c54e8c8998923ab332882d99092769c67..140ef4959fa2fe5b9cd251955c93683e
|
||||
List<ChunkPos> chunkPositions = Lists.newArrayList();
|
||||
|
||||
- try (RegionFile regionSource = new RegionFile(info, regionFile.toPath(), regionFolder, true)) {
|
||||
+ var regionFileInfo = new me.earthme.luminol.utils.RegionCreatorInfo(info, regionFile.toPath(), regionFolder, true); // Luminol - Configurable region file format
|
||||
+ try (abomination.IRegionFile regionSource = me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat.getCreator().create(regionFileInfo)) { // Luminol - Configurable region file format
|
||||
+ var regionFileInfo = new io.anonymous.anonymous.utils.RegionCreatorInfo(info, regionFile.toPath(), regionFolder, true); // Anonymous - Configurable region file format
|
||||
+ try (io.anonymous.anonymous.data.RegionFile regionSource = me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat.getCreator().newFile(regionFileInfo)) { // Anonymous - Configurable region file format
|
||||
for (int x = 0; x < 32; x++) {
|
||||
for (int z = 0; z < 32; z++) {
|
||||
ChunkPos pos = new ChunkPos(x + xOffset, z + zOffset);
|
||||
@@ -109,12 +112,12 @@ index b228cd6c54e8c8998923ab332882d99092769c67..140ef4959fa2fe5b9cd251955c93683e
|
||||
}
|
||||
|
||||
- private void onFileFinished(final RegionFile regionFile) {
|
||||
+ private void onFileFinished(final abomination.IRegionFile regionFile) { // Luminol - Configurable region file format
|
||||
+ private void onFileFinished(final io.anonymous.anonymous.data.RegionFile regionFile) { // Anonymous - Configurable region file format
|
||||
if (this.recreateRegionFiles) {
|
||||
if (this.previousWriteFuture != null) {
|
||||
this.previousWriteFuture.join();
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFile.java b/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93addb767392 100644
|
||||
index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..821924f85a507589a039832be8657e1dc3c0ce0c 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.world.level.ChunkPos;
|
||||
@@ -122,7 +125,7 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93ad
|
||||
import org.slf4j.Logger;
|
||||
|
||||
-public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile { // Paper - rewrite chunk system
|
||||
+public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile , abomination.IRegionFile{ // Paper - rewrite chunk system // Luminol - Configurable region file format
|
||||
+public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile , io.anonymous.anonymous.data.RegionFile{ // Paper - rewrite chunk system // Anonymous - Configurable region file format
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
public static final int MAX_CHUNK_SIZE = 500 * 1024 * 1024; // Paper - don't write garbage data to disk if writing serialization fails
|
||||
private static final int SECTOR_BYTES = 4096;
|
||||
@@ -131,7 +134,7 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93ad
|
||||
}
|
||||
|
||||
- boolean recalculateHeader() throws IOException {
|
||||
+ public boolean recalculateHeader() throws IOException { // Luminol - Configurable region file format
|
||||
+ public boolean recalculateHeader() throws IOException { // Anonymous - Configurable region file format
|
||||
if (!this.canRecalcHeader) {
|
||||
return false;
|
||||
}
|
||||
@@ -140,7 +143,7 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93ad
|
||||
}
|
||||
|
||||
- protected synchronized void write(final ChunkPos pos, final ByteBuffer data) throws IOException {
|
||||
+ public synchronized void write(final ChunkPos pos, final ByteBuffer data) throws IOException { // Luminol - Configurable region file format
|
||||
+ public synchronized void write(final ChunkPos pos, final ByteBuffer data) throws IOException { // Anonymous - Configurable region file format
|
||||
int offsetIndex = getOffsetIndex(pos);
|
||||
int offset = this.offsets.get(offsetIndex);
|
||||
int sectorNumber = getSectorNumber(offset);
|
||||
@@ -149,7 +152,7 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93ad
|
||||
|
||||
@Override
|
||||
- public final void moonrise$write(final RegionFile regionFile) throws IOException {
|
||||
+ public final void moonrise$write(final abomination.IRegionFile regionFile) throws IOException { // Luminol - Configurable region file format
|
||||
+ public final void moonrise$write(final io.anonymous.anonymous.data.RegionFile regionFile) throws IOException { // Anonymous - Configurable region file format
|
||||
regionFile.write(this.pos, ByteBuffer.wrap(this.buf, 0, this.count));
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -158,12 +161,12 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93ad
|
||||
}
|
||||
|
||||
- synchronized boolean isOversized(int x, int z) {
|
||||
+ public synchronized boolean isOversized(int x, int z) { // Luminol - Configurable region file format
|
||||
+ public synchronized boolean isOversized(int x, int z) { // Anonymous - Configurable region file format
|
||||
return this.oversized[getChunkIndex(x, z)] == 1;
|
||||
}
|
||||
|
||||
- synchronized void setOversized(int x, int z, boolean oversized) throws IOException {
|
||||
+ public synchronized void setOversized(int x, int z, boolean oversized) throws IOException { // Luminol - Configurable region file format
|
||||
+ public synchronized void setOversized(int x, int z, boolean oversized) throws IOException { // Anonymous - Configurable region file format
|
||||
final int offset = getChunkIndex(x, z);
|
||||
boolean previous = this.oversized[offset] == 1;
|
||||
this.oversized[offset] = (byte) (oversized ? 1 : 0);
|
||||
@@ -172,12 +175,12 @@ index 3de7fd2b084c38e72d7a6bc416880a881f514ad3..d3350dee1d6d5bc15dcdfba3611f93ad
|
||||
}
|
||||
|
||||
- synchronized net.minecraft.nbt.CompoundTag getOversizedData(int x, int z) throws IOException {
|
||||
+ public synchronized net.minecraft.nbt.CompoundTag getOversizedData(int x, int z) throws IOException { // Luminol - Configurable region file format
|
||||
+ public synchronized net.minecraft.nbt.CompoundTag getOversizedData(int x, int z) throws IOException { // Anonymous - Configurable region file format
|
||||
Path file = getOversizedFile(x, z);
|
||||
try (DataInputStream out = new DataInputStream(new java.io.BufferedInputStream(new java.util.zip.InflaterInputStream(Files.newInputStream(file))))) {
|
||||
return net.minecraft.nbt.NbtIo.read((java.io.DataInput) out);
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977ebfb18517 100644
|
||||
index 63b40c420030d935bb81a219fb33defe0946e21f..e0e19f091f6b85d7788259cfcc53cc3db848b68e 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -19,7 +19,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -185,7 +188,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
public static final String ANVIL_EXTENSION = ".mca";
|
||||
private static final int MAX_CACHE_SIZE = 256;
|
||||
- private final Long2ObjectLinkedOpenHashMap<RegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>();
|
||||
+ private final Long2ObjectLinkedOpenHashMap<abomination.IRegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>(); // Luminol - Configurable region file format
|
||||
+ private final Long2ObjectLinkedOpenHashMap<io.anonymous.anonymous.data.RegionFile> regionCache = new Long2ObjectLinkedOpenHashMap<>(); // Anonymous - Configurable region file format
|
||||
private final RegionStorageInfo info;
|
||||
private final Path folder;
|
||||
private final boolean sync;
|
||||
@@ -194,7 +197,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
public static ChunkPos getRegionFileCoordinates(Path file) {
|
||||
String fileName = file.getFileName().toString();
|
||||
- if (!fileName.startsWith("r.") || !fileName.endsWith(".mca")) {
|
||||
+ if (!fileName.startsWith("r.") || !fileName.endsWith(getExtensionName())) { // Luminol - Configurable region file format
|
||||
+ if (!fileName.startsWith("r.") || !fileName.endsWith(getExtensionName())) { // Anonymous - Configurable region file format
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -203,32 +206,32 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet nonExistingRegionFiles = new it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet();
|
||||
private static String getRegionFileName(final int chunkX, final int chunkZ) {
|
||||
- return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + ".mca";
|
||||
+ return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + getExtensionName(); // Luminol - Configurable region file format
|
||||
+ return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + getExtensionName(); // Anonymous - Configurable region file format
|
||||
}
|
||||
+ // Luminol start - Configurable region file format
|
||||
+ public static abomination.IRegionFile createNew(RegionStorageInfo info, Path filePath, Path folder, boolean sync) throws IOException{
|
||||
+ final me.earthme.luminol.enums.EnumRegionFormat regionFormat = me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat;
|
||||
+ // Anonymous start - Configurable region file format
|
||||
+ public static io.anonymous.anonymous.data.RegionFile createNew(RegionStorageInfo info, Path filePath, Path folder, boolean sync) throws IOException{
|
||||
+ final io.anonymous.anonymous.enums.EnumRegionFormat regionFormat = me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat;
|
||||
+ final String fullFileName = filePath.getFileName().toString();
|
||||
+ final String[] fullNameSplit = fullFileName.split("\\.");
|
||||
+ final String extensionName = fullNameSplit[fullNameSplit.length - 1];
|
||||
+
|
||||
+ if (!regionFormat.getArgument().equalsIgnoreCase(extensionName)) {
|
||||
+ // delayed crash
|
||||
+ // raise a delayed crash
|
||||
+ io.papermc.paper.threadedregions.RegionizedServer.getInstance().addTask(() -> {
|
||||
+ new RuntimeException("Invalid region file format: " + extensionName + " expected " + regionFormat.getArgument());
|
||||
+ throw new RuntimeException("Invalid region file format: " + extensionName + " expected " + regionFormat.getArgument());
|
||||
+ });
|
||||
+
|
||||
+
|
||||
+ throw new IOException("Invalid region file format: " + extensionName + " expected " + regionFormat.getArgument());
|
||||
+ }
|
||||
+
|
||||
+ return regionFormat.getCreator().create(new me.earthme.luminol.utils.RegionCreatorInfo(info, filePath, folder, sync));
|
||||
+ return regionFormat.getCreator().newFile(new io.anonymous.anonymous.utils.RegionCreatorInfo(info, filePath, folder, sync));
|
||||
+ }
|
||||
+
|
||||
+ public static String getExtensionName() {
|
||||
+ return "." + me.earthme.luminol.config.modules.function.RegionFormatConfig.regionFormat.getArgument();
|
||||
+ }
|
||||
+ // Luminol end
|
||||
+ // Anonymous end
|
||||
|
||||
private boolean doesRegionFilePossiblyExist(final long position) {
|
||||
synchronized (this.nonExistingRegionFiles) {
|
||||
@@ -237,17 +240,17 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
|
||||
@Override
|
||||
- public synchronized final RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) {
|
||||
+ public synchronized final abomination.IRegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) { // Luminol - Configurable region file format
|
||||
+ public synchronized final io.anonymous.anonymous.data.RegionFile moonrise$getRegionFileIfLoaded(final int chunkX, final int chunkZ) { // Anonymous - Configurable region file format
|
||||
return this.regionCache.getAndMoveToFirst(ChunkPos.pack(chunkX >> REGION_SHIFT, chunkZ >> REGION_SHIFT));
|
||||
}
|
||||
|
||||
@Override
|
||||
- public synchronized final RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException {
|
||||
+ public synchronized final abomination.IRegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException { // Luminol - Configurable region file format
|
||||
+ public synchronized final io.anonymous.anonymous.data.RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException { // Anonymous - Configurable region file format
|
||||
final long key = ChunkPos.pack(chunkX >> REGION_SHIFT, chunkZ >> REGION_SHIFT);
|
||||
|
||||
- RegionFile ret = this.regionCache.getAndMoveToFirst(key);
|
||||
+ abomination.IRegionFile ret = this.regionCache.getAndMoveToFirst(key); // Luminol - Configurable region file format
|
||||
+ io.anonymous.anonymous.data.RegionFile ret = this.regionCache.getAndMoveToFirst(key); // Anonymous - Configurable region file format
|
||||
if (ret != null) {
|
||||
return ret;
|
||||
}
|
||||
@@ -256,7 +259,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
FileUtil.createDirectoriesSafe(this.folder);
|
||||
|
||||
- ret = new RegionFile(this.info, regionPath, this.folder, this.sync);
|
||||
+ ret = this.createNew(this.info, regionPath, this.folder, this.sync); // Luminol - Configurable region file format
|
||||
+ ret = this.createNew(this.info, regionPath, this.folder, this.sync); // Anonymous - Configurable region file format
|
||||
|
||||
this.regionCache.putAndMoveToFirst(key, ret);
|
||||
|
||||
@@ -265,7 +268,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
|
||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||
- final RegionFile regionFile = this.getRegionFile(pos);
|
||||
+ final abomination.IRegionFile regionFile = this.getRegionFile(pos); // Luminol - Configurable region file format
|
||||
+ final io.anonymous.anonymous.data.RegionFile regionFile = this.getRegionFile(pos); // Anonymous - Configurable region file format
|
||||
|
||||
// note: not required to keep regionfile loaded after this call, as the write param takes a regionfile as input
|
||||
// (and, the regionfile parameter is unused for writing until the write call)
|
||||
@@ -274,7 +277,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||
if (writeData.result() == ca.spottedleaf.moonrise.patches.chunk_system.io.MoonriseRegionFileIO.RegionDataController.WriteData.WriteResult.DELETE) {
|
||||
- final RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ);
|
||||
+ final abomination.IRegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Luminol - Configurable region file format
|
||||
+ final io.anonymous.anonymous.data.RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Anonymous - Configurable region file format
|
||||
if (regionFile != null) {
|
||||
regionFile.clear(pos);
|
||||
} // else: didn't exist
|
||||
@@ -283,7 +286,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
final int chunkX, final int chunkZ
|
||||
) throws IOException {
|
||||
- final RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ);
|
||||
+ final abomination.IRegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Luminol - Configurable region file format
|
||||
+ final io.anonymous.anonymous.data.RegionFile regionFile = this.moonrise$getRegionFileIfExists(chunkX, chunkZ); // Anonymous - Configurable region file format
|
||||
|
||||
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
|
||||
|
||||
@@ -292,7 +295,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
final ChunkPos pos = new ChunkPos(chunkX, chunkZ);
|
||||
final ChunkPos headerChunkPos = SerializableChunkData.getChunkCoordinate(ret);
|
||||
- final RegionFile regionFile = this.getRegionFile(pos);
|
||||
+ final abomination.IRegionFile regionFile = this.getRegionFile(pos); // Luminol - Configurable region file format
|
||||
+ final io.anonymous.anonymous.data.RegionFile regionFile = this.getRegionFile(pos); // Anonymous - Configurable region file format
|
||||
|
||||
if (regionFile.getRecalculateCount() != readData.recalculateCount()) {
|
||||
return null;
|
||||
@@ -301,7 +304,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
// Paper end - rewrite chunk system
|
||||
// Paper start - rewrite chunk system
|
||||
- public RegionFile getRegionFile(ChunkPos pos) throws IOException {
|
||||
+ public abomination.IRegionFile getRegionFile(ChunkPos pos) throws IOException { // Luminol - Configurable region file format
|
||||
+ public io.anonymous.anonymous.data.RegionFile getRegionFile(ChunkPos pos) throws IOException { // Anonymous - Configurable region file format
|
||||
return this.getRegionFile(pos, false);
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -310,7 +313,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
}
|
||||
|
||||
- @org.jetbrains.annotations.Contract("_, false -> !null") private @Nullable RegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit
|
||||
+ @org.jetbrains.annotations.Contract("_, false -> !null") private abomination.@Nullable IRegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit // Luminol - Configurable region file format
|
||||
+ @org.jetbrains.annotations.Contract("_, false -> !null") private io.anonymous.anonymous.data.RegionFile getRegionFile(final ChunkPos pos, boolean existingOnly) throws IOException { // CraftBukkit // Anonymous - Configurable region file format
|
||||
// Paper start - rewrite chunk system
|
||||
if (existingOnly) {
|
||||
return this.moonrise$getRegionFileIfExists(pos.x(), pos.z());
|
||||
@@ -319,7 +322,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
final long key = ChunkPos.pack(pos.x() >> REGION_SHIFT, pos.z() >> REGION_SHIFT);
|
||||
|
||||
- RegionFile ret = this.regionCache.getAndMoveToFirst(key);
|
||||
+ abomination.IRegionFile ret = this.regionCache.getAndMoveToFirst(key); // Luminol - Configurable region file format
|
||||
+ io.anonymous.anonymous.data.RegionFile ret = this.regionCache.getAndMoveToFirst(key); // Anonymous - Configurable region file format
|
||||
if (ret != null) {
|
||||
return ret;
|
||||
}
|
||||
@@ -328,7 +331,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
FileUtil.createDirectoriesSafe(this.folder);
|
||||
|
||||
- ret = new RegionFile(this.info, regionPath, this.folder, this.sync);
|
||||
+ ret = this.createNew(this.info, regionPath, this.folder, this.sync); // Luminol - Configurable region file format
|
||||
+ ret = this.createNew(this.info, regionPath, this.folder, this.sync); // Anonymous - Configurable region file format
|
||||
|
||||
this.regionCache.putAndMoveToFirst(key, ret);
|
||||
|
||||
@@ -337,7 +340,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
}
|
||||
|
||||
- private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||
+ private static CompoundTag readOversizedChunk(abomination.IRegionFile regionfile, ChunkPos chunkCoordinate) throws IOException { // Luminol - Configurable region file format
|
||||
+ private static CompoundTag readOversizedChunk(io.anonymous.anonymous.data.RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException { // Anonymous - Configurable region file format
|
||||
synchronized (regionfile) {
|
||||
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
|
||||
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x(), chunkCoordinate.z());
|
||||
@@ -346,7 +349,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
public @Nullable CompoundTag read(final ChunkPos pos) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
- RegionFile region = this.getRegionFile(pos, true);
|
||||
+ abomination.IRegionFile region = this.getRegionFile(pos, true); // Luminol - Configurable region file format
|
||||
+ io.anonymous.anonymous.data.RegionFile region = this.getRegionFile(pos, true); // Anonymous - Configurable region file format
|
||||
if (region == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -355,7 +358,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
public void scanChunk(final ChunkPos pos, final StreamTagVisitor scanner) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
- RegionFile region = this.getRegionFile(pos, true);
|
||||
+ abomination.IRegionFile region = this.getRegionFile(pos, true); // Luminol - Configurable region file format
|
||||
+ io.anonymous.anonymous.data.RegionFile region = this.getRegionFile(pos, true); // Anonymous - Configurable region file format
|
||||
if (region == null) {
|
||||
return;
|
||||
}
|
||||
@@ -364,7 +367,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
public void write(final ChunkPos pos, final @Nullable CompoundTag value) throws IOException {
|
||||
if (!SharedConstants.DEBUG_DONT_SAVE_WORLD) {
|
||||
- RegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system
|
||||
+ abomination.IRegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system // Luminol - Configurable region file format
|
||||
+ io.anonymous.anonymous.data.RegionFile region = this.getRegionFile(pos, value == null); // CraftBukkit // Paper - rewrite chunk system // Anonymous - Configurable region file format
|
||||
// Paper start - rewrite chunk system
|
||||
if (region == null) {
|
||||
// if the RegionFile doesn't exist, no point in deleting from it
|
||||
@@ -373,7 +376,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
synchronized (this) {
|
||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||
- for (final RegionFile regionFile : this.regionCache.values()) {
|
||||
+ for (final abomination.IRegionFile regionFile : this.regionCache.values()) { // Luminol - Configurable region file format
|
||||
+ for (final io.anonymous.anonymous.data.RegionFile regionFile : this.regionCache.values()) { // Anonymous - Configurable region file format
|
||||
try {
|
||||
regionFile.close();
|
||||
} catch (final IOException ex) {
|
||||
@@ -382,7 +385,7 @@ index 63b40c420030d935bb81a219fb33defe0946e21f..2e67e69862cbf5d804de50193442977e
|
||||
synchronized (this) {
|
||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||
- for (final RegionFile regionFile : this.regionCache.values()) {
|
||||
+ for (final abomination.IRegionFile regionFile : this.regionCache.values()) { // Luminol - Configurable region file format
|
||||
+ for (final io.anonymous.anonymous.data.RegionFile regionFile : this.regionCache.values()) { // Anonymous - Configurable region file format
|
||||
try {
|
||||
regionFile.flush();
|
||||
} catch (final IOException ex) {
|
||||
+2
-2
@@ -6,10 +6,10 @@ Subject: [PATCH] Do not enable any debug subscriptions
|
||||
Really this would really crash the server by accident when the operators used F3 + J or toggled the debug synchronizer
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 44b3dfbf529630d8cca9a4270ae2a7c94c5a077c..34cc36f6bdf435593d16f2e7af280a27be048280 100644
|
||||
index a2e40bc7a15ba0663314a288f4a9b3ec3a39dc4d..216c9263999f05c36fb4c5598b41ff70e5759f5e 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -3504,7 +3504,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -3483,7 +3483,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
public Set<DebugSubscription<?>> debugSubscriptions() {
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ Inspired by https://github.com/CraftCanvasMC/Canvas/blob/ver/1.21.8/canvas-serve
|
||||
but Canvas loses its main thread checks so fixed that btw
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index 40b4eeb561a91264b9ab6ddc49cb8a93daae84a4..97f4c546663fb19558246366a3d8d77f2b9327ef 100644
|
||||
index 77c4670868a95dc7b13461dfa67af34b0a3c329a..111789b4aca281dd1899dfbcc4e7e0ca36d74b51 100644
|
||||
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -290,13 +290,14 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -299,13 +299,14 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
// Paper start
|
||||
@Override
|
||||
public void disconnectAsync(final net.minecraft.network.DisconnectionDetails disconnectionInfo) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix riding statistics desync
|
||||
Referred to: https://github.com/CraftCanvasMC/Canvas/commit/057175b0c10d5a4d1d9059fd9d077750c32633b2
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 34cc36f6bdf435593d16f2e7af280a27be048280..98d1ab3aa8dfbe571371d01544da2750339ce988 100644
|
||||
index 216c9263999f05c36fb4c5598b41ff70e5759f5e..6c2196726a0669bddda456a089aeec0d9d9bdfa3 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2537,7 +2537,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2516,7 +2516,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ index 34cc36f6bdf435593d16f2e7af280a27be048280..98d1ab3aa8dfbe571371d01544da2750
|
||||
int distance = Math.round((float)Math.sqrt(dx * dx + dy * dy + dz * dz) * 100.0F);
|
||||
Entity vehicle = this.getVehicle();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index a2b57f62b745dd21e215f919d335f14f5cb1706f..2cf8bdf6c4ab04ab42829b7af5eb89e6bd509d7a 100644
|
||||
index 18b9e630442fd31a14e131bb9043be46e10881e3..b475a8fe259848749ee05ff6cf10e46f52f955d3 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4198,7 +4198,13 @@ public abstract class Entity
|
||||
@@ -4194,7 +4194,13 @@ public abstract class Entity
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ index a2b57f62b745dd21e215f919d335f14f5cb1706f..2cf8bdf6c4ab04ab42829b7af5eb89e6
|
||||
java.util.ArrayDeque<EntityTreeNode> queue = new java.util.ArrayDeque<>();
|
||||
queue.add(this);
|
||||
|
||||
@@ -4211,14 +4217,24 @@ public abstract class Entity
|
||||
@@ -4207,14 +4213,24 @@ public abstract class Entity
|
||||
|
||||
for (EntityTreeNode passenger : passengers) {
|
||||
queue.add(passenger);
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ Almost the same bug as:
|
||||
https://github.com/PaperMC/Folia/pull/418 and https://github.com/PaperMC/Folia/issues/393
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
index 501a0e89cc7bcfce6793f059b080b38666e0fb64..ad35eafa457f706879ba8a9c92b3a34e620ee2d6 100644
|
||||
index d0dba5cc351903fb762e231a95f302479794185f..fb00f70505a6c548cd1311d7ea55c6a501e814e3 100644
|
||||
--- a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
+++ b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
@@ -264,7 +264,8 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix entity portal-teleport speed
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index c6434ff2e5c211887c2e98c8462a49e0e1cb5b21..534f103234eb92571c664cbcfea4ce4e990d3ea8 100644
|
||||
index 35ab432bbd59aba80a6eaca1769e6aa82c8a7e46..6950fa2462353f30ee02e1d0091cfcf289f63939 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1492,7 +1492,27 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -46,7 +46,7 @@ index c6434ff2e5c211887c2e98c8462a49e0e1cb5b21..534f103234eb92571c664cbcfea4ce4e
|
||||
} else {entity.inactiveTick();} // Paper - EAR 2
|
||||
profiler.pop();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 2cf8bdf6c4ab04ab42829b7af5eb89e6bd509d7a..a52d5c0ba970d666fd57e075d14350ff07401bac 100644
|
||||
index b475a8fe259848749ee05ff6cf10e46f52f955d3..5e7cf38d241591715fec9ec008d3ac87bbaef662 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -387,6 +387,7 @@ public abstract class Entity
|
||||
@@ -57,7 +57,7 @@ index 2cf8bdf6c4ab04ab42829b7af5eb89e6bd509d7a..a52d5c0ba970d666fd57e075d14350ff
|
||||
|
||||
public void inactiveTick() {
|
||||
}
|
||||
@@ -3595,6 +3596,7 @@ public abstract class Entity
|
||||
@@ -3591,6 +3592,7 @@ public abstract class Entity
|
||||
} else {
|
||||
if (this.portalProcess == null || !this.portalProcess.isSamePortal(portal)) {
|
||||
this.portalProcess = new PortalProcessor(portal, pos.immutable());
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix player auto saving ignores interval
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 98d1ab3aa8dfbe571371d01544da2750339ce988..264de9099b19779f20ad23c41d0967670759ae12 100644
|
||||
index 6c2196726a0669bddda456a089aeec0d9d9bdfa3..0802483484015fd92dec211aae9fd33e45621f74 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -208,7 +208,7 @@ import org.slf4j.Logger;
|
||||
|
||||
+6
-6
@@ -6,7 +6,7 @@ Subject: [PATCH] Force disable builtin spark plugin
|
||||
The spark passed down from paper has some memory leaking issue, so we fully removed it from the code to prevent that memory leaking issue.
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 83b9aab16124ddcc416f7b4cd95084e1c64fe5b7..7683c12d48d23dd43bce3d3b5633029c596930a5 100644
|
||||
index dd63f14cf6b857202146348b2242673af1883cb7..88ccf32b3c1b3506fb76be5ae520168b6b167aa3 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -672,8 +672,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -29,7 +29,7 @@ index 83b9aab16124ddcc416f7b4cd95084e1c64fe5b7..7683c12d48d23dd43bce3d3b5633029c
|
||||
this.server.disablePlugins();
|
||||
this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown
|
||||
}
|
||||
@@ -1352,7 +1352,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1351,7 +1351,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.statusIcon = this.loadStatusIcon().orElse(null);
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
@@ -38,7 +38,7 @@ index 83b9aab16124ddcc416f7b4cd95084e1c64fe5b7..7683c12d48d23dd43bce3d3b5633029c
|
||||
// Folia start - region threading
|
||||
if (true) {
|
||||
io.papermc.paper.threadedregions.RegionizedServer.getInstance().init(); // Folia - region threading - only after loading worlds
|
||||
@@ -1666,7 +1666,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1665,7 +1665,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.emptyTicks >= emptyTickThreshold) {
|
||||
@@ -47,7 +47,7 @@ index 83b9aab16124ddcc416f7b4cd95084e1c64fe5b7..7683c12d48d23dd43bce3d3b5633029c
|
||||
if (this.emptyTicks == emptyTickThreshold) {
|
||||
LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhenEmptySeconds());
|
||||
this.autoSave();
|
||||
@@ -1685,7 +1685,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1684,7 +1684,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - avoid issues with certain tasks not processing during sleep
|
||||
//this.server.spark.executeMainThreadTasks(); // Paper - spark // Folia - region threading
|
||||
this.tickConnection();
|
||||
@@ -56,7 +56,7 @@ index 83b9aab16124ddcc416f7b4cd95084e1c64fe5b7..7683c12d48d23dd43bce3d3b5633029c
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1698,7 +1698,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1697,7 +1697,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
};
|
||||
// Folia end - region threading
|
||||
|
||||
@@ -65,7 +65,7 @@ index 83b9aab16124ddcc416f7b4cd95084e1c64fe5b7..7683c12d48d23dd43bce3d3b5633029c
|
||||
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) {
|
||||
@@ -1785,7 +1785,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1784,7 +1784,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
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleprotAsync calls in move events
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c1faaf7d514c23d756aa626fa93aabd8bb503463..0c5fb17e7cce18eac68183cc3b5de6fc6451dc50 100644
|
||||
index c86b1fd5e200c478d178be32791b6e8c960d47e2..9be6d486082d344fb91fd74207eee83ca2f8e869 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -730,7 +730,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -18,7 +18,7 @@ index c1faaf7d514c23d756aa626fa93aabd8bb503463..0c5fb17e7cce18eac68183cc3b5de6fc
|
||||
|
||||
// If the event is cancelled we move the player back to their old location.
|
||||
if (event.isCancelled()) {
|
||||
@@ -1740,7 +1742,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1741,7 +1743,9 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
Location oldTo = to.clone();
|
||||
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
||||
@@ -29,10 +29,10 @@ index c1faaf7d514c23d756aa626fa93aabd8bb503463..0c5fb17e7cce18eac68183cc3b5de6fc
|
||||
// If the event is cancelled we move the player back to their old location.
|
||||
if (event.isCancelled()) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index a52d5c0ba970d666fd57e075d14350ff07401bac..72f89eaba2ca8b66fa07a6378d93917dec83c688 100644
|
||||
index 5e7cf38d241591715fec9ec008d3ac87bbaef662..51dacbe395c85aba9b81831e511a413b303ca675 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4476,12 +4476,25 @@ public abstract class Entity
|
||||
@@ -4472,12 +4472,25 @@ public abstract class Entity
|
||||
teleportTarget.cause(), teleportFlags, teleportComplete
|
||||
);
|
||||
}
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@ Subject: [PATCH] Sync dragon part when teleportation or firstly created
|
||||
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..75c36cbf86e56d4993169688a13f22ccef555d92 100644
|
||||
index aa53138b3670a8337b639472a6ab5ce46702ff76..ed27b73e787782f328906b2a061feeca25d42a24 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/server/ServerEntityLookup.java
|
||||
@@ -97,6 +97,7 @@ public final class ServerEntityLookup extends EntityLookup {
|
||||
@@ -93,6 +93,7 @@ public final class ServerEntityLookup extends EntityLookup {
|
||||
if (entity instanceof ThrownEnderpearl enderpearl) {
|
||||
this.addEnderPearl(CoordinateUtils.getChunkKey(enderpearl.chunkPosition()), enderpearl.getId()); // Folia - region threading
|
||||
}
|
||||
@@ -17,10 +17,10 @@ index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..75c36cbf86e56d4993169688a13f22cc
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 72f89eaba2ca8b66fa07a6378d93917dec83c688..6b7382f06a8c76b216b081e66789fe51466b1e29 100644
|
||||
index 51dacbe395c85aba9b81831e511a413b303ca675..e2e1b101de8afbec7d853593c527e35111c94319 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4460,6 +4460,7 @@ public abstract class Entity
|
||||
@@ -4456,6 +4456,7 @@ public abstract class Entity
|
||||
Entity copy = this.getType().create(destination, EntitySpawnReason.DIMENSION_TRAVEL);
|
||||
copy.restoreFrom(this);
|
||||
copy.transform(pos, yaw, pitch, velocity);
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ On folia, entity usually cannot move out of the tickregion, but sometimes it act
|
||||
Reference from : https://github.com/KaiijuMC/Kaiiju/blob/ver/1.20.1/patches/server/0040-Teleport-async-if-we-cannot-move-entity-off-main.patch
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 6b7382f06a8c76b216b081e66789fe51466b1e29..8c909108a0c468f353837787188c12f907369b9b 100644
|
||||
index e2e1b101de8afbec7d853593c527e35111c94319..33c9692a59c58c44a77b1077553e2bda88cb8305 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1163,6 +1163,19 @@ public abstract class Entity
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ index 13d7965fd4f99f0848b080349df41f8b1c31a19b..5b83f2edd6afe94c28bf491afab737e9
|
||||
nmsEntity.stopRiding();
|
||||
nmsEntity.teleportAsync(
|
||||
diff --git a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
index ad35eafa457f706879ba8a9c92b3a34e620ee2d6..790c1bcf11150d31bf90c32345e4eb40de9a6a41 100644
|
||||
index fb00f70505a6c548cd1311d7ea55c6a501e814e3..4df9a3356cfdee52761db47694e59779976840db 100644
|
||||
--- a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
+++ b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
@@ -99,7 +99,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
|
||||
|
||||
@@ -228,7 +228,7 @@ index 5a72fa0d72bfdb927293abe921c57f6ae964a6ec..f8344f640f119e3865f2718d1abd0ede
|
||||
|
||||
private void uncaughtException(final Thread thread, final Throwable thr) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 7683c12d48d23dd43bce3d3b5633029c596930a5..ab61d18845827ac835edf92651d0b510358106ff 100644
|
||||
index 88ccf32b3c1b3506fb76be5ae520168b6b167aa3..8bc18bf35537d5bbf2dacef34886b9a95d44a340 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -236,7 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -240,7 +240,7 @@ index 7683c12d48d23dd43bce3d3b5633029c596930a5..ab61d18845827ac835edf92651d0b510
|
||||
private PlayerList playerList;
|
||||
private volatile boolean running = true;
|
||||
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
@@ -2034,14 +2034,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2047,14 +2047,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -258,7 +258,7 @@ index 7683c12d48d23dd43bce3d3b5633029c596930a5..ab61d18845827ac835edf92651d0b510
|
||||
Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
|
||||
newLevels.remove(level.dimension());
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 534f103234eb92571c664cbcfea4ce4e990d3ea8..c4d9d890db784d376b876d70f0468df6edb75168 100644
|
||||
index 6950fa2462353f30ee02e1d0091cfcf289f63939..def5d4ce012dba5f819680d671235173467bfe7a 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,6 +221,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -275,10 +275,10 @@ index 534f103234eb92571c664cbcfea4ce4e990d3ea8..c4d9d890db784d376b876d70f0468df6
|
||||
// CraftBukkit start
|
||||
private final ResourceKey<LevelStem> typeKey;
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 264de9099b19779f20ad23c41d0967670759ae12..ab6229ee412cf2aa5affc87510230c587765080b 100644
|
||||
index 0802483484015fd92dec211aae9fd33e45621f74..4c9915087798f6548bb22574051c7b0b5aed7732 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1705,7 +1705,30 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1694,7 +1694,30 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
|
||||
ServerLevel origin = this.level();
|
||||
ServerPlayer.RespawnConfig respawnConfig = this.getRespawnConfig();
|
||||
@@ -310,7 +310,7 @@ index 264de9099b19779f20ad23c41d0967670759ae12..ab6229ee412cf2aa5affc87510230c58
|
||||
|
||||
// modified based off PlayerList#respawn
|
||||
|
||||
@@ -1756,8 +1779,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1745,8 +1768,8 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
// now the respawn logic is complete
|
||||
|
||||
// last, call the function callback
|
||||
@@ -322,10 +322,10 @@ index 264de9099b19779f20ad23c41d0967670759ae12..ab6229ee412cf2aa5affc87510230c58
|
||||
}
|
||||
);
|
||||
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index 97f4c546663fb19558246366a3d8d77f2b9327ef..e5304e9d1ea57c01a1147621a42a9b584878f765 100644
|
||||
index 111789b4aca281dd1899dfbcc4e7e0ca36d74b51..2d3b0243f061aeaa979ddfc89c0361ecc29edcde 100644
|
||||
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -210,8 +210,23 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -219,8 +219,23 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
|
||||
this.switchToMain = serverPlayer;
|
||||
// now the connection responsibility is transferred to the region
|
||||
@@ -350,7 +350,7 @@ index 97f4c546663fb19558246366a3d8d77f2b9327ef..e5304e9d1ea57c01a1147621a42a9b58
|
||||
world.moonrise$getChunkTaskScheduler().scheduleTickingState(
|
||||
chunkPos.x(), chunkPos.z(), net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING, true,
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGHER,
|
||||
@@ -223,9 +238,15 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -232,9 +247,15 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
);
|
||||
io.papermc.paper.threadedregions.RegionizedServer.getInstance().taskQueue.queueTickTaskQueue(
|
||||
world, chunkPos.x(), chunkPos.z(), () -> {
|
||||
@@ -367,7 +367,7 @@ index 97f4c546663fb19558246366a3d8d77f2b9327ef..e5304e9d1ea57c01a1147621a42a9b58
|
||||
);
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/config/PrepareSpawnTask.java b/net/minecraft/server/network/config/PrepareSpawnTask.java
|
||||
index 48f51b0f94df3e59c9410129489c63a4287bc0bc..2682f8702785b1e501748a308c5e394b8b664428 100644
|
||||
index 9fad06eda81b4c2c1889a9cfa7a6948e7ee01862..854f8954ccfd8c34c9f9c91fd1805260f9b429b5 100644
|
||||
--- a/net/minecraft/server/network/config/PrepareSpawnTask.java
|
||||
+++ b/net/minecraft/server/network/config/PrepareSpawnTask.java
|
||||
@@ -104,6 +104,16 @@ public class PrepareSpawnTask implements ConfigurationTask {
|
||||
@@ -429,7 +429,7 @@ index 48f51b0f94df3e59c9410129489c63a4287bc0bc..2682f8702785b1e501748a308c5e394b
|
||||
private final Vec2 spawnAngle;
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 8c909108a0c468f353837787188c12f907369b9b..1dd0ce3f8af52f5ba0da1d6617489a0de2c971b2 100644
|
||||
index 33c9692a59c58c44a77b1077553e2bda88cb8305..e8047a06a2df17fde9965508c1ebcf1fc4d25989 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -392,6 +392,9 @@ public abstract class Entity
|
||||
@@ -442,7 +442,7 @@ index 8c909108a0c468f353837787188c12f907369b9b..1dd0ce3f8af52f5ba0da1d6617489a0d
|
||||
// CraftBukkit end
|
||||
|
||||
// Paper start
|
||||
@@ -4538,6 +4541,17 @@ public abstract class Entity
|
||||
@@ -4534,6 +4537,17 @@ public abstract class Entity
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ index 8c909108a0c468f353837787188c12f907369b9b..1dd0ce3f8af52f5ba0da1d6617489a0d
|
||||
// TODO any events that can modify go HERE
|
||||
|
||||
// check for same region
|
||||
@@ -4556,6 +4570,14 @@ public abstract class Entity
|
||||
@@ -4552,6 +4566,14 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
for (EntityTreeNode entity : passengerTree.getFullTree()) {
|
||||
@@ -475,7 +475,7 @@ index 8c909108a0c468f353837787188c12f907369b9b..1dd0ce3f8af52f5ba0da1d6617489a0d
|
||||
entity.root.teleportSyncSameRegion(pos, yaw, pitch, velocity);
|
||||
}
|
||||
|
||||
@@ -4571,8 +4593,8 @@ public abstract class Entity
|
||||
@@ -4567,8 +4589,8 @@ public abstract class Entity
|
||||
// performs add/remove from world logic which will also perform add/remove tracker logic
|
||||
}
|
||||
|
||||
@@ -486,7 +486,7 @@ index 8c909108a0c468f353837787188c12f907369b9b..1dd0ce3f8af52f5ba0da1d6617489a0d
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -4589,7 +4611,7 @@ public abstract class Entity
|
||||
@@ -4585,7 +4607,7 @@ public abstract class Entity
|
||||
node.root = node.root.transformForAsyncTeleport(destination, pos, yaw, pitch, velocity);
|
||||
}
|
||||
|
||||
|
||||
+18
-6
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Tue, 21 Apr 2026 01:41:14 +0800
|
||||
Date: Sat, 8 Aug 2026 01:27:42 +0800
|
||||
Subject: [PATCH] Kaiiju: Entity tick and removal limiter
|
||||
|
||||
Co-authored by: Xymb <xymb@endcrystal.me>
|
||||
@@ -8,19 +8,19 @@ As part of: Kaiiju (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2e
|
||||
Licensed under: GPL-3.0 (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2ec408e6411e6f752379da/LICENSE)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index cb15cfbc684ae9e9d9634886f707c2df10063139..f32d118e1e925b2155cef3fcdcb1e194c541e242 100644
|
||||
index c8f13da82c55cc5c1fe1c922a87e3eccb1117937..981458f6697a79dbc9fc8cf41c088c98e556c6dd 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -354,6 +354,7 @@ public final class RegionizedWorldData {
|
||||
@@ -349,6 +349,7 @@ public final class RegionizedWorldData {
|
||||
private final IteratorSafeOrderedReferenceSet<Mob> navigatingMobs = new IteratorSafeOrderedReferenceSet<>();
|
||||
public final ReferenceList<Entity> trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker
|
||||
public final ReferenceList<Entity> trackerUnloadedEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker
|
||||
public ReferenceList<Entity> trackerEntities = new ReferenceList<>(EMPTY_ENTITY_ARRAY); // Moonrise - entity tracker
|
||||
public boolean iteratingTrackerEntities;
|
||||
+ public final dev.kaiijumc.kaiiju.KaiijuEntityThrottler entityThrottler = new dev.kaiijumc.kaiiju.KaiijuEntityThrottler(); // Kaiiju
|
||||
|
||||
// block ticking
|
||||
private final ObjectLinkedOpenHashSet<BlockEventData> blockEvents = new ObjectLinkedOpenHashSet<>();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index c4d9d890db784d376b876d70f0468df6edb75168..0641b98ef3298eb682ceae83f60b730f3bf90103 100644
|
||||
index def5d4ce012dba5f819680d671235173467bfe7a..1c01ec9597c47b7296f498a897f1fd2333c8c4d4 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -917,6 +917,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -53,3 +53,15 @@ index c4d9d890db784d376b876d70f0468df6edb75168..0641b98ef3298eb682ceae83f60b730f
|
||||
} finally { foliaProfiler.stopTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ENTITY_TICK); } // Folia - profiler
|
||||
if (this.paperConfig().unsupportedSettings.ticking.blockEntities) { // Paper - option to disable ticking
|
||||
profiler.popPush("blockEntities");
|
||||
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
||||
index 6efaa78faca15c7a48bdffb24480d1bac29f3ba8..31619890f1bd4f458b6f9a31fac8cefaafe09e8e 100644
|
||||
--- a/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/net/minecraft/world/entity/EntityType.java
|
||||
@@ -73,6 +73,7 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T>,
|
||||
private final float spawnDimensionsScale;
|
||||
private final FeatureFlagSet requiredFeatures;
|
||||
private final boolean allowedInPeaceful;
|
||||
+ public volatile dev.kaiijumc.kaiiju.KaiijuEntityLimits.EntityLimit entityLimit;
|
||||
|
||||
public static Identifier getKey(final EntityType<?> type) {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(type);
|
||||
|
||||
+8
-7
@@ -8,10 +8,10 @@ As part of: Kaiiju (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2e
|
||||
Licensed under: GPL-3.0 (https://github.com/KaiijuMC/Kaiiju/blob/c2b7aec8f7b418a39a2ec408e6411e6f752379da/LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 1dd0ce3f8af52f5ba0da1d6617489a0de2c971b2..cf70a8e2fe2fe70bcdf71f8112479031d80d8b75 100644
|
||||
index e8047a06a2df17fde9965508c1ebcf1fc4d25989..3b98ef4310d9f996437af9f12ab3de2cf6f4dd63 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4676,14 +4676,18 @@ public abstract class Entity
|
||||
@@ -4672,15 +4672,19 @@ public abstract class Entity
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
@@ -28,13 +28,14 @@ index 1dd0ce3f8af52f5ba0da1d6617489a0de2c971b2..cf70a8e2fe2fe70bcdf71f8112479031
|
||||
portalInfoCompletable.complete(
|
||||
new net.minecraft.world.level.portal.TeleportTransition(
|
||||
- destination, Vec3.atBottomCenterOf(targetPos.below()), Vec3.ZERO, Direction.WEST.toYRot(), 0.0f,
|
||||
- Relative.union(Relative.DELTA, Set.of(Relative.X_ROT)),
|
||||
+ destination, finalPos, this.getDeltaMovement(), Direction.WEST.toYRot(), 0.0f, // Kaiiju - Vanilla end teleportation
|
||||
false, false,
|
||||
- Relative.union(Relative.DELTA, Set.of(Relative.X_ROT)),
|
||||
+ /*Relative.union(Relative.DELTA, Set.of(Relative.X_ROT))*/Set.of(), // Kaiiju - Vanilla end teleportation
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
|
||||
)
|
||||
@@ -4698,11 +4702,15 @@ public abstract class Entity
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL,
|
||||
TeleportTransition.PassengerTeleportationMode.POSITION_RIDER
|
||||
@@ -4696,11 +4700,15 @@ public abstract class Entity
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
BlockPos adjustedSpawn = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, spawnPos);
|
||||
@@ -49,9 +50,9 @@ index 1dd0ce3f8af52f5ba0da1d6617489a0de2c971b2..cf70a8e2fe2fe70bcdf71f8112479031
|
||||
new net.minecraft.world.level.portal.TeleportTransition(
|
||||
- destination, Vec3.atBottomCenterOf(adjustedSpawn), Vec3.ZERO, 0.0f, 0.0f,
|
||||
+ destination, finalPos, this.getDeltaMovement(), 0.0f, 0.0f, // Kaiiju - Vanilla end teleportation
|
||||
false, false,
|
||||
Relative.union(Relative.DELTA, Relative.ROTATION),
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
|
||||
@@ -4881,6 +4889,10 @@ public abstract class Entity
|
||||
return false;
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 28 Jun 2026 19:58:46 +0800
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Sat, 8 Aug 2026 01:29:57 +0800
|
||||
Subject: [PATCH] Async protocol switching optimization
|
||||
|
||||
|
||||
@@ -137,10 +137,10 @@ index 40f54536422fa38bd84017fc634808016b4de58b..ecaa296f576c5c90fda89e0406d65526
|
||||
+
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
index e5304e9d1ea57c01a1147621a42a9b584878f765..af337f77545df94760b12a2b2f5eaf43d18e3774 100644
|
||||
index 2d3b0243f061aeaa979ddfc89c0361ecc29edcde..e074fe9eb6a1e6cb30b7de522fcac673dcb81960 100644
|
||||
--- a/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||
@@ -188,8 +188,9 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -197,8 +197,9 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
public void handleConfigurationFinished(final ServerboundFinishConfigurationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.server.packetProcessor());
|
||||
this.finishCurrentTask(JoinWorldTask.TYPE);
|
||||
@@ -151,7 +151,7 @@ index e5304e9d1ea57c01a1147621a42a9b584878f765..af337f77545df94760b12a2b2f5eaf43
|
||||
try {
|
||||
PlayerList playerList = this.server.getPlayerList();
|
||||
if (playerList.getPlayer(this.gameProfile.id()) != null) {
|
||||
@@ -256,6 +257,18 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
@@ -265,6 +266,18 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||
LOGGER.error("Couldn't place player in world", e);
|
||||
this.disconnect(DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
@@ -171,10 +171,10 @@ index e5304e9d1ea57c01a1147621a42a9b584878f765..af337f77545df94760b12a2b2f5eaf43
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0c5fb17e7cce18eac68183cc3b5de6fc6451dc50..1ea8e03a4dc39486505d21bff1d15cb2339cafc2 100644
|
||||
index 9be6d486082d344fb91fd74207eee83ca2f8e869..40b409ad07eaa03473712ba83bc4ccd9a5c0f932 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2901,7 +2901,13 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2902,7 +2902,13 @@ public class ServerGamePacketListenerImpl
|
||||
} // Folia end - rewrite login process - move connection ownership to global region
|
||||
this.waitingForSwitchToConfig = true; // Folia - rewrite login process - fix bad ordering of this field write - moved down
|
||||
this.send(ClientboundStartConfigurationPacket.INSTANCE);
|
||||
@@ -188,7 +188,7 @@ index 0c5fb17e7cce18eac68183cc3b5de6fc6451dc50..1ea8e03a4dc39486505d21bff1d15cb2
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -3786,12 +3792,26 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3787,12 +3793,26 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
final ServerConfigurationPacketListenerImpl listener = new ServerConfigurationPacketListenerImpl(this.server, this.connection, this.createCookie(this.player.clientInformation())); // Paper
|
||||
@@ -253,12 +253,12 @@ index f2329d1a9d9d4bf4c9d771e25e54f2f9ef65a76c..deee051c103f9797f4612e06c12f293e
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index e7579a9873362317dd82b63306cf650af9472574..53449af103c1774f68cb0c296d47e7032e4e3843 100644
|
||||
index 259eb7574841b1b885093b534440f8a40db4e8e2..2975a879320faed5f6591489f86d3f909072cbaa 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -237,9 +237,11 @@ public abstract class PlayerList {
|
||||
// only after setting the connection listener to game type, add the connection to this regions list
|
||||
level.getCurrentWorldData().connections.add(connection);
|
||||
level.getCurrentWorldData().addConnection(player);
|
||||
// Folia end - rewrite login process
|
||||
+ if (!me.earthme.luminol.config.modules.optimizations.AsyncProtocolChangeConfig.enabled) { // Luminol - Async protocol switch // we will run async switch once these main thread logics became done
|
||||
connection.setupInboundProtocol(
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for server mod name
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index ab61d18845827ac835edf92651d0b510358106ff..d4e31bb829451a687bf567fd0357f46fd7d46902 100644
|
||||
index 8bc18bf35537d5bbf2dacef34886b9a95d44a340..daf45761bdc88848ba81b7595b5abd5635dfd607 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2072,7 +2072,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2085,7 +2085,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ index 480b6b2405706fd4d7158d0e160adafd84099887..137389f7ee97fc3a15c8f5f87c058065
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
index d42bb2a1721e4ab8c9956e18c3ca418b8d648c59..4f06daf619596d4116140b0710ea92c2c8552fc0 100644
|
||||
index 123df098fa987030fe3789f36ff95aeee2979834..35b0632faf2709f65f731cd42e575ee967937254 100644
|
||||
--- a/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
@@ -76,6 +76,12 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config for vanilla random
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index cf70a8e2fe2fe70bcdf71f8112479031d80d8b75..17650e196f1e5b79765651bf302291873a4eb509 100644
|
||||
index 3b98ef4310d9f996437af9f12ab3de2cf6f4dd63..a7f4a9f8bca00fda1b57e2245c57726bb1ce41ed 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -298,7 +298,7 @@ public abstract class Entity
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add force the data command to be enabled config
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index bc9f6cc286536b87513de81855ad0b61cf787c84..afbaf2116930d72ebb0c77745d02115abab14dc4 100644
|
||||
index 4ddb5e7ce3529466c3930caa9aa6b18158e9a63d..9b1dcfadd6d5ae868b087a18983d03e8bb86b56a 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -202,7 +202,9 @@ public class Commands {
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@ Subject: [PATCH] Add back read-only datapack command & Fix datapack command
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index afbaf2116930d72ebb0c77745d02115abab14dc4..6823c41c08ca1a1baf9257fc861ae97bbcbe3a50 100644
|
||||
index 9b1dcfadd6d5ae868b087a18983d03e8bb86b56a..21f2b9866e1cf36421e10a945fb6fbaa251009ed 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -205,7 +205,7 @@ public class Commands {
|
||||
@@ -19,10 +19,10 @@ index afbaf2116930d72ebb0c77745d02115abab14dc4..6823c41c08ca1a1baf9257fc861ae97b
|
||||
DefaultGameModeCommands.register(this.dispatcher);
|
||||
//DialogCommand.register(this.dispatcher, context); // Folia - region threading - TODO
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index d4e31bb829451a687bf567fd0357f46fd7d46902..4f292468194baae343eeb077362e51dcfb6c0df1 100644
|
||||
index daf45761bdc88848ba81b7595b5abd5635dfd607..b9ff4628421ba0c5bdaec13c9dc1b35e8d194d92 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2415,6 +2415,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2428,6 +2428,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.reloadResources(packsToEnable, io.papermc.paper.event.server.ServerResourcesReloadedEvent.Cause.PLUGIN);
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -17,10 +17,10 @@ index 52dcbcf64c3a510d4a4524b7d0ee226d9a73511d..051d601e7e809518e8d82ae4ae325905
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 4f292468194baae343eeb077362e51dcfb6c0df1..f0a3fdaf7e9d342b472b3db42f5b59b0f6691b49 100644
|
||||
index b9ff4628421ba0c5bdaec13c9dc1b35e8d194d92..ff6809944c2dd8a2cc7c11a8b05b0f7c17b5fb4c 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1743,7 +1743,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1742,7 +1742,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Folia end - region threading
|
||||
//this.tickCount++; // Folia - region threading
|
||||
//this.tickRateManager.tick(); // Folia - region threading
|
||||
@@ -68,7 +68,7 @@ index 4f292468194baae343eeb077362e51dcfb6c0df1..f0a3fdaf7e9d342b472b3db42f5b59b0
|
||||
this.lastServerStatus = nano;
|
||||
this.status = this.buildServerStatus();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 0641b98ef3298eb682ceae83f60b730f3bf90103..cea4bc7036dfd8777c151a0dd811fc13579d6501 100644
|
||||
index 1c01ec9597c47b7296f498a897f1fd2333c8c4d4..015f0521aa65201fab990177867d10e0ea0611d4 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1491,6 +1491,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -106,7 +106,7 @@ index 0641b98ef3298eb682ceae83f60b730f3bf90103..cea4bc7036dfd8777c151a0dd811fc13
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index ab6229ee412cf2aa5affc87510230c587765080b..f0c574e039f80ff0227239356de8d61ef06a0936 100644
|
||||
index 4c9915087798f6548bb22574051c7b0b5aed7732..21733beb07c0df3cf6872ce84a07e85dfe5ee3e9 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -441,7 +441,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -183,10 +183,10 @@ index f03fa06c0ba56f7f5e1e45bc1568a490751efde3..eee1c14249addbf4714df733870da974
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 17650e196f1e5b79765651bf302291873a4eb509..f218b7f6ce32d7ac959255e59c620d6fd420bf8e 100644
|
||||
index a7f4a9f8bca00fda1b57e2245c57726bb1ce41ed..84fe83f25e72e8ce257421f62e532d4203438d2b 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -6468,4 +6468,6 @@ public abstract class Entity
|
||||
@@ -6475,4 +6475,6 @@ public abstract class Entity
|
||||
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
|
||||
}
|
||||
// Paper end
|
||||
@@ -258,7 +258,7 @@ index f79353aa58b03d00839e4e95d1fd2480a635a592..0a43947bcc9f505ad9bc4d54c564709c
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 2eb5fc819e2e17c69de87f8aa1a99e02bc5a62d5..a4bc767b799c050ce07a3685f655b4ba947d2466 100644
|
||||
index 5ffcf20d06f8a0cc0394347d8ef4cfa1e89ebab2..a26025ec6c3c6fe84bfc598176a6d4ff49de4a41 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -170,6 +170,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
+7
-7
@@ -6,7 +6,7 @@ Subject: [PATCH] Add config to enable tick command
|
||||
only freeze/unfreeze/step/query/rate can run when enabled
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e83122ccfdbd1 100644
|
||||
index ff90abb47203c03636d3175f2b3efcf43517b3b0..a96da8ab0d8ca8241df79fbfca33f3e6072db367 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -239,6 +239,11 @@ public final class RegionizedServer {
|
||||
@@ -14,7 +14,7 @@ index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e8312
|
||||
private void globalTick(final long tickCount) {
|
||||
++this.tickCount;
|
||||
+ // Luminol start - Add a config to enable tick command
|
||||
+ if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
+ MinecraftServer.getServer().tickRateManager().tick();
|
||||
+ }
|
||||
+ // Luminol end - Add a config to enable tick command
|
||||
@@ -41,12 +41,12 @@ index ff90abb47203c03636d3175f2b3efcf43517b3b0..a2db29aa47a4b7213d4956f02f6e8312
|
||||
|
||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||
- if (world.tickTime) {
|
||||
+ if ((!me.earthme.luminol.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Luminol - Add a config to enable tick command
|
||||
+ if ((!fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick || world.tickRateManager().runsNormally()) && world.tickTime) { // Luminol - Add a config to enable tick command // Lophine - redirect
|
||||
world.serverLevelData.setGameTime(world.serverLevelData.getGameTime() + tickCount);
|
||||
}
|
||||
}
|
||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533d9d5bc1b 100644
|
||||
index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..ae424c8931a2f82c6c8d4ddd8422a2c142a77a95 100644
|
||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
@@ -40,8 +40,8 @@ public final class TickRegionScheduler {
|
||||
@@ -92,7 +92,7 @@ index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533
|
||||
// next start isn't updated until the end of this tick
|
||||
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||
+ // Luminol start - Add a config to enable tick command
|
||||
+ if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
+ MinecraftServer.getServer().tickRateManager().endTickWork();
|
||||
+ }
|
||||
+ // Luminol end - Add a config to enable tick command
|
||||
@@ -100,7 +100,7 @@ index 58e557923dfe6cee39ec45e7f5aa43a5ded9f107..57a35d7a801621fc461e896eb2bba533
|
||||
this.scheduler.regionFailed(this, false, thr);
|
||||
// regionFailed will schedule a shutdown, so we should avoid letting this region tick further
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 6823c41c08ca1a1baf9257fc861ae97bbcbe3a50..0fa14f60310b063f419620539fd40898627b46b9 100644
|
||||
index 21f2b9866e1cf36421e10a945fb6fbaa251009ed..409fcc5e95ca453fee7d3bd0375c910d79b507e6 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -259,7 +259,11 @@ public class Commands {
|
||||
@@ -109,7 +109,7 @@ index 6823c41c08ca1a1baf9257fc861ae97bbcbe3a50..0fa14f60310b063f419620539fd40898
|
||||
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
||||
- //TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
+ // Luminol start - Add a config to enable tick command
|
||||
+ if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
+ TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
+ }
|
||||
+ // Luminol end - Add a config to enable tick command
|
||||
|
||||
@@ -8,10 +8,10 @@ is for Anarchy servers or Crystal PVP servers this allows them to pvp
|
||||
without stopping the item mid animation.
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 1ea8e03a4dc39486505d21bff1d15cb2339cafc2..a2146662c8ec83f62547bcd813c0e4dcb10efc07 100644
|
||||
index 40b409ad07eaa03473712ba83bc4ccd9a5c0f932..95715be85fe2d35d219a496f6677732833d6b345 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2186,7 +2186,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2187,7 +2187,9 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.sendSpawnProtectionMessage(pos);
|
||||
} else if (this.awaitingPositionFromClient == null && (level.mayInteract(this.player, pos) || passthroughSignInteraction)) {
|
||||
// Paper end - Allow using signs inside spawn protection
|
||||
@@ -21,7 +21,7 @@ index 1ea8e03a4dc39486505d21bff1d15cb2339cafc2..a2146662c8ec83f62547bcd813c0e4dc
|
||||
InteractionResult interactionResult = this.player.gameMode.useItemOn(this.player, level, itemStack, hand, blockHit);
|
||||
if (interactionResult.consumesAction()) {
|
||||
CriteriaTriggers.ANY_BLOCK_USE.trigger(this.player, blockHit.getBlockPos(), itemStack);
|
||||
@@ -2385,9 +2387,13 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2386,9 +2388,13 @@ public class ServerGamePacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+6
-6
@@ -5,10 +5,10 @@ Subject: [PATCH] Add missing teleportation event APIs for folia
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index f0c574e039f80ff0227239356de8d61ef06a0936..093c48e2379c01f45277b88f6c1b19b107a46326 100644
|
||||
index 21733beb07c0df3cf6872ce84a07e85dfe5ee3e9..055911982349bab23ba8d6c88f06c01456a86167 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1814,6 +1814,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1803,6 +1803,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
if (finalRespawnCompleteCallback != null) { // Luminol - Level hot unload apis
|
||||
finalRespawnCompleteCallback.accept(ServerPlayer.this); // Luminol - Level hot unload apis
|
||||
}
|
||||
@@ -19,10 +19,10 @@ index f0c574e039f80ff0227239356de8d61ef06a0936..093c48e2379c01f45277b88f6c1b19b1
|
||||
);
|
||||
});
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index f218b7f6ce32d7ac959255e59c620d6fd420bf8e..2ae0cf7c9a4febfa79a9eab2f0e9309a61a78f56 100644
|
||||
index 84fe83f25e72e8ce257421f62e532d4203438d2b..7b5fac05a53a80a7c9cdae4986f35c30285bcf81 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4553,6 +4553,31 @@ public abstract class Entity
|
||||
@@ -4549,6 +4549,31 @@ public abstract class Entity
|
||||
// Luminol end
|
||||
|
||||
// TODO any events that can modify go HERE
|
||||
@@ -54,7 +54,7 @@ index f218b7f6ce32d7ac959255e59c620d6fd420bf8e..2ae0cf7c9a4febfa79a9eab2f0e9309a
|
||||
|
||||
// check for same region
|
||||
if (destination == this.level()
|
||||
@@ -4671,6 +4696,17 @@ public abstract class Entity
|
||||
@@ -4667,6 +4692,17 @@ public abstract class Entity
|
||||
case END: {
|
||||
if (destination.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.END) {
|
||||
BlockPos targetPos = ServerLevel.END_SPAWN_POINT;
|
||||
@@ -72,7 +72,7 @@ index f218b7f6ce32d7ac959255e59c620d6fd420bf8e..2ae0cf7c9a4febfa79a9eab2f0e9309a
|
||||
// need to load chunks so we can create the platform
|
||||
destination.moonrise$loadChunksAsync(
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
@@ -4696,6 +4732,17 @@ public abstract class Entity
|
||||
@@ -4694,6 +4730,17 @@ public abstract class Entity
|
||||
);
|
||||
} else {
|
||||
BlockPos spawnPos = destination.getRespawnData().pos();
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Portal rate limiter
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b4066861dc79d64 100644
|
||||
index 981458f6697a79dbc9fc8cf41c088c98e556c6dd..4dbbe03d949811bf6140a35faa5e8cee8f7e28f0 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -157,6 +157,10 @@ public final class RegionizedWorldData {
|
||||
@@ -154,6 +154,10 @@ public final class RegionizedWorldData {
|
||||
for (final ChunkHolder chunkHolder : from.chunkHoldersToBroadcast) {
|
||||
into.chunkHoldersToBroadcast.add(chunkHolder);
|
||||
}
|
||||
@@ -19,7 +19,7 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b406686
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -322,6 +326,12 @@ public final class RegionizedWorldData {
|
||||
@@ -316,6 +320,12 @@ public final class RegionizedWorldData {
|
||||
into.chunkHoldersToBroadcast.add(chunkHolder);
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b406686
|
||||
}
|
||||
};
|
||||
|
||||
@@ -343,6 +353,35 @@ public final class RegionizedWorldData {
|
||||
@@ -338,6 +348,35 @@ public final class RegionizedWorldData {
|
||||
return this.isHandlingTick;
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ index f32d118e1e925b2155cef3fcdcb1e194c541e242..2d5d4170e1f45ae9113c37623b406686
|
||||
// this is copy on write to allow packet processing to iterate safely
|
||||
private final CopyOnWriteArrayList<ServerPlayer> localPlayers = new CopyOnWriteArrayList<>();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index f0a3fdaf7e9d342b472b3db42f5b59b0f6691b49..ac49bcc53951c025de0160fd8afd319b1f3d1347 100644
|
||||
index ff6809944c2dd8a2cc7c11a8b05b0f7c17b5fb4c..fe1b70edb24e2ded42f8ca1f5ddfbae7151b147a 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1973,6 +1973,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1978,6 +1978,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = level.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers // Folia - region threading
|
||||
profiler.push(() -> level + " " + level.dimension().identifier());
|
||||
profiler.push("tick");
|
||||
@@ -82,7 +82,7 @@ index f0a3fdaf7e9d342b472b3db42f5b59b0f6691b49..ac49bcc53951c025de0160fd8afd319b
|
||||
|
||||
try {
|
||||
foliaProfiler.startTimer(level.tickTimerId); try { // Folia - profiler
|
||||
@@ -1987,6 +1990,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1992,6 +1995,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
profiler.pop();
|
||||
profiler.pop();
|
||||
regionizedWorldData.explosionDensityCache.clear(); // Paper - Optimize explosions // Folia - region threading
|
||||
@@ -93,7 +93,7 @@ index f0a3fdaf7e9d342b472b3db42f5b59b0f6691b49..ac49bcc53951c025de0160fd8afd319b
|
||||
//this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked // Folia - region threading
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index cea4bc7036dfd8777c151a0dd811fc13579d6501..402e2f01f2b3a8e9ce5c818f07581b4dab38fc26 100644
|
||||
index 015f0521aa65201fab990177867d10e0ea0611d4..adde187ad84ad75047096736de6e51ef81897d61 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1536,8 +1536,15 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
+5
-5
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config for waypoint restoration
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 0fa14f60310b063f419620539fd40898627b46b9..9800ae1d3c49800b0c7342d43d696109b5b72cf4 100644
|
||||
index 409fcc5e95ca453fee7d3bd0375c910d79b507e6..5a5f7f7fefacaa0d77ec389d6eb332eff519496a 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -267,7 +267,7 @@ public class Commands {
|
||||
@@ -18,10 +18,10 @@ index 0fa14f60310b063f419620539fd40898627b46b9..9800ae1d3c49800b0c7342d43d696109
|
||||
WorldBorderCommand.register(this.dispatcher);
|
||||
if (JvmProfiler.INSTANCE.isAvailable()) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index ac49bcc53951c025de0160fd8afd319b1f3d1347..c91902632d0e97b814e387454b119edb62b67413 100644
|
||||
index fe1b70edb24e2ded42f8ca1f5ddfbae7151b147a..35aa8df4aecd91387997f01c258f0d549dfba0f8 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3127,8 +3127,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -3140,8 +3140,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
level.players().forEach(playerx -> playerx.connection.send(packet)); // Paper - per-world game rules
|
||||
} else if (rule == GameRules.LOCATOR_BAR) {
|
||||
// this.getAllLevels().forEach(level -> { // Paper - per-world game rules
|
||||
@@ -33,7 +33,7 @@ index ac49bcc53951c025de0160fd8afd319b1f3d1347..c91902632d0e97b814e387454b119edb
|
||||
level.players().forEach(waypointManager::updatePlayer);
|
||||
} else {
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 402e2f01f2b3a8e9ce5c818f07581b4dab38fc26..a1c3f3e5c7c3f32e0bdead33ebd72c7601295291 100644
|
||||
index adde187ad84ad75047096736de6e51ef81897d61..303233dcb0b33bf874fd71ee953565886e990138 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -690,7 +690,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -47,7 +47,7 @@ index 402e2f01f2b3a8e9ce5c818f07581b4dab38fc26..a1c3f3e5c7c3f32e0bdead33ebd72c76
|
||||
//this.updateSkyBrightness(); // Folia - region threading - delay until first tick
|
||||
// Paper start - rewrite chunk system
|
||||
diff --git a/net/minecraft/world/waypoints/WaypointTransmitter.java b/net/minecraft/world/waypoints/WaypointTransmitter.java
|
||||
index 2866b750a28cc32c2913d3c1afee95f05956982c..f0b62f49382eb808dcd6b6b654b99b9f7763c342 100644
|
||||
index 07af92310ee5c8bba04e6175b6faac629632e4de..79561456c3b0877974ae1519443ebf8bd07533da 100644
|
||||
--- a/net/minecraft/world/waypoints/WaypointTransmitter.java
|
||||
+++ b/net/minecraft/world/waypoints/WaypointTransmitter.java
|
||||
@@ -76,7 +76,8 @@ public interface WaypointTransmitter extends Waypoint {
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ index 7927769cf9bccb892745f4d1390eb83b2861d1bb..414c21345879f589fb61130180d0ca60
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index a1c3f3e5c7c3f32e0bdead33ebd72c7601295291..85eed61919b3c2ef93943e1c1b50fbcbca6fb319 100644
|
||||
index 303233dcb0b33bf874fd71ee953565886e990138..1024e68e1e3344b02c6e37c501a4ac989f486463 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -639,6 +639,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/7f3e240bbe0970683c40
|
||||
Licensed under: MIT (https://github.com/Winds-Studio/Leaf/blob/7f3e240bbe0970683c40279a7a65f0fde47503b6/licenses/MIT.txt)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 53449af103c1774f68cb0c296d47e7032e4e3843..a8f051e6aff31a723a3ba59842fac3a43f4911fe 100644
|
||||
index 2975a879320faed5f6591489f86d3f909072cbaa..d1683d4853f0d0190d9eae31706c99001229c026 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1294,22 +1294,26 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -8,10 +8,10 @@ This is a part of Leaf(https://github.com/Winds-Studio/Leaf/blob/d0ed97cf45dfa94
|
||||
Original license: https://github.com/Winds-Studio/Leaf/blob/d0ed97cf45dfa94f686ef32f0eea1ec7323f78d5/LICENSE.md
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 2d5d4170e1f45ae9113c37623b4066861dc79d64..48fea9051efe038a823d7c2c9ae3bf28078f2fcc 100644
|
||||
index 4dbbe03d949811bf6140a35faa5e8cee8f7e28f0..ab607bcc767068c89bf034013652102c232d35a9 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -457,6 +457,7 @@ public final class RegionizedWorldData {
|
||||
@@ -452,6 +452,7 @@ public final class RegionizedWorldData {
|
||||
public final PathTypeCache pathTypesByPosCache = new PathTypeCache();
|
||||
public final List<LevelChunk> temporaryChunkTickList = new java.util.ArrayList<>();
|
||||
public final Set<ChunkHolder> chunkHoldersToBroadcast = new ReferenceLinkedOpenHashSet<>();
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ A part of Leaf(https://github.com/Winds-Studio/Leaf/blob/edb0504069139beaa6f39ef
|
||||
License: https://github.com/Winds-Studio/Leaf/blob/edb0504069139beaa6f39efa4702370c2576b3fc/LICENSE.md
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index c91902632d0e97b814e387454b119edb62b67413..4b6f961e695155db1d6cc86496491017bf3a6383 100644
|
||||
index 35aa8df4aecd91387997f01c258f0d549dfba0f8..908cff4caa1457e07d809fb793d00d367ae42320 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -217,7 +217,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -86,7 +86,7 @@ index 7443744e3f256983e52a1cefcaf66082e4a46a7b..b7553611723f7120c66e1f3e51d89df2
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index a8f051e6aff31a723a3ba59842fac3a43f4911fe..2939aa1ecd68504424198dd7c90c71c6c1aa4c80 100644
|
||||
index d1683d4853f0d0190d9eae31706c99001229c026..a98c9b287885e2c353cf75dbb7f004cf67c0d802 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -134,6 +134,7 @@ public abstract class PlayerList {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18
|
||||
Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/villager/Villager.java b/net/minecraft/world/entity/npc/villager/Villager.java
|
||||
index f649c46cc9a34e646f8da3244866c6e011d30aa3..10715e891205eadd3774dc349c52963606ce1ab7 100644
|
||||
index 0869ecb4b7fe07efa33d521bef2f525955bd3c30..3fa0ca479922a7c55625c5e7bcd25065210ea44e 100644
|
||||
--- a/net/minecraft/world/entity/npc/villager/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/villager/Villager.java
|
||||
@@ -190,6 +190,53 @@ public class Villager extends AbstractVillager implements VillagerDataHolder, Re
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Fri, 1 May 2026 21:47:48 +0800
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Sat, 8 Aug 2026 01:31:30 +0800
|
||||
Subject: [PATCH] Pufferfish: Reduce projectile chunk loading
|
||||
|
||||
A part of Pufferfish(https://github.com/Pufferfish-gg/Pufferfish)
|
||||
@@ -9,10 +9,10 @@ Original patch: https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.21/puffer
|
||||
Original license(GPL-3.0): https://github.com/pufferfish-gg/Pufferfish/blob/ver/1.21/PATCH-LICENSE
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 48fea9051efe038a823d7c2c9ae3bf28078f2fcc..c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc 100644
|
||||
index ab607bcc767068c89bf034013652102c232d35a9..0bf23b7ceacf7d962270cb513abce050670c172e 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -339,6 +339,10 @@ public final class RegionizedWorldData {
|
||||
@@ -333,6 +333,10 @@ public final class RegionizedWorldData {
|
||||
|
||||
private RegionizedServer.WorldLevelData tickData;
|
||||
|
||||
@@ -21,8 +21,8 @@ index 48fea9051efe038a823d7c2c9ae3bf28078f2fcc..c9f2d54be6f0699c2bf922c66ba0bafc
|
||||
+ public long pufferfish$loadedTick = 0L;
|
||||
+ // Luminol end
|
||||
// connections
|
||||
public final List<Connection> connections = new ArrayList<>();
|
||||
|
||||
private static final Connection[] EMPTY_CONNECTION_ARRAY = new Connection[0];
|
||||
private final ReferenceList<Connection> connections = new ReferenceList<>(EMPTY_CONNECTION_ARRAY);
|
||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 721e3b083846fd363a31311196bc4c681969215c..81aafd64cc80038eaafba059373db3682afb8c2c 100644
|
||||
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
||||
|
||||
@@ -20,7 +20,7 @@ index ecaa296f576c5c90fda89e0406d6552628ef5de3..d2e9d46bbd9ee4ce45419b11499d7a7b
|
||||
synchronized (PACKET_LIMIT_LOCK) {
|
||||
if (this.allPacketCounts != null) {
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca5623111e98e51 100644
|
||||
index 95715be85fe2d35d219a496f6677732833d6b345..1bd8ae7e1250a56cff636b010c371144adbb7ad0 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -892,7 +892,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -32,7 +32,7 @@ index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca56231
|
||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
|
||||
return;
|
||||
}
|
||||
@@ -2128,6 +2128,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2129,6 +2129,7 @@ public class ServerGamePacketListenerImpl
|
||||
private long lastLimitedPacket = -1;
|
||||
|
||||
private boolean checkLimit(long timestamp) {
|
||||
@@ -40,7 +40,7 @@ index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca56231
|
||||
if (!io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.incomingPacketThreshold.enabled()) {
|
||||
return true;
|
||||
}
|
||||
@@ -2694,6 +2695,8 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2695,6 +2696,8 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
// Spigot start - spam exclusions
|
||||
private void detectRateSpam(final TickThrottler throttler, final String message) {
|
||||
@@ -49,7 +49,7 @@ index a2146662c8ec83f62547bcd813c0e4dcb10efc07..31c6defd8941a2c9e55eca3c8ca56231
|
||||
if (org.spigotmc.SpigotConfig.enableSpamExclusions) {
|
||||
for (String exclude : org.spigotmc.SpigotConfig.spamExclusions) {
|
||||
if (exclude != null && message.startsWith(exclude)) {
|
||||
@@ -3492,7 +3495,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3493,7 +3496,7 @@ public class ServerGamePacketListenerImpl
|
||||
@Override
|
||||
public void handlePlaceRecipe(final ServerboundPlaceRecipePacket packet) {
|
||||
// Paper start - auto recipe limit
|
||||
|
||||
+9
-9
@@ -9,7 +9,7 @@ Origin patch link: https://github.com/LeavesMC/Leaves/blob/master/leaves-server/
|
||||
Origin license: https://github.com/LeavesMC/Leaves/blob/master/LICENSE.md
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9c930ac97 100644
|
||||
index 0bf23b7ceacf7d962270cb513abce050670c172e..9820d2e18cbcb5fbc07fe57dd93101809ed2727d 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -65,6 +65,10 @@ import java.util.Set;
|
||||
@@ -56,7 +56,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
// connections
|
||||
for (final Connection conn : from.connections) {
|
||||
into.connections.add(conn);
|
||||
@@ -114,16 +144,22 @@ public final class RegionizedWorldData {
|
||||
@@ -111,16 +141,22 @@ public final class RegionizedWorldData {
|
||||
from.fluidLevelTicks.merge(into.fluidLevelTicks, fromRedstoneTimeOffset);
|
||||
|
||||
// tile entity ticking
|
||||
@@ -83,7 +83,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
if (tileEntity != null) {
|
||||
tileEntity.updateTicks(fromTickOffset, fromRedstoneTimeOffset);
|
||||
}
|
||||
@@ -167,6 +203,37 @@ public final class RegionizedWorldData {
|
||||
@@ -164,6 +200,37 @@ public final class RegionizedWorldData {
|
||||
public void split(final RegionizedWorldData from, final int chunkToRegionShift,
|
||||
final Long2ReferenceOpenHashMap<RegionizedWorldData> regionToData,
|
||||
final ReferenceOpenHashSet<RegionizedWorldData> dataSet) {
|
||||
@@ -121,7 +121,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
// connections
|
||||
for (final Connection conn : from.connections) {
|
||||
final ServerPlayer player = conn.getPlayer();
|
||||
@@ -243,8 +310,9 @@ public final class RegionizedWorldData {
|
||||
@@ -237,8 +304,9 @@ public final class RegionizedWorldData {
|
||||
from.fluidLevelTicks.split(chunkToRegionShift, levelTicksFluidRegionData);
|
||||
|
||||
// tile entity ticking
|
||||
@@ -133,7 +133,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
final int chunkX = pos.getX() >> 4;
|
||||
final int chunkZ = pos.getZ() >> 4;
|
||||
|
||||
@@ -254,8 +322,9 @@ public final class RegionizedWorldData {
|
||||
@@ -248,8 +316,9 @@ public final class RegionizedWorldData {
|
||||
} // else: when a chunk unloads, it does not actually _remove_ the tile entity from the list, it just gets
|
||||
// marked as removed. So if there is no section, it's probably removed!
|
||||
}
|
||||
@@ -145,7 +145,7 @@ index c9f2d54be6f0699c2bf922c66ba0bafc7fb83ccc..24e186d05aa0333885178f444fade3b9
|
||||
final int chunkX = pos.getX() >> 4;
|
||||
final int chunkZ = pos.getZ() >> 4;
|
||||
|
||||
@@ -488,6 +557,11 @@ public final class RegionizedWorldData {
|
||||
@@ -483,6 +552,11 @@ public final class RegionizedWorldData {
|
||||
public final io.papermc.paper.redstone.RedstoneWireTurbo turbo;
|
||||
// Environment attribute system
|
||||
public Reference2ObjectOpenHashMap<EnvironmentAttribute<?>, EnvironmentAttributeSystem.ValueSampler<?>> attributeSamplers;
|
||||
@@ -240,7 +240,7 @@ index 6e08d50794c4af4405f3e164a3fd46f376b3f78f..dd2d0940eece3e85078e574f66f71a4c
|
||||
|
||||
int getContainerSize();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 2ae0cf7c9a4febfa79a9eab2f0e9309a61a78f56..6b3c691dcc9c9e4a8b2b43110aedd5d5131a9520 100644
|
||||
index 7b5fac05a53a80a7c9cdae4986f35c30285bcf81..77ff989f2d2c2705a82d0e99e532c7073eb42825 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -324,7 +324,7 @@ public abstract class Entity
|
||||
@@ -252,7 +252,7 @@ index 2ae0cf7c9a4febfa79a9eab2f0e9309a61a78f56..6b3c691dcc9c9e4a8b2b43110aedd5d5
|
||||
private final VecDeltaCodec packetPositionCodec = new VecDeltaCodec();
|
||||
public boolean needsSync;
|
||||
public boolean syncPosition;
|
||||
@@ -4471,11 +4471,13 @@ public abstract class Entity
|
||||
@@ -4467,11 +4467,13 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
protected Entity transformForAsyncTeleport(ServerLevel destination, Vec3 pos, Float yaw, Float pitch, Vec3 velocity) {
|
||||
@@ -266,7 +266,7 @@ index 2ae0cf7c9a4febfa79a9eab2f0e9309a61a78f56..6b3c691dcc9c9e4a8b2b43110aedd5d5
|
||||
if (copy instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Luminol - Sync dragon part when teleportation or firstly created
|
||||
// vanilla code used to call remove _after_ copying, and some stuff is required to be after copy - so add hook here
|
||||
// for example, clearing of inventory after switching dimensions
|
||||
@@ -6140,8 +6142,29 @@ public abstract class Entity
|
||||
@@ -6147,8 +6149,29 @@ public abstract class Entity
|
||||
this.setBoundingBox(this.makeBoundingBox());
|
||||
}
|
||||
// Paper end - Block invalid positions and bounding box
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/f553c53e4230aa032e54
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 31c6defd8941a2c9e55eca3c8ca5623111e98e51..164e2101688a9f29ecfa83f62141d8cb9df22ed1 100644
|
||||
index 1bd8ae7e1250a56cff636b010c371144adbb7ad0..6b0856e836f041aa8bfe274d0444d6ce3165b1ce 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -644,7 +644,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -29,7 +29,7 @@ index 31c6defd8941a2c9e55eca3c8ca5623111e98e51..164e2101688a9f29ecfa83f62141d8cb
|
||||
fail = true;
|
||||
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", vehicle.getPlainTextName(), this.player.getPlainTextName(), Math.sqrt(movedDist));
|
||||
}
|
||||
@@ -1614,7 +1614,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1615,7 +1615,7 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
if (this.shouldCheckPlayerMovement(isFallFlying)) {
|
||||
float metersPerTick = isFallFlying ? 300.0F : 100.0F;
|
||||
@@ -38,7 +38,7 @@ index 31c6defd8941a2c9e55eca3c8ca5623111e98e51..164e2101688a9f29ecfa83f62141d8cb
|
||||
// CraftBukkit end
|
||||
// Paper start - Add fail move event
|
||||
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY,
|
||||
@@ -1675,7 +1675,8 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1676,7 +1676,8 @@ public class ServerGamePacketListenerImpl
|
||||
zDist = targetZ - this.player.getZ();
|
||||
movedDist = xDist * xDist + yDist * yDist + zDist * zDist;
|
||||
boolean movedWrongly = false; // Paper - Add fail move event; rename
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/4ade1001e4dd19c47d95
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EnderDragonFight.java b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..3388bf5d2cff00b397af1dd7b9ab93669985b35c 100644
|
||||
index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..7c68effb78bcb17ca64e043f87d6449f90b1b0a7 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
@@ -317,7 +317,67 @@ public class EnderDragonFight extends SavedData {
|
||||
@@ -21,7 +21,7 @@ index 824ef3f458505569fe5b8efb2055ecea7ba6cc56..3388bf5d2cff00b397af1dd7b9ab9366
|
||||
+ private int cachePortalOriginIteratorY = -1;
|
||||
+
|
||||
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
||||
+ if (me.earthme.luminol.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.optimizedDragonRespawn) { // Lophine - redirect
|
||||
+ int i, j;
|
||||
+ for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
||||
+ for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@ VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 6b3c691dcc9c9e4a8b2b43110aedd5d5131a9520..d1298c499f6551d7a084f2d1ccd2a2b8b9a2475b 100644
|
||||
index 77ff989f2d2c2705a82d0e99e532c7073eb42825..3c3420c51d70eb9afb80db43635246a546d1562c 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1155,8 +1155,14 @@ public abstract class Entity
|
||||
@@ -28,7 +28,7 @@ index 6b3c691dcc9c9e4a8b2b43110aedd5d5131a9520..d1298c499f6551d7a084f2d1ccd2a2b8
|
||||
final Vec3 originalMovement = delta; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -5634,6 +5640,11 @@ public abstract class Entity
|
||||
@@ -5641,6 +5647,11 @@ public abstract class Entity
|
||||
}
|
||||
|
||||
public final void setBoundingBox(final AABB bb) {
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 85eed61919b3c2ef93943e1c1b50fbcbca6fb319..3fda5043937af3d66ab44c41b7e76822a3ddf53b 100644
|
||||
index 1024e68e1e3344b02c6e37c501a4ac989f486463..2e84df044e65d2f145a190d1bbbb7de205d85e77 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1059,7 +1059,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
||||
Licensed under: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index d1298c499f6551d7a084f2d1ccd2a2b8b9a2475b..1888210d014f9c00316059a7ccce086dfb0e3a0f 100644
|
||||
index 3c3420c51d70eb9afb80db43635246a546d1562c..f38ce49165b6c46d039e82d676e24832e93a402e 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -2441,8 +2441,8 @@ public abstract class Entity
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ License: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
Gale - https://github.com/GaleMC/Gale
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 1888210d014f9c00316059a7ccce086dfb0e3a0f..00bc928a19cb877698b34b7c039bee5fe8b5cda5 100644
|
||||
index f38ce49165b6c46d039e82d676e24832e93a402e..0868c067c5a455d1984d59b22426c2f019b25c9f 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1302,8 +1302,17 @@ public abstract class Entity
|
||||
|
||||
@@ -27,7 +27,7 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
||||
Licensed under: GPL-3.0-only (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
index 8d9ce3d301d5f7e4106587ae00adb8dd5b8b6f88..dd8a4e445928d93667702dedbd35ab3e0f94f3be 100644
|
||||
index 5b7ed8e5067683143c99473a126e17baa531903c..ece13c12b793ede92ec67850ab6d5a88fddb8afa 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
|
||||
@@ -400,7 +400,6 @@ public final class ChunkEntitySlices {
|
||||
@@ -137,7 +137,7 @@ index 2e71a1cbabf3405e3e4fd5349a1784d895e7e60c..42de919064680b1a464d813976ca5e69
|
||||
if (!itemStack.isEmpty()) {
|
||||
slots.add(Pair.of(slot, itemStack.copy()));
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 093c48e2379c01f45277b88f6c1b19b107a46326..b4d8cc8b520266abe1921b5e990c34fce3f1d982 100644
|
||||
index 055911982349bab23ba8d6c88f06c01456a86167..82ffe2cd08f3187a69d81b65d6903c5b8deeba0d 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1424,7 +1424,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -150,10 +150,10 @@ index 093c48e2379c01f45277b88f6c1b19b107a46326..b4d8cc8b520266abe1921b5e990c34fc
|
||||
this.getInventory().equipment.set(value, net.minecraft.world.item.ItemStack.EMPTY);
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 164e2101688a9f29ecfa83f62141d8cb9df22ed1..2a383eee714b7da08b552c5bfb3988fad3cadb93 100644
|
||||
index 6b0856e836f041aa8bfe274d0444d6ce3165b1ce..4be8ef7acd34c4768a86422063eb07075d35583c 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3027,7 +3027,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3028,7 +3028,7 @@ public class ServerGamePacketListenerImpl
|
||||
// SPIGOT-7136 - Allays
|
||||
if (target instanceof net.minecraft.world.entity.animal.allay.Allay || target instanceof net.minecraft.world.entity.animal.equine.AbstractHorse) { // Paper - Fix horse armor desync
|
||||
ServerGamePacketListenerImpl.this.send(new net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket(
|
||||
@@ -287,7 +287,7 @@ index 9e4293c6df1851a852423b469577388d2254e169..952b09fba4cf7de90110a7aa4b96dc03
|
||||
ItemStack itemStack = this.equipment.get(slot); // Paper
|
||||
if (!itemStack.isEmpty() && !EnchantmentHelper.has(itemStack, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index a4bc767b799c050ce07a3685f655b4ba947d2466..a447b9fbb579591c62b3d8f8e2527796feefc4a0 100644
|
||||
index a26025ec6c3c6fe84bfc598176a6d4ff49de4a41..5e4f2061aecef57d89acc456acfc347953a386aa 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -346,7 +346,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Server I18n
|
||||
|
||||
|
||||
diff --git a/net/minecraft/locale/Language.java b/net/minecraft/locale/Language.java
|
||||
index 47cd33bce908744e64356b585853d6a8ecf82443..9e6f89ac7cf730bfc3c15d5a4f648c550cf72e22 100644
|
||||
index 47cd33bce908744e64356b585853d6a8ecf82443..bb4011d3c6a1d2a5aa66e68fe719cd5eea2c0dd2 100644
|
||||
--- a/net/minecraft/locale/Language.java
|
||||
+++ b/net/minecraft/locale/Language.java
|
||||
@@ -37,6 +37,7 @@ public abstract class Language {
|
||||
@@ -26,10 +26,10 @@ index 47cd33bce908744e64356b585853d6a8ecf82443..9e6f89ac7cf730bfc3c15d5a4f648c55
|
||||
loadFromJson(stream, output);
|
||||
} catch (IOException | JsonParseException e) {
|
||||
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
||||
index 2a75f8fbd2e5f41ca138740319d34683915e3b5b..0cc56b19d68f34994c9dbae578609eca7b7343cb 100644
|
||||
index 4385488983a7544eb6d9193d913dc55294f4620d..9269f9918c4f1eda8ae9cc487da2826ca09a10fb 100644
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -158,6 +158,8 @@ public class Main {
|
||||
@@ -167,6 +167,8 @@ public class Main {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/dc46f46d28dcdcaf33bb
|
||||
Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/dc46f46d28dcdcaf33bb533f9571a107db98c1d7/LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 2939aa1ecd68504424198dd7c90c71c6c1aa4c80..8b7e4814b00d6f6c9f25cce5186905f165b97c2f 100644
|
||||
index a98c9b287885e2c353cf75dbb7f004cf67c0d802..1dcb4fe3e2c250554e4f065caf21b37ea659e621 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -961,6 +961,10 @@ public abstract class PlayerList {
|
||||
@@ -23,7 +23,7 @@ index 2939aa1ecd68504424198dd7c90c71c6c1aa4c80..8b7e4814b00d6f6c9f25cce5186905f1
|
||||
|
||||
// Paper start - whitelist verify event / login event
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index a447b9fbb579591c62b3d8f8e2527796feefc4a0..9fdc8134fdde2cdd7724a459a29e51f4ad943403 100644
|
||||
index 5e4f2061aecef57d89acc456acfc347953a386aa..e7b6c83a4e7bd83f6c5a1d772c42c51bf1d1bed1 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -175,6 +175,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable some check for operators
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 2a383eee714b7da08b552c5bfb3988fad3cadb93..6f5d5b123f69b7bdc3960e0ad216ec291aa100c3 100644
|
||||
index 4be8ef7acd34c4768a86422063eb07075d35583c..57c2748dccf3bcb4f8464f3bc0fe3df39a2c8cb5 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -402,7 +402,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -35,7 +35,7 @@ index 2a383eee714b7da08b552c5bfb3988fad3cadb93..6f5d5b123f69b7bdc3960e0ad216ec29
|
||||
fail = true;
|
||||
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", vehicle.getPlainTextName(), this.player.getPlainTextName(), Math.sqrt(movedDist));
|
||||
}
|
||||
@@ -1619,7 +1619,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1620,7 +1620,7 @@ public class ServerGamePacketListenerImpl
|
||||
// Paper start - Add fail move event
|
||||
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY,
|
||||
targetX, targetY, targetZ, targetYRot, targetXRot, true);
|
||||
@@ -44,7 +44,7 @@ index 2a383eee714b7da08b552c5bfb3988fad3cadb93..6f5d5b123f69b7bdc3960e0ad216ec29
|
||||
if (event.getLogWarning()) {
|
||||
LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getPlainTextName(), xDist, yDist, zDist);
|
||||
}
|
||||
@@ -1685,7 +1685,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1686,7 +1686,7 @@ public class ServerGamePacketListenerImpl
|
||||
// Paper start - Add fail move event
|
||||
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_WRONGLY,
|
||||
targetX, targetY, targetZ, targetYRot, targetXRot, true);
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable cross region damage trace
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index b4d8cc8b520266abe1921b5e990c34fce3f1d982..93c76c2faf75bf4901ecaba1e04d957d5ddddfca 100644
|
||||
index 82ffe2cd08f3187a69d81b65d6903c5b8deeba0d..dcd1b874b68bc2e780f5a5a2ba8ac7a6a16a65f4 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1448,6 +1448,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
|
||||
+4
-4
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable save-all command
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index a2db29aa47a4b7213d4956f02f6e83122ccfdbd1..6fb3c88463ff69bddb7d8dcde0e5339567d3e1c6 100644
|
||||
index a96da8ab0d8ca8241df79fbfca33f3e6072db367..f881d10d63a665a73aefe03ba1305ca9ae956513 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -265,6 +265,8 @@ public final class RegionizedServer {
|
||||
@@ -31,7 +31,7 @@ index 97c514673a454b752ab86b944fd143725ca8090d..ba91d40d6d91588a4b39abfefcb17a36
|
||||
private final Reference2ReferenceOpenHashMap<RegionizedData<?>, Object> regionizedData = new Reference2ReferenceOpenHashMap<>();
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 9800ae1d3c49800b0c7342d43d696109b5b72cf4..f9a8c79640ed6ca381e4482eaeab6b23db59419f 100644
|
||||
index 5a5f7f7fefacaa0d77ec389d6eb332eff519496a..f0f6175569100589102d9d76b3ff8f5546030060 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -299,7 +299,11 @@ public class Commands {
|
||||
@@ -48,10 +48,10 @@ index 9800ae1d3c49800b0c7342d43d696109b5b72cf4..f9a8c79640ed6ca381e4482eaeab6b23
|
||||
SaveOnCommand.register(this.dispatcher);
|
||||
SetPlayerIdleTimeoutCommand.register(this.dispatcher);
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 4b6f961e695155db1d6cc86496491017bf3a6383..e7f7f7927fc1e2ce45ea5dbf7cc9ec19197c599f 100644
|
||||
index 908cff4caa1457e07d809fb793d00d367ae42320..143b7a167dcbf015a7318f2fe5e0798418fa2572 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1652,6 +1652,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1651,6 +1651,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Folia start - region threading
|
||||
public void tickServer(final long startTime, final long scheduledEnd, final long targetBuffer,
|
||||
final io.papermc.paper.threadedregions.TickRegions.TickRegionData region) {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable function command
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index f9a8c79640ed6ca381e4482eaeab6b23db59419f..1b2d3e2c23e8e03ae25e85a60b6ef0528e627f61 100644
|
||||
index f0f6175569100589102d9d76b3ff8f5546030060..ddd656e147cdaeb8f91865117e6f9c268b0fd9bc 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -217,7 +217,11 @@ public class Commands {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable scoreboard command
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 1b2d3e2c23e8e03ae25e85a60b6ef0528e627f61..916b5c8d524ffd7ccb953fe0f1cf020a1ea8dafb 100644
|
||||
index ddd656e147cdaeb8f91865117e6f9c268b0fd9bc..5fda3083f73744b0df3aab47b3c378dba41b904c 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -246,7 +246,11 @@ public class Commands {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to enable trigger command
|
||||
|
||||
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 916b5c8d524ffd7ccb953fe0f1cf020a1ea8dafb..03f3fe221b14f0317947d74e25049bcce2ebeb66 100644
|
||||
index 5fda3083f73744b0df3aab47b3c378dba41b904c..82af03649c7537274aa54ed942e4aae589b97888 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -274,7 +274,11 @@ public class Commands {
|
||||
|
||||
+7
-7
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to enable raytracing tracker
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index 163999d50213e0167eb09f0eae883388849f28fa..5196431f52e81608a5575f8a262cd5c855b06182 100644
|
||||
index e9307ef10502856378d7831fb7800dd77230130c..6bca982627cf6a865820df75be2814a7289f98dc 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1351,7 +1351,7 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP
|
||||
@@ -1375,7 +1375,7 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP
|
||||
double distanceSquared = deltaToPlayerX * deltaToPlayerX + deltaToPlayerZ * deltaToPlayerZ; // Paper
|
||||
double rangeSquared = visibleRange * visibleRange;
|
||||
// Paper start - Configurable entity tracking range by Y
|
||||
@@ -18,7 +18,7 @@ index 163999d50213e0167eb09f0eae883388849f28fa..5196431f52e81608a5575f8a262cd5c8
|
||||
double rangeY = level.paperConfig().entities.trackingRangeY.get(this.entity, -1);
|
||||
if (rangeY != -1) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 00bc928a19cb877698b34b7c039bee5fe8b5cda5..db7281fcf1f4dc878a87ef9b8f24f2f9da12238a 100644
|
||||
index 0868c067c5a455d1984d59b22426c2f019b25c9f..b9f9dd85d259306db9eb9daf0a9ec36f27dfddb7 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -164,7 +164,7 @@ public abstract class Entity
|
||||
@@ -30,7 +30,7 @@ index 00bc928a19cb877698b34b7c039bee5fe8b5cda5..db7281fcf1f4dc878a87ef9b8f24f2f9
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
static boolean isLevelAtLeast(ValueInput input, int level) {
|
||||
@@ -6579,4 +6579,48 @@ public abstract class Entity
|
||||
@@ -6586,4 +6586,48 @@ public abstract class Entity
|
||||
// Paper end
|
||||
|
||||
public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
||||
@@ -80,10 +80,10 @@ index 00bc928a19cb877698b34b7c039bee5fe8b5cda5..db7281fcf1f4dc878a87ef9b8f24f2f9
|
||||
+ // Lophine end - Add config to enable raytracing tracker
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
||||
index 6efaa78faca15c7a48bdffb24480d1bac29f3ba8..8a328a41673a3d720f0b1a5de8ce049e360fac1b 100644
|
||||
index 31619890f1bd4f458b6f9a31fac8cefaafe09e8e..50643bd0b546a1ff70031ea39e2610f219ef8a79 100644
|
||||
--- a/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/net/minecraft/world/entity/EntityType.java
|
||||
@@ -84,6 +84,11 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T>,
|
||||
@@ -85,6 +85,11 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T>,
|
||||
public final int passengerTickTimerId;
|
||||
public final int passengerInactiveTickTimerId;
|
||||
// Folia end - profiler
|
||||
@@ -96,7 +96,7 @@ index 6efaa78faca15c7a48bdffb24480d1bac29f3ba8..8a328a41673a3d720f0b1a5de8ce049e
|
||||
public EntityType(
|
||||
final EntityType.EntityFactory<T> factory,
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index 9fdc8134fdde2cdd7724a459a29e51f4ad943403..c6fa9dff800b1491b1e0fc5d7e1dc16b99b8c7db 100644
|
||||
index e7b6c83a4e7bd83f6c5a1d772c42c51bf1d1bed1..449a2904fb1190f68de72bc47eb8220f50002577 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -186,6 +186,25 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Spawn invulnerable time
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 93c76c2faf75bf4901ecaba1e04d957d5ddddfca..2985d5e2dde049a999a39f6edbb6696332f6d822 100644
|
||||
index dcd1b874b68bc2e780f5a5a2ba8ac7a6a16a65f4..14eaa25d67e9dbaad5ae4c6d6be4ae640b2fc015 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -245,6 +245,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
|
||||
@@ -38,10 +38,10 @@ index be357d315f5c83349a7f7287ff45e92137950a8c..a542e38ea6a1e8fc81466acbca071d89
|
||||
if (count > maxAllowedCount) {
|
||||
source.sendFailure(Component.translatable("commands.give.failed.toomanyitems", maxAllowedCount, prototypeItemStack.getDisplayName()));
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6f5d5b123f69b7bdc3960e0ad216ec291aa100c3..f036ef938bdd66ab87610e76c8c878bf3d3c86b1 100644
|
||||
index 57c2748dccf3bcb4f8464f3bc0fe3df39a2c8cb5..9907e58908eb17874cc938337888dfe4ad4c060f 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3232,7 +3232,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3233,7 +3233,7 @@ public class ServerGamePacketListenerImpl
|
||||
} else if (slot.mayPlace(cursor)) {
|
||||
if (ItemStack.isSameItemSameComponents(clickedItem, cursor)) {
|
||||
int toPlace = packet.buttonNum() == 0 ? cursor.getCount() : 1;
|
||||
@@ -50,7 +50,7 @@ index 6f5d5b123f69b7bdc3960e0ad216ec291aa100c3..f036ef938bdd66ab87610e76c8c878bf
|
||||
toPlace = Math.min(toPlace, slot.container.getMaxStackSize() - clickedItem.getCount());
|
||||
if (toPlace == 1) {
|
||||
action = InventoryAction.PLACE_ONE;
|
||||
@@ -3268,7 +3268,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3269,7 +3269,7 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
} else if (ItemStack.isSameItemSameComponents(cursor, clickedItem)) {
|
||||
if (clickedItem.getCount() >= 0) {
|
||||
@@ -59,7 +59,7 @@ index 6f5d5b123f69b7bdc3960e0ad216ec291aa100c3..f036ef938bdd66ab87610e76c8c878bf
|
||||
// As of 1.5, this is result slots only
|
||||
action = InventoryAction.PICKUP_ALL;
|
||||
}
|
||||
@@ -3485,6 +3485,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3486,6 +3486,7 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.containerMenu.broadcastFullState();
|
||||
} else {
|
||||
this.player.containerMenu.broadcastChanges();
|
||||
@@ -67,7 +67,7 @@ index 6f5d5b123f69b7bdc3960e0ad216ec291aa100c3..f036ef938bdd66ab87610e76c8c878bf
|
||||
}
|
||||
if (packet.buttonNum() == Inventory.SLOT_OFFHAND && this.player.containerMenu != this.player.inventoryMenu) this.player.containerSynchronizer.sendOffHandSlotChange(); // Paper - update offhand data when the player is clicking in an inventory not their own as the sychronizer does not include offhand slots
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes.
|
||||
@@ -3596,7 +3597,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3597,7 +3598,7 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
boolean validSlot = packet.slotNum() >= 1 && packet.slotNum() <= 45;
|
||||
@@ -76,7 +76,7 @@ index 6f5d5b123f69b7bdc3960e0ad216ec291aa100c3..f036ef938bdd66ab87610e76c8c878bf
|
||||
if (drop || (validSlot && !ItemStack.matches(this.player.inventoryMenu.getSlot(packet.slotNum()).getItem(), packet.itemStack()))) { // Insist on valid slot
|
||||
// CraftBukkit start - Call click event
|
||||
org.bukkit.inventory.InventoryView inventory = this.player.inventoryMenu.getBukkitView();
|
||||
@@ -3638,6 +3639,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3639,6 +3640,7 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.inventoryMenu.getSlot(packet.slotNum()).setByPlayer(itemStack);
|
||||
this.player.inventoryMenu.setRemoteSlot(packet.slotNum(), itemStack);
|
||||
this.player.inventoryMenu.broadcastChanges();
|
||||
|
||||
+3
-3
@@ -36,10 +36,10 @@ index 08e253662a2c183c0ab53a51cc07485cff33bf2c..1bd678d668a1febc129f4cb4d0d95ea2
|
||||
};
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index e7f7f7927fc1e2ce45ea5dbf7cc9ec19197c599f..1f13f7b016b4256e92989d83003a983d6ba1c750 100644
|
||||
index 143b7a167dcbf015a7318f2fe5e0798418fa2572..22ad0846be08292b07b363b6b96f7431f87a4f3d 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2016,6 +2016,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2021,6 +2021,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
profiler.popPush("server gui refresh");
|
||||
|
||||
@@ -96,7 +96,7 @@ index 010180899d69d0457dcc9feee4f1c062c5354995..279b5072596c062a7c800510ed914a9d
|
||||
bridge.removeChannel(channel);
|
||||
}
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 8b7e4814b00d6f6c9f25cce5186905f165b97c2f..5bfc986f3d8dc81444be857c857bd91ada8c409d 100644
|
||||
index 1dcb4fe3e2c250554e4f065caf21b37ea659e621..1f20671b8bc07c77e8a3e60414bb2c8255e37385 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -318,6 +318,8 @@ public abstract class PlayerList {
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves/blob/9d2bd3f7b0a48f00d
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 3fda5043937af3d66ab44c41b7e76822a3ddf53b..7e362b71c629c75475016973a0181fce75a5156a 100644
|
||||
index 2e84df044e65d2f145a190d1bbbb7de205d85e77..4396f58571f137e0d351c27c7bf452fbeded4abc 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -3136,7 +3136,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -21,7 +21,7 @@ index 3fda5043937af3d66ab44c41b7e76822a3ddf53b..7e362b71c629c75475016973a0181fce
|
||||
}
|
||||
// Paper end - Fix merchant inventory not closing on entity removal
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 5bfc986f3d8dc81444be857c857bd91ada8c409d..ebcd7ce794ca696b44ab75dbb177beb5f929adf0 100644
|
||||
index 1f20671b8bc07c77e8a3e60414bb2c8255e37385..9d69106b5a1867af541c23dc92f63005315e27e2 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -557,7 +557,7 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -23,7 +23,7 @@ index 8432d0ce22ddc9c9bfa98901e403697f40e53c99..9ec141359c4422c1574dac71a88b7f50
|
||||
+ // Leaves end - servux
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 7e362b71c629c75475016973a0181fce75a5156a..cb11830c2f399c9706b20f8104686dc0d9b686f9 100644
|
||||
index 4396f58571f137e0d351c27c7bf452fbeded4abc..f1cf0deebe8a0df6509d647e7590126ee02444b8 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2569,6 +2569,8 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
@@ -9,7 +9,7 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f036ef938bdd66ab87610e76c8c878bf3d3c86b1..170ce02f1e93f3cb493e01d5464768e872bfb491 100644
|
||||
index 9907e58908eb17874cc938337888dfe4ad4c060f..b180b65ab4de4ca6f28b22c8650e894c7d328b82 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -348,9 +348,12 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
@@ -8,7 +8,7 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index ebcd7ce794ca696b44ab75dbb177beb5f929adf0..ca1e635b0fdf3d0d17447b43a558fe030536d297 100644
|
||||
index 9d69106b5a1867af541c23dc92f63005315e27e2..71988e11c512fcb391f845a1905411ea240479fa 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1107,6 +1107,7 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -9,10 +9,10 @@ As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 170ce02f1e93f3cb493e01d5464768e872bfb491..6b3d1cdfdee2a815807ac32a6fc2f353215a13ab 100644
|
||||
index b180b65ab4de4ca6f28b22c8650e894c7d328b82..71433d0a09fd4e90254a2842addf989a257b3b50 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3906,7 +3906,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3907,7 +3907,7 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
@Deprecated @io.papermc.paper.annotation.DoNotUse // Paper - Add PlayerLoadedWorldEvent
|
||||
|
||||
+2
-2
@@ -13,10 +13,10 @@ MasaGadget(https://github.com/plusls/MasaGadget)
|
||||
litematica(https://github.com/maruohon/litematica)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6b3d1cdfdee2a815807ac32a6fc2f353215a13ab..77b9cd3d14eddc735d9131597916405fde4230ec 100644
|
||||
index 71433d0a09fd4e90254a2842addf989a257b3b50..11d177e486958727f880f073550ae5db7e233dcd 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2175,7 +2175,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2176,7 +2176,7 @@ public class ServerGamePacketListenerImpl
|
||||
if (ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(this.player.level(), pos.getX() >> 4, pos.getZ() >> 4, 8) && this.player.isWithinBlockInteractionRange(pos, 1.0)) { // Folia - do not allow players to interact with blocks outside the current region
|
||||
Vec3 distance = location.subtract(Vec3.atCenterOf(pos));
|
||||
double limit = 1.0000001;
|
||||
|
||||
@@ -7,6 +7,19 @@ Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As a part of : Leaves (https://github.com/LeavesMC/Leaves)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 9820d2e18cbcb5fbc07fe57dd93101809ed2727d..b7df2edf243448cc6342db9360e0458f58769a12 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -408,7 +408,7 @@ public final class RegionizedWorldData {
|
||||
// Luminol end
|
||||
// connections
|
||||
private static final Connection[] EMPTY_CONNECTION_ARRAY = new Connection[0];
|
||||
- private final ReferenceList<Connection> connections = new ReferenceList<>(EMPTY_CONNECTION_ARRAY);
|
||||
+ public final ReferenceList<Connection> connections = new ReferenceList<>(EMPTY_CONNECTION_ARRAY); // Lophine - BotList Public
|
||||
|
||||
// misc. fields
|
||||
private boolean isHandlingTick;
|
||||
diff --git a/net/minecraft/advancements/triggers/SimpleCriterionTrigger.java b/net/minecraft/advancements/triggers/SimpleCriterionTrigger.java
|
||||
index d76a338ab4f326e6105adc451eee3d4601403c98..b827d51d23ceaebef2191a9f349bbd346e73f1af 100644
|
||||
--- a/net/minecraft/advancements/triggers/SimpleCriterionTrigger.java
|
||||
@@ -33,7 +46,7 @@ index d2e9d46bbd9ee4ce45419b11499d7a7bc50f0219..848967dbe41694411603ef369cfdc3a0
|
||||
private final java.util.concurrent.atomic.AtomicBoolean disconnectionHandled = new java.util.concurrent.atomic.AtomicBoolean(false); // Folia - region threading - may be called concurrently during configuration stage
|
||||
private int receivedPackets;
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 1f13f7b016b4256e92989d83003a983d6ba1c750..f76e40f8bbea076ad620f7525d4d8666603a5175 100644
|
||||
index 22ad0846be08292b07b363b6b96f7431f87a4f3d..07add4a7a350ac61b7fa7797874ab24d5289b9b1 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -296,6 +296,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -45,7 +58,7 @@ index 1f13f7b016b4256e92989d83003a983d6ba1c750..f76e40f8bbea076ad620f7525d4d8666
|
||||
public static <S extends MinecraftServer> S spin(final Function<Thread, S> factory) {
|
||||
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
|
||||
AtomicReference<S> serverReference = new AtomicReference<>();
|
||||
@@ -1195,6 +1197,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1194,6 +1196,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.halt(wait, false);
|
||||
}
|
||||
public void halt(final boolean wait, final boolean isRestarting) {
|
||||
@@ -62,7 +75,7 @@ index 1f13f7b016b4256e92989d83003a983d6ba1c750..f76e40f8bbea076ad620f7525d4d8666
|
||||
this.isRestarting = isRestarting;
|
||||
this.hasLoggedStop = true; // Paper - Debugging
|
||||
if (this.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
||||
@@ -1664,7 +1676,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1663,7 +1675,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
int emptyTickThreshold = this.pauseWhenEmptySeconds() * 20;
|
||||
this.removeDisabledPluginsBlockingSleep(); // Paper - API to allow/disallow tick sleeping
|
||||
if (false && emptyTickThreshold > 0) { // Folia - region threading - this is complicated to implement, and even if done correctly is messy
|
||||
@@ -71,7 +84,7 @@ index 1f13f7b016b4256e92989d83003a983d6ba1c750..f76e40f8bbea076ad620f7525d4d8666
|
||||
this.emptyTicks++;
|
||||
} else {
|
||||
this.emptyTicks = 0;
|
||||
@@ -1806,6 +1818,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1805,6 +1817,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.isSaving = true;
|
||||
if (playerSaveInterval > 0) {
|
||||
this.playerList.saveAll(playerSaveInterval);
|
||||
@@ -79,7 +92,7 @@ index 1f13f7b016b4256e92989d83003a983d6ba1c750..f76e40f8bbea076ad620f7525d4d8666
|
||||
}
|
||||
if (region == null && fullSave) { // Folia - region threading - don't auto save level data
|
||||
this.saveGlobalData(false);
|
||||
@@ -2044,6 +2057,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2057,6 +2070,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void tickConnection() {
|
||||
this.getConnection().tick();
|
||||
@@ -87,7 +100,7 @@ index 1f13f7b016b4256e92989d83003a983d6ba1c750..f76e40f8bbea076ad620f7525d4d8666
|
||||
}
|
||||
|
||||
public void forceGameTimeSynchronization() {
|
||||
@@ -3253,6 +3267,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -3266,6 +3280,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.debugSubscribers;
|
||||
}
|
||||
|
||||
@@ -240,7 +253,7 @@ index 3021b70b941ed09c5c58b98d30830a2279b8339c..d289f59475b617ae527d123239297f69
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 2dae0f4249eade60ac55c9fa289dd146dc3675e1..239cad02f85f0d14d4abfa746ecdc4dd82b04657 100644
|
||||
index 2dae0f4249eade60ac55c9fa289dd146dc3675e1..f70f6501254b40cf76dc7f9bcd621a1f68e39ea9 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -230,6 +230,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -251,16 +264,17 @@ index 2dae0f4249eade60ac55c9fa289dd146dc3675e1..239cad02f85f0d14d4abfa746ecdc4dd
|
||||
this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage));
|
||||
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
|
||||
org.spigotmc.SpigotConfig.registerCommands();
|
||||
@@ -251,6 +252,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
consoleThread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
|
||||
if (false) this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark // Luminol - Force disable builtin spark
|
||||
+ this.getBotList().loadResumeBotInfo(); // Leaves - load resident bot info
|
||||
@@ -254,6 +255,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
|
||||
+ this.getBotList().loadResumeBotInfo(); // Leaves - load resident bot info
|
||||
+
|
||||
// this.worldData.setGameType(properties.gameMode.get()); // CraftBukkit - moved to world loading
|
||||
LOGGER.info("Default game type: {}", properties.gameMode.get());
|
||||
// Paper start - Unix domain socket support
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index 5196431f52e81608a5575f8a262cd5c855b06182..6d43ca34f38192faf5bb4254d849c5ac51197f48 100644
|
||||
index 6bca982627cf6a865820df75be2814a7289f98dc..b6f752a134ac7192375053d8bf93e39caf5f0c6f 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -972,7 +972,7 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP
|
||||
@@ -272,7 +286,21 @@ index 5196431f52e81608a5575f8a262cd5c855b06182..6d43ca34f38192faf5bb4254d849c5ac
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
|
||||
// Paper start - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
if (!entity.valid || entity.level() != this.level || entity.moonrise$getTrackedEntity() != null) { // Folia - region threading
|
||||
@@ -1389,6 +1389,13 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP
|
||||
@@ -1282,6 +1282,13 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP
|
||||
ServerPlayer player = conn.getPlayer();
|
||||
if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(player)) {
|
||||
this.removePlayer(player);
|
||||
+ // Leaves start - render bot
|
||||
+ if (entity instanceof org.leavesmc.leaves.bot.ServerBot bot) {
|
||||
+ if (bot.needSendFakeData(player)) {
|
||||
+ bot.sendFakeData(player.connection, false);
|
||||
+ }
|
||||
+ }
|
||||
+ // Leaves end - render bot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1413,6 +1420,13 @@ public class ChunkMap extends SimpleRegionStorage implements ChunkHolder.PlayerP
|
||||
}
|
||||
} else {
|
||||
this.removePlayer(player);
|
||||
@@ -287,7 +315,7 @@ index 5196431f52e81608a5575f8a262cd5c855b06182..6d43ca34f38192faf5bb4254d849c5ac
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index cb11830c2f399c9706b20f8104686dc0d9b686f9..1c4c67410849f844946e4883585910fc8fe97048 100644
|
||||
index f1cf0deebe8a0df6509d647e7590126ee02444b8..3e4b2f1fbe6864e40f1978c70d41773cde09fd17 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -243,6 +243,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -344,7 +372,7 @@ index cb11830c2f399c9706b20f8104686dc0d9b686f9..1c4c67410849f844946e4883585910fc
|
||||
ServerLevel.this.updateSleepingPlayerList();
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2985d5e2dde049a999a39f6edbb6696332f6d822..64943c193ae73795ddf8222a6f71ea5eb1705fe2 100644
|
||||
index 14eaa25d67e9dbaad5ae4c6d6be4ae640b2fc015..624f637e7a4fb8297d42e9944011e3c83245949e 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -232,7 +232,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -377,7 +405,7 @@ index 2985d5e2dde049a999a39f6edbb6696332f6d822..64943c193ae73795ddf8222a6f71ea5e
|
||||
AABB aabb = new AABB(this.blockPosition()).inflate(32.0, 10.0, 32.0);
|
||||
this.level()
|
||||
.getEntitiesOfClass(Mob.class, aabb, EntitySelector.NO_SPECTATORS)
|
||||
@@ -2161,6 +2161,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2140,6 +2140,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.lastSentHealth = -1.0F;
|
||||
this.lastSentFood = -1;
|
||||
this.teleportSpectators(transition, oldLevel);
|
||||
@@ -455,7 +483,7 @@ index 12190f2a2856b0d0cf95144d0b1622f1b9600bf6..be01f06d4ee02854345842c97382e8b6
|
||||
|
||||
// Paper start - utility method for common conversion back to the game profile
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index ca1e635b0fdf3d0d17447b43a558fe030536d297..ed50484ca24ef24b1e5bef9f6369dfa4b30c359c 100644
|
||||
index 71988e11c512fcb391f845a1905411ea240479fa..a7a687c7a90bce1ad20d32241f0b4316fefc8f9d 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -320,6 +320,19 @@ public abstract class PlayerList {
|
||||
@@ -542,7 +570,7 @@ index ca1e635b0fdf3d0d17447b43a558fe030536d297..ed50484ca24ef24b1e5bef9f6369dfa4
|
||||
|
||||
public @Nullable ServerPlayer getPlayer(final String playerName) {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index db7281fcf1f4dc878a87ef9b8f24f2f9da12238a..b11637543c3ef8650ad5c65c2cab8a1cb6e95158 100644
|
||||
index b9f9dd85d259306db9eb9daf0a9ec36f27dfddb7..c3df068144c3af4b3700b104588970154837018d 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1263,7 +1263,7 @@ public abstract class Entity
|
||||
@@ -564,9 +592,18 @@ index db7281fcf1f4dc878a87ef9b8f24f2f9da12238a..b11637543c3ef8650ad5c65c2cab8a1c
|
||||
final boolean xZero = movement.x == 0.0;
|
||||
final boolean yZero = movement.y == 0.0;
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index cb1589e3aa663ca058fb5c3a24da700d4482cf35..d64c68651b7142869a06ce0200fb625cd45ae235 100644
|
||||
index cb1589e3aa663ca058fb5c3a24da700d4482cf35..1de8eac336e2dd6335c433b7708ce6b6684553c9 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2001,7 +2001,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return 0; // CraftBukkit
|
||||
}
|
||||
|
||||
- protected void dropExperience(ServerLevel level, @Nullable Entity entity) {
|
||||
+ public void dropExperience(ServerLevel level, @Nullable Entity entity) {
|
||||
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
||||
if (!(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
||||
ExperienceOrb.awardWithDirection(level, this.position(), Vec3.ZERO, this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, entity, this); // Paper
|
||||
@@ -3348,7 +3348,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
private void travelRidden(final Player controller, final Vec3 selfInput) {
|
||||
Vec3 riddenInput = this.getRiddenInput(controller, selfInput);
|
||||
@@ -610,7 +647,7 @@ index cb1589e3aa663ca058fb5c3a24da700d4482cf35..d64c68651b7142869a06ce0200fb625c
|
||||
if (!this.level().isClientSide()) {
|
||||
boolean wasUsingItem = this.isUsingItem();
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index c6fa9dff800b1491b1e0fc5d7e1dc16b99b8c7db..f063e9b7601480d0e66da22ea8e5bec2e8619fee 100644
|
||||
index 449a2904fb1190f68de72bc47eb8220f50002577..3f4cf6e0ddce45ca169a5fdfc54b25f609eba44b 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -156,7 +156,7 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
@@ -88,10 +88,10 @@ index 6c05b9276bdc267a36376f6c64592a50e4b2b36e..21d2c97b3d1e1d29c9de02b6acd58985
|
||||
result.add(player);
|
||||
if (result.size() >= limit) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index f76e40f8bbea076ad620f7525d4d8666603a5175..77bbc527b017c2ac42ebe4638457caf32868e3f6 100644
|
||||
index 07add4a7a350ac61b7fa7797874ab24d5289b9b1..d1a0585e4a9fe85d8a99507bb8a55d175c1804e3 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1909,7 +1909,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1908,7 +1908,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
private ServerStatus.Players buildPlayerStatus() {
|
||||
@@ -100,7 +100,7 @@ index f76e40f8bbea076ad620f7525d4d8666603a5175..77bbc527b017c2ac42ebe4638457caf3
|
||||
int maxPlayers = this.getMaxPlayers();
|
||||
if (this.hidesOnlinePlayers()) {
|
||||
return new ServerStatus.Players(maxPlayers, players.size(), List.of());
|
||||
@@ -2130,7 +2130,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2143,7 +2143,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public int getPlayerCount() {
|
||||
@@ -109,7 +109,7 @@ index f76e40f8bbea076ad620f7525d4d8666603a5175..77bbc527b017c2ac42ebe4638457caf3
|
||||
}
|
||||
|
||||
public String[] getPlayerNames() {
|
||||
@@ -2347,7 +2347,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2360,7 +2360,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
int count = 0;
|
||||
|
||||
@@ -118,7 +118,7 @@ index f76e40f8bbea076ad620f7525d4d8666603a5175..77bbc527b017c2ac42ebe4638457caf3
|
||||
player.getBukkitEntity().taskScheduler.schedule((ServerPlayer updatedPlayer) -> { // Folia - region threading
|
||||
// Paper start - Expand PlayerGameModeChangeEvent
|
||||
org.bukkit.event.player.PlayerGameModeChangeEvent event = updatedPlayer.setGameMode(gameType, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, null); // Folia - region threading
|
||||
@@ -2538,7 +2538,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2551,7 +2551,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (Thread.currentThread() != this.serverThread) return; // Paper
|
||||
// Paper start - we don't need to save everything, just advancements
|
||||
// this.getPlayerList().saveAll();
|
||||
@@ -127,7 +127,7 @@ index f76e40f8bbea076ad620f7525d4d8666603a5175..77bbc527b017c2ac42ebe4638457caf3
|
||||
player.getAdvancements().save();
|
||||
}
|
||||
// Paper end - we don't need to save everything, just advancements
|
||||
@@ -2674,7 +2674,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2687,7 +2687,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
PlayerList playerList = this.getPlayerList();
|
||||
UserWhiteList whiteList = playerList.getWhiteList();
|
||||
|
||||
@@ -289,7 +289,7 @@ index 37c9f983ae89c497f44a1b7967d741abf909e0a0..d7fb2505f2a86ca0d81f144624ef2e1a
|
||||
|
||||
this.setListData(players);
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 1c4c67410849f844946e4883585910fc8fe97048..08a6fc0e58d61b1765e704c500b3aec635e69560 100644
|
||||
index 3e4b2f1fbe6864e40f1978c70d41773cde09fd17..1dda86db63f47a6cccb8e144ae2c6d3b11043cb1 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -3078,7 +3078,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -311,7 +311,7 @@ index 1c4c67410849f844946e4883585910fc8fe97048..08a6fc0e58d61b1765e704c500b3aec6
|
||||
}
|
||||
// Leaves end - skip
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f8501255adc 100644
|
||||
index a7a687c7a90bce1ad20d32241f0b4316fefc8f9d..7f3492a909536ca14577c3ec3aa511e98ca5551f 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -129,6 +129,7 @@ public abstract class PlayerList {
|
||||
@@ -330,12 +330,12 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
int count = this.usersCountedAgainstLimit.size();
|
||||
if (count >= limit) {
|
||||
return false;
|
||||
@@ -221,6 +223,123 @@ public abstract class PlayerList {
|
||||
@@ -221,6 +223,124 @@ public abstract class PlayerList {
|
||||
|
||||
abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor
|
||||
|
||||
+ // Leaves start - replay mod api
|
||||
+ public void placeNewPhotographer(Connection connection, org.leavesmc.leaves.replay.ServerPhotographer player, ServerLevel worldserver) {
|
||||
+ public void placeNewPhotographer(org.leavesmc.leaves.replay.Recorder connection, org.leavesmc.leaves.replay.ServerPhotographer player, ServerLevel worldserver) {
|
||||
+ player.isRealPlayer = true; // Paper
|
||||
+ player.loginTime = System.currentTimeMillis(); // Paper
|
||||
+
|
||||
@@ -347,6 +347,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
+ LevelData worlddata = worldserver1.getLevelData();
|
||||
+
|
||||
+ ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, CommonListenerCookie.createInitial(player.gameProfile, false));
|
||||
+ connection.bind(playerconnection);
|
||||
+ GameRules gamerules = worldserver1.getGameRules();
|
||||
+ boolean flag = gamerules.get(GameRules.IMMEDIATE_RESPAWN);
|
||||
+ boolean flag1 = gamerules.get(GameRules.REDUCED_DEBUG_INFO);
|
||||
@@ -454,7 +455,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
public void placeNewPlayer(final Connection connection, final ServerPlayer player, final CommonListenerCookie cookie) {
|
||||
player.isRealPlayer = true; // Paper
|
||||
player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
@@ -295,6 +414,7 @@ public abstract class PlayerList {
|
||||
@@ -295,6 +415,7 @@ public abstract class PlayerList {
|
||||
|
||||
// player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below
|
||||
this.players.add(player);
|
||||
@@ -462,7 +463,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||
this.playersByUUID.put(player.getUUID(), player);
|
||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player))); // CraftBukkit - replaced with loop below
|
||||
@@ -510,6 +630,7 @@ public abstract class PlayerList {
|
||||
@@ -510,6 +631,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
protected void save(final ServerPlayer player) {
|
||||
@@ -470,7 +471,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
player.lastSave = System.nanoTime(); // Folia - region threading - changed to nanoTime tracking
|
||||
this.playerIo.save(player);
|
||||
@@ -524,6 +645,48 @@ public abstract class PlayerList {
|
||||
@@ -524,6 +646,48 @@ public abstract class PlayerList {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -519,7 +520,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
public net.kyori.adventure.text.@Nullable Component remove(final ServerPlayer player) { // CraftBukkit - return string // Paper - return Component
|
||||
// Paper start - Fix kick event leave message not being sent
|
||||
return this.remove(player, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? player.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName())));
|
||||
@@ -597,6 +760,7 @@ public abstract class PlayerList {
|
||||
@@ -597,6 +761,7 @@ public abstract class PlayerList {
|
||||
player.getBukkitEntity().packetProcessor.close(); // Folia - region threading
|
||||
player.getAdvancements().clearTriggers();
|
||||
this.players.remove(player);
|
||||
@@ -527,7 +528,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||
if (me.earthme.luminol.config.modules.misc.UsernameCheckConfig.allowOldPlayersJoin) this.playedPlayers.remove(player.getGameProfile().name()); // Leaf - Configurable vanilla username check
|
||||
this.server.getCustomBossEvents().onPlayerDisconnect(player);
|
||||
@@ -910,15 +1074,15 @@ public abstract class PlayerList {
|
||||
@@ -910,15 +1075,15 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public String[] getPlayerNamesArray() {
|
||||
@@ -550,7 +551,7 @@ index ed50484ca24ef24b1e5bef9f6369dfa4b30c359c..64a87785048e103c10f6453e97a37f85
|
||||
// Leaves end - fakeplayer support
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index d64c68651b7142869a06ce0200fb625cd45ae235..1fe317cf3251bff7bb3e0335452a5714d4d31017 100644
|
||||
index 1de8eac336e2dd6335c433b7708ce6b6684553c9..dae262a073acb3bb3464d169dd5a0b6d67f27846 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -276,7 +276,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
@@ -21,7 +21,7 @@ index 700c9c0d40dee1df6c97f7c63ad731f16bc5f3e7..b95c56e0699fbe16e65efcf010cd514f
|
||||
} else {
|
||||
this.followingPlayer = null;
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index f063e9b7601480d0e66da22ea8e5bec2e8619fee..d46abbea2153cac2d939416fafeac7f905fe0e02 100644
|
||||
index 3f4cf6e0ddce45ca169a5fdfc54b25f609eba44b..8709dabd6d3574e53210543321ca88c778594afc 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -284,8 +284,8 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Global Entities Counter
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 24e186d05aa0333885178f444fade3b9c930ac97..5724a276cf4fdd41f239c47e4352ec05736a5e49 100644
|
||||
index b7df2edf243448cc6342db9360e0458f58769a12..6040a28aad7419d343feeb5aa97551591399dfd9 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -563,6 +563,9 @@ public final class RegionizedWorldData {
|
||||
@@ -558,6 +558,9 @@ public final class RegionizedWorldData {
|
||||
public final Map<Long, ChunkSectionItemEntityMovementTracker> itemEntityMovementTrackerMap = new it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap<>();
|
||||
// Luminol end
|
||||
|
||||
@@ -18,7 +18,7 @@ index 24e186d05aa0333885178f444fade3b9c930ac97..5724a276cf4fdd41f239c47e4352ec05
|
||||
public final TickRegions.TickRegionData regionData;
|
||||
|
||||
public RegionizedWorldData(final ServerLevel world, final TickRegions.TickRegionData regionData) {
|
||||
@@ -575,6 +578,15 @@ public final class RegionizedWorldData {
|
||||
@@ -570,6 +573,15 @@ public final class RegionizedWorldData {
|
||||
this.turbo = new io.papermc.paper.redstone.RedstoneWireTurbo((RedStoneWireBlock)Blocks.REDSTONE_WIRE);
|
||||
this.regionData = regionData;
|
||||
|
||||
@@ -99,7 +99,7 @@ index 414c21345879f589fb61130180d0ca606e37a454..98284b695cec2fcd968b594d7944c635
|
||||
NaturalSpawner.spawnForChunk(this.level, chunk, spawnCookie, spawningCategories);
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 08a6fc0e58d61b1765e704c500b3aec635e69560..ae88e57974f631ff2494c35d6e02049ba5d38014 100644
|
||||
index 1dda86db63f47a6cccb8e144ae2c6d3b11043cb1..68db8f0b571778f9a1c3cb7b6faf1e271fedd304 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -823,6 +823,11 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
+5
-5
@@ -36,10 +36,10 @@ index 20fa23988efbfb50c664fa48cc823adbe8e6ce58..1a95ccd745f4789225d711ab6fe497c6
|
||||
throw PacketUtils.makeReportedException(e, this.packet, this.listener);
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 77bbc527b017c2ac42ebe4638457caf32868e3f6..6ba62c5c6af4fc060442de8dfb069d5fe8ac0c69 100644
|
||||
index d1a0585e4a9fe85d8a99507bb8a55d175c1804e3..657801b605ff49af0a7b80e17bc45b89e243b35e 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1998,11 +1998,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2003,11 +2003,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
try {
|
||||
foliaProfiler.startTimer(level.tickTimerId); try { // Folia - profiler
|
||||
level.tick(haveTime, region); // Folia - region threading
|
||||
@@ -74,7 +74,7 @@ index 77bbc527b017c2ac42ebe4638457caf32868e3f6..6ba62c5c6af4fc060442de8dfb069d5f
|
||||
|
||||
profiler.pop();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index ae88e57974f631ff2494c35d6e02049ba5d38014..6b8073023833fc9e99684944802dc5941833aa4c 100644
|
||||
index 68db8f0b571778f9a1c3cb7b6faf1e271fedd304..ff146441b9665ae5f70e1f8acd8bd8fae52d810f 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -957,7 +957,18 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
@@ -98,7 +98,7 @@ index ae88e57974f631ff2494c35d6e02049ba5d38014..6b8073023833fc9e99684944802dc594
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 64943c193ae73795ddf8222a6f71ea5eb1705fe2..4034b4b9bd5e567b882169b5b1e17f75b64ba8db 100644
|
||||
index 624f637e7a4fb8297d42e9944011e3c83245949e..ac6561a1552f7a2f724fefe0aa1507dbd9a703ef 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1111,6 +1111,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -115,7 +115,7 @@ index 64943c193ae73795ddf8222a6f71ea5eb1705fe2..4034b4b9bd5e567b882169b5b1e17f75
|
||||
CrashReport report = CrashReport.forThrowable(t, "Ticking player");
|
||||
CrashReportCategory category = report.addCategory("Player being ticked");
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index b11637543c3ef8650ad5c65c2cab8a1cb6e95158..426e033e033147f5db6c2d9c96ab13af0fc553a8 100644
|
||||
index c3df068144c3af4b3700b104588970154837018d..f15f0ca83ff2313d2e025db984c4fa1d492c5a70 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1522,8 +1522,18 @@ public abstract class Entity
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Instant Block Updater
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index 5724a276cf4fdd41f239c47e4352ec05736a5e49..3a50e625160d0dad6bd8fa534b719087dae7881d 100644
|
||||
index 6040a28aad7419d343feeb5aa97551591399dfd9..f1234717c2626661a93f5a22358a41752c22df3d 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -509,7 +509,7 @@ public final class RegionizedWorldData {
|
||||
@@ -504,7 +504,7 @@ public final class RegionizedWorldData {
|
||||
public long lastMidTickExecuteFailure;
|
||||
// From Level
|
||||
public boolean populating;
|
||||
@@ -17,7 +17,7 @@ index 5724a276cf4fdd41f239c47e4352ec05736a5e49..3a50e625160d0dad6bd8fa534b719087
|
||||
public boolean captureBlockStates = false;
|
||||
public boolean captureTreeGeneration = false;
|
||||
public final Map<BlockPos, CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper
|
||||
@@ -572,7 +572,11 @@ public final class RegionizedWorldData {
|
||||
@@ -567,7 +567,11 @@ public final class RegionizedWorldData {
|
||||
this.world = world;
|
||||
this.blockLevelTicks = new LevelTicks<>(world::isPositionTickingWithEntitiesLoaded, world, true);
|
||||
this.fluidLevelTicks = new LevelTicks<>(world::isPositionTickingWithEntitiesLoaded, world, false);
|
||||
@@ -30,7 +30,7 @@ index 5724a276cf4fdd41f239c47e4352ec05736a5e49..3a50e625160d0dad6bd8fa534b719087
|
||||
this.nearbyPlayers = new NearbyPlayers(world);
|
||||
this.wireHandler = new alternate.current.wire.WireHandler(world);
|
||||
this.turbo = new io.papermc.paper.redstone.RedstoneWireTurbo((RedStoneWireBlock)Blocks.REDSTONE_WIRE);
|
||||
@@ -901,4 +905,4 @@ public final class RegionizedWorldData {
|
||||
@@ -915,4 +919,4 @@ public final class RegionizedWorldData {
|
||||
public int getChunkCount() {
|
||||
return this.chunks.size();
|
||||
}
|
||||
@@ -38,7 +38,7 @@ index 5724a276cf4fdd41f239c47e4352ec05736a5e49..3a50e625160d0dad6bd8fa534b719087
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 6b8073023833fc9e99684944802dc5941833aa4c..132122f23a697109696852cf383fa1b0186e0210 100644
|
||||
index ff146441b9665ae5f70e1f8acd8bd8fae52d810f..8eca4b0a82d738f873f9e01a7424aaf7ee3735a2 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -991,11 +991,15 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Carpet features
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index 6fb3c88463ff69bddb7d8dcde0e5339567d3e1c6..7ee9eb8439330724c537f9b1451be78dd3a107ad 100644
|
||||
index f881d10d63a665a73aefe03ba1305ca9ae956513..7577533f82688304f06c445fd5a1c3fa3c4575fc 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -238,6 +238,7 @@ public final class RegionizedServer {
|
||||
@@ -15,7 +15,7 @@ index 6fb3c88463ff69bddb7d8dcde0e5339567d3e1c6..7ee9eb8439330724c537f9b1451be78d
|
||||
+ final long tickStartNanos = System.nanoTime(); // Lophine - Carpet features
|
||||
++this.tickCount;
|
||||
// Luminol start - Add a config to enable tick command
|
||||
if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
@@ -280,6 +281,10 @@ public final class RegionizedServer {
|
||||
}
|
||||
// Lophine end - Add a config to enable tick command
|
||||
@@ -28,7 +28,7 @@ index 6fb3c88463ff69bddb7d8dcde0e5339567d3e1c6..7ee9eb8439330724c537f9b1451be78d
|
||||
this.tickConnections();
|
||||
|
||||
diff --git a/net/minecraft/commands/arguments/blocks/BlockInput.java b/net/minecraft/commands/arguments/blocks/BlockInput.java
|
||||
index 29dcaa5b33e4f6c649b0918721cfaafe9c74eb01..c7e4f2345c8d48b263eeb537d5fcce3ac43bb59e 100644
|
||||
index 29dcaa5b33e4f6c649b0918721cfaafe9c74eb01..804f7d9d5b71ccff3c16f4c743081c38b658dd3c 100644
|
||||
--- a/net/minecraft/commands/arguments/blocks/BlockInput.java
|
||||
+++ b/net/minecraft/commands/arguments/blocks/BlockInput.java
|
||||
@@ -65,7 +65,11 @@ public class BlockInput implements Predicate<BlockInWorld> {
|
||||
@@ -37,7 +37,7 @@ index 29dcaa5b33e4f6c649b0918721cfaafe9c74eb01..c7e4f2345c8d48b263eeb537d5fcce3a
|
||||
public boolean place(final ServerLevel level, final BlockPos pos, final @Block.UpdateFlags int update) {
|
||||
- BlockState state = (update & Block.UPDATE_KNOWN_SHAPE) != 0 ? this.state : Block.updateFromNeighbourShapes(this.state, level, pos);
|
||||
+ // Lophine start - Carpet features
|
||||
+ BlockState state = (update & Block.UPDATE_KNOWN_SHAPE) != 0 || fun.bm.lophine.carpet.InteractionUpdateCompatHelper.shouldSkipUpdates()
|
||||
+ BlockState state = (update & Block.UPDATE_KNOWN_SHAPE) != 0 || fun.bm.lophine.carpet.InteractionUpdateHelper.shouldSkipUpdates()
|
||||
+ ? this.state
|
||||
+ : Block.updateFromNeighbourShapes(this.state, level, pos);
|
||||
+ // Lophine end - Carpet features
|
||||
@@ -128,7 +128,7 @@ index 8cc4fe9feb57902a4b9a6a26e6175ac00a2cef65..9ab1a812e43145120859734075e2ac99
|
||||
// Paper start - fix converting txt to json file; moved from constructor
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 4034b4b9bd5e567b882169b5b1e17f75b64ba8db..4c53b688ed6b26ca7231841f3235f9a824416bba 100644
|
||||
index ac6561a1552f7a2f724fefe0aa1507dbd9a703ef..d393f485965ddd960b4a3cb26ad7eb48deccb4ab 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -260,6 +260,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -139,7 +139,7 @@ index 4034b4b9bd5e567b882169b5b1e17f75b64ba8db..4c53b688ed6b26ca7231841f3235f9a8
|
||||
private @Nullable Vec3 startingToFallPosition;
|
||||
private @Nullable Vec3 enteredNetherPosition;
|
||||
private @Nullable Vec3 enteredLavaOnVehiclePosition;
|
||||
@@ -2168,7 +2169,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2147,7 +2148,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.lastSentFood = -1;
|
||||
this.teleportSpectators(transition, oldLevel);
|
||||
// Leaves start - bot support
|
||||
@@ -148,7 +148,7 @@ index 4034b4b9bd5e567b882169b5b1e17f75b64ba8db..4c53b688ed6b26ca7231841f3235f9a8
|
||||
this.server.getBotList().bots.forEach(bot -> bot.sendFakeDataIfNeed(this, true)); // Leaves - render bot
|
||||
}
|
||||
// Leaves end - bot support
|
||||
@@ -2805,6 +2806,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2784,6 +2785,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.setShoulderEntityRight(oldPlayer.getShoulderEntityRight());
|
||||
this.setLastDeathLocation(oldPlayer.getLastDeathLocation());
|
||||
this.waypointIcon().copyFrom(oldPlayer.waypointIcon());
|
||||
@@ -160,7 +160,7 @@ index 4034b4b9bd5e567b882169b5b1e17f75b64ba8db..4c53b688ed6b26ca7231841f3235f9a8
|
||||
}
|
||||
|
||||
private void transferInventoryXpAndScore(final Player oldPlayer) {
|
||||
@@ -3084,6 +3090,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -3063,6 +3069,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.particleStatus = information.particleStatus();
|
||||
this.getEntityData().set(DATA_PLAYER_MODE_CUSTOMISATION, (byte)information.modelCustomisation());
|
||||
this.getEntityData().set(DATA_PLAYER_MAIN_HAND, information.mainHand());
|
||||
@@ -173,10 +173,10 @@ index 4034b4b9bd5e567b882169b5b1e17f75b64ba8db..4c53b688ed6b26ca7231841f3235f9a8
|
||||
|
||||
public ClientInformation clientInformation() {
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7dacb4fd1e 100644
|
||||
index 11d177e486958727f880f073550ae5db7e233dcd..e489da1acbb77c003951b608856ea706570cbed6 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2091,7 +2091,15 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2092,7 +2092,15 @@ public class ServerGamePacketListenerImpl
|
||||
this.player.gameMode.capturedBlockEntity = false;
|
||||
this.player.gameMode.captureSentBlockEntities = true;
|
||||
// Paper end - Send block entities after destroy prediction
|
||||
@@ -185,7 +185,7 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.interactionUpdates) {
|
||||
+ this.player.gameMode.handleBlockBreakAction(pos, action, packet.getDirection(), this.player.level().getMaxY(), packet.getSequence());
|
||||
+ } else {
|
||||
+ fun.bm.lophine.carpet.InteractionUpdateCompatHelper.runWithSuppressedUpdates(
|
||||
+ fun.bm.lophine.carpet.InteractionUpdateHelper.runWithSuppressedUpdates(
|
||||
+ () -> this.player.gameMode.handleBlockBreakAction(pos, action, packet.getDirection(), this.player.level().getMaxY(), packet.getSequence())
|
||||
+ );
|
||||
+ }
|
||||
@@ -193,7 +193,7 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
this.ackBlockChangesUpTo(packet.getSequence());
|
||||
// Paper start - Send block entities after destroy prediction
|
||||
this.player.gameMode.captureSentBlockEntities = false;
|
||||
@@ -2194,7 +2202,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2195,7 +2203,9 @@ public class ServerGamePacketListenerImpl
|
||||
if (!me.earthme.luminol.config.modules.fixes.ItemMultitaskConfig.enabled) { // Luminol - Add item multitask config
|
||||
this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706
|
||||
} // Luminol - Add item multitask config
|
||||
@@ -204,7 +204,7 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
if (interactionResult.consumesAction()) {
|
||||
CriteriaTriggers.ANY_BLOCK_USE.trigger(this.player, blockHit.getBlockPos(), itemStack);
|
||||
}
|
||||
@@ -2299,7 +2309,10 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2300,7 +2310,10 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -216,7 +216,7 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
&& success.swingSource() == InteractionResult.SwingSource.SERVER) {
|
||||
this.player.swing(hand, true);
|
||||
}
|
||||
@@ -2307,6 +2320,16 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2308,6 +2321,16 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,25 +226,25 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
+ return action.get();
|
||||
+ }
|
||||
+
|
||||
+ return fun.bm.lophine.carpet.InteractionUpdateCompatHelper.supplyWithSuppressedUpdates(action);
|
||||
+ return fun.bm.lophine.carpet.InteractionUpdateHelper.supplyWithSuppressedUpdates(action);
|
||||
+ }
|
||||
+
|
||||
+ // Lophine end - Carpet features
|
||||
@Override
|
||||
public void handleTeleportToEntityPacket(final ServerboundTeleportToEntityPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
|
||||
@@ -2687,6 +2710,10 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2688,6 +2711,10 @@ public class ServerGamePacketListenerImpl
|
||||
if (true) throw new UnsupportedOperationException(); // Folia - region threading
|
||||
final String conversationInput = rawMessage;
|
||||
this.server.processQueue.add(() -> ServerGamePacketListenerImpl.this.getCraftPlayer().acceptConversationInput(conversationInput));
|
||||
+ // Lophine start - Carpet features
|
||||
+ } else if (fun.bm.lophine.carpet.CarpetCalculatorCompatHelper.handleChat(this.player, rawMessage)) {
|
||||
+ } else if (fun.bm.lophine.carpet.CarpetCalculatorHelper.handleChat(this.player, rawMessage)) {
|
||||
+ return;
|
||||
+ // Lophine end - Carpet features
|
||||
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check
|
||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.cannotSend").withStyle(ChatFormatting.RED), false));
|
||||
} else {
|
||||
@@ -2699,6 +2726,9 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2700,6 +2727,9 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
// Spigot start - spam exclusions
|
||||
private void detectRateSpam(final TickThrottler throttler, final String message) {
|
||||
@@ -254,7 +254,7 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
if (me.earthme.luminol.config.modules.misc.PaperPacketLimiterConfig.forceDisable) return; // Leaves - disable
|
||||
// CraftBukkit start - replaced with thread safe throttle
|
||||
if (org.spigotmc.SpigotConfig.enableSpamExclusions) {
|
||||
@@ -3645,8 +3675,10 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3646,8 +3676,10 @@ public class ServerGamePacketListenerImpl
|
||||
if (org.leavesmc.leaves.util.ItemOverstackUtils.hasOverstackingItem()) this.player.containerMenu.sendSingleSlot(packet.slotNum(), itemStack); // Leaves - item over-stack util - force send carried item
|
||||
if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes.
|
||||
} else if (drop && validData) {
|
||||
@@ -268,10 +268,10 @@ index 77b9cd3d14eddc735d9131597916405fde4230ec..b23a47380fb1178696dc49e35d2c3d7d
|
||||
} else {
|
||||
LOGGER.warn("Player {} was dropping items too fast in creative mode, ignoring.", this.player.getPlainTextName());
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 64a87785048e103c10f6453e97a37f8501255adc..432a6dfff8e45eccea653b0d4cf04956edec6d98 100644
|
||||
index 7f3492a909536ca14577c3ec3aa511e98ca5551f..2d6500eb0a01f455de8d7a627cabcc06bb60ca61 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -279,7 +279,7 @@ public abstract class PlayerList {
|
||||
@@ -280,7 +280,7 @@ public abstract class PlayerList {
|
||||
// org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerJoin(player); // Leaves - protocol
|
||||
|
||||
// Leaves start - bot support
|
||||
@@ -280,7 +280,7 @@ index 64a87785048e103c10f6453e97a37f8501255adc..432a6dfff8e45eccea653b0d4cf04956
|
||||
org.leavesmc.leaves.bot.ServerBot bot = this.server.getBotList().getBotByName(player.getScoreboardName());
|
||||
if (bot != null) {
|
||||
this.server.getBotList().removeBot(bot, org.leavesmc.leaves.event.bot.BotRemoveEvent.RemoveReason.INTERNAL, player.getBukkitEntity(), false, false);
|
||||
@@ -441,7 +441,7 @@ public abstract class PlayerList {
|
||||
@@ -442,7 +442,7 @@ public abstract class PlayerList {
|
||||
org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerJoin(player); // Leaves - protocol
|
||||
|
||||
// Leaves start - bot support
|
||||
@@ -289,7 +289,7 @@ index 64a87785048e103c10f6453e97a37f8501255adc..432a6dfff8e45eccea653b0d4cf04956
|
||||
org.leavesmc.leaves.bot.ServerBot bot = this.server.getBotList().getBotByName(player.getScoreboardName());
|
||||
if (bot != null) {
|
||||
this.server.getBotList().removeBot(bot, org.leavesmc.leaves.event.bot.BotRemoveEvent.RemoveReason.INTERNAL, player.getBukkitEntity(), false, false);
|
||||
@@ -969,7 +969,7 @@ public abstract class PlayerList {
|
||||
@@ -970,7 +970,7 @@ public abstract class PlayerList {
|
||||
).callEvent();
|
||||
// Paper end
|
||||
// Leaves start - bot support
|
||||
@@ -424,7 +424,7 @@ index b95c56e0699fbe16e65efcf010cd514f0ac0962f..0125d59551accd9005aa33a5c7cc8ec2
|
||||
return this.entityData.get(DATA_VALUE);
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 1fe317cf3251bff7bb3e0335452a5714d4d31017..14a79e8ef5a98b1eef2f2d3e0c63f21cb5bb4dbf 100644
|
||||
index dae262a073acb3bb3464d169dd5a0b6d67f27846..0990e393c8695b17571d9a7646d895ab07ec30ba 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -623,7 +623,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -521,7 +521,7 @@ index d2ac2a0c5bb18c2bca18e5166ed65afd01166e04..6b3adf1af870c3d710494d34d2f25850
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index d46abbea2153cac2d939416fafeac7f905fe0e02..e224c1b8977cd97f2868f7db56c1df22a6820918 100644
|
||||
index 8709dabd6d3574e53210543321ca88c778594afc..76af5d1aa163e399cd4b5ed1ffd0a03757e31555 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -560,7 +560,15 @@ public abstract class Player extends Avatar implements ContainerUser {
|
||||
@@ -716,7 +716,7 @@ index 6812ade4d9de26d507234b8357b109ec7e5cbb50..071d2cd7e0c2e5bba0732590ba804a5c
|
||||
public void addRecipe(RecipeHolder<?> holder) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("Recipe Add"); // Spigot
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 000e4924e8e338728715a3946002903a3118a98a..55d83a1a97077033191f0f0c220e99095f2a314d 100644
|
||||
index 000e4924e8e338728715a3946002903a3118a98a..ca92bb3a8b739c0da3f48a2dd16c5fb4fa7e8453 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1179,7 +1179,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -725,7 +725,7 @@ index 000e4924e8e338728715a3946002903a3118a98a..55d83a1a97077033191f0f0c220e9909
|
||||
if (newState == blockState) {
|
||||
- if (oldState != newState) {
|
||||
+ // Lophine start - Carpet features
|
||||
+ boolean skipInteractionUpdates = fun.bm.lophine.carpet.InteractionUpdateCompatHelper.shouldSkipUpdates();
|
||||
+ boolean skipInteractionUpdates = fun.bm.lophine.carpet.InteractionUpdateHelper.shouldSkipUpdates();
|
||||
+ if (skipInteractionUpdates) {
|
||||
+ updateFlags &= ~Block.UPDATE_NEIGHBORS;
|
||||
+ }
|
||||
@@ -744,7 +744,7 @@ index 000e4924e8e338728715a3946002903a3118a98a..55d83a1a97077033191f0f0c220e9909
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926649b097f 100644
|
||||
index 0d8d2459457167d78a9a9ea43765980240416947..6da302e1dd755217b82dbc10051324bc8b5d10c1 100644
|
||||
--- a/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -289,6 +289,12 @@ public final class NaturalSpawner {
|
||||
@@ -753,7 +753,7 @@ index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926
|
||||
double nearestPlayerDistanceSqr = nearestPlayer.distanceToSqr(xx, yStart, zz);
|
||||
+ // Lophine start - Carpet features
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.lagFreeSpawning) {
|
||||
+ nearestPlayerDistanceSqr = fun.bm.lophine.carpet.LagFreeSpawningCompatHelper.limitDistanceSq(mobCategory, nearestPlayerDistanceSqr);
|
||||
+ nearestPlayerDistanceSqr = fun.bm.lophine.carpet.LagFreeSpawningHelper.limitDistanceSq(mobCategory, nearestPlayerDistanceSqr);
|
||||
+ }
|
||||
+
|
||||
+ // Lophine end - Carpet features
|
||||
@@ -766,7 +766,7 @@ index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926
|
||||
if (!mob.isRemoved()) {
|
||||
+ // Lophine start - Carpet features
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.lagFreeSpawning) {
|
||||
+ fun.bm.lophine.carpet.LagFreeSpawningCompatHelper.markSpawned(level, mob.getType());
|
||||
+ fun.bm.lophine.carpet.LagFreeSpawningHelper.markSpawned(level, mob.getType());
|
||||
+ }
|
||||
+
|
||||
+ // Lophine end - Carpet features
|
||||
@@ -780,7 +780,7 @@ index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926
|
||||
- && level.noCollision(type.getSpawnAABB(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5));
|
||||
+ // Lophine start - Carpet features
|
||||
+ && (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.lagFreeSpawning
|
||||
+ ? fun.bm.lophine.carpet.LagFreeSpawningCompatHelper.hasNoCollision(level, type.getSpawnAABB(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5))
|
||||
+ ? fun.bm.lophine.carpet.LagFreeSpawningHelper.hasNoCollision(level, type.getSpawnAABB(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5))
|
||||
+ : level.noCollision(type.getSpawnAABB(pos.getX() + 0.5, pos.getY(), pos.getZ() + 0.5)));
|
||||
+ // Lophine end - Carpet features
|
||||
return success ? PreSpawnStatus.SUCCESS : PreSpawnStatus.FAIL; // Paper - PreCreatureSpawnEvent
|
||||
@@ -789,7 +789,7 @@ index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926
|
||||
private static @Nullable Mob getMobForSpawn(final ServerLevel level, final EntityType<?> type) {
|
||||
+ // Lophine start - Carpet features
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.lagFreeSpawning) {
|
||||
+ Mob cachedMob = fun.bm.lophine.carpet.LagFreeSpawningCompatHelper.getOrCreateMob(level, type);
|
||||
+ Mob cachedMob = fun.bm.lophine.carpet.LagFreeSpawningHelper.getOrCreateMob(level, type);
|
||||
+ if (cachedMob != null) {
|
||||
+ return cachedMob;
|
||||
+ }
|
||||
@@ -806,7 +806,7 @@ index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926
|
||||
- if (!level.noCollision(spawnerData.type().getSpawnAABB(fx, pos.getY(), fz))
|
||||
+ // Lophine start - Carpet features
|
||||
+ if (!(fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.lagFreeSpawning
|
||||
+ ? fun.bm.lophine.carpet.LagFreeSpawningCompatHelper.hasNoCollision(level.getLevel(), spawnerData.type().getSpawnAABB(fx, pos.getY(), fz))
|
||||
+ ? fun.bm.lophine.carpet.LagFreeSpawningHelper.hasNoCollision(level.getLevel(), spawnerData.type().getSpawnAABB(fx, pos.getY(), fz))
|
||||
+ : level.noCollision(spawnerData.type().getSpawnAABB(fx, pos.getY(), fz)))
|
||||
+ // Lophine end - Carpet features
|
||||
|| !SpawnPlacements.checkSpawnRules(
|
||||
@@ -818,7 +818,7 @@ index 0d8d2459457167d78a9a9ea43765980240416947..717cd4b18da2c637fc070c738741f926
|
||||
level.addFreshEntityWithPassengers(mob, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit
|
||||
+ // Lophine start - Carpet features
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.lagFreeSpawning) {
|
||||
+ fun.bm.lophine.carpet.LagFreeSpawningCompatHelper.markSpawned(level.getLevel(), mob.getType());
|
||||
+ fun.bm.lophine.carpet.LagFreeSpawningHelper.markSpawned(level.getLevel(), mob.getType());
|
||||
+ }
|
||||
+ // Lophine end - Carpet features
|
||||
success = true;
|
||||
@@ -842,7 +842,7 @@ index b90077b44ce81d5d60f9d0ad2414f0b7c6b1e720..4f4512d30717e5e41bd98703574485c0
|
||||
final ObjectArrayList<BlockPos> ret = new ObjectArrayList<>();
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/net/minecraft/world/level/block/CarvedPumpkinBlock.java
|
||||
index 4ed03c9bb81a903c6ec68efe72845f20b083f3ac..003c19d8cad2ae5af770923a76735e4944b24c28 100644
|
||||
index 5a316fedee1992efd4a21c4678b659c4589d57ec..f0a46c30b3c446cdc52a8198608d7f60441b7d1b 100644
|
||||
--- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java
|
||||
+++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java
|
||||
@@ -59,7 +59,10 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock {
|
||||
@@ -868,7 +868,7 @@ index 4ed03c9bb81a903c6ec68efe72845f20b083f3ac..003c19d8cad2ae5af770923a76735e49
|
||||
}
|
||||
|
||||
private WeatheringCopper.WeatherState getWeatherStateFromPattern(final BlockPattern.BlockPatternMatch copperGolemMatch) {
|
||||
@@ -159,6 +166,44 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock {
|
||||
@@ -162,6 +169,44 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@@ -1182,7 +1182,7 @@ index 972b953a579120c1c05f2dc9bfc2b408d6071d26..a60bb8af6b6aa356193befa9d7e9cdfc
|
||||
return function != null ? function.evaluate(this.asState(), pos) : Vec3.ZERO;
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index a4d5bf1773a9ce8184a940384696f0d38690a421..cd8ccc6de723bc01390b0439382ea69c775640ba 100644
|
||||
index a4d5bf1773a9ce8184a940384696f0d38690a421..5b306cc2d4a3cdc3ce08595dc63975c87fca9d3f 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -425,10 +425,10 @@ public class LevelChunk extends ChunkAccess implements DebugValueSource, ca.spot
|
||||
@@ -1190,7 +1190,7 @@ index a4d5bf1773a9ce8184a940384696f0d38690a421..cd8ccc6de723bc01390b0439382ea69c
|
||||
boolean movedByPiston = (flags & Block.UPDATE_MOVE_BY_PISTON) != 0;
|
||||
boolean sideEffects = (flags & Block.UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS) == 0;
|
||||
- // Leaves start - behaviour 1.21.1-
|
||||
+ boolean skipInteractionUpdates = fun.bm.lophine.carpet.InteractionUpdateCompatHelper.shouldSkipUpdates(); // Lophine - Carpet features// Leaves start - behaviour 1.21.1-
|
||||
+ boolean skipInteractionUpdates = fun.bm.lophine.carpet.InteractionUpdateHelper.shouldSkipUpdates(); // Lophine - Carpet features// Leaves start - behaviour 1.21.1-
|
||||
if (!fun.bm.lophine.config.modules.experiment.RedStoneConfig.oldBlockRemoveBehaviour) {
|
||||
if (blockChanged && oldState.hasBlockEntity() && !state.shouldChangedStateKeepBlockEntity(oldState)) {
|
||||
- if (!this.level.isClientSide() && sideEffects) {
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Wed, 21 Jan 2026 21:28:21 +0800
|
||||
Subject: [PATCH] Carpet Features Compatible
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index 7ee9eb8439330724c537f9b1451be78dd3a107ad..7577533f82688304f06c445fd5a1c3fa3c4575fc 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -241,7 +241,7 @@ public final class RegionizedServer {
|
||||
final long tickStartNanos = System.nanoTime(); // Lophine - Carpet features
|
||||
++this.tickCount;
|
||||
// Luminol start - Add a config to enable tick command
|
||||
- if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
MinecraftServer.getServer().tickRateManager().tick();
|
||||
}
|
||||
// Luminol end - Add a config to enable tick command
|
||||
@@ -435,7 +435,7 @@ public final class RegionizedServer {
|
||||
}
|
||||
|
||||
private void tickTime(final ServerLevel world, final long tickCount) {
|
||||
- if ((!me.earthme.luminol.config.modules.experiment.CommandConfig.tick || world.tickRateManager().runsNormally()) && world.tickTime) { // Luminol - Add a config to enable tick command
|
||||
+ if ((!fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick || world.tickRateManager().runsNormally()) && world.tickTime) { // Luminol - Add a config to enable tick command // Lophine - redirect
|
||||
world.serverLevelData.setGameTime(world.serverLevelData.getGameTime() + tickCount);
|
||||
}
|
||||
}
|
||||
diff --git a/io/papermc/paper/threadedregions/TickRegionScheduler.java b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
index 57a35d7a801621fc461e896eb2bba533d9d5bc1b..ae424c8931a2f82c6c8d4ddd8422a2c142a77a95 100644
|
||||
--- a/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
+++ b/io/papermc/paper/threadedregions/TickRegionScheduler.java
|
||||
@@ -576,7 +576,7 @@ public final class TickRegionScheduler {
|
||||
// next start isn't updated until the end of this tick
|
||||
this.tickRegion(tickCount, tickStart, scheduledEnd);
|
||||
// Luminol start - Add a config to enable tick command
|
||||
- if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
MinecraftServer.getServer().tickRateManager().endTickWork();
|
||||
}
|
||||
// Luminol end - Add a config to enable tick command
|
||||
diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java
|
||||
index 03f3fe221b14f0317947d74e25049bcce2ebeb66..6882e85fb6413e5c346c189a82b69f3e408aafba 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -268,7 +268,7 @@ public class Commands {
|
||||
TellRawCommand.register(this.dispatcher, context);
|
||||
//TestCommand.register(this.dispatcher, context); // Folia - region threading
|
||||
// Luminol start - Add a config to enable tick command
|
||||
- if (me.earthme.luminol.config.modules.experiment.CommandConfig.tick) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.commandTick) { // Lophine - redirect
|
||||
TickCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
}
|
||||
// Luminol end - Add a config to enable tick command
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EnderDragonFight.java b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
index 3388bf5d2cff00b397af1dd7b9ab93669985b35c..e70a6c295e8c26bdf56528826801f037ad0f93b0 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EnderDragonFight.java
|
||||
@@ -323,7 +323,7 @@ public class EnderDragonFight extends SavedData {
|
||||
private int cachePortalOriginIteratorY = -1;
|
||||
|
||||
public BlockPattern.@Nullable BlockPatternMatch findExitPortal() {
|
||||
- if (me.earthme.luminol.config.modules.optimizations.OptimizedDragonRespawnConfig.optimizedRespawn) {
|
||||
+ if (fun.bm.lophine.carpet.config.modules.GeneralCompatConfig.optimizedDragonRespawn) { // Lophine - Carpet Features Compatible
|
||||
int i, j;
|
||||
for (i = cachePortalChunkIteratorX; i <= 8; ++i) {
|
||||
for (j = cachePortalChunkIteratorZ; j <= 8; ++j) {
|
||||
+4
-4
@@ -21,10 +21,10 @@ index dd17339fe2f9d7660b20eed05b61d6231302aa82..d997e4f7ae6ee4e81f5fffe874f2895d
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 4c53b688ed6b26ca7231841f3235f9a824416bba..cef9c7887332b91e2466a97a5250db81f7af0dcf 100644
|
||||
index d393f485965ddd960b4a3cb26ad7eb48deccb4ab..27a6970fe699b9346b7ca69e1cfa04833a1c0b57 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2360,7 +2360,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -2339,7 +2339,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public boolean isInvulnerableTo(final ServerLevel level, final DamageSource source) {
|
||||
// Paper start - disable player cramming
|
||||
return (super.isInvulnerableTo(level, source) || this.isChangingDimension() && !source.is(DamageTypes.ENDER_PEARL) || !this.connection.hasClientLoaded())
|
||||
@@ -34,7 +34,7 @@ index 4c53b688ed6b26ca7231841f3235f9a824416bba..cef9c7887332b91e2466a97a5250db81
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 14a79e8ef5a98b1eef2f2d3e0c63f21cb5bb4dbf..429116ab6bac69054a30b0c766ea5d0186877fae 100644
|
||||
index 0990e393c8695b17571d9a7646d895ab07ec30ba..386033fa4ba0fb705593e0c9f9cc6574c0ab55ac 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -4004,7 +4004,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -99,7 +99,7 @@ index 6130c477349096d5912dce859b616661e2f43b36..c8c433dcfef3442ff8385c9fc1f1ea47
|
||||
return true;
|
||||
} // Paper - Add phantom creative and insomniac controls
|
||||
diff --git a/net/minecraft/world/level/NaturalSpawner.java b/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 717cd4b18da2c637fc070c738741f926649b097f..dfb85696affef368d85f93cb0b465abb88267aa1 100644
|
||||
index 6da302e1dd755217b82dbc10051324bc8b5d10c1..e333abe5bcdd0c571682550d43c7e88d9f6f3296 100644
|
||||
--- a/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -90,7 +90,8 @@ public final class NaturalSpawner {
|
||||
+5
-5
@@ -5,7 +5,7 @@ Subject: [PATCH] Restore vanilla ender pearl loading
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index cef9c7887332b91e2466a97a5250db81f7af0dcf..a17212c1910ce9490fe8df8c4ef507e25b89c545 100644
|
||||
index 27a6970fe699b9346b7ca69e1cfa04833a1c0b57..28ce624e9952e9d45930d4550ef80d1e788f5916 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -277,7 +277,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -51,7 +51,7 @@ index cef9c7887332b91e2466a97a5250db81f7af0dcf..a17212c1910ce9490fe8df8c4ef507e2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3568,11 +3570,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -3547,11 +3549,11 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
public void registerEnderPearl(final ThrownEnderpearl enderPearl) {
|
||||
@@ -66,10 +66,10 @@ index cef9c7887332b91e2466a97a5250db81f7af0dcf..a17212c1910ce9490fe8df8c4ef507e2
|
||||
|
||||
public Set<ThrownEnderpearl> getEnderPearls() {
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 432a6dfff8e45eccea653b0d4cf04956edec6d98..835c13ff69592951261f917ad999d9a7689e802c 100644
|
||||
index 2d6500eb0a01f455de8d7a627cabcc06bb60ca61..2cfae6cb39fb4d2b24f6e773d9df1f24130bfbe3 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -748,11 +748,13 @@ public abstract class PlayerList {
|
||||
@@ -749,11 +749,13 @@ public abstract class PlayerList {
|
||||
player.unRide();
|
||||
|
||||
for (ThrownEnderpearl enderpearl : player.getEnderPearls()) {
|
||||
@@ -89,7 +89,7 @@ index 432a6dfff8e45eccea653b0d4cf04956edec6d98..835c13ff69592951261f917ad999d9a7
|
||||
|
||||
level.removePlayerImmediately(player, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
|
||||
diff --git a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
index 790c1bcf11150d31bf90c32345e4eb40de9a6a41..7409b452567608dbdb36ac686791e604a267fb6a 100644
|
||||
index 4df9a3356cfdee52761db47694e59779976840db..3e6844a468d8e6c9cf3b0bd23e21a3cabc9b7f51 100644
|
||||
--- a/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
+++ b/net/minecraft/world/entity/projectile/throwableitemprojectile/ThrownEnderpearl.java
|
||||
@@ -31,7 +31,11 @@ import net.minecraft.world.phys.Vec3;
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 28 Jul 2026 15:08:10 +0800
|
||||
Subject: [PATCH] Anonymous Object: Fix wrong variable passing in
|
||||
RegionizedWorldData
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedWorldData.java b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
index f1234717c2626661a93f5a22358a41752c22df3d..a2187a61070a8dde2e457127394ce9eba44c0201 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -855,7 +855,7 @@ public final class RegionizedWorldData {
|
||||
}
|
||||
|
||||
public void setTickingBlockEntities(final boolean to) {
|
||||
- this.tickingBlockEntities = true;
|
||||
+ this.tickingBlockEntities = to; // Anonymous - Fix wrong variable passing in RegionizedWorldData
|
||||
}
|
||||
|
||||
public List<TickingBlockEntity> getBlockEntityTickers() {
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 28 Jul 2026 15:08:28 +0800
|
||||
Subject: [PATCH] Anonymous Object: Fix wrong variable passing in
|
||||
ThreadedRegionizer
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/ThreadedRegionizer.java b/io/papermc/paper/threadedregions/ThreadedRegionizer.java
|
||||
index a346b96500ae859e9469c80e2ff6b39c4d3d0b52..73e0aeb5a5e9bdd1f275dd64d1fffa32c389052d 100644
|
||||
--- a/io/papermc/paper/threadedregions/ThreadedRegionizer.java
|
||||
+++ b/io/papermc/paper/threadedregions/ThreadedRegionizer.java
|
||||
@@ -755,8 +755,8 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio
|
||||
final int x1 = CoordinateUtils.getChunkX(k1);
|
||||
final int x2 = CoordinateUtils.getChunkX(k2);
|
||||
|
||||
- final int z1 = CoordinateUtils.getChunkZ(x1);
|
||||
- final int z2 = CoordinateUtils.getChunkZ(x2);
|
||||
+ final int z1 = CoordinateUtils.getChunkZ(k1); // Anonymous - Fix wrong variable passing in ThreadedRegionizer
|
||||
+ final int z2 = CoordinateUtils.getChunkZ(k2); // Anonymous - Fix wrong variable passing in ThreadedRegionizer
|
||||
|
||||
final int zCompare = Integer.compare(z1, z2);
|
||||
if (zCompare != 0) {
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 28 Jul 2026 15:08:42 +0800
|
||||
Subject: [PATCH] Anonymous Object: Fix wrong ticket update determination in
|
||||
RegionizedTaskQueue
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedTaskQueue.java b/io/papermc/paper/threadedregions/RegionizedTaskQueue.java
|
||||
index b264dbd13a392cde3f24ff75c0034985fda68ccc..fe0a6bd90cba4869a0ee11723832f2dee5039f62 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedTaskQueue.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedTaskQueue.java
|
||||
@@ -289,14 +289,17 @@ public final class RegionizedTaskQueue {
|
||||
boolean executeTickTasks = allowedTickTasks > 0;
|
||||
boolean executeChunkTasks = allowedChunkTasks > 0;
|
||||
boolean executeGlobalTasks = true;
|
||||
+ boolean processedChunkTask = false; // Anonymous - Fix wrong ticket update determination in RegionizedTaskQueue
|
||||
|
||||
do {
|
||||
executeTickTasks = executeTickTasks && allowedTickTasks-- > 0 && tickTaskQueue.executeTask();
|
||||
executeChunkTasks = executeChunkTasks && allowedChunkTasks-- > 0 && chunkTaskQueue.executeTask();
|
||||
executeGlobalTasks = executeGlobalTasks && this.worldRegionTaskData.executeGlobalChunkTask();
|
||||
+
|
||||
+ processedChunkTask |= (executeChunkTasks | executeGlobalTasks); // Anonymous - Fix wrong ticket update determination in RegionizedTaskQueue
|
||||
} while (executeTickTasks | executeChunkTasks | executeGlobalTasks);
|
||||
|
||||
- if (allowedChunkTasks > 0) {
|
||||
+ if (processedChunkTask) { // Anonymous - Fix wrong ticket update determination in RegionizedTaskQueue
|
||||
// if we executed chunk tasks, we should try to process ticket updates for full status changes
|
||||
this.worldRegionTaskData.world.moonrise$getChunkTaskScheduler().chunkHolderManager.processTicketUpdates();
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 28 Jul 2026 15:09:06 +0800
|
||||
Subject: [PATCH] Anonymous Object: Lithium optimized collections for
|
||||
WeightedList
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/util/random/WeightedList.java b/net/minecraft/util/random/WeightedList.java
|
||||
index a8481259e42aa116e29bccd1e30fdfd91f51a8cc..49a558d6021db2d57eb2596206ea459fd33485e0 100644
|
||||
--- a/net/minecraft/util/random/WeightedList.java
|
||||
+++ b/net/minecraft/util/random/WeightedList.java
|
||||
@@ -23,7 +23,7 @@ public class WeightedList<E> { // Paper - non-final
|
||||
private final WeightedList.@Nullable Selector<E> selector;
|
||||
|
||||
protected WeightedList(final List<? extends Weighted<E>> items) { // Paper - protected
|
||||
- this.items = List.copyOf(items);
|
||||
+ this.items = items.size() > 4 ? new net.caffeinemc.mods.lithium.common.util.collections.HashedReferenceList(items) : new it.unimi.dsi.fastutil.objects.ReferenceArrayList<>(items); // Anonymous - Lithium optimized collections for WeightedList
|
||||
this.totalWeight = WeightedRandom.getTotalWeight(items, Weighted::weight);
|
||||
if (this.totalWeight == 0) {
|
||||
this.selector = null;
|
||||
+282
@@ -0,0 +1,282 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 28 Jul 2026 15:09:19 +0800
|
||||
Subject: [PATCH] Anonymous Object: Lithium optimized non poi block searching
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
index c6e9b155c2341c13d569f28f54f0c1d2d7313676..927635518c51375315390877d582b32fc38748df 100644
|
||||
--- a/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.PathfinderMob;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
|
||||
-public abstract class MoveToBlockGoal extends Goal {
|
||||
+public abstract class MoveToBlockGoal extends Goal implements net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.LithiumMoveToBlockGoal { // Anonymous - Lithium Optimizes move to block goal
|
||||
private static final int GIVE_UP_TICKS = 1200;
|
||||
private static final int STAY_TICKS = 1200;
|
||||
private static final int INTERVAL_TICKS = 200;
|
||||
@@ -133,4 +133,167 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
}
|
||||
|
||||
protected abstract boolean isValidTarget(LevelReader level, BlockPos pos);
|
||||
+ // Anonymous start - Lithium Optimizes move to block goal
|
||||
+ /**
|
||||
+ * Finds the nearest block matching the predicates.
|
||||
+ * <p>
|
||||
+ * Side effect: The matching block position is stored in the blockPos field.
|
||||
+ *
|
||||
+ * @return Whether a matching block was found.
|
||||
+ */
|
||||
+ @Override
|
||||
+ public boolean lithium$findNearestBlock(java.util.function.Predicate<net.minecraft.world.level.block.state.BlockState> requiredBlock, java.util.function.BiPredicate<net.minecraft.world.level.chunk.ChunkAccess,
|
||||
+ BlockPos.MutableBlockPos> lithium$isValidTarget, final boolean shouldChunkLoad) {
|
||||
+ //Center of the search starts 1 block below the mob's block position
|
||||
+ BlockPos center = this.mob.blockPosition().offset(0,-1,0);
|
||||
+
|
||||
+ //Range is +-(searchRange - 1), +-verticalSearchRange, +-(searchRange - 1)
|
||||
+ //Cache ChunkAccesses - getting them is surprisingly expensive - and track whether subchunks have the block
|
||||
+ final LevelReader levelReader = this.mob.level();
|
||||
+ net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.CheckAndCacheBlockChecker checker = new net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.CheckAndCacheBlockChecker(center,
|
||||
+ this.searchRange-1, this.verticalSearchRange,
|
||||
+ levelReader, requiredBlock, shouldChunkLoad);
|
||||
+ it.unimi.dsi.fastutil.longs.LongArrayList sortedChunksMaybeWithBlock = new it.unimi.dsi.fastutil.longs.LongArrayList(checker.getChunkSize());
|
||||
+ checker.initializeChunks(sortedChunksMaybeWithBlock::addLast);
|
||||
+
|
||||
+ if (checker.shouldStop()) {
|
||||
+ return false; //No chunks with the target block - return early
|
||||
+ }
|
||||
+
|
||||
+ final int minY = net.caffeinemc.mods.lithium.common.util.Pos.BlockCoord.getMinY(levelReader);
|
||||
+ final int maxY = net.caffeinemc.mods.lithium.common.util.Pos.BlockCoord.getMaxYInclusive(levelReader);
|
||||
+
|
||||
+ // Prefer chunk aware search because it also cuts iterations inside "empty" chunk sections
|
||||
+ if(!checker.hasUnloadedPossibleChunks()){
|
||||
+ return this.lithium$chunkAwareSearch(center, lithium$isValidTarget, checker, sortedChunksMaybeWithBlock, minY, maxY);
|
||||
+ }
|
||||
+
|
||||
+ // Use vanilla search because unordered search may observably alter chunk-loading behavior
|
||||
+ return this.lithium$vanillaOrderSearch(center, lithium$isValidTarget, checker, minY, maxY);
|
||||
+ }
|
||||
+
|
||||
+ private boolean lithium$vanillaOrderSearch(BlockPos center,
|
||||
+ java.util.function.BiPredicate<net.minecraft.world.level.chunk.ChunkAccess, BlockPos.MutableBlockPos> lithium$isValidTarget,
|
||||
+ net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.CheckAndCacheBlockChecker checker, final int minY, final int maxY) {
|
||||
+ BlockPos.MutableBlockPos currentPos = new BlockPos.MutableBlockPos();
|
||||
+ final int centerY = center.getY();
|
||||
+
|
||||
+ for (int layer = this.verticalSearchStart; layer <= this.verticalSearchRange; layer = layer > 0 ? -layer : 1 - layer) {
|
||||
+ final int y = centerY + layer;
|
||||
+
|
||||
+ // Layer outside of build limit - skip
|
||||
+ // Note: this is likely to be hit because farms where this lags tend to be built at world floor
|
||||
+ if (y < minY || y > maxY) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ for (int ring = 0; ring < this.searchRange; ring++) {
|
||||
+ for (int dX = 0; dX <= ring; dX = dX > 0 ? -dX : 1 - dX) {
|
||||
+ for (int dZ = dX < ring && dX > -ring ? ring : 0; dZ <= ring; dZ = dZ > 0 ? -dZ : 1 - dZ) {
|
||||
+ currentPos.setWithOffset(center, dX, layer, dZ);
|
||||
+ if (this.mob.isWithinHome(currentPos) && checker.checkPosition(currentPos)) {
|
||||
+ // ChunkAccess is always loaded at this point
|
||||
+ net.minecraft.world.level.chunk.ChunkAccess chunkAccess = checker.getCachedChunkAccess(currentPos);
|
||||
+ if (lithium$isValidTarget.test(chunkAccess, currentPos)){
|
||||
+ this.blockPos = currentPos;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ private boolean lithium$chunkAwareSearch(BlockPos center,
|
||||
+ java.util.function.BiPredicate<net.minecraft.world.level.chunk.ChunkAccess, BlockPos.MutableBlockPos> lithium$isValidTarget,
|
||||
+ net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.CheckAndCacheBlockChecker checker, it.unimi.dsi.fastutil.longs.LongArrayList sortedChunksMaybeWithBlock,
|
||||
+ final int minY, final int maxY) {
|
||||
+ // Sort chunks by lowest sort order - has the earliest searched position
|
||||
+ // Note: In this search order, the closest point normally is also the closest point in the search
|
||||
+ sortedChunksMaybeWithBlock.sort((chunkLong0, chunkLong1) ->
|
||||
+ net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.NonPOISearchDistances.MoveToBlockGoalDistances.getMinimumSortOrderOfChunk(center, chunkLong0)
|
||||
+ - net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.NonPOISearchDistances.MoveToBlockGoalDistances.getMinimumSortOrderOfChunk(center, chunkLong1)
|
||||
+ );
|
||||
+
|
||||
+ java.util.function.Predicate<net.minecraft.world.level.block.state.BlockState> requiredBlock = checker.blockStatePredicate;
|
||||
+ final int minSectionY = checker.minSectionY;
|
||||
+
|
||||
+ BlockPos.MutableBlockPos foundPos = new BlockPos.MutableBlockPos();
|
||||
+ BlockPos.MutableBlockPos currentPos = new BlockPos.MutableBlockPos();
|
||||
+
|
||||
+ // Same layer order as vanilla - saves iterations if targets are found in the first layer
|
||||
+ for (int layer = this.verticalSearchStart; layer <= this.verticalSearchRange; layer = layer > 0 ? -layer : 1 - layer) {
|
||||
+ final int y = center.getY() + layer;
|
||||
+
|
||||
+ // Layer outside of build limit - skip
|
||||
+ // Note: this is likely to be hit because farms where this lags tend to be built at world floor
|
||||
+ if (y < minY || y > maxY) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ final int chunkY = net.minecraft.core.SectionPos.blockToSectionCoord(y);
|
||||
+ final int ySectionIndex = chunkY - minSectionY;
|
||||
+
|
||||
+ int closestFound = Integer.MAX_VALUE;
|
||||
+ int ringMax = this.searchRange - 1;
|
||||
+
|
||||
+ // Iterate through slices of chunks that may have the target blockState
|
||||
+ for (long chunkPos: sortedChunksMaybeWithBlock) {
|
||||
+ final int chunkX = net.minecraft.world.level.ChunkPos.getX(chunkPos);
|
||||
+ final int chunkZ = net.minecraft.world.level.ChunkPos.getZ(chunkPos);
|
||||
+
|
||||
+ // Break since no subsequent chunks can be closer
|
||||
+ if (closestFound < net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.NonPOISearchDistances.MoveToBlockGoalDistances.getMinimumSortOrderOfChunk(center, chunkX, chunkZ)) {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ // Skip if the current subchunk does not have the block
|
||||
+ if (!checker.checkCachedSection(chunkX, chunkY, chunkZ)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ net.minecraft.world.level.chunk.ChunkAccess chunkAccess = checker.getCachedChunkAccess(chunkPos);
|
||||
+ // If ChunkSection may have close enough targets, iterate layer in Paletted Container (x then z) order
|
||||
+ final int chunkBlockX = net.minecraft.core.SectionPos.sectionToBlockCoord(chunkX);
|
||||
+ int xMin = Math.max(center.getX() - ringMax, chunkBlockX);
|
||||
+ int xMax = Math.min(center.getX() + ringMax, chunkBlockX + 15);
|
||||
+ final int chunkBlockZ = net.minecraft.core.SectionPos.sectionToBlockCoord(chunkZ);
|
||||
+ int zMin = Math.max(center.getZ() - ringMax, chunkBlockZ);
|
||||
+ int zMax = Math.min(center.getZ() + ringMax, chunkBlockZ + 15);
|
||||
+ net.minecraft.world.level.chunk.LevelChunkSection levelChunkSection = chunkAccess.getSections()[ySectionIndex];
|
||||
+ for (int z = zMin; z <= zMax; z++) {
|
||||
+ for (int x = xMin; x <= xMax; x++) {
|
||||
+ int dX = x - center.getX();
|
||||
+ int dZ = z - center.getZ();
|
||||
+ int ring = net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.NonPOISearchDistances.MoveToBlockGoalDistances.getRing(dX, dZ);
|
||||
+ int currentDistance = net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.NonPOISearchDistances.MoveToBlockGoalDistances.getVanillaSortOrderInt(ring, dX, dZ);
|
||||
+ if (currentDistance < closestFound
|
||||
+ && this.mob.isWithinHome(currentPos.set(x, y, z))
|
||||
+ && requiredBlock.test(levelChunkSection.getBlockState(x & 15, y & 15, z & 15))
|
||||
+ && lithium$isValidTarget.test(chunkAccess, currentPos)) {
|
||||
+ // Constrain search size when we find a valid target
|
||||
+ ringMax = ring;
|
||||
+ xMin = Math.max(center.getX() - ringMax, chunkBlockX);
|
||||
+ xMax = Math.min(center.getX() + ringMax, chunkBlockX + 15);
|
||||
+ zMax = Math.min(center.getZ() + ringMax, chunkBlockZ + 15);
|
||||
+ foundPos.set(x, y, z);
|
||||
+ closestFound = currentDistance;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (closestFound < Integer.MAX_VALUE) {
|
||||
+ // Vanilla uses the mutable pos, no need to create immutable copy
|
||||
+ this.blockPos = foundPos;
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Anonymous end - Lithium Optimizes move to block goal
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
index ff0f99d4b560a1c0721885b0eba5bd5ab2087bd7..99c076ee2fe0d8294398c5ef1f24a95da5eee89c 100644
|
||||
--- a/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
+++ b/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
|
||||
@@ -25,6 +25,19 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
|
||||
private final Mob removerMob;
|
||||
private int ticksSinceReachedGoal;
|
||||
private static final int WAIT_AFTER_BLOCK_FOUND = 20;
|
||||
+ // Anonymous start - Lithium Optimize remove block goal
|
||||
+ private static final java.util.function.BiPredicate<ChunkAccess, BlockPos.MutableBlockPos> IS_VALID_TARGET_ABOVE_BIPREDICATE =
|
||||
+ RemoveBlockGoal::lithium$isValidTargetAbove;
|
||||
+ //Split check condition in order to use maybeHas
|
||||
+ private boolean lithium$isValidTargetBlock(net.minecraft.world.level.block.state.BlockState blockState){
|
||||
+ return blockState.is(this.blockToRemove);
|
||||
+ }
|
||||
+
|
||||
+ private static boolean lithium$isValidTargetAbove(ChunkAccess chunkAccess, BlockPos.MutableBlockPos mutable) {
|
||||
+ return chunkAccess.getBlockState(mutable.move(0, 1, 0)).isAir()
|
||||
+ && chunkAccess.getBlockState(mutable.move(0, 1, 0)).isAir();
|
||||
+ }
|
||||
+ // Anonymous end - Lithium Optimize remove block goal
|
||||
|
||||
public RemoveBlockGoal(final Block blockToRemove, final PathfinderMob mob, final double speedModifier, final int verticalSearchRange) {
|
||||
super(mob, speedModifier, 24, verticalSearchRange);
|
||||
@@ -39,7 +52,7 @@ public class RemoveBlockGoal extends MoveToBlockGoal {
|
||||
} else if (this.nextStartTick > 0) {
|
||||
this.nextStartTick--;
|
||||
return false;
|
||||
- } else if (this.findNearestBlock()) {
|
||||
+ } else if (((net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.LithiumMoveToBlockGoal) this).lithium$findNearestBlock(this::lithium$isValidTargetBlock, IS_VALID_TARGET_ABOVE_BIPREDICATE, false)) { // Anonymous - Lithium Optimize remove block goal
|
||||
this.nextStartTick = reducedTickDelay(20);
|
||||
return true;
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/entity/ai/sensing/HoglinSpecificSensor.java b/net/minecraft/world/entity/ai/sensing/HoglinSpecificSensor.java
|
||||
index 7022679c84e184999b416e06d1af2cc2500cb12b..78743515ff2afd1ea1f06432f33f41a03fc7988b 100644
|
||||
--- a/net/minecraft/world/entity/ai/sensing/HoglinSpecificSensor.java
|
||||
+++ b/net/minecraft/world/entity/ai/sensing/HoglinSpecificSensor.java
|
||||
@@ -16,6 +16,14 @@ import net.minecraft.world.entity.monster.hoglin.Hoglin;
|
||||
import net.minecraft.world.entity.monster.piglin.Piglin;
|
||||
|
||||
public class HoglinSpecificSensor extends Sensor<Hoglin> {
|
||||
+ // Anonymous start - Lithium Optimizes Hoglin repellent search.
|
||||
+ private static final java.util.function.Predicate<net.minecraft.world.level.block.state.BlockState> IS_VALID_REPELLENT_PREDICATE =
|
||||
+ HoglinSpecificSensor::lithium$isValidRepellent;
|
||||
+
|
||||
+ private static boolean lithium$isValidRepellent(net.minecraft.world.level.block.state.BlockState blockState) {
|
||||
+ return blockState.is(BlockTags.HOGLIN_REPELLENTS);
|
||||
+ }
|
||||
+ // Anonymous end - Lithium Optimizes Hoglin repellent search.
|
||||
@Override
|
||||
public Set<MemoryModuleType<?>> requires() {
|
||||
return ImmutableSet.of(
|
||||
@@ -30,8 +38,8 @@ public class HoglinSpecificSensor extends Sensor<Hoglin> {
|
||||
|
||||
@Override
|
||||
protected void doTick(final ServerLevel level, final Hoglin body) {
|
||||
- Brain<?> brain = body.getBrain();
|
||||
- brain.setMemory(MemoryModuleType.NEAREST_REPELLENT, this.findNearestRepellent(level, body));
|
||||
+ Brain<?> brain = body.getBrain();;
|
||||
+ brain.setMemory(MemoryModuleType.NEAREST_REPELLENT, net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.CommonBlockSearchesCheckAndCache.blockPosFindClosestMatch(level, body, 8, 4, IS_VALID_REPELLENT_PREDICATE, true)); // Anonymous - Lithium Optimizes Hoglin repellent search.
|
||||
Optional<Piglin> adultPiglin = Optional.empty();
|
||||
int adultPiglinCount = 0;
|
||||
List<Hoglin> adultHoglins = Lists.newArrayList();
|
||||
diff --git a/net/minecraft/world/entity/ai/sensing/PiglinSpecificSensor.java b/net/minecraft/world/entity/ai/sensing/PiglinSpecificSensor.java
|
||||
index 060a53da799a3036a343cc6f1d73e3e5ca4b7af9..8594f559a5c8f5957348f7178464d5e9c5abc5ff 100644
|
||||
--- a/net/minecraft/world/entity/ai/sensing/PiglinSpecificSensor.java
|
||||
+++ b/net/minecraft/world/entity/ai/sensing/PiglinSpecificSensor.java
|
||||
@@ -26,6 +26,15 @@ import net.minecraft.world.level.block.CampfireBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public class PiglinSpecificSensor extends Sensor<LivingEntity> {
|
||||
+ // Anonymous start - Lithium Optimizes Piglin repellent search.
|
||||
+ private static final java.util.function.Predicate<BlockState> IS_VALID_REPELLENT_PREDICATE =
|
||||
+ PiglinSpecificSensor::lithium$isValidRepellent;
|
||||
+ private static boolean lithium$isValidRepellent(BlockState blockState){
|
||||
+ final boolean isPiglinRepellent = blockState.is(BlockTags.PIGLIN_REPELLENTS);
|
||||
+ return isPiglinRepellent && blockState.is(Blocks.SOUL_CAMPFIRE) ?
|
||||
+ CampfireBlock.isLitCampfire(blockState) : isPiglinRepellent;
|
||||
+ }
|
||||
+ // Anonymous end - Lithium Optimizes Piglin repellent search.
|
||||
@Override
|
||||
public Set<MemoryModuleType<?>> requires() {
|
||||
return ImmutableSet.of(
|
||||
@@ -47,7 +56,7 @@ public class PiglinSpecificSensor extends Sensor<LivingEntity> {
|
||||
@Override
|
||||
protected void doTick(final ServerLevel level, final LivingEntity body) {
|
||||
Brain<?> brain = body.getBrain();
|
||||
- brain.setMemory(MemoryModuleType.NEAREST_REPELLENT, findNearestRepellent(level, body));
|
||||
+ brain.setMemory(MemoryModuleType.NEAREST_REPELLENT, net.caffeinemc.mods.lithium.common.ai.non_poi_block_search.CommonBlockSearchesCheckAndCache.blockPosFindClosestMatch(level, body, 8, 4, IS_VALID_REPELLENT_PREDICATE, true)); // Anonymous - Lithium Optimizes Piglin repellent search.
|
||||
Optional<Mob> nemesis = Optional.empty();
|
||||
Optional<Hoglin> huntableHoglin = Optional.empty();
|
||||
Optional<Hoglin> babyHoglin = Optional.empty();
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 28 Jul 2026 20:40:01 +0800
|
||||
Subject: [PATCH] Anonymous Object: Fix folia nether portal ticket placement
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/util/BlockUtil.java b/net/minecraft/util/BlockUtil.java
|
||||
index ea93ac07ec6d4e83d1d0904daf721132e2bbecc3..4252672ad2aaf03d50e5ea6a681e9964fd9a6137 100644
|
||||
--- a/net/minecraft/util/BlockUtil.java
|
||||
+++ b/net/minecraft/util/BlockUtil.java
|
||||
@@ -138,12 +138,20 @@ public class BlockUtil {
|
||||
public final BlockPos minCorner;
|
||||
public final int axis1Size;
|
||||
public final int axis2Size;
|
||||
+ public BlockPos foundOrigin; // Anonymous - Fix folia nether portal ticket placement
|
||||
|
||||
public FoundRectangle(final BlockPos minCorner, final int axis1Size, final int axis2Size) {
|
||||
this.minCorner = minCorner;
|
||||
this.axis1Size = axis1Size;
|
||||
this.axis2Size = axis2Size;
|
||||
+ this.foundOrigin = minCorner; // Anonymous - Fix folia nether portal ticket placement - prevent edge conditions(idk if someone would do this so just prevent it)
|
||||
}
|
||||
+ // Anonymous start - Fix folia nether portal ticket placement
|
||||
+ public FoundRectangle withFoundOrigin(BlockPos origin) {
|
||||
+ this.foundOrigin = origin;
|
||||
+ return this;
|
||||
+ }
|
||||
+ // Anonymous end
|
||||
}
|
||||
|
||||
public static class IntBounds {
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index f15f0ca83ff2313d2e025db984c4fa1d492c5a70..6d6b1024ef7467bc7f72693a655a25eeede1b0f8 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4847,7 +4847,7 @@ public abstract class Entity
|
||||
portalInfoCompletable.complete(
|
||||
new TeleportTransition(destination, Vec3.atCenterOf(targetPos), Vec3.ZERO,
|
||||
90.0f, 0.0f,
|
||||
- TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET))
|
||||
+ TeleportTransition.PLAY_PORTAL_SOUND.then(ent -> ent.placePortalTicket(targetPos))) // Anonymous - Fix folia nether portal ticket placement
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -4859,7 +4859,7 @@ public abstract class Entity
|
||||
portalInfoCompletable.complete(
|
||||
net.minecraft.world.level.block.NetherPortalBlock.createDimensionTransition(
|
||||
destination, portal, originalPortalDirection, relativePos,
|
||||
- Entity.this, TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET)
|
||||
+ Entity.this, TeleportTransition.PLAY_PORTAL_SOUND.then(ent -> ent.placePortalTicket(portal.foundOrigin)) // Anonymous - Fix folia nether portal ticket placement
|
||||
)
|
||||
);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
index 29fc9521c2c8333c999647dd833899393a838064..e8d2b52a3948755c8d3912a4ad1204cea5f78674 100644
|
||||
--- a/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/NetherPortalBlock.java
|
||||
@@ -204,7 +204,7 @@ public class NetherPortalBlock extends Block implements Portal {
|
||||
|
||||
return BlockUtil.getLargestRectangleAround(found, portalState.getValue(BlockStateProperties.HORIZONTAL_AXIS), 21, Direction.Axis.Y, 21, (pos) -> {
|
||||
return world.getBlockStateFromEmptyChunk(pos) == portalState;
|
||||
- });
|
||||
+ }).withFoundOrigin(found); // Anonymous - Fix folia nether portal ticket placement
|
||||
}
|
||||
// Folia end - region threading
|
||||
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sat, 1 Aug 2026 16:30:53 +0800
|
||||
Subject: [PATCH] Anonymous Object: RegionizedTaskQueue queue TTL optimization
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedTaskQueue.java b/io/papermc/paper/threadedregions/RegionizedTaskQueue.java
|
||||
index fe0a6bd90cba4869a0ee11723832f2dee5039f62..53579b6faa9d55485088d59ec2fd1e4251c2fb01 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedTaskQueue.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedTaskQueue.java
|
||||
@@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
public final class RegionizedTaskQueue {
|
||||
|
||||
private static final TicketType<Long> TASK_QUEUE_TICKET = ChunkSystemTicketType.create("task_queue_ticket", Long::compareTo);
|
||||
+ private static final long QUEUE_MAX_TTL_TICKS = 5L; // Anonymous - RegionizedTaskQueue queue TTL optimization
|
||||
|
||||
public PrioritisedExecutor.PrioritisedTask createChunkTask(final ServerLevel world, final int chunkX, final int chunkZ,
|
||||
final Runnable run) {
|
||||
@@ -155,6 +156,58 @@ public final class RegionizedTaskQueue {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Anonymous start - RegionizedTaskQueue queue TTL optimization
|
||||
+ public void tickQueueReferenceTTL() {
|
||||
+ final ThreadedRegionizer.ThreadedRegion<TickRegions.TickRegionData, TickRegions.TickRegionSectionData> currentRegion
|
||||
+ = io.papermc.paper.threadedregions.TickRegionScheduler.getCurrentRegion();
|
||||
+ if (currentRegion == null) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ final ReferenceCountData[] toRemoveTicket = new ReferenceCountData[1];
|
||||
+
|
||||
+ for (ConcurrentChainedLong2ReferenceHashTable.TableEntry<ReferenceCountData> counterEntry : this.referenceCounters.entrySet()) {
|
||||
+ final long coord = counterEntry.getKey();
|
||||
+ final ReferenceCountData counterData = counterEntry.getValue();
|
||||
+
|
||||
+ // only tick for our region
|
||||
+ if (currentRegion == this.world.regioniser.getRegionAtUnsynchronised(CoordinateUtils.getChunkX(coord), CoordinateUtils.getChunkZ(coord))) {
|
||||
+ long curr = counterData.referenceTTL.get();
|
||||
+ // successfully decreased ttl
|
||||
+ if (curr == (curr = counterData.referenceTTL.compareAndExchange(curr, curr - 1))) {
|
||||
+ if (counterData.referenceCount.get() != 0L) {
|
||||
+ // still has reference, pump back
|
||||
+ counterData.referenceTTL.set(QUEUE_MAX_TTL_TICKS);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ // dead
|
||||
+ if (curr <= 0) {
|
||||
+ // parsed from decrementReference
|
||||
+ this.referenceCounters.computeIfPresent(coord, (final long keyInMap, final ReferenceCountData valueInMap) -> {
|
||||
+ // might be increased again
|
||||
+ if (valueInMap.referenceCount.get() != 0L) {
|
||||
+ valueInMap.referenceTTL.set(QUEUE_MAX_TTL_TICKS); // still has reference, pump back
|
||||
+ return valueInMap; // directly, the ttl was already charged in add logic
|
||||
+ }
|
||||
+
|
||||
+ // note: valueInMap may not be referenceCountData
|
||||
+ toRemoveTicket[0] = valueInMap;
|
||||
+
|
||||
+ return null;
|
||||
+ });
|
||||
+
|
||||
+ if (toRemoveTicket[0] != null) {
|
||||
+ this.removeTicket(coord, toRemoveTicket[0].id);
|
||||
+ toRemoveTicket[0] = null;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Anonymous end - RegionizedTaskQueue queue TTL optimization
|
||||
+
|
||||
private void decrementReference(final ReferenceCountData referenceCountData, final long coord) {
|
||||
if (!referenceCountData.decreaseReferenceCount()) {
|
||||
return;
|
||||
@@ -212,9 +265,10 @@ public final class RegionizedTaskQueue {
|
||||
private final long id = ID_GENERATOR.getAndIncrement();
|
||||
|
||||
public final AtomicLong referenceCount = new AtomicLong(1L);
|
||||
+ public final AtomicLong referenceTTL = new AtomicLong(QUEUE_MAX_TTL_TICKS); // Anonymous - RegionizedTaskQueue queue TTL optimization
|
||||
public volatile boolean addedTicket;
|
||||
|
||||
- // returns false if reference count is 0, otherwise increments ref count
|
||||
+ // returns false if reference count or ttl is 0, otherwise increments ref count // Anonymous - RegionizedTaskQueue queue TTL optimization
|
||||
public boolean addCount() {
|
||||
int failures = 0;
|
||||
for (long curr = this.referenceCount.get();;) {
|
||||
@@ -227,6 +281,27 @@ public final class RegionizedTaskQueue {
|
||||
}
|
||||
|
||||
if (curr == (curr = this.referenceCount.compareAndExchange(curr, curr + 1L))) {
|
||||
+ // Anonymous start - RegionizedTaskQueue queue TTL optimization
|
||||
+ // now force charge back the ttl to max
|
||||
+ int ttlFailures = 0;
|
||||
+ for (long currTTL = this.referenceTTL.get();;) {
|
||||
+ for (int i = 0; i < ttlFailures; i++) {
|
||||
+ Thread.onSpinWait();
|
||||
+ }
|
||||
+
|
||||
+ // add failed, rollback (ttl reached)
|
||||
+ if (currTTL <= 0) {
|
||||
+ this.referenceCount.decrementAndGet(); // revert the addition
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (currTTL == (currTTL = this.referenceTTL.compareAndExchange(currTTL, QUEUE_MAX_TTL_TICKS))) {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ ++ttlFailures;
|
||||
+ }
|
||||
+ // Anonymous end - RegionizedTaskQueue queue TTL optimization
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -234,11 +309,11 @@ public final class RegionizedTaskQueue {
|
||||
}
|
||||
}
|
||||
|
||||
- // returns true if new reference count is 0
|
||||
+ // returns true if new reference count and ttl is 0 // Anonymous - RegionizedTaskQueue queue TTL optimization
|
||||
public boolean decreaseReferenceCount() {
|
||||
final long res = this.referenceCount.decrementAndGet();
|
||||
if (res >= 0L) {
|
||||
- return res == 0L;
|
||||
+ return res == 0L && this.referenceTTL.get() <= 0L; // Anonymous - RegionizedTaskQueue queue TTL optimization
|
||||
} else {
|
||||
throw new IllegalStateException("Negative reference count");
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 657801b605ff49af0a7b80e17bc45b89e243b35e..b498cecb37cf83d31ad4a02bb1acecf7328e7aa6 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1755,6 +1755,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
foliaProfiler.stopTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.PASSENGER_DESYNC_CHECK);
|
||||
}
|
||||
// Folia end - fix passenger desync
|
||||
+ region.world.taskQueueRegionData.tickQueueReferenceTTL(); // Anonymous - RegionizedTaskQueue queue TTL optimization
|
||||
}
|
||||
// Folia end - region threading
|
||||
//this.tickCount++; // Folia - region threading
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sat, 1 Aug 2026 16:31:57 +0800
|
||||
Subject: [PATCH] Anonymous Object: Reduce ticket operations in nether portal
|
||||
searching
|
||||
|
||||
As requested by the original author, this patch will be anonymous and hide the original commit address.
|
||||
This patch is used with permission from the original author.
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 8eca4b0a82d738f873f9e01a7424aaf7ee3735a2..e94ea890c83e65d987519379ebe3b5134bb14b42 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
private final StructureCheck structureCheck;
|
||||
public final boolean tickTime; // Folia - region threading
|
||||
private final LevelDebugSynchronizers debugSynchronizers = new LevelDebugSynchronizers(this);
|
||||
+ public final io.anonymous.anonymous.utils.ReferenceCountingChunkLoader portalSearchingChunkLoader = new io.anonymous.anonymous.utils.ReferenceCountingChunkLoader(this, net.minecraft.world.level.chunk.status.ChunkStatus.EMPTY); // Anonymous - Reduce ticket operations in nether portal searching
|
||||
// Luminol start - Level schedulers
|
||||
private static final java.util.concurrent.atomic.AtomicInteger UNLOADER_ID_GEN = new java.util.concurrent.atomic.AtomicInteger(0);
|
||||
public final me.earthme.luminol.utils.thread.LevelAwareRegionScheduler levelScheduler = new me.earthme.luminol.utils.thread.LevelAwareRegionScheduler(io.papermc.paper.threadedregions.TickRegions.getScheduler().scheduler);
|
||||
@@ -1004,6 +1005,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
|
||||
|
||||
this.debugSynchronizers.tick(this.server.debugSubscribers());
|
||||
profiler.pop();
|
||||
+ this.portalSearchingChunkLoader.tickChunkReferenceTTL(); // Anonymous - Reduce ticket operations in nether portal searching
|
||||
}
|
||||
|
||||
// Folia start - region threading
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 6d6b1024ef7467bc7f72693a655a25eeede1b0f8..363dcad09e441ea8b4fd79fcb94432536783676c 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4866,10 +4866,10 @@ public abstract class Entity
|
||||
);
|
||||
|
||||
// kick off search for existing portal or creation
|
||||
- destination.moonrise$loadChunksAsync(
|
||||
+ destination.portalSearchingChunkLoader.loadChunksAsync( // Anonymous - Reduce ticket operations in nether portal searching
|
||||
// add 32 so that the final search for a portal frame doesn't load any chunks
|
||||
targetPos, portalSearchRadius + 32,
|
||||
- net.minecraft.world.level.chunk.status.ChunkStatus.EMPTY,
|
||||
+ //net.minecraft.world.level.chunk.status.ChunkStatus.EMPTY, // Anonymous - Reduce ticket operations in nether portal searching
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
BlockUtil.FoundRectangle portal =
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Luminol Config System
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9d0dc8815842a0583b212891680bd0c6461c30b9..2f5a73ac33fbb47cc025fe2d7ad16a5c34c06944 100644
|
||||
index 3fac32b420ce4ae74166eac43d38c51c1fd513cf..5409e2e6aef23dcf2ec2b0c3488a5cfdb8392277 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -3033,6 +3033,17 @@ public final class CraftServer implements Server {
|
||||
@@ -3032,6 +3032,17 @@ public final class CraftServer implements Server {
|
||||
this.console.addPluginAllowingSleep(plugin.getName(), value);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ index 9661f033bbb2c00073f1c891e1411c2a9943a37a..4ecd9fe2f9ab4c7b456345665703256a
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2f5a73ac33fbb47cc025fe2d7ad16a5c34c06944..407191ad9a7f31cc3317a7747ec3489804807b8e 100644
|
||||
index 5409e2e6aef23dcf2ec2b0c3488a5cfdb8392277..e412b654df3f452ef21f9c68ef3c7c5643ed1d7b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -302,7 +302,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@@ -13,7 +13,7 @@ Content-Transfer-Encoding: 8bit
|
||||
由于世界卸载可能发生在玩家登录或者传送的过程中,所以我使用了引用计数器来避免这个竟态条件的发生
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 407191ad9a7f31cc3317a7747ec3489804807b8e..606235c9af5afce55be8bbc963e8af7291a050c5 100644
|
||||
index e412b654df3f452ef21f9c68ef3c7c5643ed1d7b..9e40ea5f161eef4d74084c081d4df912cbe65548 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -276,7 +276,7 @@ public final class CraftServer implements Server {
|
||||
@@ -25,7 +25,7 @@ index 407191ad9a7f31cc3317a7747ec3489804807b8e..606235c9af5afce55be8bbc963e8af72
|
||||
private YamlConfiguration configuration;
|
||||
private YamlConfiguration commandsConfiguration;
|
||||
private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
|
||||
@@ -1198,7 +1198,8 @@ public final class CraftServer implements Server {
|
||||
@@ -1197,7 +1197,8 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public World createWorld(WorldCreator creator) {
|
||||
@@ -35,7 +35,7 @@ index 407191ad9a7f31cc3317a7747ec3489804807b8e..606235c9af5afce55be8bbc963e8af72
|
||||
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
||||
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
|
||||
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
|
||||
@@ -1356,7 +1357,8 @@ public final class CraftServer implements Server {
|
||||
@@ -1355,7 +1356,8 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean unloadWorld(World world, boolean save) {
|
||||
@@ -45,7 +45,7 @@ index 407191ad9a7f31cc3317a7747ec3489804807b8e..606235c9af5afce55be8bbc963e8af72
|
||||
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot unload a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
|
||||
if (world == null) {
|
||||
return false;
|
||||
@@ -1381,7 +1383,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1380,7 +1382,7 @@ public final class CraftServer implements Server {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ index 407191ad9a7f31cc3317a7747ec3489804807b8e..606235c9af5afce55be8bbc963e8af72
|
||||
if (save) {
|
||||
handle.save(null, true, false); // Paper - Fix saving in unloadWorld
|
||||
}
|
||||
@@ -1393,10 +1395,70 @@ public final class CraftServer implements Server {
|
||||
@@ -1392,10 +1394,70 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
this.worlds.remove(world.getName().toLowerCase(Locale.ROOT));
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable async catchers
|
||||
|
||||
|
||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java b/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java
|
||||
index 6c74787321748702022787b65ff5465f8bcec4ad..8e5f470fd0b98d3894d7a5234386ff4cbe127f78 100644
|
||||
index 72a3478a98912caae8899df37218dd2a628a6e05..faf4d9c6e421f29a2e862be9ea94ad6daa700dca 100644
|
||||
--- a/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java
|
||||
+++ b/src/main/java/ca/spottedleaf/moonrise/common/util/TickThread.java
|
||||
@@ -48,14 +48,14 @@ public class TickThread extends Thread {
|
||||
|
||||
+2
-2
@@ -34,10 +34,10 @@ index 6ef0042a355c65262bdb89dcf151bd644653216d..8f0b7b2985d3aadaacd5313d52d48ac9
|
||||
}
|
||||
// Folia end - block plugins not marked as supported
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 55a095e00bfe15321d8a1d69beb232e9956b0df7..c189f583598f94fc7944afcabe130c5ee9504c0d 100644
|
||||
index 804ea060fc5dc0d0ab89574a75604cdf911b4e6c..946fa5a718ff1243d665064a8920cd1a7aec5470 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -323,7 +323,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -393,7 +393,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
}
|
||||
|
||||
// Folia start - block plugins not marked as supported
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user