Compare commits
36 Commits
1.21.4-3d6
...
dev/1.21.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7899ce2a0 | ||
|
|
e963af5628 | ||
|
|
b74abd342b | ||
|
|
63507137a0 | ||
|
|
7b7fe5c62a | ||
|
|
0a00e23143 | ||
|
|
c935e6bdc8 | ||
|
|
31d22035f3 | ||
|
|
064d0b5595 | ||
|
|
aa863608b1 | ||
|
|
f16bbf1c97 | ||
|
|
c8daaf7d24 | ||
|
|
b620644bcb | ||
|
|
c9772c3e88 | ||
|
|
97479a28d9 | ||
|
|
bcd43da904 | ||
|
|
639bf05eb2 | ||
|
|
f4378b54c6 | ||
|
|
2492015b6e | ||
|
|
1a5c505f35 | ||
|
|
f580d94d89 | ||
|
|
b05604da52 | ||
|
|
e2551fa176 | ||
|
|
71ebc63ee2 | ||
|
|
4240ffc3b9 | ||
|
|
8881532a0e | ||
|
|
073c987260 | ||
|
|
7f9a24f6f7 | ||
|
|
318423c783 | ||
|
|
3d882e8793 | ||
|
|
b57a78a708 | ||
|
|
8a31579023 | ||
|
|
ad85413c9e | ||
|
|
2098159155 | ||
|
|
769d0330f6 | ||
|
|
daedaa2315 |
@@ -1,10 +1,10 @@
|
||||
name: Luminol CI - dev/1.21.4-hardfork
|
||||
name: Luminol CI - ver/1.21.5
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev/1.21.4-hardfork" ]
|
||||
branches: [ "ver/1.21.5" ]
|
||||
pull_request:
|
||||
branches: [ "dev/1.21.4-hardfork" ]
|
||||
branches: [ "ver/1.21.5" ]
|
||||
|
||||
permissions: write-all
|
||||
|
||||
@@ -16,17 +16,14 @@ jobs:
|
||||
- name: Checkout Git Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '22'
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Configure Git User Details
|
||||
run: git config --global user.email "ci@luminolmc.com" && git config --global user.name "LuminolMC CI"
|
||||
@@ -63,13 +60,13 @@ jobs:
|
||||
tag: ${{ env.tag }}
|
||||
name: ${{ env.project_id_b }} ${{ env.mcversion }} - ${{ env.commit_id }}
|
||||
body: |
|
||||
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commit_id }} [](https://github.com/LuminolMC/${{ env.project_id }}/download/${{ env.tag }}/${{ env.jar }})
|
||||
📦Version: `${{ env.mcversion }}` | Commit ${{ env.commit_id }} [](https://github.com/LuminolMC/${{ env.project_id }}/releases/download/${{ env.tag }}/${{ env.jar }})
|
||||
This release is automatically compiled by GitHub Actions
|
||||
### Commit Message
|
||||
${{ env.commit_msg }}
|
||||
artifacts: |
|
||||
${{ env.jar_dir }}
|
||||
generateReleaseNotes: true
|
||||
prerelease: ${{ env.pre }}
|
||||
prerelease: false
|
||||
makeLatest: ${{ env.make_latest }}
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
|
||||
|
||||
plugins {
|
||||
java // TODO java launcher tasks
|
||||
id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"
|
||||
id("io.papermc.paperweight.patcher") version "2.0.0-beta.17"
|
||||
}
|
||||
|
||||
paperweight {
|
||||
@@ -64,6 +64,7 @@ subprojects {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release = 21
|
||||
options.isFork = true
|
||||
options.forkOptions.memoryMaximumSize = "6g" // Prevent OOM during building
|
||||
}
|
||||
tasks.withType<Javadoc> {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
- `git`
|
||||
- `JDK 21 或更高版本`
|
||||
|
||||
特别提醒:在操作前,您需要启用系统和Git的长路径支持,以下为部分平台的相关描述。
|
||||
|
||||
[`Windows`](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation)
|
||||
[`Git for Windows`](https://gitforwindows.org/faq.html#i-get-errors-trying-to-check-out-files-with-long-path-names)
|
||||
|
||||
## 了解补丁(Patches)
|
||||
|
||||
Luminol 使用和 Folia 一样的补丁系统,并为了针对不同部分的修改分成了两个目录:
|
||||
|
||||
@@ -25,6 +25,11 @@ Before coding, you need these pieces of software / tools as Dev Environment.
|
||||
- `git`
|
||||
- `JDK 21 or higher`
|
||||
|
||||
PS: You need to enable long path support in your System and Git before start, some of the platform's resolution here.
|
||||
|
||||
[`Windows`](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation)
|
||||
[`Git for Windows`](https://gitforwindows.org/faq.html#i-get-errors-trying-to-check-out-files-with-long-path-names)
|
||||
|
||||
## Understanding "Patches"
|
||||
|
||||
Luminol uses as the same patching system as Paper,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
group = me.earthme.luminol
|
||||
version=1.21.4-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.4
|
||||
version=1.21.5-R0.1-SNAPSHOT
|
||||
mcVersion=1.21.5
|
||||
|
||||
foliaRef=f69d1c974daa7646b869d4c11dcc86915eec96a8
|
||||
foliaRef=da0d7cd1beb8eb7b84a5210dcefa6ffb4cce7415
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
org.gradle.caching=true
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
6
gradlew
vendored
6
gradlew
vendored
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -205,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
|
||||
4
gradlew.bat
vendored
4
gradlew.bat
vendored
@@ -70,11 +70,11 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
--- a/folia-api/build.gradle.kts
|
||||
+++ b/folia-api/build.gradle.kts
|
||||
@@ -54,6 +_,7 @@
|
||||
@@ -51,6 +_,7 @@
|
||||
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
|
||||
api("org.slf4j:slf4j-api:$slf4jVersion")
|
||||
api("com.mojang:brigadier:1.3.10")
|
||||
+ api("io.sentry:sentry:8.0.0-rc.2") // Pufferfish
|
||||
|
||||
// Deprecate bungeecord-chat in favor of adventure
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.19") {
|
||||
@@ -104,17 +_,21 @@
|
||||
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
|
||||
@@ -101,17 +_,21 @@
|
||||
java {
|
||||
srcDir(generatedApiPath)
|
||||
srcDir(generatedDir)
|
||||
srcDir(file("../paper-api/src/main/java"))
|
||||
+ srcDir(file("../folia-api/src/main/java"))
|
||||
}
|
||||
@@ -30,10 +30,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,3 +_,10 @@
|
||||
tasks.check {
|
||||
@@ -257,3 +_,10 @@
|
||||
dependsOn(scanJarForOldGeneratedCode)
|
||||
}
|
||||
}
|
||||
+
|
||||
+// Pufferfish Start
|
||||
+tasks.withType<JavaCompile> {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] KioCG Chunk API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
||||
index d434277342b2db19f98e032d3a316b27d728b840..e188353ad193f6203533790ae52fafc0554df63f 100644
|
||||
index 9f8414f854646ad7429fe806e35a13e32a07ddaa..9a0995bf82830b45b2d72b2a1cff2bfdd4f7a638 100644
|
||||
--- a/src/main/java/org/bukkit/Chunk.java
|
||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||
@@ -388,4 +388,6 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@@ -16,10 +16,10 @@ index d434277342b2db19f98e032d3a316b27d728b840..e188353ad193f6203533790ae52fafc0
|
||||
+ long getChunkHotAvg(); // KioCG
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 494dca2ee48a03953d47050b178496df12bc48c5..a65d64b1ef64cf1cf213cec00e7f73cc7ad2b79c 100644
|
||||
index d34419693fc78b3f7e8f6bbf115f17f29e5e3377..aefcae5d9b7beff4bb7185cf44b443fc340af179 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3918,4 +3918,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3925,4 +3925,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param score New death screen score of player
|
||||
*/
|
||||
void setDeathScreenScore(int score);
|
||||
|
||||
@@ -18,14 +18,14 @@ index 89017af09ce32e7a66014fc3aeb50155921252a5..b862779b48176dd7e67a2f1a3e7f24bc
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 5df19bd701c67506689fc7f49d91f99ebfbc83f0..baf0cbd2f995ebe2e4382244eff6e15ec125d790 100644
|
||||
index 4acda947b7d69ab4133b4cc94e76d945e4d148d5..8093eff77c80be2c2e97bf6700a69d879d4c62a5 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -39,7 +39,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
register("bukkit", new VersionCommand("version"));
|
||||
@@ -32,7 +32,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
|
||||
private void setDefaultCommands() {
|
||||
register("bukkit", new ReloadCommand("reload"));
|
||||
//register("bukkit", new PluginsCommand("plugins")); // Paper
|
||||
- register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper
|
||||
- register("bukkit", new co.aikar.timings.TimingsCommand("timings"));
|
||||
+ //register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper // Luminol - Disable timings warn msg and commands
|
||||
}
|
||||
|
||||
|
||||
@@ -5,15 +5,15 @@ Subject: [PATCH] Force disable reload command
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index baf0cbd2f995ebe2e4382244eff6e15ec125d790..0d354eb5e7df427faff2d6c816c297c3d39a6e63 100644
|
||||
index 8093eff77c80be2c2e97bf6700a69d879d4c62a5..c51bc888011091925d73945a52b252aef3e2b384 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -37,7 +37,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -31,7 +31,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
|
||||
private void setDefaultCommands() {
|
||||
register("bukkit", new VersionCommand("version"));
|
||||
- register("bukkit", new ReloadCommand("reload"));
|
||||
+ //register("bukkit", new ReloadCommand("reload")); // Luminol - Force disable reload command
|
||||
//register("bukkit", new PluginsCommand("plugins")); // Paper
|
||||
//register("bukkit", new co.aikar.timings.TimingsCommand("timings")); // Paper // Luminol - Disable timings warn msg and commands
|
||||
}
|
||||
|
||||
|
||||
@@ -202,10 +202,10 @@ index ab36e3aaff57e2f27b5aed06b4bdfe277f86a35e..96da9f1082ab134d197b3a6069f2fcdf
|
||||
callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event)));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index b412aaf08901d169ac9fc89b36f9d6ccb95c53d3..45a9ca8969f635d20cc44c062fda85bbccd8f8ff 100644
|
||||
index 163e9a0e179dc88be93614ff66ee2be3eccc694f..78cdf669328fc1ec5e9943033a11d2200857a07e 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -336,7 +336,13 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
@@ -329,7 +329,13 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
try {
|
||||
jPlugin.setEnabled(true);
|
||||
} catch (Throwable ex) {
|
||||
@@ -219,7 +219,7 @@ index b412aaf08901d169ac9fc89b36f9d6ccb95c53d3..45a9ca8969f635d20cc44c062fda85bb
|
||||
}
|
||||
|
||||
// Perhaps abort here, rather than continue going, but as it stands,
|
||||
@@ -361,7 +367,9 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
@@ -354,7 +360,9 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
try {
|
||||
jPlugin.setEnabled(false);
|
||||
} catch (Throwable ex) {
|
||||
|
||||
@@ -176,19 +176,19 @@ index 0000000000000000000000000000000000000000..c26dcaaa2e85882730c854099df80d69
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index 6995f9cc08d162e3adcd3a28f6bfa6d329661999..83ea70a16b4090a8c628784f2807cd16e7065103 100644
|
||||
index fc9728342de7605da69813fb44b008c1343124c0..d322e6c47d751b41e4b2f2fc45bb8d7498bff21d 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapPalette.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
@@ -45,7 +45,7 @@ public final class MapPalette {
|
||||
@@ -35,7 +35,7 @@ public final class MapPalette {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
- static final Color[] colors = {
|
||||
+ public static final Color[] colors = { // Luminol - package-private -> public
|
||||
c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0), c(0, 0, 0, 0),
|
||||
c(89, 125, 39), c(109, 153, 48), c(127, 178, 56), c(67, 94, 29),
|
||||
c(174, 164, 115), c(213, 201, 140), c(247, 233, 163), c(130, 123, 86),
|
||||
@@ -216,9 +216,11 @@ public final class MapPalette {
|
||||
// Start generate - MapPalette#colors
|
||||
// @GeneratedFrom 1.21.5
|
||||
new Color(0x00000000, true),
|
||||
@@ -395,9 +395,11 @@ public final class MapPalette {
|
||||
temp.getRGB(0, 0, temp.getWidth(), temp.getHeight(), pixels, 0, temp.getWidth());
|
||||
|
||||
byte[] result = new byte[temp.getWidth() * temp.getHeight()];
|
||||
|
||||
@@ -192,10 +192,10 @@ index 0000000000000000000000000000000000000000..ecde4462b08d701b8bff9f26902f1775
|
||||
+ RegionStats getRegionStats();
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index bff01411f4b2d3ecd9e6d807c3f450d72c108323..1d74f4814d5c87d6cd1320634e5610cac16d32c5 100644
|
||||
index a8b64f78bf3c453094074b4b4d3c8fd07b9eb273..7927012c1afe5289d22879353a88a4574da91e01 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4437,4 +4437,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4444,4 +4444,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 6 Apr 2025 10:42:47 +0800
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sat, 24 May 2025 01:25:10 +0800
|
||||
Subject: [PATCH] Leaves Fix SculkCatalyst exp skip
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
index 42ffb81708b327f765ba3235fdd1ab69cd7589fd..0a7e37420f8d024ffba1fd1c52edc50c10408e6e 100644
|
||||
index 76c08499b704a6cb0cb95ce69b9a9248d69cc127..d516595a8675a9f3d9c14658b66160ba4b3c4278 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
@@ -25,17 +25,25 @@ public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Ca
|
||||
@@ -27,6 +27,7 @@ public class EntityDeathEvent extends EntityEvent implements Cancellable {
|
||||
@Nullable private org.bukkit.SoundCategory deathSoundCategory;
|
||||
private float deathSoundVolume;
|
||||
private float deathSoundPitch;
|
||||
// Paper end
|
||||
+ private int rewardExp; // Leaves - exp fix
|
||||
|
||||
public EntityDeathEvent(@NotNull final LivingEntity entity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops) {
|
||||
this(entity, damageSource, drops, 0);
|
||||
private boolean cancelled;
|
||||
|
||||
@@ -35,13 +36,20 @@ public class EntityDeathEvent extends EntityEvent implements Cancellable {
|
||||
this(livingEntity, damageSource, drops, 0);
|
||||
}
|
||||
|
||||
public EntityDeathEvent(@NotNull final LivingEntity what, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp) {
|
||||
- @ApiStatus.Internal
|
||||
public EntityDeathEvent(@NotNull final LivingEntity livingEntity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp) {
|
||||
+ // Leaves start - exp fix
|
||||
+ this(what, damageSource, drops, droppedExp, droppedExp);
|
||||
+ this(livingEntity, damageSource, drops, droppedExp, droppedExp);
|
||||
+ }
|
||||
+
|
||||
+ public EntityDeathEvent(@NotNull final LivingEntity what, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int rewardExp) {
|
||||
super(what);
|
||||
+ @ApiStatus.Internal
|
||||
+ public EntityDeathEvent(@NotNull final LivingEntity livingEntity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int rewardExp) {
|
||||
super(livingEntity);
|
||||
this.damageSource = damageSource;
|
||||
this.drops = drops;
|
||||
this.dropExp = droppedExp;
|
||||
@@ -34,18 +38,10 @@ index 42ffb81708b327f765ba3235fdd1ab69cd7589fd..0a7e37420f8d024ffba1fd1c52edc50c
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@@ -75,6 +83,7 @@ public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Ca
|
||||
*/
|
||||
public void setDroppedExp(int exp) {
|
||||
this.dropExp = exp;
|
||||
+ this.rewardExp = exp; // Leaves - exp fix
|
||||
@@ -230,4 +238,14 @@ public class EntityDeathEvent extends EntityEvent implements Cancellable {
|
||||
public static HandlerList getHandlerList() {
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,4 +235,14 @@ public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Ca
|
||||
this.deathSoundPitch = pitch;
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Leaves start - exp fix
|
||||
+ public int getRewardExp() {
|
||||
|
||||
@@ -5,14 +5,13 @@ Subject: [PATCH] Purpur Lobotomize stuck villagers
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 1db3742024e9cd1b70af2d52b4b756a544c019df..9c722a762c88a88bb5ef18c3b9eab8b371360dac 100644
|
||||
index 02b86d9615f8150b13ff0beefd5ca502c0494f99..3a444609ea9fdeee9057d593fbd4d38cc9e1ad68 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -367,4 +367,14 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -391,4 +391,13 @@ public interface Villager extends AbstractVillager {
|
||||
* reputation regardless of its impact and the player associated.
|
||||
*/
|
||||
public void clearReputations();
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start
|
||||
+
|
||||
+ /**
|
||||
|
||||
@@ -1,31 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 6 Apr 2025 10:42:47 +0800
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sat, 24 May 2025 01:47:10 +0800
|
||||
Subject: [PATCH] Leaves Fix SculkCatalyst exp skip
|
||||
|
||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/master/leaves-api/paper-patches/features/0008-Fix-SculkCatalyst-exp-skip.patch)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
index ab7584873e46020148bceecbd42a43055684e6a0..f33ab20313310a113d6c88e0fc1fe1666218061e 100644
|
||||
index 6316a2f1d2dc0314397e33e6dbd354fb8bc50541..6e2d1bf0e8eb9fa4917b464324a02b9b5d0dd496 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
@@ -18,6 +18,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
@@ -25,6 +25,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
private boolean doExpDrop;
|
||||
private boolean keepLevel = false;
|
||||
private boolean keepInventory = false;
|
||||
private boolean doExpDrop; // Paper - shouldDropExperience API
|
||||
+ private boolean useApiExpDropStatus = false; // Leaves - exp fix
|
||||
// Paper start - adventure
|
||||
@org.jetbrains.annotations.ApiStatus.Internal
|
||||
public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List<ItemStack> drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) {
|
||||
@@ -122,9 +123,16 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
*/
|
||||
public void setShouldDropExperience(boolean doExpDrop) {
|
||||
@Deprecated
|
||||
private final List<ItemStack> itemsToKeep = new ArrayList<>();
|
||||
|
||||
@@ -82,8 +83,15 @@ public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
this.showDeathMessages = true;
|
||||
this.deathMessage = LegacyComponentSerializer.legacySection().deserializeOrNull(deathMessage);
|
||||
this.doExpDrop = doExpDrop;
|
||||
+ this.useApiExpDropStatus = true; // Leaves - exp fix
|
||||
}
|
||||
// Paper end - shouldDropExperience API
|
||||
|
||||
+ // Leaves start - exp fix
|
||||
+ public boolean forceUseEventDropStatus() {
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
--- a/folia-server/build.gradle.kts
|
||||
+++ b/folia-server/build.gradle.kts
|
||||
@@ -20,8 +_,9 @@
|
||||
minecraftVersion = providers.gradleProperty("mcVersion")
|
||||
// macheOldPath = file("F:\\Projects\\PaperTooling\\mache\\versions\\1.21.4\\src\\main\\java")
|
||||
// gitFilePatches = true
|
||||
-
|
||||
+
|
||||
@@ -29,6 +_,7 @@
|
||||
//}
|
||||
|
||||
val fork = forks.register("folia") {
|
||||
+ rootDirectory = upstreamsDirectory().map { it.dir("folia") }
|
||||
upstream.patchDir("paperServer") {
|
||||
upstreamPath = "paper-server"
|
||||
excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
|
||||
@@ -30,7 +_,23 @@
|
||||
@@ -37,7 +_,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +32,10 @@
|
||||
+ activeFork = luminol
|
||||
|
||||
spigot {
|
||||
buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42"
|
||||
@@ -116,10 +_,14 @@
|
||||
buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc"
|
||||
@@ -123,10 +_,14 @@
|
||||
main {
|
||||
java { srcDir("../paper-server/src/main/java") }
|
||||
java { srcDir("../paper-server/src/main/java"); srcDir("../paper-server/src/generated/java") }
|
||||
resources { srcDir("../paper-server/src/main/resources") }
|
||||
+ java { srcDir("../folia-server/src/main/java") }
|
||||
+ resources { srcDir("../folia-server/src/main/resources") }
|
||||
@@ -50,8 +47,8 @@
|
||||
+ resources { srcDir("../folia-server/src/test/resources") }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +_,14 @@
|
||||
val log4jPlugins = sourceSets.create("log4jPlugins") {
|
||||
@@ -153,7 +_,14 @@
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -67,8 +64,8 @@
|
||||
implementation("ca.spottedleaf:concurrentutil:0.0.3")
|
||||
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
|
||||
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
|
||||
@@ -201,26 +_,33 @@
|
||||
implementation("me.lucko:spark-paper:1.10.119-20241121.092015-1")
|
||||
@@ -217,26 +_,33 @@
|
||||
implementation("me.lucko:spark-paper:1.10.133-20250413.112336-1")
|
||||
}
|
||||
|
||||
+// Pufferfish Start
|
||||
@@ -107,7 +104,7 @@
|
||||
"Build-Number" to (build ?: ""),
|
||||
"Build-Time" to buildTime.toString(),
|
||||
"Git-Branch" to gitBranch,
|
||||
@@ -351,3 +_,10 @@
|
||||
@@ -393,3 +_,10 @@
|
||||
classpath(tasks.createReobfPaperclipJar.flatMap { it.outputZip })
|
||||
mainClass.set(null as String?)
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for command block command execution
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/BaseCommandBlock.java b/net/minecraft/world/level/BaseCommandBlock.java
|
||||
index b02b79ccedb8b87bc22270377dfc36e21ebe1724..3786e8288c3a66a5e986ae2a150d03ce2dd5ed16 100644
|
||||
index 91e30f9c83259abc0589f4ee69c429cd4305d6ea..21a22d6fca111dd6a8cd4c7a6f994aa87d06feb4 100644
|
||||
--- a/net/minecraft/world/level/BaseCommandBlock.java
|
||||
+++ b/net/minecraft/world/level/BaseCommandBlock.java
|
||||
@@ -114,7 +114,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||
@@ -102,7 +102,7 @@ public abstract class BaseCommandBlock implements CommandSource {
|
||||
}
|
||||
|
||||
public boolean performCommand(Level level) {
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: [PATCH] Add config for entity to clean memory value which is not
|
||||
Folia does not fully get the entity AI patched correctly, like some memories in entity's brain is still exists when switched dimension or teleported to the new tickregion, which entity is still accessing in the next tick then it will trigger the async catcher, which lead the entity go disappear and throw an exception in the console.In this patch, if this function is turned on, the server will clean the memory that doesn't belong to the entity's tickregion before ticking any behaviors, which can simply fix that.
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java
|
||||
index 65b2b3ece213d901cdd585093e2fafcd2ef4a7cd..52b08be8b37117edc38dddf6d1919178b1f86271 100644
|
||||
index 3eb1362e6597faa21b27c9d1611d64a236491f98..c589e18b68e45d5991291db3a0bdd833588ce945 100644
|
||||
--- a/net/minecraft/world/entity/ai/Brain.java
|
||||
+++ b/net/minecraft/world/entity/ai/Brain.java
|
||||
@@ -399,7 +399,7 @@ public class Brain<E extends LivingEntity> {
|
||||
@@ -408,7 +408,7 @@ public class Brain<E extends LivingEntity> {
|
||||
}
|
||||
|
||||
public void tick(ServerLevel level, E entity) {
|
||||
@@ -19,7 +19,7 @@ index 65b2b3ece213d901cdd585093e2fafcd2ef4a7cd..52b08be8b37117edc38dddf6d1919178
|
||||
this.tickSensors(level, entity);
|
||||
this.startEachNonRunningBehavior(level, entity);
|
||||
this.tickEachRunningBehavior(level, entity);
|
||||
@@ -411,10 +411,31 @@ public class Brain<E extends LivingEntity> {
|
||||
@@ -420,10 +420,31 @@ public class Brain<E extends LivingEntity> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for offline mode warning
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 375f4a59333ee1d75fb1acb8c2cbada7866bd48e..f4b738b05ec9488e20402efb6c935ff55d86adf2 100644
|
||||
index 898373c7be5a80e82138f66bb5f739c0d4b10e5e..e76599e92e4bf4f5b5d7176f4a0a2a854d10818a 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -285,7 +285,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -243,7 +243,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||
// Paper end - Add Velocity IP Forwarding Support
|
||||
|
||||
@@ -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 faf72dd6dff74296c73cb058aaabd1f9f475a072..46375fa81b36b89b79c22f0a7ac6d610ab1183d4 100644
|
||||
index 02676eb449bb98bc959717c72356bc980d4662f8..db435869dd2a2dfe0c36c62e46e5389170cfb0cd 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1967,7 +1967,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1965,7 +1965,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
|
||||
@@ -5,11 +5,11 @@ Subject: [PATCH] Add config for unsafe teleportation
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 1fa5e6a12b943e889bde566038a632a6adcf319e..c1f6a3b3a8fa990b8e9b052341ab31bde7c04e7a 100644
|
||||
index e77276b1dccebd5b768c3cdbe5e0206da32b91ff..95f3bcf2f3093e66602e4323708ac349d58db4c1 100644
|
||||
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -65,7 +65,7 @@ public class FallingBlockEntity extends Entity {
|
||||
public float fallDamagePerDistance;
|
||||
@@ -67,7 +67,7 @@ public class FallingBlockEntity extends Entity {
|
||||
public float fallDamagePerDistance = 0.0F;
|
||||
@Nullable
|
||||
public CompoundTag blockData;
|
||||
- public boolean forceTickAfterTeleportToDuplicate;
|
||||
@@ -17,7 +17,7 @@ index 1fa5e6a12b943e889bde566038a632a6adcf319e..c1f6a3b3a8fa990b8e9b052341ab31bd
|
||||
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
|
||||
public boolean autoExpire = true; // Paper - Expand FallingBlock API
|
||||
|
||||
@@ -401,7 +401,7 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -382,7 +382,7 @@ public class FallingBlockEntity extends Entity {
|
||||
ResourceKey<Level> resourceKey1 = this.level().dimension();
|
||||
boolean flag = (resourceKey1 == Level.END || resourceKey == Level.END) && resourceKey1 != resourceKey;
|
||||
Entity entity = super.teleport(teleportTransition);
|
||||
@@ -27,10 +27,10 @@ index 1fa5e6a12b943e889bde566038a632a6adcf319e..c1f6a3b3a8fa990b8e9b052341ab31bd
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/EndPortalBlock.java b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
index 554d75ac1374d7d93977a10e06fcf51259830c97..17c1ce4397c5953bb92aaa3b56c179b7c24a0736 100644
|
||||
index 685c0fb071efd8e3c4e81cb89e93d8f7707773c1..eaf46427e07edc59b6cffd3fec76489fe65f8f14 100644
|
||||
--- a/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EndPortalBlock.java
|
||||
@@ -67,6 +67,11 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
@@ -68,6 +68,11 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
|
||||
if (level.paperConfig().misc.disableEndCredits) {serverPlayer.seenCredits = true; return;} // Paper - Option to disable end credits
|
||||
serverPlayer.showEndCredits();
|
||||
} else {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for username check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 159f2f169d26b436a70006f7bc9bdc481315dd32..2b366fea4d8d376b150786fdc00fd5e2413388f6 100644
|
||||
index 829ff1f36d565f15cfe5d4997d3ccfdfe7898e0f..b7cfe0c73de732e22f90a7b38321c775e405aaa5 100644
|
||||
--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -176,7 +176,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -175,7 +175,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
public void handleHello(ServerboundHelloPacket packet) {
|
||||
Validate.validState(this.state == ServerLoginPacketListenerImpl.State.HELLO, "Unexpected hello packet");
|
||||
// Paper start - Validate usernames
|
||||
@@ -19,10 +19,10 @@ index 159f2f169d26b436a70006f7bc9bdc481315dd32..2b366fea4d8d376b150786fdc00fd5e2
|
||||
&& !this.iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation) {
|
||||
Validate.validState(StringUtil.isReasonablePlayerName(packet.name()), "Invalid characters in username");
|
||||
diff --git a/net/minecraft/server/players/GameProfileCache.java b/net/minecraft/server/players/GameProfileCache.java
|
||||
index 6fb3712f33a84a3612752dcfd9e97d67066f610e..1999188b5667035362ba579a80b30336c5c7fc38 100644
|
||||
index 066f84df5c31242ab542932f1e243369d0e766e2..144a2644c15f276f02bb3be859dc5d05a677ac55 100644
|
||||
--- a/net/minecraft/server/players/GameProfileCache.java
|
||||
+++ b/net/minecraft/server/players/GameProfileCache.java
|
||||
@@ -77,7 +77,7 @@ public class GameProfileCache {
|
||||
@@ -75,7 +75,7 @@ public class GameProfileCache {
|
||||
}
|
||||
|
||||
private static Optional<GameProfile> lookupGameProfile(GameProfileRepository profileRepo, String name) {
|
||||
@@ -30,7 +30,7 @@ index 6fb3712f33a84a3612752dcfd9e97d67066f610e..1999188b5667035362ba579a80b30336
|
||||
+ if (!StringUtil.isValidPlayerName(name, false)) { // Luminol - Add config for username check - Directly return, skip unnecessary following logic
|
||||
return createUnknownProfile(name);
|
||||
} else {
|
||||
final AtomicReference<GameProfile> atomicReference = new AtomicReference<>();
|
||||
final boolean shouldLookup = !org.apache.commons.lang3.StringUtils.isBlank(name) // Paper - Don't lookup a profile with a blank name
|
||||
diff --git a/net/minecraft/util/StringUtil.java b/net/minecraft/util/StringUtil.java
|
||||
index 77947e6915facee44588943fcd3e5b513de37e77..d9f95c5cf4bd2946244c153db0fd21c8d51ae20d 100644
|
||||
--- a/net/minecraft/util/StringUtil.java
|
||||
|
||||
@@ -5,13 +5,13 @@ Subject: [PATCH] Add config for vanilla random
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 2cd2ce1060f567be6c72b7bc9d02651ec7166203..f69fd922fa67cd366dbb93c34fa15659ba76c844 100644
|
||||
index 414be522896c63c34100199177788d71e8f2d326..bf177d9f7e5d9f643d13fcb9ea23686fd0f32dc5 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -255,7 +255,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -261,7 +261,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public double yOld;
|
||||
public double zOld;
|
||||
public boolean noPhysics;
|
||||
private boolean wasOnFire;
|
||||
- public final RandomSource random = SHARED_RANDOM; // Paper - Share random for entities to make them more random
|
||||
+ public final RandomSource random = me.earthme.luminol.config.modules.fixes.VanillaRandomSourceConfig.useLegacyRandomSourceForPlayers ? RandomSource.create() : SHARED_RANDOM; // Paper - Share random for entities to make them more random // Luminol - Add config for vanilla random SHARED_RANDOM
|
||||
public int tickCount;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to disable end crystal check
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/dimension/end/EndDragonFight.java b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 2e156694b337760be986fdf1cbf863b0d896ef2d..b55ac3c0d19cf9117368c17687fa34099bfe3533 100644
|
||||
index 4fa8371c212dcc02b8cf5fd267b736e1cf3f50c1..e80afd034eba10c9adaa5df776c728253e874af4 100644
|
||||
--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -546,6 +546,8 @@ public class EndDragonFight {
|
||||
@@ -547,6 +547,8 @@ public class EndDragonFight {
|
||||
|
||||
blockPos = this.portalLocation;
|
||||
}
|
||||
@@ -17,7 +17,7 @@ index 2e156694b337760be986fdf1cbf863b0d896ef2d..b55ac3c0d19cf9117368c17687fa3409
|
||||
// Paper start - Perf: Do crystal-portal proximity check before entity lookup
|
||||
if (placedEndCrystalPos != null) {
|
||||
// The end crystal must be 0 or 1 higher than the portal origin
|
||||
@@ -561,6 +563,7 @@ public class EndDragonFight {
|
||||
@@ -562,6 +564,7 @@ public class EndDragonFight {
|
||||
}
|
||||
}
|
||||
// Paper end - Perf: Do crystal-portal proximity check before entity lookup
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to disable entity tick catchers
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index dafd90502937019b616ac0a79465e1dbc578cf66..96daa716aa06de31b2867f09833ac8e77b6314c4 100644
|
||||
index 0e7e2a17a9ba3b90d4458032b6d5ff324fad77b5..ba1ccd6eab77e27a38d22c12dba0797d65cc4c4e 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1547,6 +1547,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1533,6 +1533,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
try {
|
||||
consumerEntity.accept(entity);
|
||||
} catch (Throwable var6) {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to disable heightmap warning
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/levelgen/Heightmap.java b/net/minecraft/world/level/levelgen/Heightmap.java
|
||||
index 3b27bcfbbe0529d1526adc30760c846b4011645f..95747ae41cea0d4b577c58ef44959a18e0a46672 100644
|
||||
index f7b8637680e654dc0b3e8850d65081a1c565bb69..5edbc84650243d1c47d269d4e8176ccdffa6c4e9 100644
|
||||
--- a/net/minecraft/world/level/levelgen/Heightmap.java
|
||||
+++ b/net/minecraft/world/level/levelgen/Heightmap.java
|
||||
@@ -123,7 +123,8 @@ public class Heightmap {
|
||||
@@ -128,7 +128,8 @@ public class Heightmap {
|
||||
if (raw.length == data.length) {
|
||||
System.arraycopy(data, 0, raw, 0, data.length);
|
||||
} else {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config to enable tick command
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/RegionizedServer.java b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
index 1382c695c4991488b113401e231875ddc74f6b01..68280b07a71dcdb42eaee6f62fbda074813a22e4 100644
|
||||
index 8e91ec81128bdbd5f78e1f04fe17bcbd6e5dc280..55476f0d4898c67e433dcee769a5cf8bd6109930 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedServer.java
|
||||
@@ -286,6 +286,11 @@ public final class RegionizedServer {
|
||||
@@ -299,6 +299,11 @@ public final class RegionizedServer {
|
||||
this.randomWalk();
|
||||
*/
|
||||
++this.tickCount;
|
||||
@@ -20,7 +20,7 @@ index 1382c695c4991488b113401e231875ddc74f6b01..68280b07a71dcdb42eaee6f62fbda074
|
||||
// expire invalid click command callbacks
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue((int)this.tickCount);
|
||||
|
||||
@@ -308,6 +313,13 @@ public final class RegionizedServer {
|
||||
@@ -321,6 +326,13 @@ public final class RegionizedServer {
|
||||
this.globalTick(world, tickCount);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ index 1382c695c4991488b113401e231875ddc74f6b01..68280b07a71dcdb42eaee6f62fbda074
|
||||
// tick connections
|
||||
this.tickConnections();
|
||||
|
||||
@@ -441,7 +453,7 @@ public final class RegionizedServer {
|
||||
@@ -454,7 +466,7 @@ public final class RegionizedServer {
|
||||
}
|
||||
|
||||
private void tickTime(final ServerLevel world, final int tickCount) {
|
||||
@@ -97,13 +97,13 @@ index 7123b3eb2f2e52946b8ef9de993a6828eb0bb6f7..82948984404a183711588932a4a026dc
|
||||
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 009e6405a11a391adca41a7c4ecafbf3254d799d..779dfa95d91ec4661227c94b012cb63953d4ba96 100644
|
||||
index 4e3bfa25ec4917d2bca594b050e38be3bdea077b..fca716bf52e114b196c7617f352e9394c7185271 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -211,7 +211,11 @@ public class Commands {
|
||||
//TeamMsgCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
@@ -212,7 +212,11 @@ public class Commands {
|
||||
TeleportCommand.register(this.dispatcher);
|
||||
TellRawCommand.register(this.dispatcher, context);
|
||||
//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.CommandTickConfig.enabled) {
|
||||
@@ -114,10 +114,10 @@ index 009e6405a11a391adca41a7c4ecafbf3254d799d..779dfa95d91ec4661227c94b012cb639
|
||||
TitleCommand.register(this.dispatcher, context);
|
||||
//TriggerCommand.register(this.dispatcher); // Folia - region threading - TODO later
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 46375fa81b36b89b79c22f0a7ac6d610ab1183d4..2f0a1810e3ab4ff4376e893af7ceb2bf5849ba76 100644
|
||||
index db435869dd2a2dfe0c36c62e46e5389170cfb0cd..a90ac07eaea956cb7c50b66a27dd47c955f98feb 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -267,7 +267,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -266,7 +266,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private String serverId;
|
||||
public MinecraftServer.ReloadableResources resources;
|
||||
private final StructureTemplateManager structureTemplateManager;
|
||||
|
||||
@@ -5,25 +5,24 @@ Subject: [PATCH] Add config to modify tripwire behavior
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index 9aace993c6c18f1a50610e4766225485984b8167..419c1c7e14691a472b70ed548ecb928cb289b939 100644
|
||||
index 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..8f9f5b0bf098a32a732e3ff9f636e3ea828e5f43 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -214,10 +214,18 @@ public class TripWireHookBlock extends Block {
|
||||
@@ -200,10 +200,17 @@ public class TripWireHookBlock extends Block {
|
||||
BlockPos blockPos1 = pos.relative(direction, i2);
|
||||
BlockState blockState2 = blockStates[i2];
|
||||
if (blockState2 != null) {
|
||||
- BlockState blockState3 = level.getBlockState(blockPos1);
|
||||
- if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
|
||||
- if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating
|
||||
- if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3); // Paper - prevent tripwire from updating
|
||||
+ // Luminol start - tripwire and tripwireHook dupe
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.enabled) {
|
||||
+ level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3);
|
||||
+ level.getBlockState(blockPos1);
|
||||
+ } else {
|
||||
+ BlockState blockState3 = level.getBlockState(blockPos1);
|
||||
+ if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
|
||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE))
|
||||
+ level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating
|
||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3); // Paper - prevent tripwire from updating
|
||||
+ }
|
||||
}
|
||||
+ // Luminol end - tripwire and tripwireHook dupe
|
||||
@@ -31,29 +30,29 @@ index 9aace993c6c18f1a50610e4766225485984b8167..419c1c7e14691a472b70ed548ecb928c
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
index f96fc1391167dea48cac1caa464b9026657df89a..29b286386546db9d809f1b1b5c98571d3058a0f5 100644
|
||||
index 49b810ae9d9a8d0718a5f8c512e15a5573ed04fd..37ebb23c9c053de0530254d98f2120058833f232 100644
|
||||
--- a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
+++ b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
@@ -27,6 +27,11 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
@@ -28,6 +28,11 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
// CraftBukkit end
|
||||
BlockPos.MutableBlockPos mutableBlockPos = pos.mutable();
|
||||
|
||||
+ // Luminol start - tripwire behavior modifier
|
||||
+ java.util.List<BlockPos> blockList1 = new java.util.ArrayList<>();
|
||||
+ java.util.List<BlockPos> blockList2 = new java.util.ArrayList<>();
|
||||
+ boolean flag21 = !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode, "VANILLA20")
|
||||
+ && !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode, "MIXED");
|
||||
+ boolean flag21 = !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.behaviorMode, "VANILLA20")
|
||||
+ && !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.behaviorMode, "MIXED");
|
||||
for (int i = -2; i <= 2; i++) {
|
||||
for (int i1 = -2; i1 <= 2; i1++) {
|
||||
for (int i2 = -1; i2 < 3; i2++) {
|
||||
@@ -35,7 +40,29 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
// CraftBukkit start
|
||||
if (!blockList.getBlockState(blockPos).is(block)) {
|
||||
Block block = i2 == -1 ? Blocks.OBSIDIAN : Blocks.AIR;
|
||||
if (!blockList.getBlockState(blockPos).is(block)) { // CraftBukkit
|
||||
if (dropBlocks) {
|
||||
- blockList.destroyBlock(blockPos, true, null);
|
||||
- blockList.destroyBlock(blockPos, true, null); // CraftBukkit
|
||||
+ boolean flag = false;
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ switch (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.enabled) {
|
||||
+ switch (me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.behaviorMode) {
|
||||
+ case "VANILLA20": {
|
||||
+ flag = true;
|
||||
+ }
|
||||
@@ -73,42 +72,32 @@ index f96fc1391167dea48cac1caa464b9026657df89a..29b286386546db9d809f1b1b5c98571d
|
||||
+ }
|
||||
+ }
|
||||
+ if (flag) blockList1.add(blockPos.immutable());
|
||||
+ else blockList.destroyBlock(blockPos, true, null);
|
||||
+ else blockList.destroyBlock(blockPos, true, null); // CraftBukkit
|
||||
}
|
||||
|
||||
blockList.setBlock(blockPos, block.defaultBlockState(), 3);
|
||||
@@ -54,11 +81,39 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
blockList.setBlock(blockPos, block.defaultBlockState(), 3); // CraftBukkit
|
||||
@@ -53,11 +80,30 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
if (portalEvent.isCancelled()) return;
|
||||
}
|
||||
|
||||
- // SPIGOT-7856: End platform not dropping items after replacing blocks
|
||||
- if (dropBlocks) {
|
||||
- blockList.getList().forEach((state) -> level.destroyBlock(state.getPosition(), true, null));
|
||||
+ if (flag21 || !me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ // Luminol start - When updated replace it with newer code
|
||||
- blockList.placeBlocks(state -> level.destroyBlock(state.getPosition(), true, null));
|
||||
+ if (flag21 || !me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.enabled) {
|
||||
+ if (dropBlocks) {
|
||||
+ java.util.function.Consumer<? super org.bukkit.craftbukkit.block.CraftBlockState> beforeRun = state -> level.destroyBlock(state.getPosition(), !blockList1.contains(state.getPosition()), null);
|
||||
+ java.util.function.Predicate<? super org.bukkit.block.BlockState> filter = $ -> true;
|
||||
+ for (org.bukkit.craftbukkit.block.CraftBlockState state : blockList.getList()) {
|
||||
+ if (filter.test(state)) {
|
||||
+ beforeRun.accept(state);
|
||||
+ if (state.isPlaced()) {
|
||||
+ state.getWorldHandle().setBlock(state.getPosition(), state.getHandle(), state.getFlag());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ blockList.placeBlocks(state -> level.destroyBlock(state.getPosition(), true, null));
|
||||
+ } else {
|
||||
+ blockList.updateList();
|
||||
+ blockList.placeBlocks();
|
||||
+ }
|
||||
+ // Luminol end - When updated replace it with newer code
|
||||
+ } else {
|
||||
+ // SPIGOT-7856: End platform not dropping items after replacing blocks
|
||||
} else {
|
||||
- blockList.placeBlocks();
|
||||
+ if (dropBlocks) {
|
||||
+ blockList.getList().forEach((state) -> level.destroyBlock(state.getPosition(), !blockList1.contains(state.getPosition()), null)); // Luminol - prevent tripwire dupe in end platform generate
|
||||
+ blockList.getSnapshotBlocks().forEach((state) -> {
|
||||
+ level.destroyBlock(state.getPosition(), !blockList1.contains(state.getPosition()), null);
|
||||
+ state.update();
|
||||
+ });
|
||||
+ // Luminol - prevent tripwire dupe in end platform generate
|
||||
+ }
|
||||
+ blockList.updateList();
|
||||
}
|
||||
- blockList.updateList();
|
||||
// CraftBukkit end
|
||||
}
|
||||
+
|
||||
|
||||
@@ -21,17 +21,17 @@ index 80f17f33f670018240c854df589cf90cdeab6e70..8672757a4d5fb5c247599782fece6b8d
|
||||
if (raidAt == null || raidAt.getRaidOmenLevel() < raidAt.getMaxRaidOmenLevel()) {
|
||||
serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, amplifier));
|
||||
diff --git a/net/minecraft/world/entity/raid/Raid.java b/net/minecraft/world/entity/raid/Raid.java
|
||||
index 2f45befbb50645f1bfb5961ad725f3670ff0d592..190b9f46029ba0a0d69f68db2c56301f4ea21c94 100644
|
||||
index dbb207c638a64b733dc21704033ff55ca1f44f1d..8401b3e9968e48c7a936386f3290315091501d4f 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raid.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raid.java
|
||||
@@ -325,7 +325,20 @@ public class Raid {
|
||||
@@ -340,7 +340,20 @@ public class Raid {
|
||||
}
|
||||
|
||||
if (flag1) {
|
||||
- this.waveSpawnPos = this.getValidSpawnPos();
|
||||
- this.waveSpawnPos = this.getValidSpawnPos(level);
|
||||
+ // Luminol Start - Raid revert
|
||||
+ if (!me.earthme.luminol.config.modules.misc.RaidChangesConfig.posRevert) {
|
||||
+ this.waveSpawnPos = this.getValidSpawnPos();
|
||||
+ this.waveSpawnPos = this.getValidSpawnPos(level);
|
||||
+ } else {
|
||||
+ int n4 = 0;
|
||||
+ if (this.raidCooldownTicks < 100) {
|
||||
@@ -40,45 +40,45 @@ index 2f45befbb50645f1bfb5961ad725f3670ff0d592..190b9f46029ba0a0d69f68db2c56301f
|
||||
+ if (this.raidCooldownTicks < 40) {
|
||||
+ n4 = 2;
|
||||
+ }
|
||||
+ this.waveSpawnPos = this.getValidSpawnPos(n4);
|
||||
+ this.waveSpawnPos = this.getValidSpawnPos(level, n4);
|
||||
+ }
|
||||
+ // Luminol End - Raid revert
|
||||
}
|
||||
|
||||
if (this.raidCooldownTicks == 300 || this.raidCooldownTicks % 20 == 0) {
|
||||
@@ -360,7 +373,14 @@ public class Raid {
|
||||
@@ -375,7 +388,14 @@ public class Raid {
|
||||
int i = 0;
|
||||
|
||||
while (this.shouldSpawnGroup()) {
|
||||
- BlockPos blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(20));
|
||||
- BlockPos blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(level, 20));
|
||||
+ // Luminol Start - Raid revert
|
||||
+ BlockPos blockPos;
|
||||
+ if (!me.earthme.luminol.config.modules.misc.RaidChangesConfig.posRevert) {
|
||||
+ blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(20));
|
||||
+ blockPos = this.waveSpawnPos.orElseGet(() -> this.findRandomSpawnPos(level, 20));
|
||||
+ } else {
|
||||
+ blockPos = this.waveSpawnPos.isPresent() ? this.waveSpawnPos.get() : this.findRandomSpawnPos(i, 20);
|
||||
+ blockPos = this.waveSpawnPos.isPresent() ? this.waveSpawnPos.get() : this.findRandomSpawnPos(level, i, 20);
|
||||
+ }
|
||||
+ // Luminol End - Raid revert
|
||||
if (blockPos != null) {
|
||||
this.started = true;
|
||||
this.spawnGroup(blockPos);
|
||||
@@ -372,7 +392,7 @@ public class Raid {
|
||||
this.spawnGroup(level, blockPos);
|
||||
@@ -387,7 +407,7 @@ public class Raid {
|
||||
i++;
|
||||
}
|
||||
|
||||
- if (i > 5) {
|
||||
+ if (i > (me.earthme.luminol.config.modules.misc.RaidChangesConfig.posRevert ? 3 : 5)) { // Luminol - Raid revert
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(this, org.bukkit.event.raid.RaidStopEvent.Reason.UNSPAWNABLE); // CraftBukkit
|
||||
org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(level, this, org.bukkit.event.raid.RaidStopEvent.Reason.UNSPAWNABLE); // CraftBukkit
|
||||
this.stop();
|
||||
break;
|
||||
@@ -449,6 +469,17 @@ public class Raid {
|
||||
@@ -458,6 +478,17 @@ public class Raid {
|
||||
return blockPos != null ? Optional.of(blockPos) : Optional.empty();
|
||||
}
|
||||
|
||||
+ // Luminol Start - Raid revert
|
||||
+ private Optional<BlockPos> getValidSpawnPos(int n) {
|
||||
+ private Optional<BlockPos> getValidSpawnPos(ServerLevel level, int n) {
|
||||
+ for (int i = 0; i < 3; ++i) {
|
||||
+ BlockPos blockPos = this.findRandomSpawnPos(n, 1);
|
||||
+ BlockPos blockPos = this.findRandomSpawnPos(level, n, 1);
|
||||
+ if (blockPos == null) continue;
|
||||
+ return Optional.of(blockPos);
|
||||
+ }
|
||||
@@ -89,59 +89,58 @@ index 2f45befbb50645f1bfb5961ad725f3670ff0d592..190b9f46029ba0a0d69f68db2c56301f
|
||||
private boolean hasMoreWaves() {
|
||||
return this.hasBonusWave() ? !this.hasSpawnedBonusWave() : !this.isFinalWave();
|
||||
}
|
||||
@@ -674,7 +705,7 @@ public class Raid {
|
||||
int i2 = this.center.getX() + Mth.floor(Mth.cos(f2) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f);
|
||||
int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + this.level.random.nextInt(3) * Mth.floor(f);
|
||||
int height = this.level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3);
|
||||
@@ -683,7 +714,7 @@ public class Raid {
|
||||
int i2 = this.center.getX() + Mth.floor(Mth.cos(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
|
||||
int i3 = this.center.getZ() + Mth.floor(Mth.sin(f2) * 32.0F * f) + level.random.nextInt(3) * Mth.floor(f);
|
||||
int height = level.getHeight(Heightmap.Types.WORLD_SURFACE, i2, i3);
|
||||
- if (Mth.abs(height - this.center.getY()) <= 96) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.RaidChangesConfig.heightCheck || Mth.abs(height - this.center.getY()) <= 96) { // Leaves - Disable height check
|
||||
mutableBlockPos.set(i2, height, i3);
|
||||
if (!this.level.isVillage(mutableBlockPos) || i <= 7) {
|
||||
if (!level.isVillage(mutableBlockPos) || i <= 7) {
|
||||
int i4 = 10;
|
||||
@@ -694,6 +725,26 @@ public class Raid {
|
||||
@@ -702,6 +733,26 @@ public class Raid {
|
||||
return null;
|
||||
}
|
||||
|
||||
+ // Luminol Start - Raid revert
|
||||
+ @Nullable
|
||||
+ private BlockPos findRandomSpawnPos(int n, int n2) {
|
||||
+ private BlockPos findRandomSpawnPos(ServerLevel level, int n, int n2) {
|
||||
+ int n3 = 2 - n;
|
||||
+ BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos();
|
||||
+ SpawnPlacementType spawnPlacementType = SpawnPlacements.getPlacementType(EntityType.RAVAGER);
|
||||
+ for (int i = 0; i < n2; ++i) {
|
||||
+ float f = this.level.random.nextFloat() * ((float)Math.PI * 2);
|
||||
+ int n4 = this.center.getX() + Mth.floor(Mth.cos(f) * 32.0f * (float)n3) + this.level.random.nextInt(5);
|
||||
+ int n5 = this.center.getZ() + Mth.floor(Mth.sin(f) * 32.0f * (float)n3) + this.level.random.nextInt(5);
|
||||
+ int n6 = this.level.getHeight(Heightmap.Types.WORLD_SURFACE, n4, n5);
|
||||
+ float f = level.random.nextFloat() * ((float)Math.PI * 2);
|
||||
+ int n4 = this.center.getX() + Mth.floor(Mth.cos(f) * 32.0f * (float)n3) + level.random.nextInt(5);
|
||||
+ int n5 = this.center.getZ() + Mth.floor(Mth.sin(f) * 32.0f * (float)n3) + level.random.nextInt(5);
|
||||
+ int n6 = level.getHeight(Heightmap.Types.WORLD_SURFACE, n4, n5);
|
||||
+ mutableBlockPos.set(n4, n6, n5);
|
||||
+ if (this.level.isVillage(mutableBlockPos) && n < 2) continue;
|
||||
+ if (!this.level.hasChunksAt(mutableBlockPos.getX() - 10, mutableBlockPos.getZ() - 10, mutableBlockPos.getX() + 10, mutableBlockPos.getZ() + 10) || !this.level.isPositionEntityTicking(mutableBlockPos) || !spawnPlacementType.isSpawnPositionOk(this.level, mutableBlockPos, EntityType.RAVAGER) && (!this.level.getBlockState((BlockPos)mutableBlockPos.below()).is(Blocks.SNOW) || !this.level.getBlockState(mutableBlockPos).isAir())) continue;
|
||||
+ if (level.isVillage(mutableBlockPos) && n < 2) continue;
|
||||
+ if (!level.hasChunksAt(mutableBlockPos.getX() - 10, mutableBlockPos.getZ() - 10, mutableBlockPos.getX() + 10, mutableBlockPos.getZ() + 10) || !level.isPositionEntityTicking(mutableBlockPos) || !spawnPlacementType.isSpawnPositionOk(level, mutableBlockPos, EntityType.RAVAGER) && (!level.getBlockState(mutableBlockPos.below()).is(Blocks.SNOW) || !level.getBlockState(mutableBlockPos).isAir())) continue;
|
||||
+ return mutableBlockPos;
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+ // Luminol End - Raid revert
|
||||
+
|
||||
private boolean addWaveMob(int wave, Raider raider) {
|
||||
return this.addWaveMob(wave, raider, true);
|
||||
}
|
||||
private boolean addWaveMob(ServerLevel level, int wave, Raider raider) {
|
||||
// Folia start - make raids thread-safe
|
||||
if (!this.ownsRaid(level)) {
|
||||
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
|
||||
index 7c385baae81b9a987c0e1e4deb017884600331bc..075563d83fadd85191117685fa3b97a9fad14488 100644
|
||||
index f6f36c15120da6c57c0cbea3743a0819252cb6cc..cb537b243b16876e7922cd732ab8dad8d046a450 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -125,6 +125,43 @@ public abstract class Raider extends PatrollingMonster {
|
||||
@@ -127,6 +127,41 @@ public abstract class Raider extends PatrollingMonster {
|
||||
|
||||
currentRaid.removeFromRaid(this, false);
|
||||
currentRaid.removeFromRaid(serverLevel, this, false);
|
||||
}
|
||||
+
|
||||
+ // Leaves start - Revert raid changes
|
||||
+ if (this.level() instanceof ServerLevel serverLevel) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.RaidChangesConfig.effect && !this.hasRaid()) {
|
||||
+ ItemStack itemstack = this.getItemBySlot(EquipmentSlot.HEAD);
|
||||
+ net.minecraft.world.entity.player.Player entityhuman = null;
|
||||
+ if (entity instanceof net.minecraft.world.entity.player.Player player) {
|
||||
+ entityhuman = player;
|
||||
+ } else if (entity instanceof net.minecraft.world.entity.animal.Wolf wolf) {
|
||||
+ } else if (entity instanceof net.minecraft.world.entity.animal.wolf.Wolf wolf) {
|
||||
+ LivingEntity entityliving = wolf.getOwner();
|
||||
+ if (wolf.isTame() && entityliving instanceof net.minecraft.world.entity.player.Player player) {
|
||||
+ entityhuman = player;
|
||||
@@ -163,17 +162,16 @@ index 7c385baae81b9a987c0e1e4deb017884600331bc..075563d83fadd85191117685fa3b97a9
|
||||
+ net.minecraft.world.effect.MobEffectInstance mobeffect1 = new net.minecraft.world.effect.MobEffectInstance(net.minecraft.world.effect.MobEffects.BAD_OMEN, me.earthme.luminol.config.modules.misc.RaidChangesConfig.infinite ? net.minecraft.world.effect.MobEffectInstance.INFINITE_DURATION : 120000, i, false, false, true);
|
||||
+
|
||||
+ if (!serverLevel.getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_DISABLE_RAIDS)) {
|
||||
+ entityhuman.addEffect(mobeffect1, entityhuman, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN, true, true); // CraftBukkit // Luminol - Raid revert adapt Cross Region Damage trace
|
||||
+ entityhuman.addEffect(mobeffect1, entityhuman, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN, true); // CraftBukkit
|
||||
+ }
|
||||
+ this.setPatrolLeader(false);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Leaves end - Revert raid changes
|
||||
}
|
||||
|
||||
super.die(cause);
|
||||
@@ -153,7 +190,7 @@ public abstract class Raider extends PatrollingMonster {
|
||||
@@ -155,7 +190,7 @@ public abstract class Raider extends PatrollingMonster {
|
||||
}
|
||||
|
||||
public boolean hasRaid() {
|
||||
@@ -183,13 +181,22 @@ index 7c385baae81b9a987c0e1e4deb017884600331bc..075563d83fadd85191117685fa3b97a9
|
||||
|
||||
public boolean hasActiveRaid() {
|
||||
diff --git a/net/minecraft/world/item/component/OminousBottleAmplifier.java b/net/minecraft/world/item/component/OminousBottleAmplifier.java
|
||||
index 318f24d67be4daf6993ba547da0540be9c221a75..5607d2f21131510563f8fdc9079d1145483b11df 100644
|
||||
index 33907bb190ffa22ccf9ea424b1e536297878711a..ee8f7d840520b113036e7d2e5e36f626651e1fa5 100644
|
||||
--- a/net/minecraft/world/item/component/OminousBottleAmplifier.java
|
||||
+++ b/net/minecraft/world/item/component/OminousBottleAmplifier.java
|
||||
@@ -40,7 +40,7 @@ public record OminousBottleAmplifier(int value) implements ConsumableListener, T
|
||||
@@ -29,7 +29,7 @@ public record OminousBottleAmplifier(int value) implements ConsumableListener, T
|
||||
|
||||
@Override
|
||||
public void addToTooltip(Item.TooltipContext context, Consumer<Component> tooltipAdder, TooltipFlag tooltipFlag) {
|
||||
public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) {
|
||||
- entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); // Paper - properly resend entities - diff on change for below
|
||||
+ entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, me.earthme.luminol.config.modules.misc.RaidChangesConfig.infinite ? net.minecraft.world.effect.MobEffectInstance.INFINITE_DURATION : 120000, this.value, false, false, true)); // Paper - properly resend entities - diff on change for below // Luminol - Raid effect infinite
|
||||
}
|
||||
|
||||
// Paper start - properly resend entities - collect packets for bundle
|
||||
@@ -41,7 +41,7 @@ public record OminousBottleAmplifier(int value) implements ConsumableListener, T
|
||||
|
||||
@Override
|
||||
public void addToTooltip(Item.TooltipContext context, Consumer<Component> tooltipAdder, TooltipFlag flag, DataComponentGetter componentGetter) {
|
||||
- List<MobEffectInstance> list = List.of(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true));
|
||||
+ List<MobEffectInstance> list = List.of(new MobEffectInstance(MobEffects.BAD_OMEN, me.earthme.luminol.config.modules.misc.RaidChangesConfig.infinite ? net.minecraft.world.effect.MobEffectInstance.INFINITE_DURATION : 120000, this.value, false, false, true)); // Luminol - Raid effect infinite
|
||||
PotionContents.addPotionTooltip(list, tooltipAdder, 1.0F, context.tickRate());
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to verify signature only in online-mode
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/player/ProfilePublicKey.java b/net/minecraft/world/entity/player/ProfilePublicKey.java
|
||||
index 41a9cc693183e96c83837692e93b177a521d6789..f4a2d1a2d467808b9cb75fc32765ddc27be5fdba 100644
|
||||
index 15293ed76018f4790754721bd687cbbf906c71dc..c2eaf52590f417b9562edcc70cca68ad9904fe90 100644
|
||||
--- a/net/minecraft/world/entity/player/ProfilePublicKey.java
|
||||
+++ b/net/minecraft/world/entity/player/ProfilePublicKey.java
|
||||
@@ -23,7 +23,7 @@ public record ProfilePublicKey(ProfilePublicKey.Data data) {
|
||||
|
||||
@@ -5,10 +5,10 @@ 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 74e5fc8686042525dd79d773832ec0a88a135293..221efd21385edb6656b37f7fb672539e92790805 100644
|
||||
index f90defbc0d06b48bdfd6bdfa1a2bf4a6267a45d2..d42f4375952239ecc53a8fbca449120d8a1c52a6 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1371,6 +1371,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1289,6 +1289,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.awardStat(Stats.ENTITY_KILLED_BY.get(killCredit.getType()));
|
||||
killCredit.awardKillScore(this, cause);
|
||||
this.createWitherRose(killCredit);
|
||||
@@ -22,7 +22,7 @@ index 74e5fc8686042525dd79d773832ec0a88a135293..221efd21385edb6656b37f7fb672539e
|
||||
}
|
||||
|
||||
this.level().broadcastEntityEvent(this, (byte)3);
|
||||
@@ -1385,6 +1392,24 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1303,6 +1310,24 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.setClientLoaded(false);
|
||||
}
|
||||
|
||||
@@ -44,14 +44,14 @@ index 74e5fc8686042525dd79d773832ec0a88a135293..221efd21385edb6656b37f7fb672539e
|
||||
+ }
|
||||
+ // Luminol End - Cross Region Damage trace
|
||||
+
|
||||
// Leaves start - exp fix
|
||||
private boolean shouldDropExperience(boolean eventResult, boolean forceUseEvent) {
|
||||
if (forceUseEvent) {
|
||||
private void tellNeutralMobsThatIDied() {
|
||||
AABB aabb = new AABB(this.blockPosition()).inflate(32.0, 10.0, 32.0);
|
||||
this.level()
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 658aa09aecf8d64145feedb82dc9be2a55201450..ccb1541e5ea0acf7ec34084a041652e2139ee724 100644
|
||||
index 6102493315f1db2695478ecd7a346cc3f371ebe0..c1d53987991a0808733eac3b500d5d5a0f5d7ac2 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1181,6 +1181,29 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1190,6 +1190,29 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,21 +81,21 @@ index 658aa09aecf8d64145feedb82dc9be2a55201450..ccb1541e5ea0acf7ec34084a041652e2
|
||||
public boolean canBeAffected(MobEffectInstance effectInstance) {
|
||||
if (this.getType().is(EntityTypeTags.IMMUNE_TO_INFESTED)) {
|
||||
return !effectInstance.is(MobEffects.INFESTED);
|
||||
@@ -1831,6 +1854,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
final LivingEntity entityliving = this.getKillCredit();
|
||||
if (entityliving != null) {
|
||||
entityliving.awardKillScore(this, damageSource);
|
||||
@@ -1914,6 +1937,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
final LivingEntity killer = this.getKillCredit();
|
||||
if (killer != null) {
|
||||
killer.awardKillScore(this, damageSource);
|
||||
+ // Luminol Start - Cross Region Damage trace
|
||||
+ } else if (me.earthme.luminol.config.modules.experiment.EntityDamageSourceTraceConfig.enabled) {
|
||||
+ final LivingEntity entitylivingnew = this.getKillCreditOrigin();
|
||||
+ if (entitylivingnew != null) {
|
||||
+ this.damageTransferToAsync(entitylivingnew, damageSource);
|
||||
+ final LivingEntity killernew = this.getKillCreditOrigin();
|
||||
+ if (killernew != null) {
|
||||
+ this.damageTransferToAsync(killernew, damageSource);
|
||||
+ }
|
||||
+ // Luminol End - Cross Region Damage trace
|
||||
}
|
||||
}); // Paper end
|
||||
this.postDeathDropItems(deathEvent); // Paper
|
||||
@@ -1841,6 +1871,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1924,6 +1954,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return deathEvent; // Paper
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ index 658aa09aecf8d64145feedb82dc9be2a55201450..ccb1541e5ea0acf7ec34084a041652e2
|
||||
protected void dropEquipment(ServerLevel level) {
|
||||
}
|
||||
protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled
|
||||
@@ -2474,6 +2516,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2508,6 +2550,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,9 +122,9 @@ index 658aa09aecf8d64145feedb82dc9be2a55201450..ccb1541e5ea0acf7ec34084a041652e2
|
||||
+ @Nullable
|
||||
+ public LivingEntity getKillCreditOrigin() {
|
||||
+ if (this.lastHurtByPlayer != null) {
|
||||
+ return this.lastHurtByPlayer;
|
||||
+ return this.lastHurtByPlayer.getEntity(this.level(), Player.class);
|
||||
+ } else if (this.lastHurtByMob != null) {
|
||||
+ return this.lastHurtByMob;
|
||||
+ return this.lastHurtByMob.getEntity(this.level(), LivingEntity.class);
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
@@ -133,16 +133,22 @@ index 658aa09aecf8d64145feedb82dc9be2a55201450..ccb1541e5ea0acf7ec34084a041652e2
|
||||
public final float getMaxHealth() {
|
||||
return (float)this.getAttributeValue(Attributes.MAX_HEALTH);
|
||||
}
|
||||
diff --git a/net/minecraft/world/item/component/OminousBottleAmplifier.java b/net/minecraft/world/item/component/OminousBottleAmplifier.java
|
||||
index 5607d2f21131510563f8fdc9079d1145483b11df..f709880a8c1064298aa133617055e7aa5cc2be5e 100644
|
||||
--- a/net/minecraft/world/item/component/OminousBottleAmplifier.java
|
||||
+++ b/net/minecraft/world/item/component/OminousBottleAmplifier.java
|
||||
@@ -28,7 +28,7 @@ public record OminousBottleAmplifier(int value) implements ConsumableListener, T
|
||||
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
|
||||
index cb537b243b16876e7922cd732ab8dad8d046a450..c25f4b6bb3e11cc13d2de6f2d123d8c7d5a58649 100644
|
||||
--- a/net/minecraft/world/entity/raid/Raider.java
|
||||
+++ b/net/minecraft/world/entity/raid/Raider.java
|
||||
@@ -156,7 +156,13 @@ public abstract class Raider extends PatrollingMonster {
|
||||
net.minecraft.world.effect.MobEffectInstance mobeffect1 = new net.minecraft.world.effect.MobEffectInstance(net.minecraft.world.effect.MobEffects.BAD_OMEN, me.earthme.luminol.config.modules.misc.RaidChangesConfig.infinite ? net.minecraft.world.effect.MobEffectInstance.INFINITE_DURATION : 120000, i, false, false, true);
|
||||
|
||||
@Override
|
||||
public void onConsume(Level level, LivingEntity entity, ItemStack stack, Consumable consumable) {
|
||||
- entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, 120000, this.value, false, false, true)); // Paper - properly resend entities - diff on change for below
|
||||
+ entity.addEffect(new MobEffectInstance(MobEffects.BAD_OMEN, me.earthme.luminol.config.modules.misc.RaidChangesConfig.infinite ? net.minecraft.world.effect.MobEffectInstance.INFINITE_DURATION : 120000, this.value, false, false, true)); // Paper - properly resend entities - diff on change for below // Luminol - Raid effect infinite
|
||||
if (!serverLevel.getGameRules().getBoolean(net.minecraft.world.level.GameRules.RULE_DISABLE_RAIDS)) {
|
||||
- entityhuman.addEffect(mobeffect1, entityhuman, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN, true); // CraftBukkit
|
||||
+ if (me.earthme.luminol.config.modules.experiment.EntityDamageSourceTraceConfig.enabled) {
|
||||
+ // Luminol start - Raid changes adapt DamageSource trace
|
||||
+ entityhuman.addEffect(mobeffect1, entityhuman, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN, true, true);
|
||||
+ } else {
|
||||
+ entityhuman.addEffect(mobeffect1, entityhuman, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN, true); // CraftBukkit
|
||||
+ }
|
||||
+ // Luminol end - Raid changes adapt DamageSource trace
|
||||
}
|
||||
this.setPatrolLeader(false);
|
||||
}
|
||||
|
||||
// Paper start - properly resend entities - collect packets for bundle
|
||||
@@ -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 7eff847790394aecd058e7a61905da86163b4c6e..9099457f55a2829297ac1db8a69a98ff717d9a86 100644
|
||||
index d0c03dc51c8ad4997963b244ada855827a4c4065..99a8b9a8ee2032107be03bbc13d0275a337faf7b 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1208,7 +1208,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1278,7 +1278,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
double d1 = vec3_dx * vec3_dx + vec3_dz * vec3_dz; // Paper
|
||||
double d2 = d * d;
|
||||
// Paper start - Configurable entity tracking range by Y
|
||||
@@ -18,22 +18,24 @@ index 7eff847790394aecd058e7a61905da86163b4c6e..9099457f55a2829297ac1db8a69a98ff
|
||||
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 97879ba5080db09dde7cd76fe7b0ba502d8df572..002466add86b36529bff6787332b575d1f12305b 100644
|
||||
index b5838a0320c729778f27f0d6a623eed4ef7c3a52..e9ea86d77395975afbe189993ee0dbbd066c3536 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -135,7 +135,7 @@ import net.minecraft.world.scores.ScoreHolder;
|
||||
@@ -140,7 +140,7 @@ import net.minecraft.world.scores.ScoreHolder;
|
||||
import net.minecraft.world.scores.Team;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
-public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker
|
||||
+public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity, dev.tr7zw.entityculling.versionless.access.Cullable { // Paper - rewrite chunk system // Paper - optimise entity tracker // Luminol - Ray tracing entity tracker
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
-public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker
|
||||
+public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder, DataComponentGetter, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity, dev.tr7zw.entityculling.versionless.access.Cullable { // Paper - rewrite chunk system // Paper - optimise entity tracker // Luminol - Ray tracing entity tracker
|
||||
// CraftBukkit start
|
||||
private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger();
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -6086,4 +6086,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5957,4 +5957,48 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
|
||||
public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
||||
+
|
||||
+ public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
||||
+
|
||||
+ private long lasttime = 0;
|
||||
+ private boolean culled = false;
|
||||
@@ -78,10 +80,10 @@ index 97879ba5080db09dde7cd76fe7b0ba502d8df572..002466add86b36529bff6787332b575d
|
||||
+
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
|
||||
index d9cc1d7e56c37d5ce92544edc10e89dbc89dd15d..39e7689be243b9c99b507d665f6591359115287b 100644
|
||||
index 6b72ab233508e6df1eca34360ce76d102ee25a41..f39ee4605cc15102d6560afd1dad5f56dd53cf4e 100644
|
||||
--- a/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/net/minecraft/world/entity/EntityType.java
|
||||
@@ -1097,6 +1097,9 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -1109,6 +1109,9 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
public final int passengerTickTimerId;
|
||||
public final int passengerInactiveTickTimerId;
|
||||
// Folia end - profiler
|
||||
@@ -92,10 +94,10 @@ index d9cc1d7e56c37d5ce92544edc10e89dbc89dd15d..39e7689be243b9c99b507d665f659135
|
||||
public EntityType(
|
||||
EntityType.EntityFactory<T> factory,
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index c6252a245e9701f69db1fe167f6590095237553a..40b91234fd2e4f4f134d309590ea6b605f764e83 100644
|
||||
index aed525af488eb839d31d6bec0673b7e128ca4068..5af32286092222f09ad2b54dd2fa6bd9ad3a8f40 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -211,6 +211,25 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -220,6 +220,25 @@ public abstract class Player extends LivingEntity {
|
||||
return (org.bukkit.craftbukkit.entity.CraftHumanEntity) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -121,7 +123,7 @@ index c6252a245e9701f69db1fe167f6590095237553a..40b91234fd2e4f4f134d309590ea6b60
|
||||
|
||||
public Player(Level level, BlockPos pos, float yRot, GameProfile gameProfile) {
|
||||
super(EntityType.PLAYER, level);
|
||||
@@ -263,6 +282,26 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -277,6 +296,26 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@@ -148,11 +150,11 @@ index c6252a245e9701f69db1fe167f6590095237553a..40b91234fd2e4f4f134d309590ea6b60
|
||||
this.noPhysics = this.isSpectator();
|
||||
if (this.isSpectator() || this.isPassenger()) {
|
||||
this.setOnGround(false);
|
||||
@@ -1505,6 +1544,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1415,6 +1454,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (this.containerMenu != null && this.hasContainerOpen()) {
|
||||
this.doCloseContainer();
|
||||
}
|
||||
+ if (this.cullTask != null) this.cullTask.signalStop(); // Luminol - Ray tracing entity tracker
|
||||
}
|
||||
|
||||
// Folia start - region threading
|
||||
@Override
|
||||
@@ -22,7 +22,7 @@ index a814512fcfb85312474ae2c2c21443843bf57831..2e084a5b28cbe4737f48c25e10af5892
|
||||
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 98fbc5c8044bd945d64569f13412a6e7e49a4e7f..9709d60d3b2a5478cd6c711669e32f28ac105667 100644
|
||||
index 709df35246fb328cda21679b53d44d9f96206cb3..a26e1dbce1b34aba6f88c1c61ebd168dcb4206bd 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java
|
||||
@@ -1260,7 +1260,7 @@ public final class MoonriseRegionFileIO {
|
||||
@@ -55,10 +55,10 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..c7d4d944eb198ac53a3eeae717a25c7d
|
||||
+ public void moonrise$write(final abomination.IRegionFile regionFile) throws IOException; // Luminol - Configurable region file format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 2f0a1810e3ab4ff4376e893af7ceb2bf5849ba76..27782d1096dc4c9c82c02c29e9b17e2bf8d3f4d3 100644
|
||||
index a90ac07eaea956cb7c50b66a27dd47c955f98feb..ecf185fce582a542c65a9544388b84835643978b 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -986,10 +986,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -978,10 +978,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
if (flush) {
|
||||
for (ServerLevel serverLevel2 : this.getAllLevels()) {
|
||||
@@ -72,10 +72,10 @@ index 2f0a1810e3ab4ff4376e893af7ceb2bf5849ba76..27782d1096dc4c9c82c02c29e9b17e2b
|
||||
|
||||
return flag;
|
||||
diff --git a/net/minecraft/util/worldupdate/WorldUpgrader.java b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..57ed3f61b265fc5c231ef0f2b7c4d33b4f3f6cba 100644
|
||||
index 559bd4eef7174b04f5aa71b982ba34cbace8da8a..8284320bf596f4b06e1dadbfac4b7ac97361ff7f 100644
|
||||
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
@@ -72,7 +72,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -75,7 +75,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
volatile int skipped;
|
||||
final Reference2FloatMap<ResourceKey<Level>> progressMap = Reference2FloatMaps.synchronize(new Reference2FloatOpenHashMap<>());
|
||||
volatile Component status = Component.translatable("optimizeWorld.stage.counting");
|
||||
@@ -84,7 +84,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..57ed3f61b265fc5c231ef0f2b7c4d33b
|
||||
final DimensionDataStorage overworldDataStorage;
|
||||
|
||||
public WorldUpgrader(
|
||||
@@ -261,7 +261,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -272,7 +272,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
}
|
||||
|
||||
private static List<WorldUpgrader.FileToUpgrade> getAllChunkPositions(RegionStorageInfo regionStorageInfo, Path path) {
|
||||
@@ -93,7 +93,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..57ed3f61b265fc5c231ef0f2b7c4d33b
|
||||
if (files == null) {
|
||||
return List.of();
|
||||
} else {
|
||||
@@ -274,7 +274,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -285,7 +285,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
int i1 = Integer.parseInt(matcher.group(2)) << 5;
|
||||
List<ChunkPos> list1 = Lists.newArrayList();
|
||||
|
||||
@@ -102,7 +102,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..57ed3f61b265fc5c231ef0f2b7c4d33b
|
||||
for (int i2 = 0; i2 < 32; i2++) {
|
||||
for (int i3 = 0; i3 < 32; i3++) {
|
||||
ChunkPos chunkPos = new ChunkPos(i2 + i, i3 + i1);
|
||||
@@ -322,7 +322,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -333,7 +333,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
|
||||
protected abstract boolean tryProcessOnePosition(T chunkStorage, ChunkPos chunkPos, ResourceKey<Level> dimension);
|
||||
|
||||
@@ -111,7 +111,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..57ed3f61b265fc5c231ef0f2b7c4d33b
|
||||
if (WorldUpgrader.this.recreateRegionFiles) {
|
||||
if (this.previousWriteFuture != null) {
|
||||
this.previousWriteFuture.join();
|
||||
@@ -424,7 +424,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
@@ -438,7 +438,7 @@ public class WorldUpgrader implements AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ index e0bcda2ddea0d6633445a7440fbf0d18e50a7653..57ed3f61b265fc5c231ef0f2b7c4d33b
|
||||
|
||||
class PoiUpgrader extends WorldUpgrader.SimpleRegionStorageUpgrader {
|
||||
diff --git a/net/minecraft/world/level/chunk/storage/RegionFile.java b/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 0c41177462cca5c4bbab6490e323b9535fd6300f..39b3c3ca7248fe60833f04aee89c8851b21d5008 100644
|
||||
index 22f3aa1674664906e8ec45372d758d79017e3987..76f1b5bb94b82044d72658d4b187dd020d4c9012 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.util.profiling.jfr.JvmProfiler;
|
||||
@@ -133,16 +133,16 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..39b3c3ca7248fe60833f04aee89c8851
|
||||
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;
|
||||
@@ -124,7 +124,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -130,7 +130,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
return this.recalculateCount.get();
|
||||
}
|
||||
|
||||
// note: only call for CHUNK regionfiles
|
||||
- boolean recalculateHeader() throws IOException {
|
||||
+ public boolean recalculateHeader() throws IOException { // Luminol - Configurable region file format // Luminol - Configurable region file format
|
||||
if (!this.canRecalcHeader) {
|
||||
return false;
|
||||
}
|
||||
@@ -786,7 +786,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -794,7 +794,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..39b3c3ca7248fe60833f04aee89c8851
|
||||
int offsetIndex = getOffsetIndex(chunkPos);
|
||||
int i = this.offsets.get(offsetIndex);
|
||||
int sectorNumber = getSectorNumber(i);
|
||||
@@ -904,7 +904,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -912,7 +912,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,7 +160,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..39b3c3ca7248fe60833f04aee89c8851
|
||||
regionFile.write(this.pos, ByteBuffer.wrap(this.buf, 0, this.count));
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -970,11 +970,11 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -978,11 +978,11 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
return (x & 31) + (z & 31) * 32;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..39b3c3ca7248fe60833f04aee89c8851
|
||||
final int offset = getChunkIndex(x, z);
|
||||
boolean previous = this.oversized[offset] == 1;
|
||||
this.oversized[offset] = (byte) (oversized ? 1 : 0);
|
||||
@@ -1013,7 +1013,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
@@ -1021,7 +1021,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche
|
||||
return this.path.getParent().resolve(this.path.getFileName().toString().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt");
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ index 0c41177462cca5c4bbab6490e323b9535fd6300f..39b3c3ca7248fe60833f04aee89c8851
|
||||
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 dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805e125be60 100644
|
||||
index 384f2cd090d6d23bd1308d6e82c24338f2bf55d1..a81245aff4cc982b9eaca976ebbb54a8188b247b 100644
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -18,7 +18,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -289,7 +289,16 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
|
||||
final DataInputStream input = regionFile == null ? null : regionFile.getChunkDataInputStream(new ChunkPos(chunkX, chunkZ));
|
||||
|
||||
@@ -237,7 +256,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -238,7 +257,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
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
|
||||
|
||||
if (regionFile.getRecalculateCount() != readData.recalculateCount()) {
|
||||
return null;
|
||||
@@ -262,7 +281,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
// Paper start - rewrite chunk system
|
||||
@@ -298,7 +307,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
return this.getRegionFile(chunkcoordintpair, false);
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
@@ -249,7 +268,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -274,7 +293,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
this.isChunkData = isChunkDataFolder(this.folder); // Paper - recalculate region file headers
|
||||
}
|
||||
|
||||
@@ -307,7 +316,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
// Paper start - rewrite chunk system
|
||||
if (existingOnly) {
|
||||
return this.moonrise$getRegionFileIfExists(chunkPos.x, chunkPos.z);
|
||||
@@ -257,7 +276,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -282,7 +301,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
synchronized (this) {
|
||||
final long key = ChunkPos.asLong(chunkPos.x >> REGION_SHIFT, chunkPos.z >> REGION_SHIFT);
|
||||
|
||||
@@ -316,7 +325,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
if (ret != null) {
|
||||
return ret;
|
||||
}
|
||||
@@ -272,7 +291,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -297,7 +316,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
FileUtil.createDirectoriesSafe(this.folder);
|
||||
|
||||
@@ -325,7 +334,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
|
||||
this.regionCache.putAndMoveToFirst(key, ret);
|
||||
|
||||
@@ -286,7 +305,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -311,7 +330,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.");
|
||||
}
|
||||
|
||||
@@ -334,7 +343,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
synchronized (regionfile) {
|
||||
try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) {
|
||||
CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x, chunkCoordinate.z);
|
||||
@@ -321,7 +340,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -346,7 +365,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@Nullable
|
||||
public CompoundTag read(ChunkPos chunkPos) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
@@ -343,7 +352,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
if (regionFile == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -360,7 +379,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -385,7 +404,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
|
||||
public void scanChunk(ChunkPos chunkPos, StreamTagVisitor visitor) throws IOException {
|
||||
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
|
||||
@@ -352,7 +361,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
if (regionFile == null) {
|
||||
return;
|
||||
}
|
||||
@@ -374,7 +393,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -399,7 +418,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
}
|
||||
|
||||
public void write(ChunkPos chunkPos, @Nullable CompoundTag chunkData) throws IOException { // Paper - rewrite chunk system - public
|
||||
@@ -361,7 +370,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
// Paper start - rewrite chunk system
|
||||
if (regionFile == null) {
|
||||
// if the RegionFile doesn't exist, no point in deleting from it
|
||||
@@ -404,7 +423,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -429,7 +448,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
// Paper start - rewrite chunk system
|
||||
synchronized (this) {
|
||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||
@@ -370,7 +379,7 @@ index dad7f94b611cf0fc68b1a3878c458233f6bb6d61..437fff55b565e469f6a4e41288b6f805
|
||||
try {
|
||||
regionFile.close();
|
||||
} catch (final IOException ex) {
|
||||
@@ -420,7 +439,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
@@ -445,7 +464,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise
|
||||
// Paper start - rewrite chunk system
|
||||
synchronized (this) {
|
||||
final ExceptionCollector<IOException> exceptionCollector = new ExceptionCollector<>();
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add fix for off region adult following ai behavior
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java b/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java
|
||||
index a9be3acbf4ea52d2988347abfa6f4f8c02b1da26..751f3dde8e6bc2c0365e8672f5079af0379a69de 100644
|
||||
index a9be3acbf4ea52d2988347abfa6f4f8c02b1da26..7ddf9fae8e50bbda2502c6b584fac135fac21773 100644
|
||||
--- a/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java
|
||||
@@ -25,6 +25,14 @@ public class BabyFollowAdult {
|
||||
@@ -23,3 +23,16 @@ index a9be3acbf4ea52d2988347abfa6f4f8c02b1da26..751f3dde8e6bc2c0365e8672f5079af0
|
||||
if (mob.closerThan(ageableMob, followRange.getMaxValue() + 1) && !mob.closerThan(ageableMob, followRange.getMinValue())) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.EntityTargetLivingEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetLivingEvent(mob, ageableMob, org.bukkit.event.entity.EntityTargetEvent.TargetReason.FOLLOW_LEADER);
|
||||
@@ -35,6 +43,12 @@ public class BabyFollowAdult {
|
||||
nearestVisibleAdult.erase();
|
||||
return true;
|
||||
}
|
||||
+ // Luminol start - Fix off region baby follow adult ai
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(((org.bukkit.craftbukkit.entity.CraftEntity)event.getTarget()).getHandleRaw())) {
|
||||
+ nearestVisibleAdult.erase();
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Luminol end
|
||||
ageableMob = ((org.bukkit.craftbukkit.entity.CraftLivingEntity) event.getTarget()).getHandle();
|
||||
// CraftBukkit end
|
||||
WalkTarget walkTarget1 = new WalkTarget(
|
||||
@@ -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 779dfa95d91ec4661227c94b012cb63953d4ba96..8f7b28e5688252207ad8ce9f3fb6f9c3b65d1adc 100644
|
||||
index fca716bf52e114b196c7617f352e9394c7185271..5a275b9ac7e706012ae5d8a12ee8a3f00f129f93 100644
|
||||
--- a/net/minecraft/commands/Commands.java
|
||||
+++ b/net/minecraft/commands/Commands.java
|
||||
@@ -162,7 +162,9 @@ public class Commands {
|
||||
@@ -5,31 +5,33 @@ Subject: [PATCH] Add tpsbar with chunkhot membar and regionbar
|
||||
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/paper/util/BaseChunkSystemHooks.java b/ca/spottedleaf/moonrise/paper/util/BaseChunkSystemHooks.java
|
||||
index 8d67b4629c69d3039b199aaad45533d1acde114e..f7bfeca4b11b9860241d5eb80b6df420868c7bea 100644
|
||||
index bd3ce123652af11974be4cbf8d2e96f1b2ee0a68..5f26fd89704aa3fd9c37a1d68a7c4c65ce1e7a5d 100644
|
||||
--- a/ca/spottedleaf/moonrise/paper/util/BaseChunkSystemHooks.java
|
||||
+++ b/ca/spottedleaf/moonrise/paper/util/BaseChunkSystemHooks.java
|
||||
@@ -136,6 +136,7 @@ public abstract class BaseChunkSystemHooks implements ca.spottedleaf.moonrise.co
|
||||
@@ -131,6 +131,7 @@ public abstract class BaseChunkSystemHooks implements ca.spottedleaf.moonrise.co
|
||||
|
||||
@Override
|
||||
public void onChunkNotTicking(final LevelChunk chunk, final ChunkHolder holder) {
|
||||
+ chunk.getChunkHot().clear(); // KioCG
|
||||
chunk.getLevel().getCurrentWorldData().removeTickingChunk(chunk.moonrise$getChunkAndHolder()); // Folia - region threading
|
||||
((ca.spottedleaf.moonrise.patches.chunk_tick_iteration.ChunkTickServerLevel)(ServerLevel)chunk.getLevel()).moonrise$removeChunkForPlayerTicking(chunk); // Moonrise - chunk tick iteration
|
||||
chunk.getLevel().getCurrentWorldData().removeTickingChunk(chunk); // Folia - region threading
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 27782d1096dc4c9c82c02c29e9b17e2bf8d3f4d3..56f5568848d0f20b4d706c07dc8114594e0b5337 100644
|
||||
index ecf185fce582a542c65a9544388b84835643978b..12062e37c0e832f27ba52844739d0e8d5519a30a 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1665,7 +1665,44 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1663,7 +1663,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Folia end - region threading
|
||||
//this.tickCount++; // Folia - region threading
|
||||
//this.tickRateManager.tick(); // Folia - region threading
|
||||
+ // KioCG start - ChunkHot
|
||||
+ final ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<net.minecraft.world.level.chunk.LevelChunk> chunks = new ca.spottedleaf.moonrise.common.list.IteratorSafeOrderedReferenceSet<>();
|
||||
+ if (region != null){
|
||||
+ for (net.minecraft.world.level.chunk.LevelChunk chunk : region.world.getCurrentWorldData().getTickingChunks()) {
|
||||
+ /* wait for rewrite - temporarily crash fix
|
||||
+ for (net.minecraft.server.level.ServerChunkCache.ChunkAndHolder chunkAndHolder : region.world.getCurrentWorldData().getTickingChunks()){
|
||||
+ final net.minecraft.world.level.chunk.LevelChunk chunk = chunkAndHolder.chunk();
|
||||
+
|
||||
+ */
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(region.world, chunk.locX, chunk.locZ)){
|
||||
+ continue;
|
||||
+ }
|
||||
@@ -66,10 +68,10 @@ index 27782d1096dc4c9c82c02c29e9b17e2bf8d3f4d3..56f5568848d0f20b4d706c07dc811459
|
||||
this.lastServerStatus = nanos;
|
||||
this.status = this.buildServerStatus();
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index f4b738b05ec9488e20402efb6c935ff55d86adf2..a0a8b0c7d091f63f023f15a2620b03ae2126782e 100644
|
||||
index e76599e92e4bf4f5b5d7176f4a0a2a854d10818a..20df6b46c420b25b598accb57b921055fb0c988b 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -766,6 +766,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -724,6 +724,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public void stopServer() {
|
||||
@@ -80,10 +82,10 @@ index f4b738b05ec9488e20402efb6c935ff55d86adf2..a0a8b0c7d091f63f023f15a2620b03ae
|
||||
//Util.shutdownExecutors(); // Paper - Improved watchdog support; moved into super
|
||||
SkullBlockEntity.clear();
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index f884c707d4c1f36801018e15efb9adf91f5d6b33..210eba85ac1a50d993ef6e19b65b9f8afada00ba 100644
|
||||
index 94fb1c99baefbdde91dc5fcf103683c7ffda6baf..b4fdbdba579fa7c7de4928c259b5ff16b0e83aeb 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1339,6 +1339,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1342,6 +1342,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
final int timerId = isActive ? entity.getType().tickTimerId : entity.getType().inactiveTickTimerId;
|
||||
final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle profiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler();
|
||||
profiler.startTimer(timerId);
|
||||
@@ -92,7 +94,7 @@ index f884c707d4c1f36801018e15efb9adf91f5d6b33..210eba85ac1a50d993ef6e19b65b9f8a
|
||||
try {
|
||||
// Folia end - profiler
|
||||
if (isActive) { // Paper - EAR 2
|
||||
@@ -1356,6 +1358,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1359,6 +1361,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
} else {entity.inactiveTick();} // Paper - EAR 2
|
||||
profilerFiller.pop();
|
||||
} finally { profiler.stopTimer(timerId); } // Folia - profiler
|
||||
@@ -100,7 +102,7 @@ index f884c707d4c1f36801018e15efb9adf91f5d6b33..210eba85ac1a50d993ef6e19b65b9f8a
|
||||
|
||||
for (Entity entity1 : entity.getPassengers()) {
|
||||
this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2
|
||||
@@ -1375,6 +1378,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1378,6 +1381,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
final int timerId = isActive ? passengerEntity.getType().tickTimerId : passengerEntity.getType().inactiveTickTimerId;
|
||||
final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle profiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler();
|
||||
profiler.startTimer(timerId);
|
||||
@@ -109,7 +111,7 @@ index f884c707d4c1f36801018e15efb9adf91f5d6b33..210eba85ac1a50d993ef6e19b65b9f8a
|
||||
try {
|
||||
// Folia end - profiler
|
||||
passengerEntity.setOldPosAndRot();
|
||||
@@ -1409,6 +1414,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1412,6 +1417,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
this.tickPassenger(passengerEntity, entity, isActive); // Paper - EAR 2
|
||||
}
|
||||
} finally { profiler.stopTimer(timerId); } // Folia - profiler
|
||||
@@ -118,13 +120,13 @@ index f884c707d4c1f36801018e15efb9adf91f5d6b33..210eba85ac1a50d993ef6e19b65b9f8a
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 8a192bb24abca6d2ea90d70e12f14733658ed27b..6e3e872ba415e8e809cfbe5a4dc1441b39c45480 100644
|
||||
index 111f2f05d0ad3f290dab97f231caf8516821e030..047279cce3ff3a9eedd54db370b8fa6754d85ee4 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -393,7 +393,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
@@ -420,7 +420,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
public @Nullable com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
|
||||
public @Nullable String clientBrandName = null; // Paper - Brand support
|
||||
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
|
||||
public @Nullable org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
|
||||
-
|
||||
+ public volatile boolean isTpsBarVisible = false; //Luminol - Tps bar
|
||||
+ public volatile boolean isMemBarVisible = false; //Luminol - Memory bar
|
||||
@@ -132,10 +134,10 @@ index 8a192bb24abca6d2ea90d70e12f14733658ed27b..6e3e872ba415e8e809cfbe5a4dc1441b
|
||||
// Paper start - rewrite chunk system
|
||||
private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader;
|
||||
private final ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder viewDistanceHolder = new ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.ViewDistanceHolder();
|
||||
@@ -1006,8 +1008,35 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -957,8 +959,35 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.trackEnteredOrExitedLavaOnVehicle();
|
||||
this.updatePlayerAttributes();
|
||||
this.advancements.flushDirty(this);
|
||||
this.advancements.flushDirty(this, true);
|
||||
+
|
||||
+ // KioCG start - ChunkHot
|
||||
+ if (this.tickCount % 20 == 0){
|
||||
@@ -169,12 +171,12 @@ index 8a192bb24abca6d2ea90d70e12f14733658ed27b..6e3e872ba415e8e809cfbe5a4dc1441b
|
||||
AttributeInstance attribute = this.getAttribute(Attributes.BLOCK_INTERACTION_RANGE);
|
||||
if (attribute != null) {
|
||||
diff --git a/net/minecraft/world/entity/AreaEffectCloud.java b/net/minecraft/world/entity/AreaEffectCloud.java
|
||||
index 23b342cc31c7e72ade0e1ccad86a9ccf34380f13..249cb7326c8e4012dcffdb6bbb7bfc1f1eeb7b33 100644
|
||||
index bfd904e468bbf2cc1a5b3353d3a69ad5087c81ae..116933975ac975bb5a801be81e1c0e9bd641f162 100644
|
||||
--- a/net/minecraft/world/entity/AreaEffectCloud.java
|
||||
+++ b/net/minecraft/world/entity/AreaEffectCloud.java
|
||||
@@ -415,4 +415,11 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
|
||||
public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount) {
|
||||
return false;
|
||||
@@ -436,4 +436,11 @@ public class AreaEffectCloud extends Entity implements TraceableEntity {
|
||||
return super.applyImplicitComponent(component, value);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // KioCG start
|
||||
@@ -185,18 +187,17 @@ index 23b342cc31c7e72ade0e1ccad86a9ccf34380f13..249cb7326c8e4012dcffdb6bbb7bfc1f
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index f69fd922fa67cd366dbb93c34fa15659ba76c844..cc8efa162fbe7ce6a91629239bf18d7b6b096a8a 100644
|
||||
index e9ea86d77395975afbe189993ee0dbbd066c3536..0228471a16805042f13158b86379a77371600489 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -5919,4 +5919,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return ((ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
|
||||
@@ -6000,5 +6000,4 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return false;
|
||||
return this.outOfCamera;
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
+
|
||||
+ public boolean shouldTickHot() { return this.tickCount > 20 * 10 && this.isAlive(); } // KioCG
|
||||
-
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/LightningBolt.java b/net/minecraft/world/entity/LightningBolt.java
|
||||
index f003a65b34027dff14455860815c7d719c5289fa..6f9f8e52d2311343a0c0c3900a466c6a84f7de73 100644
|
||||
index c1c63c77598786d86b4aa4475cc4d36e60955085..27dd86d1d94959cbe8376ee714e3306732151105 100644
|
||||
--- a/net/minecraft/world/entity/LightningBolt.java
|
||||
+++ b/net/minecraft/world/entity/LightningBolt.java
|
||||
@@ -287,4 +287,11 @@ public class LightningBolt extends Entity {
|
||||
@@ -212,12 +213,12 @@ index f003a65b34027dff14455860815c7d719c5289fa..6f9f8e52d2311343a0c0c3900a466c6a
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index da922d4c0ffa0f40d5e8dd69487bf30dbbbeed87..94a7b95f41c2954561f9c3cb0f61210c0c058f1d 100644
|
||||
index a96318e5684d61b2bee998531695b0fe12e9deac..34738e880e6ef30730fc72d7b0fb89c53783be17 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -1722,4 +1722,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
public float[] getArmorDropChances() {
|
||||
return this.armorDropChances;
|
||||
@@ -1592,4 +1592,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
this.getNavigation().updatePathfinderMaxVisitedNodes();
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // KioCG start
|
||||
@@ -228,10 +229,10 @@ index da922d4c0ffa0f40d5e8dd69487bf30dbbbeed87..94a7b95f41c2954561f9c3cb0f61210c
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/animal/horse/TraderLlama.java b/net/minecraft/world/entity/animal/horse/TraderLlama.java
|
||||
index c5b11a63bb2ab660efcc386ad9b4697e2a5efc97..f139822cb3e90b9d5fac6971e2ef1a8569d9849b 100644
|
||||
index 38a5554d6e28ab73c225625531c94592a46d50a8..149fe0c4c2df7cd6925308f6bca5772050594cf3 100644
|
||||
--- a/net/minecraft/world/entity/animal/horse/TraderLlama.java
|
||||
+++ b/net/minecraft/world/entity/animal/horse/TraderLlama.java
|
||||
@@ -157,4 +157,11 @@ public class TraderLlama extends Llama {
|
||||
@@ -156,4 +156,11 @@ public class TraderLlama extends Llama {
|
||||
super.start();
|
||||
}
|
||||
}
|
||||
@@ -244,10 +245,10 @@ index c5b11a63bb2ab660efcc386ad9b4697e2a5efc97..f139822cb3e90b9d5fac6971e2ef1a85
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/npc/WanderingTrader.java b/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 6655d06e2011e20e7346dfe57527795269094d8a..48aa6fcb5c16fdbb4ae902cbb72c6b8e02820c88 100644
|
||||
index 70cc20483905d3877e2ffb51afb4902bd59f0cd0..fff3965d892e20a3ad9c84fad2c2df2ffe931fe2 100644
|
||||
--- a/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -320,4 +320,11 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
@@ -277,4 +277,11 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
return !pos.closerToCenterThan(this.trader.position(), distance);
|
||||
}
|
||||
}
|
||||
@@ -260,10 +261,10 @@ index 6655d06e2011e20e7346dfe57527795269094d8a..48aa6fcb5c16fdbb4ae902cbb72c6b8e
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index e70919757dee4b02384ded3551c8f580d289584a..ae049c5c3593525b991d865fec695c00ad408a59 100644
|
||||
index 5af32286092222f09ad2b54dd2fa6bd9ad3a8f40..0d774fd4be1cdcf03e76db8b17309bbf01bafc55 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1546,6 +1546,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1521,6 +1521,13 @@ public abstract class Player extends LivingEntity {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -278,10 +279,10 @@ index e70919757dee4b02384ded3551c8f580d289584a..ae049c5c3593525b991d865fec695c00
|
||||
// CraftBukkit start
|
||||
return this.startSleepInBed(bedPos, false);
|
||||
diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index abfe6765faec49d4b8897608582d738c7b09522d..6e1de9252ac1236e0c5196e2511c72c0d7eb3502 100644
|
||||
index 487e550d6d1f44597cfe14c4aaeb3713e3d916b7..7308dab3248b3319cee6fd0dabfe8e4b7c2628cf 100644
|
||||
--- a/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -516,4 +516,11 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -527,4 +527,11 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
public interface ProjectileFactory<T extends Projectile> {
|
||||
T create(ServerLevel level, LivingEntity owner, ItemStack spawnedFrom);
|
||||
}
|
||||
@@ -294,18 +295,18 @@ index abfe6765faec49d4b8897608582d738c7b09522d..6e1de9252ac1236e0c5196e2511c72c0
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 78211c68bf52c0cd402fee7bcdde223130d49b5c..83b0e91165024697f6b7d41d43142b2b33641968 100644
|
||||
index 23ccd2bc86e643eb3e79195d20c1182d3ad7ead6..569c13814e99f884048742226c2871fabf1e9790 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -103,6 +103,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -104,6 +104,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
// Paper start - rewrite chunk system
|
||||
private boolean postProcessingDone;
|
||||
private net.minecraft.server.level.ServerChunkCache.ChunkAndHolder chunkAndHolder;
|
||||
private ca.spottedleaf.moonrise.patches.chunk_system.scheduling.NewChunkHolder chunkAndHolder;
|
||||
+ private final com.kiocg.ChunkHot chunkHot = new com.kiocg.ChunkHot(); public com.kiocg.ChunkHot getChunkHot() { return this.chunkHot; } // KioCG
|
||||
|
||||
@Override
|
||||
public final boolean moonrise$isPostProcessingDone() {
|
||||
@@ -926,6 +927,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -930,6 +931,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
try {
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
profilerFiller.push(this::getType);
|
||||
@@ -313,7 +314,7 @@ index 78211c68bf52c0cd402fee7bcdde223130d49b5c..83b0e91165024697f6b7d41d43142b2b
|
||||
profiler.startTimer(timerId); try { // Folia - profiler
|
||||
BlockState blockState = LevelChunk.this.getBlockState(blockPos);
|
||||
if (this.blockEntity.getType().isValid(blockState)) {
|
||||
@@ -940,7 +942,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -944,7 +946,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
}
|
||||
// Paper end - Remove the Block Entity if it's invalid
|
||||
}
|
||||
@@ -323,11 +324,11 @@ index 78211c68bf52c0cd402fee7bcdde223130d49b5c..83b0e91165024697f6b7d41d43142b2b
|
||||
profilerFiller.pop();
|
||||
} catch (Throwable var5) {
|
||||
diff --git a/net/minecraft/world/level/redstone/NeighborUpdater.java b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
index 26c15c60d358273a3b369c286771c81d6f0979dd..715580a893ba9dd34ee562b81350b81f9da3f905 100644
|
||||
index 332b33a004ab11150cca0cc2cefc26d0286648f5..714e291b17856aacdac7db992fc18e6ae662f659 100644
|
||||
--- a/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
+++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
|
||||
@@ -60,7 +60,10 @@ public interface NeighborUpdater {
|
||||
}
|
||||
@@ -57,7 +57,10 @@ public interface NeighborUpdater {
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ net.minecraft.world.level.chunk.LevelChunk levelChunk = level.getChunkIfLoaded(pos); // KioCG
|
||||
@@ -336,4 +337,4 @@ index 26c15c60d358273a3b369c286771c81d6f0979dd..715580a893ba9dd34ee562b81350b81f
|
||||
+ } finally { if (levelChunk != null) levelChunk.getChunkHot().stopTickingAndCount(); } // KioCG
|
||||
// Spigot start
|
||||
} catch (StackOverflowError ex) {
|
||||
level.lastPhysicsProblem = new BlockPos(pos);
|
||||
level.lastPhysicsProblem = pos.immutable();
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add missing teleportation apis for folia
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index b5d0eb5026067080a376b9c3f902dcdf40d5dc48..62634b5c29a3333fd8f39927f4d0a3258835c891 100644
|
||||
index 047279cce3ff3a9eedd54db370b8fa6754d85ee4..bcc0c3cfa5be4daeec6e95a1b63a6cd38890f04d 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1666,6 +1666,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1631,6 +1631,9 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
if (respawnComplete != null) {
|
||||
respawnComplete.accept(ServerPlayer.this);
|
||||
}
|
||||
@@ -19,10 +19,10 @@ index b5d0eb5026067080a376b9c3f902dcdf40d5dc48..62634b5c29a3333fd8f39927f4d0a325
|
||||
);
|
||||
});
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 18e6e9fe39a559ae043fdafcf4e4db467144e309..2ea6160492cb23e96271dfbfd3bd35fe03109d6a 100644
|
||||
index 0228471a16805042f13158b86379a77371600489..9d945f615187f86913be8a9b83b1aada3a1336b6 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4175,6 +4175,31 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4108,6 +4108,31 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
// TODO any events that can modify go HERE
|
||||
@@ -54,7 +54,7 @@ index 18e6e9fe39a559ae043fdafcf4e4db467144e309..2ea6160492cb23e96271dfbfd3bd35fe
|
||||
|
||||
// check for same region
|
||||
if (destination == this.level()) {
|
||||
@@ -4292,7 +4317,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4224,7 +4249,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// we just select the spawn position
|
||||
case END: {
|
||||
if (destination.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.END) {
|
||||
@@ -74,7 +74,7 @@ index 18e6e9fe39a559ae043fdafcf4e4db467144e309..2ea6160492cb23e96271dfbfd3bd35fe
|
||||
// need to load chunks so we can create the platform
|
||||
destination.moonrise$loadChunksAsync(
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
@@ -4317,7 +4353,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4245,7 +4281,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@@ -94,7 +94,7 @@ index 18e6e9fe39a559ae043fdafcf4e4db467144e309..2ea6160492cb23e96271dfbfd3bd35fe
|
||||
// need to load chunk for heightmap
|
||||
destination.moonrise$loadChunksAsync(
|
||||
spawnPos, 0,
|
||||
@@ -4372,8 +4419,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4296,8 +4343,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
WorldBorder destinationBorder = destination.getWorldBorder();
|
||||
double dimensionScale = net.minecraft.world.level.dimension.DimensionType.getTeleportationScale(origin.dimensionType(), destination.dimensionType());
|
||||
@@ -114,7 +114,7 @@ index 18e6e9fe39a559ae043fdafcf4e4db467144e309..2ea6160492cb23e96271dfbfd3bd35fe
|
||||
ca.spottedleaf.concurrentutil.completable.CallbackCompletable<BlockUtil.FoundRectangle> portalFound
|
||||
= new ca.spottedleaf.concurrentutil.completable.CallbackCompletable<>();
|
||||
|
||||
@@ -4510,9 +4567,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4434,6 +4491,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.canPortalAsync(destination, takePassengers)) {
|
||||
return false;
|
||||
}
|
||||
@@ -127,28 +127,22 @@ index 18e6e9fe39a559ae043fdafcf4e4db467144e309..2ea6160492cb23e96271dfbfd3bd35fe
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Luminol end
|
||||
// Kaiiju start - sync end platform spawning & entity teleportation
|
||||
final java.util.function.Consumer<Entity> tpComplete = type == PortalType.END && destination.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.END ?
|
||||
- e -> net.minecraft.world.level.levelgen.feature.EndPlatformFeature.createEndPlatform(destination, ServerLevel.END_SPAWN_POINT.below(), true, null) : teleportComplete;
|
||||
+ e -> { if (new me.earthme.luminol.api.portal.EndPlatformCreateEvent().callEvent() && ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(e.level, ServerLevel.END_SPAWN_POINT.below())) net.minecraft.world.level.levelgen.feature.EndPlatformFeature.createEndPlatform(destination, ServerLevel.END_SPAWN_POINT.below(), true, null); } : teleportComplete; // Luminol - Add missing teleportation events & Fix teleportation api threading issue
|
||||
// Kaiiju end
|
||||
|
||||
Vec3 initialPosition = this.position();
|
||||
@@ -4586,6 +4652,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
tpComplete.accept(teleported);
|
||||
ChunkPos initialPositionChunk = new ChunkPos(
|
||||
@@ -4501,6 +4567,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (teleportComplete != null) {
|
||||
teleportComplete.accept(teleported);
|
||||
}
|
||||
// Kaiiju end
|
||||
+ // Luminol start - Add missing teleportation events
|
||||
+ new me.earthme.luminol.api.entity.PostEntityPortalEvent(teleported.getBukkitEntity()).callEvent();
|
||||
+ // Luminol end
|
||||
+ // Kaiiju end
|
||||
}
|
||||
);
|
||||
});
|
||||
diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 95e2dff6782bf7767ecb1a23e618862919ea71aa..386c38273e21ba6b48f9fad67fddc39255138e14 100644
|
||||
index 4961bf492e692f9278aadd90ac9d55b2f1c50cba..fc529ece01d8a85e600eb8910662010ab6851d82 100644
|
||||
--- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -193,6 +193,18 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -191,6 +191,18 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
portalTile.trySearchForExit(portalWorld, portalPos);
|
||||
return false;
|
||||
}
|
||||
@@ -3,8 +3,10 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Wed, 22 Jan 2025 17:23:16 +0800
|
||||
Subject: [PATCH] Gale: Optimize noise generation
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0106-Optimize-noise-generation.patch) and C2ME (https://github.com/RelativityMC/C2ME-fabric)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0106-Optimize-noise-generation.patch)
|
||||
C2ME (https://github.com/RelativityMC/C2ME-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java b/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sun, 9 Mar 2025 11:39:01 +0800
|
||||
Subject: [PATCH] Do not search the block out of current region
|
||||
|
||||
Skip getting the blocks don't belong to current tickregion.
|
||||
|
||||
notice: this bug is actually caused by another bug of the teleportAsync implementation.
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 61887e6b052bca715c90dff5d9cd657e0b3f6a78..95e2dff6782bf7767ecb1a23e618862919ea71aa 100644
|
||||
--- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -422,6 +422,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
if (i != 0 || i1 != 0 || allowBedrock) {
|
||||
for (int y = level.getMaxY(); y > (blockPos == null ? level.getMinY() : blockPos.getY()); y--) {
|
||||
BlockPos blockPos1 = new BlockPos(pos.getX() + i, y, pos.getZ() + i1);
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor((Level) level, blockPos1)) continue; // Luminol - Do not search the block out of current region as we might be at the edge of the tickregion
|
||||
BlockState blockState = level.getBlockState(blockPos1);
|
||||
if (blockState.isCollisionShapeFullBlock(level, blockPos1) && (allowBedrock || !blockState.is(Blocks.BEDROCK))) {
|
||||
blockPos = blockPos1;
|
||||
@@ -3,18 +3,20 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Wed, 22 Jan 2025 17:18:00 +0800
|
||||
Subject: [PATCH] Gale: Replace AI attributes with optimized collections
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, 2No2Name <2No2Name@web.de>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0087-Replace-AI-attributes-with-optimized-collections.patch) and Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
2No2Name <2No2Name@web.de>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0087-Replace-AI-attributes-with-optimized-collections.patch)
|
||||
Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
index 4c808c7ef336de74048f40bd1cc8b14131a9325d..8dfd32a8ec590c688dc8d64f18b6b59378c17880 100644
|
||||
index bed9b564c493cd84bf53fc49368fda736f3fbc2b..c61071e0019a18eb73223ed9b64619c9cb691896 100644
|
||||
--- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
+++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
@@ -19,9 +19,11 @@ import org.slf4j.Logger;
|
||||
@@ -14,9 +14,11 @@ import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class AttributeMap {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
- private final Map<Holder<Attribute>, AttributeInstance> attributes = new Object2ObjectOpenHashMap<>();
|
||||
- private final Set<AttributeInstance> attributesToSync = new ObjectOpenHashSet<>();
|
||||
- private final Set<AttributeInstance> attributesToUpdate = new ObjectOpenHashSet<>();
|
||||
@@ -3,17 +3,19 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Sun, 12 Jan 2025 15:35:15 +0800
|
||||
Subject: [PATCH] Gale: Skip entity move if movement is zero
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0103-Skip-entity-move-if-movement-is-zero.patch) and VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0103-Skip-entity-move-if-movement-is-zero.patch)
|
||||
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 2efc715857d49f69a8289bcf50f422960c00c8bd..18e6e9fe39a559ae043fdafcf4e4db467144e309 100644
|
||||
index 9d945f615187f86913be8a9b83b1aada3a1336b6..06496237f947af4849cb7f364eacf11d53736e3d 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1104,7 +1104,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
private volatile boolean preventMoving = false;
|
||||
//Luminol end
|
||||
@@ -1081,7 +1081,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
private double moveStartZ;
|
||||
// Paper end - detailed watchdog information
|
||||
|
||||
+ private boolean boundingBoxChanged = false; // Gale - VMP - skip entity move if movement is zero
|
||||
+
|
||||
@@ -26,7 +28,7 @@ index 2efc715857d49f69a8289bcf50f422960c00c8bd..18e6e9fe39a559ae043fdafcf4e4db46
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -5061,6 +5068,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5048,6 +5055,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AABB bb) {
|
||||
@@ -3,8 +3,10 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Sun, 12 Jan 2025 14:15:24 +0800
|
||||
Subject: [PATCH] Gale: Use platform math functions
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, Xymb <xymb@endcrystal.me>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0019-Use-platform-math-functions.patch) and Kaiiju(https://github.com/KaiijuMC/Kaiiju)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
Xymb <xymb@endcrystal.me>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0019-Use-platform-math-functions.patch)
|
||||
Kaiiju (https://github.com/KaiijuMC/Kaiiju)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java
|
||||
@@ -8,7 +8,7 @@ As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
index beb9b3b3cd5ca60bd2cdada937bff8a1da639da5..3c9fc433155dd235668ded700d51d95434ba745f 100644
|
||||
index 5ca1ed5e564038d6ee0b8437fb477fe8c8f09d94..aec5370b285d4648280b3e1c4c2fcaa501376739 100644
|
||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
@@ -54,27 +54,39 @@ public final class ActivationRange {
|
||||
@@ -1,34 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Fri, 2 May 2025 12:03:14 +0800
|
||||
Subject: [PATCH] Fix incorrectly synced data after player teleportation
|
||||
|
||||
Use vanilla's flag and logics to run some status sync after post teleportation, folia forgets send some packets after teleportation and which caused some desync between client and server
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 40f3700c9bf56cfb26f0bca0dc6320fad8c75a65..b5d0eb5026067080a376b9c3f902dcdf40d5dc48 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1805,14 +1805,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.connection.send(new ClientboundChangeDifficultyPacket(
|
||||
worlddata.getDifficulty(), worlddata.isDifficultyLocked()
|
||||
));
|
||||
- this.connection.send(new ClientboundSetExperiencePacket(
|
||||
+ /*this.connection.send(new ClientboundSetExperiencePacket( // Luminol start - teleportAsync tweaks, will send in next tick, see the changes below
|
||||
this.experienceProgress, this.totalExperience, this.experienceLevel
|
||||
- ));
|
||||
+ ));*/ // Luminol end
|
||||
|
||||
playerlist.sendActivePlayerEffects(this);
|
||||
playerlist.sendLevelInfo(this, destination);
|
||||
playerlist.sendPlayerPermissionLevel(this);
|
||||
|
||||
+ // Luminol start - teleportAsync tweaks
|
||||
+ this.lastSentExp = -1;
|
||||
+ this.lastSentHealth = -1.0F;
|
||||
+ this.lastSentFood = -1;
|
||||
+ // Luminol end
|
||||
+
|
||||
// regular world add logic
|
||||
this.unsetRemoved();
|
||||
destination.addDuringTeleport(this);
|
||||
@@ -8,7 +8,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/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java
|
||||
index 52b08be8b37117edc38dddf6d1919178b1f86271..d98eae5ee8a69a89e37751594dfff636831c8016 100644
|
||||
index c589e18b68e45d5991291db3a0bdd833588ce945..ff17bda274989d6b94cea280378a6e5de4f84d4b 100644
|
||||
--- a/net/minecraft/world/entity/ai/Brain.java
|
||||
+++ b/net/minecraft/world/entity/ai/Brain.java
|
||||
@@ -45,14 +45,14 @@ public class Brain<E extends LivingEntity> {
|
||||
@@ -9,10 +9,10 @@ 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 e5e946462da9e56344428139768075b7bd228ec0..9777a5b7ba9916e426ba87d6ee7cd56f0e43c195 100644
|
||||
index 44994e63a1e48efe69c0b67d02b99a3c814026b7..001483b7098523f3645a95c81fcf0e38b551705e 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1420,6 +1420,8 @@ public abstract class PlayerList {
|
||||
@@ -1430,6 +1430,8 @@ public abstract class PlayerList {
|
||||
if (serverStatsCounter == null) {
|
||||
File file = this.server.getWorldPath(LevelResource.PLAYER_STATS_DIR).toFile();
|
||||
File file1 = new File(file, uuid + ".json");
|
||||
@@ -21,7 +21,7 @@ index e5e946462da9e56344428139768075b7bd228ec0..9777a5b7ba9916e426ba87d6ee7cd56f
|
||||
if (!file1.exists()) {
|
||||
File file2 = new File(file, displayName + ".json"); // CraftBukkit
|
||||
Path path = file2.toPath();
|
||||
@@ -1427,6 +1429,8 @@ public abstract class PlayerList {
|
||||
@@ -1437,6 +1439,8 @@ public abstract class PlayerList {
|
||||
file2.renameTo(file1);
|
||||
}
|
||||
}
|
||||
@@ -53,10 +53,10 @@ index f6518e29f805018c72222f5aaa7b662071665b65..8d082996a0f361cfd12af6a2138efd70
|
||||
this.get("generator-settings", property -> GsonHelper.parse(!property.isEmpty() ? property : "{}"), new JsonObject()),
|
||||
this.get("level-type", property -> property.toLowerCase(Locale.ROOT), WorldPresets.NORMAL.location().toString())
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index ac06b8a4813716a8d136be5731cbd96113976a7e..82d95005fc67336458b50c47d44ec4047fffcd1e 100644
|
||||
index 357d81d42f187fb1c52584e6c9cfe611fe755aba..6dc5b1a8bdba998e11bcdf352bcc0fc7161a484c 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -680,6 +680,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -674,6 +674,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
|
||||
public ChunkGenerator getGenerator() {
|
||||
@@ -65,10 +65,10 @@ index ac06b8a4813716a8d136be5731cbd96113976a7e..82d95005fc67336458b50c47d44ec404
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 2763c3d87ef1f9fcbc01bdff7c0b266d46b8170a..0cec31be4733ad330b09e3d2e81c696c396cac3c 100644
|
||||
index b4fdbdba579fa7c7de4928c259b5ff16b0e83aeb..19c472901f1fd982115779dfad31a7487334f606 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -620,6 +620,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -564,6 +564,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
chunkGenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkGenerator, gen);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -77,14 +77,14 @@ index 2763c3d87ef1f9fcbc01bdff7c0b266d46b8170a..0cec31be4733ad330b09e3d2e81c696c
|
||||
DataFixer fixerUpper = server.getFixerUpper();
|
||||
// Paper - rewrite chunk system
|
||||
diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java
|
||||
index 8db4cba1be6d7a5538295ba8da1fdaf7a77a16d0..25ef938623e2e4f65f6554731b756995638e4231 100644
|
||||
index 5a81172c88f5699f1440b69b331a8ea353c1950a..8fc1f8ff2e4378f4c2b0755f5c203eec0167df7e 100644
|
||||
--- a/net/minecraft/world/entity/monster/Slime.java
|
||||
+++ b/net/minecraft/world/entity/monster/Slime.java
|
||||
@@ -340,7 +340,12 @@ public class Slime extends Mob implements Enemy {
|
||||
@@ -328,7 +328,12 @@ public class Slime extends Mob implements Enemy {
|
||||
}
|
||||
|
||||
ChunkPos chunkPos = new ChunkPos(pos);
|
||||
- boolean flag = level.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkPos.x, chunkPos.z, ((WorldGenLevel) level).getSeed(), level.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
|
||||
- boolean flag = level.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkPos.x, chunkPos.z, ((WorldGenLevel) level).getSeed(), level.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||
+ // Leaf start - Matter - Secure Seed
|
||||
+ boolean isSlimeChunk = me.earthme.luminol.config.modules.misc.SecureSeedConfig.enabled
|
||||
+ ? level.getChunk(chunkPos.x, chunkPos.z).isSlimeChunk()
|
||||
@@ -95,7 +95,7 @@ index 8db4cba1be6d7a5538295ba8da1fdaf7a77a16d0..25ef938623e2e4f65f6554731b756995
|
||||
final double maxHeightSlimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.slimeChunk.maximum;
|
||||
if (random.nextInt(10) == 0 && flag && pos.getY() < maxHeightSlimeChunk) {
|
||||
diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index 6d565b52552534ce9cacfc35ad1bf4adcb69eac3..3a6db5bc0c8be7d68e15317a621c1965fdc3a9bd 100644
|
||||
index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..6683df8d0f5a61ab094393f761a3d3a22d6e0455 100644
|
||||
--- a/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -87,6 +87,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh
|
||||
@@ -125,13 +125,13 @@ index 6d565b52552534ce9cacfc35ad1bf4adcb69eac3..3a6db5bc0c8be7d68e15317a621c1965
|
||||
+ // Leaf end - Matter - Secure Seed
|
||||
+
|
||||
public abstract BlockState getBlockState(final int x, final int y, final int z); // Paper
|
||||
|
||||
@Nullable
|
||||
public abstract BlockState setBlockState(BlockPos pos, BlockState state, boolean isMoving);
|
||||
diff --git a/net/minecraft/world/level/chunk/ChunkGenerator.java b/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index b85c547f281c58bf45c9062d0b886cb4ff7b386b..55df64f9069496010841bfc373887d27fc5c2162 100644
|
||||
index a7b0a9f9e7bb8918abc631eed0043f834646fa04..7664edaf958363701438311aa9fa3bc9f2a30874 100644
|
||||
--- a/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -343,7 +343,11 @@ public abstract class ChunkGenerator {
|
||||
@@ -342,7 +342,11 @@ public abstract class ChunkGenerator {
|
||||
Registry<Structure> registry = level.registryAccess().lookupOrThrow(Registries.STRUCTURE);
|
||||
Map<Integer, List<Structure>> map = registry.stream().collect(Collectors.groupingBy(structure1 -> structure1.step().ordinal()));
|
||||
List<FeatureSorter.StepFeatureData> list = this.featuresPerStep.get();
|
||||
@@ -144,7 +144,7 @@ index b85c547f281c58bf45c9062d0b886cb4ff7b386b..55df64f9069496010841bfc373887d27
|
||||
long l = worldgenRandom.setDecorationSeed(level.getSeed(), blockPos.getX(), blockPos.getZ());
|
||||
Set<Holder<Biome>> set = new ObjectArraySet<>();
|
||||
ChunkPos.rangeClosed(sectionPos.chunk(), 1).forEach(chunkPos -> {
|
||||
@@ -556,8 +560,15 @@ public abstract class ChunkGenerator {
|
||||
@@ -551,8 +555,15 @@ public abstract class ChunkGenerator {
|
||||
} else {
|
||||
ArrayList<StructureSet.StructureSelectionEntry> list1 = new ArrayList<>(list.size());
|
||||
list1.addAll(list);
|
||||
@@ -326,7 +326,7 @@ index c92508741439a8d0d833ea02d0104416adb83c92..a4063fe0c8e113f0fbd751b84aefaaad
|
||||
public static OptionalLong parseSeed(String seed) {
|
||||
seed = seed.trim();
|
||||
diff --git a/net/minecraft/world/level/levelgen/feature/GeodeFeature.java b/net/minecraft/world/level/levelgen/feature/GeodeFeature.java
|
||||
index 38475f6975533909924c8d54f438cf43cdfe31a3..db58fa5d2ee42711ae5ab8b7384fccdfe756e2dc 100644
|
||||
index 4e72eb49dbf4c70ae7556ba6eb210fcd5ef36aaa..4404211177c7a0595851c1ca01d2aa5758f625c9 100644
|
||||
--- a/net/minecraft/world/level/levelgen/feature/GeodeFeature.java
|
||||
+++ b/net/minecraft/world/level/levelgen/feature/GeodeFeature.java
|
||||
@@ -41,7 +41,11 @@ public class GeodeFeature extends Feature<GeodeConfiguration> {
|
||||
@@ -381,10 +381,10 @@ index ee0d9dddb36b6879fa113299e24f1aa3b2b151cc..8a93a4eb0a4935af169ff4d4108a8c6e
|
||||
int i3 = this.spreadType.evaluate(worldgenRandom, i2);
|
||||
int i4 = this.spreadType.evaluate(worldgenRandom, i2);
|
||||
diff --git a/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java b/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java
|
||||
index 670335a7bbfbc9da64c389977498c22dfcd03251..d684a7c8e6455a9154b16e2c8bca5217cd1f597a 100644
|
||||
index 1f939b325ec5291b3c4aabc4735c863f9436a6f8..e5ed4c9d59b880968cedd49d5b415c4eb22d02be 100644
|
||||
--- a/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java
|
||||
+++ b/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java
|
||||
@@ -118,8 +118,16 @@ public abstract class StructurePlacement {
|
||||
@@ -119,8 +119,16 @@ public abstract class StructurePlacement {
|
||||
public abstract StructurePlacementType<?> type();
|
||||
|
||||
private static boolean probabilityReducer(long levelSeed, int regionX, int regionZ, int salt, float probability, @org.jetbrains.annotations.Nullable Integer saltOverride) { // Paper - Add missing structure set seed configs; ignore here
|
||||
@@ -404,7 +404,7 @@ index 670335a7bbfbc9da64c389977498c22dfcd03251..d684a7c8e6455a9154b16e2c8bca5217
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java b/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java
|
||||
index eb85edaa3b7fab4f11545b0fa8bfea882dedb67d..a5b8abc06adbfcbffccfc005a625b952d8729470 100644
|
||||
index 1cfa0fcd28685736fcdce4aef817e4d4cc4061cb..307999350819dfbc31cfd32438b7711a4f6d1467 100644
|
||||
--- a/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java
|
||||
+++ b/net/minecraft/world/level/levelgen/structure/pools/JigsawPlacement.java
|
||||
@@ -64,7 +64,11 @@ public class JigsawPlacement {
|
||||
@@ -0,0 +1,50 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: adabugra <57899270+adabugra@users.noreply.github.com>
|
||||
Date: Fri, 31 Jan 2025 19:17:01 +0300
|
||||
Subject: [PATCH] Leaves: Disable moved wrongly threshold
|
||||
|
||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/f553c53e4230aa032e54a69b6479f1959ed24a60/patches/removed/server/0099-Disable-moved-wrongly-threshold.patch)
|
||||
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 77546196289bccbbc0c40c2d69ff9ddd2bc98ffe..d6a284bcdd9cb6b7442f99f9c7e9f2293fa0a218 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -573,7 +573,7 @@ public class ServerGamePacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
- if (d7 - d6 > Math.max(100.0, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed)) && !this.isSingleplayerOwner()) {
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled && d7 - d6 > Math.max(100.0, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed)) && !this.isSingleplayerOwner()) { // Leaves - disable can
|
||||
// CraftBukkit end
|
||||
LOGGER.warn(
|
||||
"{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5
|
||||
@@ -603,7 +603,7 @@ public class ServerGamePacketListenerImpl
|
||||
d5 = d2 - rootVehicle.getZ();
|
||||
d7 = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
boolean flag2 = false;
|
||||
- if (d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled && d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot // Leaves - disable can
|
||||
flag2 = true; // Paper - diff on change, this should be moved wrongly
|
||||
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7));
|
||||
}
|
||||
@@ -1487,7 +1487,7 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
if (this.shouldCheckPlayerMovement(isFallFlying)) {
|
||||
float f2 = isFallFlying ? 300.0F : 100.0F;
|
||||
- if (d7 - d6 > Math.max(f2, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed))) {
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled && d7 - d6 > Math.max(f2, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed))) { // Leaves - disable can
|
||||
// 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,
|
||||
@@ -1561,7 +1561,8 @@ public class ServerGamePacketListenerImpl
|
||||
d5 = d2 - this.player.getZ();
|
||||
d7 = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
boolean movedWrongly = false; // Paper - Add fail move event; rename
|
||||
- if (!this.player.isChangingDimension()
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled // Leaves - disable can
|
||||
+ && !this.player.isChangingDimension()
|
||||
&& d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold // Spigot
|
||||
&& !this.player.isSleeping()
|
||||
&& !this.player.isCreative()
|
||||
@@ -1,23 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <wangxyper@163.com>
|
||||
Date: Sun, 12 Jan 2025 11:03:09 +0800
|
||||
Subject: [PATCH] Paper: Hopper behavior fix
|
||||
|
||||
temporary fix
|
||||
Origin: https://github.com/PaperMC/Paper/pull/11945
|
||||
Co-authored by: Aikar <aikar@aikar.co>
|
||||
As part of: Paper (https://github.com/PaperMC/Paper/blob/d2d23118c151f11c00e42b5c60ab7e4a3a1be09c/paper-server/patches/features/0029-Optimize-Hoppers.patch)
|
||||
Licensed under: MIT (https://github.com/PaperMC/Paper/blob/fa360aa83657d15e8e803ce55800986f6bff8f70/licenses/MIT.md)
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index ae988c4910421fb720177178ef6136e595ae6946..72a81e29be6570fb119b159210453a86f003f893 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -698,6 +698,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
} else if (canMergeItems(item, stack)) {
|
||||
int i = Math.min(stack.getMaxStackSize(), destination.getMaxStackSize()) - item.getCount(); // Paper - Make hoppers respect inventory max stack size
|
||||
int min = Math.min(stack.getCount(), i);
|
||||
+ stack = stack.copy(true); // Luminol
|
||||
stack.shrink(min);
|
||||
item.grow(min);
|
||||
flag = min > 0;
|
||||
@@ -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/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java b/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
index 471b6d49d77e03665ffc269d17ab46f225e3ce1c..c574f9a23868a35ef694e432ba581d2f00e39da7 100644
|
||||
index e1bf7bc3cca63101b3c0550b5b4c0d28d0f3776e..ea01087967dd9ff32b23661079e97ea468d31163 100644
|
||||
--- a/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
+++ b/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
@@ -101,6 +101,14 @@ public final class CollisionUtil {
|
||||
@@ -26,7 +26,7 @@ index 471b6d49d77e03665ffc269d17ab46f225e3ce1c..c574f9a23868a35ef694e432ba581d2f
|
||||
// assume !isEmpty(target) && abs(source_move) >= COLLISION_EPSILON
|
||||
public static double collideX(final AABB target, final AABB source, final double source_move) {
|
||||
if ((source.minY - target.maxY) < -COLLISION_EPSILON && (source.maxY - target.minY) > COLLISION_EPSILON &&
|
||||
@@ -2026,7 +2034,10 @@ public final class CollisionUtil {
|
||||
@@ -2025,7 +2033,10 @@ public final class CollisionUtil {
|
||||
AABB singleAABB = ((CollisionVoxelShape)blockCollision).moonrise$getSingleAABBRepresentation();
|
||||
if (singleAABB != null) {
|
||||
singleAABB = singleAABB.move((double)blockX, (double)blockY, (double)blockZ);
|
||||
@@ -8,10 +8,10 @@ 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/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 62634b5c29a3333fd8f39927f4d0a3258835c891..74e5fc8686042525dd79d773832ec0a88a135293 100644
|
||||
index 5564bba66959a2a280f700f6c6a05d292faced88..4492f3ab470c0bf735b6fdc69115c1ebbcd727ef 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1351,7 +1351,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -1285,7 +1285,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
// SPIGOT-5478 must be called manually now
|
||||
@@ -20,9 +20,9 @@ index 62634b5c29a3333fd8f39927f4d0a3258835c891..74e5fc8686042525dd79d773832ec0a8
|
||||
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
|
||||
if (!event.getKeepInventory()) {
|
||||
// Paper start - PlayerDeathEvent#getItemsToKeep
|
||||
@@ -1385,6 +1385,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
this.setClientLoaded(false);
|
||||
@@ -1357,6 +1357,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
// Luminol End - Cross Region Damage trace
|
||||
|
||||
+ // Leaves start - exp fix
|
||||
+ private boolean shouldDropExperience(boolean eventResult, boolean forceUseEvent) {
|
||||
@@ -37,18 +37,18 @@ index 62634b5c29a3333fd8f39927f4d0a3258835c891..74e5fc8686042525dd79d773832ec0a8
|
||||
AABB aabb = new AABB(this.blockPosition()).inflate(32.0, 10.0, 32.0);
|
||||
this.level()
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 2293c3db45e9ecce4e0d4b2f87b8e90228e44d94..658aa09aecf8d64145feedb82dc9be2a55201450 100644
|
||||
index c1d53987991a0808733eac3b500d5d5a0f5d7ac2..dcec5d26950bc654f67e7de7688c074cc502e486 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -293,6 +293,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected float appliedScale = 1.0F;
|
||||
@@ -264,6 +264,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected final EntityEquipment equipment;
|
||||
// CraftBukkit start
|
||||
public int expToDrop;
|
||||
+ public int expToReward; // Leaves - exp fix
|
||||
public ArrayList<DefaultDrop> drops = new ArrayList<>(); // Paper - Restore vanilla drops behavior
|
||||
public List<DefaultDrop> drops = new java.util.ArrayList<>(); // Paper - Restore vanilla drops behavior
|
||||
public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
||||
public boolean collides = true;
|
||||
@@ -1761,6 +1762,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1870,6 +1871,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
entity.killedEntity((ServerLevel) this.level(), this);
|
||||
}
|
||||
this.gameEvent(GameEvent.ENTITY_DIE);
|
||||
@@ -56,8 +56,8 @@ index 2293c3db45e9ecce4e0d4b2f87b8e90228e44d94..658aa09aecf8d64145feedb82dc9be2a
|
||||
} else {
|
||||
this.dead = false;
|
||||
this.setHealth((float) deathEvent.getReviveHealth());
|
||||
@@ -1835,7 +1837,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.drops = new ArrayList<>();
|
||||
@@ -1950,7 +1952,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.drops = new java.util.ArrayList<>();
|
||||
// this.dropEquipment(level); // CraftBukkit - moved up
|
||||
// CraftBukkit end
|
||||
- this.dropExperience(level, damageSource.getEntity());
|
||||
@@ -66,7 +66,7 @@ index 2293c3db45e9ecce4e0d4b2f87b8e90228e44d94..658aa09aecf8d64145feedb82dc9be2a
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
index bd6693af6412fb08a28ca9a71d5c70d54f72c6e6..8c2e35d087150fb0fc67c7457a4af9298f4b41e1 100644
|
||||
index c94d3c755449e23e77d5ba82c6c5e384ff5cedc7..376d2b9a45e0d9b1f90ae356416370340e7cee1f 100644
|
||||
--- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
|
||||
@@ -96,8 +96,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
|
||||
@@ -11,10 +11,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/core/Direction.java b/net/minecraft/core/Direction.java
|
||||
index 216f97207dac88cc1dc3df59c6ee8a62c7614b4a..3a76b1ec8570e4c9f328e9d362b41057b092be45 100644
|
||||
index 63fd7b45750430b565d599337d3112cbaa7e7550..1363c80e7c7be20c52a947f2eb6fabc5e5b6c97c 100644
|
||||
--- a/net/minecraft/core/Direction.java
|
||||
+++ b/net/minecraft/core/Direction.java
|
||||
@@ -217,7 +217,7 @@ public enum Direction implements StringRepresentable, ca.spottedleaf.moonrise.pa
|
||||
@@ -222,7 +222,7 @@ public enum Direction implements StringRepresentable, ca.spottedleaf.moonrise.pa
|
||||
}
|
||||
|
||||
public Direction getOpposite() {
|
||||
@@ -23,7 +23,7 @@ index 216f97207dac88cc1dc3df59c6ee8a62c7614b4a..3a76b1ec8570e4c9f328e9d362b41057
|
||||
}
|
||||
|
||||
public Direction getClockWise(Direction.Axis axis) {
|
||||
@@ -350,7 +350,7 @@ public enum Direction implements StringRepresentable, ca.spottedleaf.moonrise.pa
|
||||
@@ -355,7 +355,7 @@ public enum Direction implements StringRepresentable, ca.spottedleaf.moonrise.pa
|
||||
}
|
||||
|
||||
public static Direction getRandom(RandomSource random) {
|
||||
@@ -33,10 +33,10 @@ index 216f97207dac88cc1dc3df59c6ee8a62c7614b4a..3a76b1ec8570e4c9f328e9d362b41057
|
||||
|
||||
public static Direction getApproximateNearest(double x, double y, double z) {
|
||||
diff --git a/net/minecraft/world/phys/AABB.java b/net/minecraft/world/phys/AABB.java
|
||||
index 85148858db1fd5e9da8bbdde4b0d84110d80e373..82fb85089336f874349fa87e7cb9c14ab087ad8b 100644
|
||||
index c22acc8889fbb3c9ee698624189c195ee4b5eefb..85942c81db268fb6e827683651003bff217ad309 100644
|
||||
--- a/net/minecraft/world/phys/AABB.java
|
||||
+++ b/net/minecraft/world/phys/AABB.java
|
||||
@@ -18,6 +18,15 @@ public class AABB {
|
||||
@@ -19,6 +19,15 @@ public class AABB {
|
||||
public final double maxY;
|
||||
public final double maxZ;
|
||||
|
||||
@@ -52,7 +52,7 @@ index 85148858db1fd5e9da8bbdde4b0d84110d80e373..82fb85089336f874349fa87e7cb9c14a
|
||||
public AABB(double x1, double y1, double z1, double x2, double y2, double z2) {
|
||||
this.minX = Math.min(x1, x2);
|
||||
this.minY = Math.min(y1, y2);
|
||||
@@ -79,11 +88,33 @@ public class AABB {
|
||||
@@ -80,11 +89,33 @@ public class AABB {
|
||||
}
|
||||
|
||||
public double min(Direction.Axis axis) {
|
||||
@@ -12,10 +12,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index ccb1541e5ea0acf7ec34084a041652e2139ee724..4eddc407d04428516dc3607e4726d3ff58588c62 100644
|
||||
index dcec5d26950bc654f67e7de7688c074cc502e486..0a06dc4b7fac7c7d63996553e2cb2a38ddb5f195 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2698,6 +2698,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2746,6 +2746,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
protected void updateSwingTime() {
|
||||
@@ -23,7 +23,7 @@ index ccb1541e5ea0acf7ec34084a041652e2139ee724..4eddc407d04428516dc3607e4726d3ff
|
||||
int currentSwingDuration = this.getCurrentSwingDuration();
|
||||
if (this.swinging) {
|
||||
this.swingTime++;
|
||||
@@ -3623,6 +3624,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3629,6 +3630,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected void updateFallFlying() {
|
||||
this.checkSlowFallDistance();
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -8,7 +8,7 @@ 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 c6e487a4c14e6b82533881d01f32349b9ae28728..2c747cb8a724cd25c9d724908f92b320741600de 100644
|
||||
index 17bf9a4cf48273d5021d48ae57acc4fd053dd32d..0168c2a0e3ce16f107bbd83e1071004e61de32f8 100644
|
||||
--- a/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
+++ b/io/papermc/paper/threadedregions/RegionizedWorldData.java
|
||||
@@ -354,6 +354,7 @@ public final class RegionizedWorldData {
|
||||
@@ -20,10 +20,10 @@ index c6e487a4c14e6b82533881d01f32349b9ae28728..2c747cb8a724cd25c9d724908f92b320
|
||||
// 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 210eba85ac1a50d993ef6e19b65b9f8afada00ba..2763c3d87ef1f9fcbc01bdff7c0b266d46b8170a 100644
|
||||
index 19c472901f1fd982115779dfad31a7487334f606..8329bc0cf531a1317ff8e213e948019d28df1eea 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -808,6 +808,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -803,6 +803,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
|
||||
profiler.startTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ACTIVATE_ENTITIES); try { // Folia - profiler
|
||||
@@ -31,7 +31,7 @@ index 210eba85ac1a50d993ef6e19b65b9f8afada00ba..2763c3d87ef1f9fcbc01bdff7c0b266d
|
||||
io.papermc.paper.entity.activation.ActivationRange.activateEntities(this); // Paper - EAR
|
||||
} finally { profiler.stopTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ACTIVATE_ENTITIES); } // Folia - profiler
|
||||
profiler.startTimer(ca.spottedleaf.leafprofiler.LProfilerRegistry.ENTITY_TICK); try { // Folia - profiler
|
||||
@@ -829,6 +830,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -824,6 +825,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
|
||||
entity.stopRiding();
|
||||
}
|
||||
@@ -45,7 +45,7 @@ index 210eba85ac1a50d993ef6e19b65b9f8afada00ba..2763c3d87ef1f9fcbc01bdff7c0b266d
|
||||
|
||||
profilerFiller.push("tick");
|
||||
this.guardEntityTick(this::tickNonPassenger, entity);
|
||||
@@ -838,6 +846,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -833,6 +841,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
}
|
||||
}
|
||||
);
|
||||
@@ -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 771744d4540fcd163efcde43c27111680b25c928..2efc715857d49f69a8289bcf50f422960c00c8bd 100644
|
||||
index 06496237f947af4849cb7f364eacf11d53736e3d..af793516943582d92fe02a222b8c73f759ee8aae 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4291,14 +4291,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4273,14 +4273,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
targetPos, 16, // load 16 blocks to be safe from block physics
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
@@ -34,7 +34,7 @@ index 771744d4540fcd163efcde43c27111680b25c928..2efc715857d49f69a8289bcf50f42296
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
|
||||
)
|
||||
@@ -4313,11 +4317,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4306,11 +4310,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
ca.spottedleaf.concurrentutil.util.Priority.HIGH,
|
||||
(chunks) -> {
|
||||
BlockPos adjustedSpawn = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, spawnPos);
|
||||
@@ -52,10 +52,10 @@ index 771744d4540fcd163efcde43c27111680b25c928..2efc715857d49f69a8289bcf50f42296
|
||||
Relative.union(Relative.DELTA, Relative.ROTATION),
|
||||
TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET),
|
||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.END_PORTAL
|
||||
@@ -4495,6 +4503,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
if (!this.canPortalAsync(destination, takePassengers)) {
|
||||
@@ -4507,6 +4515,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return false;
|
||||
}
|
||||
// Luminol end
|
||||
+ // Kaiiju start - sync end platform spawning & entity teleportation
|
||||
+ final java.util.function.Consumer<Entity> tpComplete = type == PortalType.END && destination.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.END ?
|
||||
+ e -> net.minecraft.world.level.levelgen.feature.EndPlatformFeature.createEndPlatform(destination, ServerLevel.END_SPAWN_POINT.below(), true, null) : teleportComplete;
|
||||
@@ -63,7 +63,7 @@ index 771744d4540fcd163efcde43c27111680b25c928..2efc715857d49f69a8289bcf50f42296
|
||||
|
||||
Vec3 initialPosition = this.position();
|
||||
ChunkPos initialPositionChunk = new ChunkPos(
|
||||
@@ -4559,9 +4571,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4571,8 +4583,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
info.postTeleportTransition().onTransition(teleported);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,5 @@ index 771744d4540fcd163efcde43c27111680b25c928..2efc715857d49f69a8289bcf50f42296
|
||||
+ if (tpComplete != null){
|
||||
+ tpComplete.accept(teleported);
|
||||
}
|
||||
+ // Kaiiju end
|
||||
// Kaiiju end
|
||||
}
|
||||
);
|
||||
});
|
||||
@@ -9,10 +9,10 @@ As part of: Paper (https://github.com/PaperMC/Paper/blob/2ae1f05336d0f13b646e6c2
|
||||
Licensed under: GPL-3.0 (https://github.com/PaperMC/Paper/blob/fa360aa83657d15e8e803ce55800986f6bff8f70/licenses/GPL.md)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
|
||||
index cf231380febd6d316eb902d43c636135ee0d7fa4..731473610e068a613d67efaee08ded810fe86cf0 100644
|
||||
index 39b65970a48568c95ff482b9636e7391f300ffa8..4395947fc8c719864ac2afde5e6bbb53da5129c2 100644
|
||||
--- a/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -348,6 +348,13 @@ public class Zombie extends Monster {
|
||||
@@ -353,6 +353,13 @@ public class Zombie extends Monster {
|
||||
int i2 = floor1 + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1);
|
||||
int i3 = floor2 + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1);
|
||||
BlockPos blockPos = new BlockPos(i1, i2, i3);
|
||||
@@ -8,10 +8,10 @@ As part of: Petal (https://github.com/Bloom-host/Petal/blob/cc691540fb48240f38b3
|
||||
Licensed under: GPL-3.0 (https://github.com/Bloom-host/Petal/blob/cc691540fb48240f38b376f3d94c8b0db2b60d99/LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||
index 94a7b95f41c2954561f9c3cb0f61210c0c058f1d..dbe0fc0c46f66c61a2f286d521302719b28917c1 100644
|
||||
index 34738e880e6ef30730fc72d7b0fb89c53783be17..92d967ca683c50e072419e9398d671a01e0263bc 100644
|
||||
--- a/net/minecraft/world/entity/Mob.java
|
||||
+++ b/net/minecraft/world/entity/Mob.java
|
||||
@@ -866,11 +866,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
@@ -736,11 +736,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
return;
|
||||
}
|
||||
// Paper end - Allow nerfed mobs to jump and float
|
||||
@@ -8,23 +8,23 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish/blob/04bc249
|
||||
Licensed under: GPL-3.0 (https://github.com/pufferfish-gg/Pufferfish/blob/04bc249f9eee6157338b6884113b6fa3192bf59b/PATCH-LICENSE)
|
||||
|
||||
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
index c260741a87513b89a5cc62c543fb9f990f86491e..beb9b3b3cd5ca60bd2cdada937bff8a1da639da5 100644
|
||||
index aec5370b285d4648280b3e1c4c2fcaa501376739..21ca0737d07e4edb5c9f52a703ba1ea0d290925e 100644
|
||||
--- a/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
|
||||
@@ -225,7 +225,7 @@ public final class ActivationRange {
|
||||
@@ -237,7 +237,7 @@ public final class ActivationRange {
|
||||
}
|
||||
// special cases.
|
||||
if (entity instanceof final LivingEntity living) {
|
||||
- if (living.onClimbable() || living.jumping || living.hurtTime > 0 || !living.activeEffects.isEmpty() || living.isFreezing()) {
|
||||
+ if ( living.onClimableCached() || living.onClimbable() || living.jumping || living.hurtTime > 0 || !living.activeEffects.isEmpty() || living.isFreezing()) { // Pufferfish - use cached
|
||||
+ if (living.onClimableCached() || living.onClimbable() || living.jumping || living.hurtTime > 0 || !living.activeEffects.isEmpty() || living.isFreezing()) { // Pufferfish - use cached
|
||||
return 1;
|
||||
}
|
||||
if (entity instanceof final Mob mob && mob.getTarget() != null) {
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 6258b008ad3e00d41e9f3014572d6f7a06b1847c..2293c3db45e9ecce4e0d4b2f87b8e90228e44d94 100644
|
||||
index 0a06dc4b7fac7c7d63996553e2cb2a38ddb5f195..ae83447f99f483e1b509c52060353bd13ddbc458 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2044,6 +2044,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2156,6 +2156,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return this.lastClimbablePos;
|
||||
}
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Bacteriawa <A3167717663@hotmail.com>
|
||||
Date: Wed, 30 Nov 2022 21:51:16 +0100
|
||||
Subject: [PATCH] Gale: Faster chunk serialization
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, Angeline <jellysquid3@users.noreply.github.com>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0096-Faster-chunk-serialization.patch), Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/util/BitStorage.java b/net/minecraft/util/BitStorage.java
|
||||
index 02502d50f0255f5bbcc0ecb965abb48cc1a112da..322a1ba06d6aed44ec67dc3f1831ac6b05c82fe0 100644
|
||||
--- a/net/minecraft/util/BitStorage.java
|
||||
+++ b/net/minecraft/util/BitStorage.java
|
||||
@@ -21,6 +21,8 @@ public interface BitStorage extends ca.spottedleaf.moonrise.patches.block_counti
|
||||
|
||||
BitStorage copy();
|
||||
|
||||
+ <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out); // Gale - Lithium - faster chunk serialization
|
||||
+
|
||||
// Paper start - block counting
|
||||
// provide default impl in case mods implement this...
|
||||
@Override
|
||||
diff --git a/net/minecraft/util/SimpleBitStorage.java b/net/minecraft/util/SimpleBitStorage.java
|
||||
index e6306a68c8652d4c5d22d5ecb1416f5f931f76ee..2a3d34733b61c73729daa4da61f33e2c2e7b6c72 100644
|
||||
--- a/net/minecraft/util/SimpleBitStorage.java
|
||||
+++ b/net/minecraft/util/SimpleBitStorage.java
|
||||
@@ -465,4 +465,36 @@ public class SimpleBitStorage implements BitStorage {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Gale start - Lithium - faster chunk serialization
|
||||
+ @Override
|
||||
+ public <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out) {
|
||||
+ if (this.size >= Short.MAX_VALUE) throw new IllegalStateException("Array too large");
|
||||
+ if (this.size != out.length) throw new IllegalStateException("Array size mismatch");
|
||||
+
|
||||
+ short[] mappings = new short[(int) (this.mask + 1)];
|
||||
+
|
||||
+ int idx = 0;
|
||||
+
|
||||
+ for (long word : this.data) {
|
||||
+ long bits = word;
|
||||
+
|
||||
+ for (int elementIdx = 0; elementIdx < this.valuesPerLong; ++elementIdx) {
|
||||
+ int value = (int) (bits & this.mask);
|
||||
+ int remappedId = mappings[value];
|
||||
+
|
||||
+ if (remappedId == 0) {
|
||||
+ remappedId = dstPalette.idFor(srcPalette.valueFor(value)) + 1;
|
||||
+ mappings[value] = (short) remappedId;
|
||||
+ }
|
||||
+
|
||||
+ out[idx] = (short) (remappedId - 1);
|
||||
+ bits >>= this.bits;
|
||||
+
|
||||
+ ++idx;
|
||||
+
|
||||
+ if (idx >= this.size) return;
|
||||
+ }
|
||||
+ }
|
||||
+ } // Gale end - Lithium - faster chunk serialization
|
||||
}
|
||||
diff --git a/net/minecraft/util/ZeroBitStorage.java b/net/minecraft/util/ZeroBitStorage.java
|
||||
index 09fd99c9cbd23b5f3c899bfb00c9b89651948ed8..90a85a00c6208d2db65cafb164cd95e6128b6dc4 100644
|
||||
--- a/net/minecraft/util/ZeroBitStorage.java
|
||||
+++ b/net/minecraft/util/ZeroBitStorage.java
|
||||
@@ -19,6 +19,8 @@ public class ZeroBitStorage implements BitStorage {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ @Override public <T> void compact(net.minecraft.world.level.chunk.Palette<T> srcPalette, net.minecraft.world.level.chunk.Palette<T> dstPalette, short[] out) {} // Gale - Lithium - faster chunk serialization
|
||||
+
|
||||
@Override
|
||||
public final void set(int index, int value) { // Paper - Perf: Optimize SimpleBitStorage
|
||||
//Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); // Paper - Perf: Optimize SimpleBitStorage
|
||||
diff --git a/net/minecraft/world/level/chunk/PaletteResize.java b/net/minecraft/world/level/chunk/PaletteResize.java
|
||||
index c723606fa0be811e580ba47de8c9c575583cc930..60d3176477c201643e1657751fcffad511b2994f 100644
|
||||
--- a/net/minecraft/world/level/chunk/PaletteResize.java
|
||||
+++ b/net/minecraft/world/level/chunk/PaletteResize.java
|
||||
@@ -1,5 +1,5 @@
|
||||
package net.minecraft.world.level.chunk;
|
||||
|
||||
-interface PaletteResize<T> {
|
||||
+public interface PaletteResize<T> { // Gale - Lithium - faster chunk serialization - package -> public
|
||||
int onResize(int bits, T objectAdded);
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/chunk/PalettedContainer.java b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index f5da433050fd3060e0335d4002d520ebe8cd691f..5a6e699df0a177ea6a919cad609a508678bff823 100644
|
||||
--- a/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -25,6 +25,21 @@ import net.minecraft.util.ThreadingDetector;
|
||||
import net.minecraft.util.ZeroBitStorage;
|
||||
|
||||
public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainerRO<T> {
|
||||
+ // Gale start - Lithium - faster chunk serialization
|
||||
+ private static final ThreadLocal<short[]> CACHED_ARRAY_4096 = ThreadLocal.withInitial(() -> new short[4096]);
|
||||
+ private static final ThreadLocal<short[]> CACHED_ARRAY_64 = ThreadLocal.withInitial(() -> new short[64]);
|
||||
+ private Optional<LongStream> asOptional(long[] data) {
|
||||
+ return Optional.of(Arrays.stream(data));
|
||||
+ }
|
||||
+ private short[] getOrCreate(int size) {
|
||||
+ return switch (size) {
|
||||
+ case 64 -> CACHED_ARRAY_64.get();
|
||||
+ case 4096 -> CACHED_ARRAY_4096.get();
|
||||
+ default -> new short[size];
|
||||
+ };
|
||||
+ }
|
||||
+ // Gale end - Lithium - faster chunk serialization
|
||||
+
|
||||
private static final int MIN_PALETTE_BITS = 0;
|
||||
private final PaletteResize<T> dummyPaletteResize = (bits, objectAdded) -> 0;
|
||||
public final IdMap<T> registry;
|
||||
@@ -344,28 +359,53 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
public synchronized PalettedContainerRO.PackedData<T> pack(IdMap<T> registry, PalettedContainer.Strategy strategy) { // Paper - synchronize
|
||||
this.acquire();
|
||||
|
||||
- PalettedContainerRO.PackedData var12;
|
||||
+ // Gale start - Lithium - faster chunk serialization
|
||||
+ Optional<LongStream> data = Optional.empty();
|
||||
+ List<T> elements = null;
|
||||
try {
|
||||
- HashMapPalette<T> hashMapPalette = new HashMapPalette<>(registry, this.data.storage.getBits(), this.dummyPaletteResize);
|
||||
- int size = strategy.size();
|
||||
- int[] ints = new int[size];
|
||||
- this.data.storage.unpack(ints);
|
||||
- swapPalette(ints, id -> hashMapPalette.idFor(this.data.palette.valueFor(id)));
|
||||
- int i = strategy.calculateBitsForSerialization(registry, hashMapPalette.getSize());
|
||||
- Optional<LongStream> optional;
|
||||
- if (i != 0) {
|
||||
- SimpleBitStorage simpleBitStorage = new SimpleBitStorage(i, size, ints);
|
||||
- optional = Optional.of(Arrays.stream(simpleBitStorage.getRaw()));
|
||||
- } else {
|
||||
- optional = Optional.empty();
|
||||
+ // The palette that will be serialized
|
||||
+ net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette<T> hashPalette = null;
|
||||
+
|
||||
+ final Palette<T> palette = this.data.palette();
|
||||
+ final BitStorage storage = this.data.storage();
|
||||
+ if (storage instanceof ZeroBitStorage || palette.getSize() == 1) {
|
||||
+ // If the palette only contains one entry, don't attempt to repack it.
|
||||
+ elements = List.of(palette.valueFor(0));
|
||||
+ } else if (palette instanceof net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette<T> lithiumHashPalette) {
|
||||
+ hashPalette = lithiumHashPalette;
|
||||
}
|
||||
|
||||
- var12 = new PalettedContainerRO.PackedData<>(hashMapPalette.getEntries(), optional);
|
||||
+ if (elements == null) {
|
||||
+ var compactedPalette = new net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette<>(registry, storage.getBits(), this.dummyPaletteResize);
|
||||
+ short[] array = this.getOrCreate(strategy.size());
|
||||
+
|
||||
+ storage.compact(this.data.palette(), compactedPalette, array);
|
||||
+
|
||||
+ // If the palette didn't change during compaction, do a simple copy of the data array
|
||||
+ if (hashPalette != null && hashPalette.getSize() == compactedPalette.getSize() && storage.getBits() == strategy.calculateBitsForSerialization(registry, hashPalette.getSize())) { // paletteSize can de-sync from palette - see https://github.com/CaffeineMC/lithium-fabric/issues/279
|
||||
+ data = this.asOptional(storage.getRaw().clone());
|
||||
+ elements = hashPalette.getElements();
|
||||
+ } else {
|
||||
+ int bits = strategy.calculateBitsForSerialization(registry, compactedPalette.getSize());
|
||||
+ if (bits != 0) {
|
||||
+ // Re-pack the integer array as the palette has changed size
|
||||
+ SimpleBitStorage copy = new SimpleBitStorage(bits, array.length);
|
||||
+ for (int i = 0; i < array.length; ++i)
|
||||
+ copy.set(i, array[i]);
|
||||
+
|
||||
+ // We don't need to clone the data array as we are the sole owner of it
|
||||
+ data = this.asOptional(copy.getRaw());
|
||||
+ }
|
||||
+
|
||||
+ elements = compactedPalette.getElements();
|
||||
+ }
|
||||
+ }
|
||||
} finally {
|
||||
this.release();
|
||||
}
|
||||
|
||||
- return var12;
|
||||
+ return new PalettedContainerRO.PackedData<>(elements, data);
|
||||
+ // Gale end - Lithium - faster chunk serialization
|
||||
}
|
||||
|
||||
private static <T> void swapPalette(int[] bits, IntUnaryOperator operator) {
|
||||
@@ -405,13 +445,30 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||
|
||||
@Override
|
||||
public void count(PalettedContainer.CountConsumer<T> countConsumer) {
|
||||
- if (this.data.palette.getSize() == 1) {
|
||||
- countConsumer.accept(this.data.palette.valueFor(0), this.data.storage.getSize());
|
||||
- } else {
|
||||
- Int2IntOpenHashMap map = new Int2IntOpenHashMap();
|
||||
- this.data.storage.getAll(id -> map.addTo(id, 1));
|
||||
- map.int2IntEntrySet().forEach(idEntry -> countConsumer.accept(this.data.palette.valueFor(idEntry.getIntKey()), idEntry.getIntValue()));
|
||||
+ // Gale start - Lithium - faster chunk serialization
|
||||
+ int len = this.data.palette().getSize();
|
||||
+
|
||||
+ // Do not allocate huge arrays if we're using a large palette
|
||||
+ if (len > 4096) {
|
||||
+ // VanillaCopy
|
||||
+ if (this.data.palette.getSize() == 1) {
|
||||
+ countConsumer.accept(this.data.palette.valueFor(0), this.data.storage.getSize());
|
||||
+ } else {
|
||||
+ Int2IntOpenHashMap map = new Int2IntOpenHashMap();
|
||||
+ this.data.storage.getAll(id -> map.addTo(id, 1));
|
||||
+ map.int2IntEntrySet().forEach(idEntry -> countConsumer.accept(this.data.palette.valueFor(idEntry.getIntKey()), idEntry.getIntValue()));
|
||||
+ }
|
||||
+ }
|
||||
+ short[] counts = new short[len];
|
||||
+ this.data.storage().getAll(i -> counts[i]++);
|
||||
+
|
||||
+ for (int i = 0; i < counts.length; i++) {
|
||||
+ T obj = this.data.palette().valueFor(i);
|
||||
+
|
||||
+ if (obj != null)
|
||||
+ countConsumer.accept(obj, counts[i]);
|
||||
}
|
||||
+ // Gale end - Lithium - faster chunk serialization
|
||||
}
|
||||
|
||||
record Configuration<T>(Palette.Factory factory, int bits) {
|
||||
@@ -8,10 +8,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish/blob/04bc249
|
||||
Licensed under: GPL-3.0 (https://github.com/pufferfish-gg/Pufferfish/blob/04bc249f9eee6157338b6884113b6fa3192bf59b/PATCH-LICENSE)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/EnderMan.java b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 4b5ffd278e0e9d47100e5452949e8d757bbfece4..772ccc4dc66253a84a6d24d00e271d9b4916f052 100644
|
||||
index ab7f7846d3fc0252c6f71277b3e67d7a785a96b5..0f496f0e1c63bc3d8b17a8f0cb065138cb079334 100644
|
||||
--- a/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -309,11 +309,18 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -300,11 +300,18 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
private boolean teleport(double x, double y, double z) {
|
||||
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(x, y, z);
|
||||
|
||||
@@ -8,10 +8,10 @@ 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/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 751b011701d6ae373099226ea63ffbafcd24ce6a..e5e946462da9e56344428139768075b7bd228ec0 100644
|
||||
index 001483b7098523f3645a95c81fcf0e38b551705e..8a32580897c6814ca7cbc7cdfc3a3e41b4ce788f 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1103,6 +1103,10 @@ public abstract class PlayerList {
|
||||
@@ -1116,6 +1116,10 @@ public abstract class PlayerList {
|
||||
player.getBukkitEntity().recalculatePermissions(); // CraftBukkit
|
||||
this.server.getCommands().sendCommands(player);
|
||||
} // Paper - Add sendOpLevel API
|
||||
@@ -23,11 +23,11 @@ index 751b011701d6ae373099226ea63ffbafcd24ce6a..e5e946462da9e56344428139768075b7
|
||||
|
||||
public boolean isWhiteListed(GameProfile profile) {
|
||||
diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java
|
||||
index ae049c5c3593525b991d865fec695c00ad408a59..c6252a245e9701f69db1fe167f6590095237553a 100644
|
||||
index 0d774fd4be1cdcf03e76db8b17309bbf01bafc55..1230effe955a627ff24866fdac4c55bff45cc241 100644
|
||||
--- a/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/net/minecraft/world/entity/player/Player.java
|
||||
@@ -200,6 +200,7 @@ public abstract class Player extends LivingEntity {
|
||||
private int currentImpulseContextResetGraceTime;
|
||||
@@ -210,6 +210,7 @@ public abstract class Player extends LivingEntity {
|
||||
private int currentImpulseContextResetGraceTime = 0;
|
||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||
public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage
|
||||
+ public int enderChestSlotCount = -1; // Purpur - Barrels and enderchests 6 rows
|
||||
@@ -35,7 +35,7 @@ index ae049c5c3593525b991d865fec695c00ad408a59..c6252a245e9701f69db1fe167f659009
|
||||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/net/minecraft/world/inventory/ChestMenu.java b/net/minecraft/world/inventory/ChestMenu.java
|
||||
index 280169afbd637eeb67ddf7eaeb4eecd464a128d5..461705345dd897c8304c884272531af836f8854f 100644
|
||||
index 0fffa384f928ab84451331380968fb4650eafe26..d84a10396395939149da88bcb01be59e220c340e 100644
|
||||
--- a/net/minecraft/world/inventory/ChestMenu.java
|
||||
+++ b/net/minecraft/world/inventory/ChestMenu.java
|
||||
@@ -66,10 +66,30 @@ public class ChestMenu extends AbstractContainerMenu {
|
||||
@@ -70,7 +70,7 @@ index 280169afbd637eeb67ddf7eaeb4eecd464a128d5..461705345dd897c8304c884272531af8
|
||||
return new ChestMenu(MenuType.GENERIC_9x6, containerId, playerInventory, container, 6);
|
||||
}
|
||||
diff --git a/net/minecraft/world/inventory/PlayerEnderChestContainer.java b/net/minecraft/world/inventory/PlayerEnderChestContainer.java
|
||||
index a6a359bab2a727f4631b633a8bb370dd40decc75..5fab998cdec92a2bd965e6b48cc6189b195dc86d 100644
|
||||
index bc2b95973192069fc64581b59583b19df876f55d..72b8532acd7838e94e2cc0e2085d2ad84ba56f5e 100644
|
||||
--- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java
|
||||
+++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java
|
||||
@@ -25,11 +25,18 @@ public class PlayerEnderChestContainer extends SimpleContainer {
|
||||
@@ -94,7 +94,7 @@ index a6a359bab2a727f4631b633a8bb370dd40decc75..5fab998cdec92a2bd965e6b48cc6189b
|
||||
this.activeChest = enderChestBlockEntity;
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/EnderChestBlock.java b/net/minecraft/world/level/block/EnderChestBlock.java
|
||||
index f5533960708bdbaf2eacefbc7c7c3123b7d26502..bf9801f1370c8d5e6ca459207b221ef2e92dac9e 100644
|
||||
index 5077a9ff7b78801bdc53536a37aee07b8d86ee4d..17b43a2c793dff0576a26e6ac3764b87faf4112e 100644
|
||||
--- a/net/minecraft/world/level/block/EnderChestBlock.java
|
||||
+++ b/net/minecraft/world/level/block/EnderChestBlock.java
|
||||
@@ -85,8 +85,14 @@ public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> i
|
||||
@@ -115,13 +115,13 @@ index f5533960708bdbaf2eacefbc7c7c3123b7d26502..bf9801f1370c8d5e6ca459207b221ef2
|
||||
// Paper end - Fix InventoryOpenEvent cancellation - moved up;
|
||||
player.awardStat(Stats.OPEN_ENDERCHEST);
|
||||
diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
index 0f808855f58281578c2758513787f0f7330c9291..5b6ee21c21686dad86717b87c0033149cefad142 100644
|
||||
index 027502d0af5512c31878978c4d05c52fa3029cca..2724b762bfb44e48619d4449560cf968a8fa7dee 100644
|
||||
--- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
|
||||
@@ -55,7 +55,17 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
this.maxStack = i;
|
||||
@@ -56,7 +56,17 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- private NonNullList<ItemStack> items = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ // Purpur start - Barrels and enderchests 6 rows
|
||||
+ private NonNullList<ItemStack> items = NonNullList.withSize(switch (me.earthme.luminol.config.modules.misc.ContainerExpansionConfig.barrelRows) {
|
||||
@@ -137,7 +137,7 @@ index 0f808855f58281578c2758513787f0f7330c9291..5b6ee21c21686dad86717b87c0033149
|
||||
public final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() {
|
||||
@Override
|
||||
protected void onOpen(Level level, BlockPos pos, BlockState state) {
|
||||
@@ -107,7 +117,16 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@@ -108,7 +118,16 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
@@ -155,7 +155,7 @@ index 0f808855f58281578c2758513787f0f7330c9291..5b6ee21c21686dad86717b87c0033149
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -127,7 +146,16 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
@@ -128,7 +147,16 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
|
||||
|
||||
@Override
|
||||
protected AbstractContainerMenu createMenu(int id, Inventory player) {
|
||||
@@ -8,11 +8,11 @@ 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.java b/net/minecraft/world/entity/npc/Villager.java
|
||||
index 7ea74aeb905b95e5919d74df5fbc5e8f7a9985e3..b61da3d0d7d24b674cae155b95f7fab0669f4a20 100644
|
||||
index aac65526817b1767511c7e180a4d9ded89ef89a1..02f1e08789d47d2e4f3ca51c1196dccea872963f 100644
|
||||
--- a/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -193,6 +193,53 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
this.setVillagerData(this.getVillagerData().setType(villagerType).setProfession(VillagerProfession.NONE));
|
||||
@@ -196,6 +196,53 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
this.setVillagerData(this.getVillagerData().withType(villagerType).withProfession(level.registryAccess(), VillagerProfession.NONE));
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
@@ -65,7 +65,7 @@ index 7ea74aeb905b95e5919d74df5fbc5e8f7a9985e3..b61da3d0d7d24b674cae155b95f7fab0
|
||||
@Override
|
||||
public Brain<Villager> getBrain() {
|
||||
return (Brain<Villager>)super.getBrain();
|
||||
@@ -289,11 +336,21 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -292,11 +339,20 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
// Paper start - EAR 2
|
||||
this.customServerAiStep(level, false);
|
||||
}
|
||||
@@ -74,7 +74,6 @@ index 7ea74aeb905b95e5919d74df5fbc5e8f7a9985e3..b61da3d0d7d24b674cae155b95f7fab0
|
||||
// Paper end - EAR 2
|
||||
ProfilerFiller profilerFiller = Profiler.get();
|
||||
profilerFiller.push("villagerBrain");
|
||||
- if (!inactive) this.getBrain().tick(level, this); // Paper - EAR 2
|
||||
+ // Purpur start
|
||||
+ if (me.earthme.luminol.config.modules.optimizations.LobotomizeVillageConfig.villagerLobotomizeEnabled) {
|
||||
+ // treat as inactive if lobotomized
|
||||
@@ -83,9 +82,8 @@ index 7ea74aeb905b95e5919d74df5fbc5e8f7a9985e3..b61da3d0d7d24b674cae155b95f7fab0
|
||||
+ this.isLobotomized = false;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+ if (!inactive) {
|
||||
+ this.getBrain().tick(level, this); // Paper - EAR 2
|
||||
+ } else if (this.isLobotomized && shouldRestock()) restock(); // Purpur - Lobotomize stuck villagers
|
||||
if (!inactive) this.getBrain().tick(level, this); // Paper - EAR 2
|
||||
+ else if (this.isLobotomized && shouldRestock()) restock(); // Purpur - Lobotomize stuck villagers
|
||||
profilerFiller.pop();
|
||||
if (this.assignProfessionWhenSpawned) {
|
||||
this.assignProfessionWhenSpawned = false;
|
||||
@@ -7,7 +7,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/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index 79fe336adf35f4f007461ed050e6301764fe7fc3..a5b805b98cf138eabfb06f4ff202462be60c2995 100644
|
||||
index 8bc92e45099007fa2120184916c4cdca98a6a452..50ddb37511074b01749a7c60b1d639ec67b3644c 100644
|
||||
--- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -41,6 +41,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -35,11 +35,10 @@ index 79fe336adf35f4f007461ed050e6301764fe7fc3..a5b805b98cf138eabfb06f4ff202462b
|
||||
if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
|
||||
int i = (int)(Util.getMillis() - this.keepAliveTime);
|
||||
this.latency = (this.latency * 3 + i) / 4;
|
||||
@@ -254,7 +265,22 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -254,6 +265,21 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
// Paper start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
||||
final long elapsedTime = millis - this.keepAliveTime;
|
||||
- if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // use vanilla's 15000L between keep alive packets
|
||||
+ // Purpur start
|
||||
+ if (me.earthme.luminol.config.modules.optimizations.PurpurAlternativeKeepaliveConfig.useAlternateKeepAlive) {
|
||||
+ if (elapsedTime >= 1000L) { // 1 second
|
||||
@@ -55,10 +54,9 @@ index 79fe336adf35f4f007461ed050e6301764fe7fc3..a5b805b98cf138eabfb06f4ff202462b
|
||||
+ }
|
||||
+ } else {
|
||||
+
|
||||
+ if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // use vanilla's 15000L between keep alive packets
|
||||
if (!this.isSingleplayerOwner() && elapsedTime >= 15000L) { // use vanilla's 15000L between keep alive packets
|
||||
if (this.keepAlivePending) {
|
||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||
this.disconnect(TIMEOUT_DISCONNECTION_MESSAGE, org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT); // Paper - kick event cause
|
||||
@@ -267,6 +293,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
this.send(new ClientboundKeepAlivePacket(this.keepAliveChallenge));
|
||||
}
|
||||
@@ -7,10 +7,10 @@ Co-authored by: MrPowerGamerBR <git@mrpowergamerbr.com>
|
||||
As part of: SparklyPaper (https://github.com/SparklyPower/SparklyPaper/blob/a69d3690472c9967772ffd4d4bd1f41403b7ea6f/sparklypaper-server/paper-patches/features/0005-Optimize-canSee-checks.patch)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index 5c507be097051de9a43a31bbc6190c3db7688667..7eff847790394aecd058e7a61905da86163b4c6e 100644
|
||||
index 99a8b9a8ee2032107be03bbc13d0275a337faf7b..607091ecbd4a7261f2c0d839ee4dd1d27fa2190a 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1224,7 +1224,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1294,7 +1294,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
// Folia end - region threading
|
||||
// CraftBukkit start - respect vanish API
|
||||
@@ -8,10 +8,10 @@ Co-authored by: MrPowerGamerBR <git@mrpowergamerbr.com>
|
||||
As part of: SparklyPaper (https://github.com/SparklyPower/SparklyPaper/blob/a69d3690472c9967772ffd4d4bd1f41403b7ea6f/sparklypaper-server/minecraft-patches/features/0002-Skip-distanceToSqr-call-in-ServerEntity-sendChanges-.patch)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java
|
||||
index 0fb253aa55a24b56b17f524b3261c5b75c7d7e59..1de43a4969a2a4535239b15a7bc30d99eb6934c6 100644
|
||||
index b118e91f1e0b5a8b8c0b2a4a32faabc5a34a5954..8c232ae73a8c6500723994af3a28b36814cccae0 100644
|
||||
--- a/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -195,6 +195,8 @@ public class ServerEntity {
|
||||
@@ -205,6 +205,8 @@ public class ServerEntity {
|
||||
|
||||
if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity)this.entity).isFallFlying()) {
|
||||
Vec3 deltaMovement = this.entity.getDeltaMovement();
|
||||
@@ -20,7 +20,7 @@ index 0fb253aa55a24b56b17f524b3261c5b75c7d7e59..1de43a4969a2a4535239b15a7bc30d99
|
||||
double d = deltaMovement.distanceToSqr(this.lastSentMovement);
|
||||
if (d > 1.0E-7 || d > 0.0 && deltaMovement.lengthSqr() == 0.0) {
|
||||
this.lastSentMovement = deltaMovement;
|
||||
@@ -212,6 +214,7 @@ public class ServerEntity {
|
||||
@@ -222,6 +224,7 @@ public class ServerEntity {
|
||||
this.broadcast.accept(new ClientboundSetEntityMotionPacket(this.entity.getId(), this.lastSentMovement));
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Correct player respawn place
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index 6e3e872ba415e8e809cfbe5a4dc1441b39c45480..40f3700c9bf56cfb26f0bca0dc6320fad8c75a65 100644
|
||||
index 4492f3ab470c0bf735b6fdc69115c1ebbcd727ef..8b9c823deed1844fa69d1456a91ac65487b8ae69 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -465,8 +465,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -492,8 +492,10 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
double amountX = selectMaxX - selectMinX;
|
||||
double amountZ = selectMaxZ - selectMinZ;
|
||||
|
||||
@@ -21,7 +21,7 @@ index 6e3e872ba415e8e809cfbe5a4dc1441b39c45480..40f3700c9bf56cfb26f0bca0dc6320fa
|
||||
|
||||
return new BlockPos(selectX, 0, selectZ);
|
||||
}
|
||||
@@ -477,10 +479,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -504,10 +506,20 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
}
|
||||
|
||||
private static BlockPos findSpawnAround(ServerLevel world, ServerPlayer player, BlockPos selected) {
|
||||
@@ -1,14 +1,14 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Thu, 24 Apr 2025 20:59:52 +0800
|
||||
Date: Sat, 24 May 2025 04:04:42 +0800
|
||||
Subject: [PATCH] Command IllegalArgumentException crash fix
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/commands/FillCommand.java b/net/minecraft/server/commands/FillCommand.java
|
||||
index 89154adfc659afa188cd771e70087e3b1a9c98b9..e622f96e6e116bf491bbea39da099e02ceaee502 100644
|
||||
index 3172e86defe86f44b1b095d89e2a35b06372dae9..5ce1f5c3e42fd0b8674cce8da9f3a732114607fb 100644
|
||||
--- a/net/minecraft/server/commands/FillCommand.java
|
||||
+++ b/net/minecraft/server/commands/FillCommand.java
|
||||
@@ -210,6 +210,10 @@ public class FillCommand {
|
||||
@@ -245,6 +245,10 @@ public class FillCommand {
|
||||
// Folia start - region threading
|
||||
} catch (CommandSyntaxException ex) {
|
||||
sendMessage(source, ex);
|
||||
@@ -16,30 +16,30 @@ index 89154adfc659afa188cd771e70087e3b1a9c98b9..e622f96e6e116bf491bbea39da099e02
|
||||
+ } catch (IllegalArgumentException ex) {
|
||||
+ net.minecraft.server.commands.SetBlockCommand.processIAE(source, ex);
|
||||
+ // Luminol End - Server crash fix
|
||||
}}); return 0; // Folia end - region threading
|
||||
}
|
||||
}); return 0; // Folia end - region threading
|
||||
}
|
||||
diff --git a/net/minecraft/server/commands/SetBlockCommand.java b/net/minecraft/server/commands/SetBlockCommand.java
|
||||
index 05b824409546ba8bacf7efdaeac106af89ff0715..55911d49c7650b344b46b2cfa9c4ae840ae433c8 100644
|
||||
index 96819168051a971685c9b69044fb5c4953bebd95..7f538574a44d4815687fe1f4cc3e7de47cac703b 100644
|
||||
--- a/net/minecraft/server/commands/SetBlockCommand.java
|
||||
+++ b/net/minecraft/server/commands/SetBlockCommand.java
|
||||
@@ -86,6 +86,15 @@ public class SetBlockCommand {
|
||||
@@ -101,6 +101,15 @@ public class SetBlockCommand {
|
||||
}
|
||||
// Folia end - region threading
|
||||
|
||||
+ // Luminol Start - Server crash fix
|
||||
+ public static void processIAE(CommandSourceStack src, IllegalArgumentException ex) {
|
||||
+ Component hoverText = Component.translatable("command.failed")
|
||||
+ .withStyle(style -> style.withHoverEvent(new net.minecraft.network.chat.HoverEvent(net.minecraft.network.chat.HoverEvent.Action.SHOW_TEXT, Component.literal(ex.getMessage()))));
|
||||
+ .withStyle(style -> style.withHoverEvent(new net.minecraft.network.chat.HoverEvent.ShowText(Component.literal(ex.getMessage()))));
|
||||
+ src.sendFailure(hoverText);
|
||||
+ com.mojang.logging.LogUtils.getLogger().error(ex.getMessage(), ex);
|
||||
+ }
|
||||
+ // Luminol end - Server crash fix
|
||||
+
|
||||
private static int setBlock(
|
||||
CommandSourceStack source, BlockPos pos, BlockInput state, SetBlockCommand.Mode mode, @Nullable Predicate<BlockInWorld> predicate
|
||||
CommandSourceStack source, BlockPos pos, BlockInput block, SetBlockCommand.Mode mode, @Nullable Predicate<BlockInWorld> filter, boolean strict
|
||||
) throws CommandSyntaxException {
|
||||
@@ -119,6 +128,10 @@ public class SetBlockCommand {
|
||||
@@ -137,6 +146,10 @@ public class SetBlockCommand {
|
||||
// Folia start - region threading
|
||||
} catch (CommandSyntaxException ex) {
|
||||
sendMessage(source, ex);
|
||||
@@ -6,10 +6,10 @@ 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 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b27973eba66f 100644
|
||||
index 12062e37c0e832f27ba52844739d0e8d5519a30a..87625b365e04ce05fa2b6cdf2003c839255c4393 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -783,8 +783,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -781,8 +781,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - Configurable player collision
|
||||
|
||||
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
|
||||
@@ -20,7 +20,7 @@ index 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b279
|
||||
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
||||
io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setValid(); // Paper - reset invalid state for event fire below
|
||||
io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.callReloadableRegistrarEvent(io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents.COMMANDS, io.papermc.paper.command.brigadier.PaperCommands.INSTANCE, org.bukkit.plugin.Plugin.class, io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.INITIAL); // Paper - call commands event for regular plugins
|
||||
@@ -1072,7 +1072,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1064,7 +1064,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
@@ -29,7 +29,7 @@ index 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b279
|
||||
this.server.disablePlugins();
|
||||
this.server.waitForAsyncTasksShutdown(); // Paper - Wait for Async Tasks during shutdown
|
||||
}
|
||||
@@ -1250,7 +1250,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1248,7 +1248,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.statusIcon = this.loadStatusIcon().orElse(null);
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
@@ -38,7 +38,7 @@ index 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b279
|
||||
// Folia start - region threading
|
||||
if (true) {
|
||||
io.papermc.paper.threadedregions.RegionizedServer.getInstance().init(); // Folia - region threading - only after loading worlds
|
||||
@@ -1593,7 +1593,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1591,7 +1591,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
if (this.emptyTicks >= i) {
|
||||
@@ -47,17 +47,16 @@ index 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b279
|
||||
if (this.emptyTicks == i) {
|
||||
LOGGER.info("Server empty for {} seconds, pausing", this.pauseWhileEmptySeconds());
|
||||
this.autoSave();
|
||||
@@ -1612,7 +1612,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1610,7 +1610,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();
|
||||
- this.server.spark.tickEnd(((double)(System.nanoTime() - lastTick) / 1000000D)); // Paper - spark
|
||||
+ if (false) this.server.spark.tickEnd(((double)(System.nanoTime() - lastTick) / 1000000D)); // Paper - spark // Luminol - Force disable builtin spark
|
||||
+ // Paper end - Server Tick Events
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1635,7 +1636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1633,7 +1633,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
};
|
||||
// Folia end - region threading
|
||||
|
||||
@@ -66,7 +65,7 @@ index 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b279
|
||||
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) {
|
||||
@@ -1743,7 +1744,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1743,7 +1743,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
|
||||
@@ -76,10 +75,10 @@ index 56f5568848d0f20b4d706c07dc8114594e0b5337..e62e8b9af7ad3e4454702ac86ad2b279
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index a0a8b0c7d091f63f023f15a2620b03ae2126782e..d7c922540b46e289395aeed514c98e43dc298e7b 100644
|
||||
index 20df6b46c420b25b598accb57b921055fb0c988b..5290b9cb524160717fb40704fb10fc0d0a37941b 100644
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -214,7 +214,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -173,7 +173,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
me.earthme.luminol.config.LuminolConfig.finalizeLoadConfig(); //Luminol - load config file
|
||||
me.earthme.luminol.config.LuminolConfig.setupLatch(); //Luminol - load config file
|
||||
@@ -88,7 +87,7 @@ index a0a8b0c7d091f63f023f15a2620b03ae2126782e..d7c922540b46e289395aeed514c98e43
|
||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||
if (this.convertOldUsers()) {
|
||||
this.getProfileCache().save(false); // Paper
|
||||
@@ -224,7 +224,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -183,7 +183,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
|
||||
thread.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
|
||||
@@ -62,7 +62,7 @@ index 36a9887f8be04c5c3fda6d926d819a9e5b2a79f2..5681592bdeb050d875c4c5d0dfaf6e01
|
||||
return Optional.of(new BlockPosTracker(globalPos.pos().above()));
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 62ca7871d1e5d0fe611948ad43e44c23fdc2d3f8..cd0fc85fbefce4669b4cb637ec3b2628da57adbf 100644
|
||||
index d34dcbbdeae41d23d6fb497e0e8da038580b6d01..50097fbb673655c2513770319e316a43449afa21 100644
|
||||
--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -257,7 +257,17 @@ public class Sniffer extends Animal {
|
||||
@@ -0,0 +1,42 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sun, 25 May 2025 23:05:15 +0800
|
||||
Subject: [PATCH] Fix chunk iteration self modification
|
||||
|
||||
We use the old-like logics which is in 1.21.4.
|
||||
Might fixes: https://github.com/PaperMC/Folia/issues/363
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index f8322334fb6a0cea38c4d1981862ba673fd1b100..0e08512ce94435ca90a2344eefc761fa4fcdeb18 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -173,14 +173,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
// 2. _removes_ are impossible at this stage in the tick
|
||||
final LevelChunk[] raw = entityTickingChunks.getRawDataUnchecked();
|
||||
final int size = entityTickingChunks.size(); foliaProfiler.addCounter(ca.spottedleaf.leafprofiler.LProfilerRegistry.RANDOM_CHUNK_TICK_COUNT, (long)size); // Folia - profiler
|
||||
+ // Luminol start - Fix chunk iteration self modification - use copy of raw array
|
||||
+ final LevelChunk[] rawCopy = new LevelChunk[size];
|
||||
+ System.arraycopy(raw, 0, rawCopy, 0, size);
|
||||
+ // Luminol end
|
||||
|
||||
- java.util.Objects.checkFromToIndex(0, size, raw.length);
|
||||
+ this.level.getServer().moonrise$executeMidTickTasks(); // Luminol - Fix chunk iteration self modification - try executing mid-tick tasks for once chunk system task parsing
|
||||
+ java.util.Objects.checkFromToIndex(0, size, rawCopy.length); // Luminol - Fix chunk iteration self modification - use copy of raw array
|
||||
for (int i = 0; i < size; ++i) {
|
||||
- world.tickChunk(raw[i], randomTickSpeed);
|
||||
+ // Luminol start - Fix chunk iteration self modification
|
||||
+ final LevelChunk chunk = rawCopy[i];
|
||||
+
|
||||
+ if (!chunk.getFullStatus().isOrAfter(FullChunkStatus.ENTITY_TICKING)) {
|
||||
+ continue; // skip chunks which are not entity ticking(probably downgraded from last iteration)
|
||||
+ }
|
||||
+ // Luminol end
|
||||
+ world.tickChunk(chunk, randomTickSpeed); // Luminol - Fix chunk iteration self modification - use copy of raw array
|
||||
|
||||
// call mid-tick tasks for chunk system
|
||||
if ((i & 7) == 0) {
|
||||
- //((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this.level.getServer()).moonrise$executeMidTickTasks(); // Folia - TODO restore this
|
||||
+ ((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this.level.getServer()).moonrise$executeMidTickTasks(); // Folia - TODO restore this // Luminol - Fix chunk iteration self modification - restore mid tasks here
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix creative player item pick
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 7587130e021d494ae5013f7992b8f3c96590cbd7..1116e2f00ea54f738535d7243fec6ad49b96f6ee 100644
|
||||
index 38f0aacba93236b8e5c19bb729326feac3285c94..a9cc35b4b253d9a7fd90f811af9be629b164fad0 100644
|
||||
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -435,7 +435,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -424,7 +424,15 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
Item item1 = item.getItem();
|
||||
int count = item.getCount();
|
||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||
@@ -0,0 +1,67 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 27 Apr 2025 14:26:01 +0800
|
||||
Subject: [PATCH] Fix entity portal-teleport speed
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 8329bc0cf531a1317ff8e213e948019d28df1eea..84a6bf575902676fc06211562b57806415528e64 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1356,7 +1356,27 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
if (levelChunk != null) levelChunk.getChunkHot().startTicking(); try { // KioCG
|
||||
try {
|
||||
// Folia end - profiler
|
||||
+ // Luminol start - Entity portal-teleport speed fix
|
||||
if (isActive) { // Paper - EAR 2
|
||||
+ if (!(entity instanceof Player) && entity.teleportTickType == 2) { // Luminol - after portal compensate tick
|
||||
+ entity.tick();
|
||||
+ entity.tick();
|
||||
+ entity.teleportTickType = 0;
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (entity.handlePortal()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ } else if (!(entity instanceof Player) && entity.teleportTickType == 1) { // Luminol - portal teleport only
|
||||
+ entity.teleportTickType++;
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (entity.handlePortal()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ } else {
|
||||
entity.tick();
|
||||
// Folia start - region threading
|
||||
if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||
@@ -1367,6 +1387,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
// portalled
|
||||
return;
|
||||
}
|
||||
+ }
|
||||
+ // Luminol end - Entity portal-teleport speed fix
|
||||
// Folia end - region threading
|
||||
} else {entity.inactiveTick();} // Paper - EAR 2
|
||||
profilerFiller.pop();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index af793516943582d92fe02a222b8c73f759ee8aae..9f1d0c85631a585e00a8b20f3536f1f61b011201 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -350,6 +350,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public boolean isTemporarilyActive;
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE;
|
||||
+ public int teleportTickType = 0;// Luminol - Entity portal-teleport speed fix
|
||||
|
||||
public void inactiveTick() {
|
||||
}
|
||||
@@ -3223,6 +3224,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
} else {
|
||||
if (this.portalProcess == null || !this.portalProcess.isSamePortal(portal)) {
|
||||
this.portalProcess = new PortalProcessor(portal, pos.immutable());
|
||||
+ this.teleportTickType = 1; // Luminol - Entity portal-teleport speed fix
|
||||
} else if (!this.portalProcess.isInsidePortalThisTick()) {
|
||||
this.portalProcess.updateEntryPosition(pos.immutable());
|
||||
this.portalProcess.setAsInsidePortalThisTick(true);
|
||||
@@ -1,142 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 27 Apr 2025 14:26:01 +0800
|
||||
Subject: [PATCH] Portal Behavior Modifiers
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 0cec31be4733ad330b09e3d2e81c696c396cac3c..de3042c1cad21c55b19ed12da0f4cbd99068540f 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1353,7 +1353,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
if (levelChunk != null) levelChunk.getChunkHot().startTicking(); try { // KioCG
|
||||
try {
|
||||
// Folia end - profiler
|
||||
+ // Luminol start - Entity portal-teleport speed fix
|
||||
if (isActive) { // Paper - EAR 2
|
||||
+ if (!(entity instanceof Player) && entity.flag_portal && entity.flag_compensate_ticks) { // Luminol - after portal compensate tick
|
||||
+ entity.tick();
|
||||
+ entity.tick();
|
||||
+ entity.flag_compensate_ticks = false;
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (entity.handlePortal()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ } else if (!(entity instanceof Player) && entity.flag_portal) { // Luminol - portal teleport only
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (entity.handlePortal()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ } else {
|
||||
entity.tick();
|
||||
// Folia start - region threading
|
||||
if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
|
||||
@@ -1364,6 +1383,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
// portalled
|
||||
return;
|
||||
}
|
||||
+ }
|
||||
+ // Luminol end - Entity portal-teleport speed fix
|
||||
// Folia end - region threading
|
||||
} else {entity.inactiveTick();} // Paper - EAR 2
|
||||
profilerFiller.pop();
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 2ea6160492cb23e96271dfbfd3bd35fe03109d6a..97879ba5080db09dde7cd76fe7b0ba502d8df572 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -343,6 +343,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public boolean isTemporarilyActive;
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE;
|
||||
+ // Luminol start - Entity portal-teleport speed fix
|
||||
+ public boolean flag_portal = false;
|
||||
+ public boolean flag_compensate_ticks = false;
|
||||
+ // Luminol end - Entity portal-teleport speed fix
|
||||
|
||||
public void inactiveTick() {
|
||||
}
|
||||
@@ -3305,6 +3309,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
} else {
|
||||
if (this.portalProcess == null || !this.portalProcess.isSamePortal(portal)) {
|
||||
this.portalProcess = new PortalProcessor(portal, pos.immutable());
|
||||
+ this.flag_portal = true; // Luminol - Entity portal-teleport speed fix
|
||||
} else if (!this.portalProcess.isInsidePortalThisTick()) {
|
||||
this.portalProcess.updateEntryPosition(pos.immutable());
|
||||
this.portalProcess.setAsInsidePortalThisTick(true);
|
||||
@@ -3829,20 +3834,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
EntityTreeNode curr;
|
||||
while ((curr = queue.pollFirst()) != null) {
|
||||
- EntityTreeNode[] passengers = curr.passengers;
|
||||
+ restore(curr); // Luminol - EndGateway Portal Passengers Fix
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Luminol Start - EndGateway Portal Passengers Fix
|
||||
+ private EntityTreeNode[] restore(EntityTreeNode entity) {
|
||||
+ EntityTreeNode[] passengers = entity.passengers;
|
||||
if (passengers == null) {
|
||||
- continue;
|
||||
+ return null;
|
||||
}
|
||||
|
||||
List<Entity> newPassengers = new java.util.ArrayList<>();
|
||||
for (EntityTreeNode passenger : passengers) {
|
||||
+ passenger.passengers = restore(passenger);
|
||||
newPassengers.add(passenger.root);
|
||||
- passenger.root.vehicle = curr.root;
|
||||
+ passenger.root.vehicle = entity.root;
|
||||
}
|
||||
-
|
||||
- curr.root.passengers = ImmutableList.copyOf(newPassengers);
|
||||
- }
|
||||
+ entity.root.passengers = ImmutableList.copyOf(newPassengers);
|
||||
+ return passengers;
|
||||
}
|
||||
+ // Luminol End - EndGateway Portal Passengers Fix
|
||||
|
||||
public void addTracker() {
|
||||
for (final EntityTreeNode node : this.getFullTree()) {
|
||||
@@ -4561,6 +4573,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
}
|
||||
|
||||
+ // Luminol start - Add afterPortalLogic
|
||||
+ protected void afterPortalLogic() {
|
||||
+ this.flag_compensate_ticks = true; // Luminol - Entity portal-teleport speed fix
|
||||
+ this.flag_portal = false; // Luminol - Entity portal-teleport speed fix
|
||||
+ }
|
||||
+ // Luminol end - Add afterPortalLogic
|
||||
+
|
||||
protected boolean portalToAsync(ServerLevel destination, BlockPos portalPos, boolean takePassengers,
|
||||
PortalType type, java.util.function.Consumer<Entity> teleportComplete) {
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(this, "Cannot portal entity async");
|
||||
@@ -4644,6 +4663,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
info.postTeleportTransition().onTransition(teleported);
|
||||
}
|
||||
|
||||
+ teleported.afterPortalLogic(); // Luminol - Add afterPortalLogic
|
||||
+
|
||||
// Kaiiju start - vanilla end teleportation
|
||||
/*if (teleportComplete != null) {
|
||||
teleportComplete.accept(teleported);
|
||||
diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 88570bb4aa02896545805d7721c45cf9599befea..f2d9ef4429b56785fd9d95abb9d734901d589828 100644
|
||||
--- a/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -251,4 +251,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
return !this.level().paperConfig().fixes.preventTntFromMovingInWater && super.isPushedByFluid();
|
||||
}
|
||||
// Paper end - Option to prevent TNT from moving in water
|
||||
+
|
||||
+ // Luminol start - Add afterPortalLogic
|
||||
+ protected void afterPortalLogic() {
|
||||
+ this.setUsedPortal(true);
|
||||
+ super.afterPortalLogic();
|
||||
+ }
|
||||
+ // Luminol end - Add afterPortalLogic
|
||||
}
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix off tickregion sync teleport
|
||||
Folis's teleportAsync implementation has some checks missing during the sync teleportation checks, if we are teleport to the edge of the tickregion, it is still asserting that we are in the same tickregion and moved us directly, but there is actually some logics is already touching the stuff out of current tickregion.So we added some new edge checks to the sync teleportation checks which will check the tickregion belonging in a shape of cycle which is in min(entity's bounding box + simulate distance, 6) of radius to fix that issue
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 4026d465687604965f105ded21a8206fd52bd375..771744d4540fcd163efcde43c27111680b25c928 100644
|
||||
index 9f1d0c85631a585e00a8b20f3536f1f61b011201..87e22d1fed087886ac845f6e816be5bf20fac9fb 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4060,6 +4060,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4024,6 +4024,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.resetStoredPositions();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ index 4026d465687604965f105ded21a8206fd52bd375..771744d4540fcd163efcde43c2711168
|
||||
protected final void transform(TeleportTransition telpeort) {
|
||||
PositionMoveRotation move = PositionMoveRotation.calculateAbsolute(
|
||||
PositionMoveRotation.of(this), PositionMoveRotation.of(telpeort), telpeort.relatives()
|
||||
@@ -4157,7 +4172,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -4146,7 +4161,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// check for same region
|
||||
if (destination == this.level()) {
|
||||
Vec3 currPos = this.position();
|
||||
@@ -1,50 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: adabugra <57899270+adabugra@users.noreply.github.com>
|
||||
Date: Fri, 31 Jan 2025 19:17:01 +0300
|
||||
Subject: [PATCH] Leaves: Disable moved wrongly threshold
|
||||
|
||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/f553c53e4230aa032e54a69b6479f1959ed24a60/patches/removed/server/0099-Disable-moved-wrongly-threshold.patch)
|
||||
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 da45200818ef4f495c90517c234a41725f709b85..bf617d2ca5e66bbcd244e4f290a7b101a967d18b 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -581,7 +581,7 @@ public class ServerGamePacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
- if (d7 - d6 > Math.max(100.0, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled && d7 - d6 > Math.max(100.0, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // Leaves - disable can
|
||||
// CraftBukkit end
|
||||
LOGGER.warn(
|
||||
"{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5
|
||||
@@ -611,7 +611,7 @@ public class ServerGamePacketListenerImpl
|
||||
d5 = d2 - rootVehicle.getZ();
|
||||
d7 = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
boolean flag2 = false;
|
||||
- if (d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled && d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot / Leaves - disable can
|
||||
flag2 = true; // Paper - diff on change, this should be moved wrongly
|
||||
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7));
|
||||
}
|
||||
@@ -1438,7 +1438,7 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
if (this.shouldCheckPlayerMovement(isFallFlying)) {
|
||||
float f2 = isFallFlying ? 300.0F : 100.0F;
|
||||
- if (d7 - d6 > Math.max(f2, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed))) {
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled && d7 - d6 > Math.max(f2, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed))) { // Leaves - disable can
|
||||
// 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,
|
||||
@@ -1510,7 +1510,8 @@ public class ServerGamePacketListenerImpl
|
||||
d5 = d2 - this.player.getZ();
|
||||
d7 = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
boolean movedWrongly = false; // Paper - Add fail move event; rename
|
||||
- if (!this.player.isChangingDimension()
|
||||
+ if (!me.earthme.luminol.config.modules.misc.DisableMovedWronglyThreshold.enabled // Leaves - disable can
|
||||
+ && !this.player.isChangingDimension()
|
||||
&& d7 > org.spigotmc.SpigotConfig.movedWronglyThreshold // Spigot
|
||||
&& !this.player.isSleeping()
|
||||
&& !this.player.gameMode.isCreative()
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix uncorrected death check of folia
|
||||
In the new mc version, mojang changed some checks in A.C.M(AbstractContainerMenu) and there is a new death check of player which will be executed when player dead.But on folia, player entity cannot be discarded unless they disconnected from the server, so there is an obvious bug that when player dead, the logic depend on that dead check will not be executed correctly because the check logic is still asserting the player is alive by checking if the player is discarded, which caused some exploits can save items in the crafting slots(with InventoryTweaks turned on in meteor client) when keepInventory is set to false
|
||||
|
||||
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
index 50af953a4698a3c6e16b840fab764dd733b3fbc9..a9c058238819f3631d94ac306185e909821caf35 100644
|
||||
index 813417a09b4acc7d57e80a53d970767e230d75b1..a9cf0ef95b706f05060bbcd2a4f5a03c60f783d2 100644
|
||||
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||
@@ -679,7 +679,7 @@ public abstract class AbstractContainerMenu {
|
||||
@@ -690,7 +690,7 @@ public abstract class AbstractContainerMenu {
|
||||
}
|
||||
|
||||
private static void dropOrPlaceInInventory(Player player, ItemStack stack) {
|
||||
@@ -6,21 +6,21 @@ Subject: [PATCH] Teleport async if entity was moving to another region at once
|
||||
On folia, entity usually cannot move out of the tickregion, but sometimes it actually does(like some end pearl gun that can shoot an end pearl to the block faraway than 10000 blocks even more). To fix this, we added a temporary fix which teleport these entities to the destination instead running its move logics so that we could ensure anything is under control.But one thing need to consider is that teleportAsync is actually calling halfway of the entity tick and there is still something running when teleportAsync called, which is actually modified the entity in another thread, so there is still need an improvement
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index cc8efa162fbe7ce6a91629239bf18d7b6b096a8a..4026d465687604965f105ded21a8206fd52bd375 100644
|
||||
index 87e22d1fed087886ac845f6e816be5bf20fac9fb..b163c43f5398b9f38c75ae7af6a3015b686624ce 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -1100,6 +1100,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
// Paper end - detailed watchdog information
|
||||
@@ -1084,6 +1084,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
|
||||
private boolean boundingBoxChanged = false; // Gale - VMP - skip entity move if movement is zero
|
||||
|
||||
+ //Luminol start - Fix large pos moving
|
||||
+ private volatile boolean preventMoving = false;
|
||||
+ //Luminol end
|
||||
+
|
||||
public void move(MoverType type, Vec3 movement) {
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
@@ -1110,6 +1114,32 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
// Gale start - VMP - skip entity move if movement is zero
|
||||
if (!this.boundingBoxChanged && movement.equals(Vec3.ZERO)) {
|
||||
@@ -1099,6 +1103,32 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
this.moveStartZ = this.getZ();
|
||||
this.moveVector = movement;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sat, 31 May 2025 16:28:19 +0800
|
||||
Subject: [PATCH] Fix mispatched entity custom spawning logic
|
||||
|
||||
we should use local players as each tickregion will only foreach their own player entities so that we won't come across async accessing world data
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/CatSpawner.java b/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
index f5d27988605d48cdf314f28ba332f33f0a314266..39b506dad0601b2d75acb14989f2758132155d1b 100644
|
||||
--- a/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
+++ b/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
@@ -27,7 +27,7 @@ public class CatSpawner implements CustomSpawner {
|
||||
worldData.catSpawnerNextTick--; // Folia - region threading
|
||||
if (worldData.catSpawnerNextTick <= 0) { // Folia - region threading
|
||||
worldData.catSpawnerNextTick = 1200; // Folia - region threading
|
||||
- Player randomPlayer = level.getRandomPlayer();
|
||||
+ Player randomPlayer = level.getRandomLocalPlayer(); // Luminol - Fix mispatched entity custom spawning logic - Use local players for only the players in current tickregion
|
||||
if (randomPlayer != null) {
|
||||
RandomSource randomSource = level.random;
|
||||
int i = (8 + randomSource.nextInt(24)) * (randomSource.nextBoolean() ? -1 : 1);
|
||||
diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index a7f56126a26e1fca86c39d8d656b648f5d6bb4ca..4626ee9f4410d8fd683db17b49ef79ab67eeda5f 100644
|
||||
--- a/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -40,7 +40,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
worldData.phantomSpawnerNextTick += (spawnAttemptMinSeconds + randomSource.nextInt(spawnAttemptMaxSeconds - spawnAttemptMinSeconds + 1)) * 20; // Folia - region threading
|
||||
// Paper end - Ability to control player's insomnia and phantoms
|
||||
if (level.getSkyDarken() >= 5 || !level.dimensionType().hasSkyLight()) {
|
||||
- for (ServerPlayer serverPlayer : level.players()) {
|
||||
+ for (ServerPlayer serverPlayer : level.getLocalPlayers()) { // Luminol - Fix mispatched entity custom spawning logic - Use local players for only the players in current tickregion
|
||||
if (!serverPlayer.isSpectator() && (!level.paperConfig().entities.behavior.phantomsDoNotSpawnOnCreativePlayers || !serverPlayer.isCreative())) { // Paper - Add phantom creative and insomniac controls
|
||||
BlockPos blockPos = serverPlayer.blockPosition();
|
||||
if (!level.dimensionType().hasSkyLight() || blockPos.getY() >= level.getSeaLevel() && level.canSeeSky(blockPos)) {
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Thu, 5 Jun 2025 21:11:31 +0800
|
||||
Subject: [PATCH] Fix off region thrown egg new entity creating
|
||||
|
||||
should set pos before so that we could correctly modify the entity's other attribute on-region without triggering the async catchers
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/ThrownEgg.java b/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
index 73ec34b43f3fb2aa3edc3f1cb48a923d1fa32036..5d2f80c4dd8cb6726b0f42891d4ddbc85bf153a7 100644
|
||||
--- a/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
+++ b/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
@@ -97,17 +97,18 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
for (int i1 = 0; i1 < i; i1++) {
|
||||
net.minecraft.world.entity.Entity chicken = newEntityType.create(this.level(), net.minecraft.world.entity.EntitySpawnReason.TRIGGERED); // CraftBukkit
|
||||
if (chicken != null) {
|
||||
+ chicken.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); // Luminol - Fix off region thrown egg - move up
|
||||
// CraftBukkit start
|
||||
if (chicken.getBukkitEntity() instanceof org.bukkit.entity.Ageable ageable) {
|
||||
ageable.setBaby();
|
||||
}
|
||||
// CraftBukkit end
|
||||
- chicken.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F);
|
||||
+ // chicken.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); // Luminol - Fix off region thrown egg - move up
|
||||
// CraftBukkit start
|
||||
if (chicken instanceof Chicken realChicken) {
|
||||
Optional.ofNullable(this.getItem().get(DataComponents.CHICKEN_VARIANT))
|
||||
- .flatMap(eitherHolder -> eitherHolder.unwrap(this.registryAccess()))
|
||||
- .ifPresent(realChicken::setVariant);
|
||||
+ .flatMap(eitherHolder -> eitherHolder.unwrap(this.registryAccess()))
|
||||
+ .ifPresent(realChicken::setVariant);
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (!chicken.fudgePositionAfterSizeChange(ZERO_SIZED_DIMENSIONS)) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -212,6 +_,8 @@
|
||||
@@ -171,6 +_,8 @@
|
||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Rebrand to Luminol
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index f5ff71e31516327be71924926938f1c9f0e503df..338e61f5cfa0c556245228462df45954ac52bc4f 100644
|
||||
index 90a5178b5025378197b69514d782de5d6090cb6b..22c038e6556d9911e1eaedf71d7b86843af89c16 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -592,7 +592,7 @@ public class Metrics {
|
||||
@@ -593,7 +593,7 @@ public class Metrics {
|
||||
boolean logFailedRequests = config.getBoolean("logFailedRequests", false);
|
||||
// Only start Metrics, if it's enabled in the config
|
||||
if (config.getBoolean("enabled", true)) {
|
||||
@@ -17,7 +17,7 @@ index f5ff71e31516327be71924926938f1c9f0e503df..338e61f5cfa0c556245228462df45954
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
String minecraftVersion = Bukkit.getVersion();
|
||||
@@ -606,11 +606,11 @@ public class Metrics {
|
||||
@@ -607,11 +607,11 @@ public class Metrics {
|
||||
final String implVersion = org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion();
|
||||
if (implVersion != null) {
|
||||
final String buildOrHash = implVersion.substring(implVersion.lastIndexOf('-') + 1);
|
||||
@@ -32,7 +32,7 @@ index f5ff71e31516327be71924926938f1c9f0e503df..338e61f5cfa0c556245228462df45954
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
index 29bd788ae8bc61c1e62a4f84b9e259931a7041ce..1676ac5e6c8369836bf719f338603fbbc3105b1e 100644
|
||||
index 1783f9ea48154dcc8971fc5ef088f5a8c0f0b2ff..22125dbe1765f930fe10fe420be1c275ec553139 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -35,7 +35,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
|
||||
@@ -80,11 +80,11 @@ index c95769a4e64fabd7acdff6c5f6f349107e1cf5c0..4efa1c057ae6cfdea7889c372bd62dc1
|
||||
reason + ", context=" + getThreadContext() + ", world=" + WorldUtil.getWorldName(world) + ", block_pos=" + new Vec3(blockX, 0.0, blockZ);
|
||||
LOGGER.error(ex, new Throwable());
|
||||
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
index 50f01faa88c8c658252fade3748f20e48e9c8432..36fa1f83c3286e10cc7c208a2a2f1a718d525ad8 100644
|
||||
index 7e7a0ed944961af5ab7a49bc659da2862d2e2c82..f2867e3758ebfc5ea1066b0d5d2fe6f2dfab8248 100644
|
||||
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
|
||||
@@ -7,7 +7,7 @@ public class AsyncCatcher {
|
||||
public static boolean enabled = true;
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.server.MinecraftServer;
|
||||
public class AsyncCatcher {
|
||||
|
||||
public static void catchOp(String reason) {
|
||||
- if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThread()) { // Paper - chunk system
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add tpsbar with chunkhot membar and region bar
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index de8b9048c8395c05b8688bc9d984b8ad680f15b3..f42692cd4f0154705c3d5b030d281cfc333803ed 100644
|
||||
index 400e632208d133a3f49fc7f14bceb48a1026769b..631bec0adee5b01bfb931c25195b949eaf2efd27 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -437,4 +437,12 @@ public class CraftChunk implements Chunk {
|
||||
@@ -422,4 +422,12 @@ public class CraftChunk implements Chunk {
|
||||
static {
|
||||
Arrays.fill(FULL_LIGHT, (byte) 0xFF);
|
||||
}
|
||||
@@ -16,32 +16,32 @@ index de8b9048c8395c05b8688bc9d984b8ad680f15b3..f42692cd4f0154705c3d5b030d281cfc
|
||||
+ // KioCG start - ChunkHot
|
||||
+ @Override
|
||||
+ public long getChunkHotAvg() {
|
||||
+ final net.minecraft.world.level.chunk.LevelChunk target = this.worldServer.getChunkIfLoaded(this.x,this.z);
|
||||
+ final net.minecraft.world.level.chunk.LevelChunk target = this.level.getChunkIfLoaded(this.x,this.z);
|
||||
+ return target == null ? -1 : target.getChunkHot().getAverage();
|
||||
+ }
|
||||
+ // KioCG end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index f7ceb89d9b908f02fc9e90e426e8e14e330ac041..b6e451c8a41a1d25bac679d18156d6e813efda2a 100644
|
||||
index 0e32a9ad852e521ce9618acc1642d3748995b4bf..7133038efdef5d60a1bdccb012a2020e432ef25e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2400,6 +2400,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
handle.expToDrop = data.getInt("expToDrop");
|
||||
handle.keepLevel = data.getBoolean("keepLevel");
|
||||
}
|
||||
@@ -2368,6 +2368,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
handle.newLevel = data.getIntOr("newLevel", 0);
|
||||
handle.expToDrop = data.getIntOr("expToDrop", 0);
|
||||
handle.keepLevel = data.getBooleanOr("keepLevel", false);
|
||||
+ //Luminol start - Tpsbar
|
||||
+ getHandle().isTpsBarVisible = data.getBoolean("tpsbarVisible");
|
||||
+ getHandle().isTpsBarVisible = data.getBooleanOr("tpsbarVisible", false);
|
||||
+ //Luminol end
|
||||
+ //Luminol start - Membar
|
||||
+ getHandle().isMemBarVisible = data.getBoolean("membarVisible");
|
||||
+ getHandle().isMemBarVisible = data.getBooleanOr("membarVisible", false);
|
||||
+ //Luminol end
|
||||
+ //Luminol start - Regionbar
|
||||
+ getHandle().isRegionBarVisible = data.getBoolean("regionbarVisible");
|
||||
+ getHandle().isRegionBarVisible = data.getBooleanOr("regionbarVisible", false);
|
||||
+ //Luminol end
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2421,6 +2430,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2389,6 +2398,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
data.putLong("lastPlayed", System.currentTimeMillis());
|
||||
data.putString("lastKnownName", handle.getScoreboardName());
|
||||
|
||||
@@ -55,9 +55,9 @@ index f7ceb89d9b908f02fc9e90e426e8e14e330ac041..b6e451c8a41a1d25bac679d18156d6e8
|
||||
+ data.putBoolean("regionbarVisible", handle.isRegionBarVisible);
|
||||
+ //Luminol end
|
||||
// Paper start - persist for use in offline save data
|
||||
if (!nbttagcompound.contains("Paper")) {
|
||||
nbttagcompound.put("Paper", new CompoundTag());
|
||||
@@ -3614,4 +3632,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (!tag.contains("Paper")) {
|
||||
tag.put("Paper", new CompoundTag());
|
||||
@@ -3581,4 +3599,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void setDeathScreenScore(final int score) {
|
||||
getHandle().setScore(score);
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ Subject: [PATCH] Purpur Lobotomize stuck villagers
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
index bd515cdfbcc6fb0d17f70150d8b0bab60949db49..b6038fedea6251226b3b3db0f4b7a1f3d2276ab0 100644
|
||||
index e86f69f75d406b81d9ca32f9cad5e31cb8c55b54..9ca1d60cb7f3e65cdf491bd65c1c0c38cd2c73e8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
|
||||
@@ -381,4 +381,11 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||
public void clearReputations() {
|
||||
getHandle().getGossips().gossips.clear();
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
|
||||
@@ -18,19 +18,19 @@ index a0b84535a9d3833d4df692b85b272f145559dd80..c2ba46408b5ad727d7a17f21d47b2898
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a60e6ed437764ebeaab64e9ae7b87a177119e436..7ffdc9a50c41adcac5d2b8ac84036aacc789ece6 100644
|
||||
index 1091d2747c04166447540b37d86f51fe2591adc8..e0cee79b949fd2a4684bdfe7aa257c2ea96914b0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -315,7 +315,7 @@ public final class CraftServer implements Server {
|
||||
public static Exception excessiveVelEx; // Paper - Velocity warnings
|
||||
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper
|
||||
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes
|
||||
- public final io.papermc.paper.SparksFly spark; // Paper - spark
|
||||
@@ -314,7 +314,7 @@ public final class CraftServer implements Server {
|
||||
public static Exception excessiveVelEx;
|
||||
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher();
|
||||
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer;
|
||||
- public final io.papermc.paper.SparksFly spark;
|
||||
+ public io.papermc.paper.SparksFly spark; // Paper - spark // Luminol - Force disable builtin spark
|
||||
private final ServerConfiguration serverConfig = new PaperServerConfiguration();
|
||||
|
||||
// Paper start - Folia region threading API
|
||||
private final io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler(); // Folia - region threading
|
||||
@@ -493,7 +493,7 @@ public final class CraftServer implements Server {
|
||||
@@ -496,7 +496,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes
|
||||
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
|
||||
@@ -39,7 +39,7 @@ index a60e6ed437764ebeaab64e9ae7b87a177119e436..7ffdc9a50c41adcac5d2b8ac84036aac
|
||||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -1157,7 +1157,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1141,7 +1141,7 @@ public final class CraftServer implements Server {
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
||||
@@ -48,7 +48,7 @@ index a60e6ed437764ebeaab64e9ae7b87a177119e436..7ffdc9a50c41adcac5d2b8ac84036aac
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -1186,7 +1186,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1170,7 +1170,7 @@ public final class CraftServer implements Server {
|
||||
this.loadPlugins();
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] SparklyPaper Optimize canSee checks
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3819c748473f2cbf53890867e552985eeb8ee35f..8cb02f08ccddd69ad3ea868e848c61dfb4fa5fe7 100644
|
||||
index 7133038efdef5d60a1bdccb012a2020e432ef25e..77dd160db2d05d6542ae336fbd71eeae76479b91 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -210,7 +210,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -216,7 +216,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private boolean hasPlayedBefore = false;
|
||||
private final ConversationTracker conversationTracker = new ConversationTracker();
|
||||
private final Set<String> channels = new HashSet<String>();
|
||||
@@ -17,7 +17,7 @@ index 3819c748473f2cbf53890867e552985eeb8ee35f..8cb02f08ccddd69ad3ea868e848c61df
|
||||
private final Set<UUID> unlistedEntities = new HashSet<>(); // Paper - Add Listing API for Player
|
||||
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
|
||||
private int hash = 0;
|
||||
@@ -2264,9 +2264,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2267,9 +2267,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public boolean canSee(org.bukkit.entity.Entity entity) {
|
||||
|
||||
@@ -5,36 +5,36 @@ Subject: [PATCH] Leaf Secure seed and matter seed command
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index f42692cd4f0154705c3d5b030d281cfc333803ed..39cc976f65f826a00e2e637c139f9134c5e74715 100644
|
||||
index 631bec0adee5b01bfb931c25195b949eaf2efd27..05d364bcadb137af4e1a8c955643b7dc3440b299 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -206,7 +206,12 @@ public class CraftChunk implements Chunk {
|
||||
@@ -196,7 +196,12 @@ public class CraftChunk implements Chunk {
|
||||
@Override
|
||||
public boolean isSlimeChunk() {
|
||||
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
|
||||
- return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||
// 987234911L is taken from Slime when seeing if a slime can spawn in a chunk
|
||||
- return this.level.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), level.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||
+ // Leaf start - Matter - Secure Seed
|
||||
+ boolean isSlimeChunk = me.earthme.luminol.config.modules.misc.SecureSeedConfig.enabled
|
||||
+ ? worldServer.getChunk(this.getX(), this.getZ()).isSlimeChunk()
|
||||
+ : WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||
+ return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
||||
+ ? level.getChunk(this.getX(), this.getZ()).isSlimeChunk()
|
||||
+ : WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), level.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
|
||||
+ return this.level.paperConfig().entities.spawning.allChunksAreSlimeChunks || isSlimeChunk;
|
||||
+ // Leaf end - Matter - Secure Seed
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7ffdc9a50c41adcac5d2b8ac84036aacc789ece6..292f32c935767b54098290eea8a512b82f962caf 100644
|
||||
index e0cee79b949fd2a4684bdfe7aa257c2ea96914b0..047369190b8d03c5765595ba898da3a5c463a6c0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1424,7 +1424,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1392,7 +1392,11 @@ public final class CraftServer implements Server {
|
||||
registryAccess = levelDataAndDimensions.dimensions().dimensionsRegistryAccess();
|
||||
} else {
|
||||
LevelSettings levelSettings;
|
||||
- WorldOptions worldOptions = new WorldOptions(creator.seed(), creator.generateStructures(), false);
|
||||
- WorldOptions worldOptions = new WorldOptions(creator.seed(), creator.generateStructures(), creator.bonusChest());
|
||||
+ // Leaf start - Matter - Secure Seed
|
||||
+ WorldOptions worldOptions = me.earthme.luminol.config.modules.misc.SecureSeedConfig.enabled
|
||||
+ ? new WorldOptions(creator.seed(), su.plo.matter.Globals.createRandomWorldSeed(), creator.generateStructures(), false)
|
||||
+ : new WorldOptions(creator.seed(), creator.generateStructures(), false);
|
||||
+ : new WorldOptions(creator.seed(), creator.generateStructures(), creator.bonusChest());
|
||||
+ // Leaf end - Matter - Secure Seed
|
||||
WorldDimensions worldDimensions;
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Tick regions api
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index cd6e46fa68c009deb8dfebcecb88e058dfede0b0..f0c8e76efaf897a81283edbf9a9c2a71bc28c9a9 100644
|
||||
index 85953b02763b4dfddfc00c095f1ec4a019a1a30f..a301a6824e68a9a18a42f16f7c47d66e9ee66c9a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2517,4 +2517,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2519,4 +2519,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.adventure$pointers;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Purpur-Barrels-and-enderchests-6-rows
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
index 1ce328bed5cf3d087a3f7dc9236153381d758493..20f2b9945eaa58e05b417d9cca7c30dd0496cf72 100644
|
||||
index c00ddfe41439954fa0fd87c0933f274c8a752eb6..f60e3896411ff8342639e3f3422d551c84d5871e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
|
||||
@@ -145,9 +145,26 @@ public class CraftContainer extends AbstractContainerMenu {
|
||||
@@ -150,9 +150,26 @@ public class CraftContainer extends AbstractContainerMenu {
|
||||
case PLAYER:
|
||||
case CHEST:
|
||||
case ENDER_CHEST:
|
||||
@@ -38,7 +38,7 @@ index 1ce328bed5cf3d087a3f7dc9236153381d758493..20f2b9945eaa58e05b417d9cca7c30dd
|
||||
case DROPPER:
|
||||
this.delegate = new DispenserMenu(windowId, bottom, top);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
index c6159c70f7a37b9bffe268b91905ce848d1d2927..1ae08daecb7f072e0afaae327bad64e43c3ae027 100644
|
||||
index f850e6cea92edc87ed54cf54488b5ebb606913ed..f4db38de4348fb03db0b769bd5b5993184dd4abb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
@@ -84,7 +84,7 @@ public class CraftInventory implements Inventory {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 6 Apr 2025 10:42:46 +0800
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sat, 24 May 2025 02:26:33 +0800
|
||||
Subject: [PATCH] Leaves Fix SculkCatalyst exp skip
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index bef7a026676ab59a84fc33c8af50ad2b9447fd8c..0a678458bcee4ced98d2880821dbff302f59b7f6 100644
|
||||
index ee8fcf73665de82fa3968e0998b3221d9088647b..7bb22db40f18be2dbc3ca33a0cb864cf8389ac1e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -991,7 +991,7 @@ public class CraftEventFactory {
|
||||
@@ -851,7 +851,7 @@ public class CraftEventFactory {
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||
CraftWorld world = (CraftWorld) entity.getWorld();
|
||||
@@ -17,15 +17,15 @@ index bef7a026676ab59a84fc33c8af50ad2b9447fd8c..0a678458bcee4ced98d2880821dbff30
|
||||
populateFields(victim, event); // Paper - make cancellable
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
@@ -1002,6 +1002,7 @@ public class CraftEventFactory {
|
||||
playDeathSound(victim, event);
|
||||
@@ -862,6 +862,7 @@ public class CraftEventFactory {
|
||||
playDeathSound(victim, event, damageSource);
|
||||
// Paper end
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
+ victim.expToReward = event.getRewardExp(); // Leaves - exp fix
|
||||
lootCheck.run(); // Paper - advancement triggers before destroying items
|
||||
|
||||
// Paper start - Restore vanilla drops behavior
|
||||
@@ -1037,6 +1038,7 @@ public class CraftEventFactory {
|
||||
@@ -897,6 +898,7 @@ public class CraftEventFactory {
|
||||
victim.newLevel = event.getNewLevel();
|
||||
victim.newTotalExp = event.getNewTotalExp();
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sat, 24 May 2025 04:27:17 +0800
|
||||
Subject: [PATCH] Add BlockPos transform to Position support
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||
index ff6d200c3c3ecb958086f11dff39357dc0bf70fc..16d95bd30c33d831fd495c65748f6633df5971aa 100644
|
||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||
@@ -160,6 +160,12 @@ public final class MCUtil {
|
||||
return new Location(world.getWorld(), pos.x(), pos.y(), pos.z());
|
||||
}
|
||||
|
||||
+ // Luminol start - add BlockPos support
|
||||
+ public static org.bukkit.Location toLocation(net.minecraft.world.level.Level world, BlockPos pos) {
|
||||
+ return new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ());
|
||||
+ }
|
||||
+ // Luminol end - add BlockPos support
|
||||
+
|
||||
/**
|
||||
* Converts a NMS World/Vector to Bukkit Location
|
||||
*/
|
||||
@@ -1,6 +1,6 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/abomination/IRegionFile.java
|
||||
@@ -1,0 +_,39 @@
|
||||
@@ -1,0 +_,41 @@
|
||||
+package abomination;
|
||||
+
|
||||
+import ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile;
|
||||
@@ -39,4 +39,6 @@
|
||||
+ boolean recalculateHeader() throws IOException;
|
||||
+
|
||||
+ void setOversized(int x, int z, boolean oversized) throws IOException;
|
||||
+
|
||||
+ default int getRecalculateCount() {return 0;} // Luminol - Configurable region file format
|
||||
+}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/LuminolConfig.java
|
||||
@@ -1,0 +_,271 @@
|
||||
@@ -1,0 +_,275 @@
|
||||
+package me.earthme.luminol.config;
|
||||
+
|
||||
+import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
@@ -146,6 +146,10 @@
|
||||
+ success = false;
|
||||
+ logger.error("Failed to transform removed config {}!", transformedConfig.name());
|
||||
+ }
|
||||
+
|
||||
+ if (transformedConfig.transformComments()) {
|
||||
+ configFileInstance.setComment(fullConfigKeyName, configFileInstance.getComment(oldConfigKeyName));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (success) removeConfig(oldConfigKeyName, transformedConfig.category());
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user