9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-23 00:39:16 +00:00

start 1.21.11 update, applied api and sources

This commit is contained in:
NONPLAYT
2025-12-09 20:55:34 +03:00
parent 1509419aa6
commit db321535bd
29 changed files with 85 additions and 101 deletions

View File

@@ -1,6 +1,6 @@
--- a/purpur-api/build.gradle.kts --- a/purpur-api/build.gradle.kts
+++ b/purpur-api/build.gradle.kts +++ b/purpur-api/build.gradle.kts
@@ -9,11 +_,11 @@ @@ -11,11 +_,11 @@
withJavadocJar() withJavadocJar()
} }
@@ -15,7 +15,7 @@
val apiAndDocs: Configuration by configurations.creating { val apiAndDocs: Configuration by configurations.creating {
attributes { attributes {
@@ -40,9 +_,9 @@ @@ -42,9 +_,9 @@
dependencies { dependencies {
// api dependencies are listed transitively to API consumers // api dependencies are listed transitively to API consumers
@@ -27,7 +27,7 @@
api("org.joml:joml:1.10.8") { api("org.joml:joml:1.10.8") {
isTransitive = false // https://github.com/JOML-CI/JOML/issues/352 isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
} }
@@ -50,6 +_,7 @@ @@ -52,6 +_,7 @@
api("org.apache.logging.log4j:log4j-api:$log4jVersion") api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion") api("org.slf4j:slf4j-api:$slf4jVersion")
api("com.mojang:brigadier:1.3.10") api("com.mojang:brigadier:1.3.10")
@@ -35,7 +35,7 @@
// Deprecate bungeecord-chat in favor of adventure // Deprecate bungeecord-chat in favor of adventure
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") { api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
@@ -64,29 +_,35 @@ @@ -66,29 +_,35 @@
apiAndDocs("net.kyori:adventure-text-serializer-plain") apiAndDocs("net.kyori:adventure-text-serializer-plain")
apiAndDocs("net.kyori:adventure-text-logger-slf4j") apiAndDocs("net.kyori:adventure-text-logger-slf4j")
@@ -81,7 +81,7 @@
} }
val generatedDir: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath() val generatedDir: java.nio.file.Path = rootProject.layout.projectDirectory.dir("paper-api/src/generated/java").asFile.toPath()
@@ -100,17 +_,21 @@ @@ -102,17 +_,21 @@
java { java {
srcDir(generatedDir) srcDir(generatedDir)
srcDir(file("../paper-api/src/main/java")) srcDir(file("../paper-api/src/main/java"))
@@ -103,24 +103,7 @@
} }
} }
} }
@@ -158,6 +_,16 @@ @@ -194,14 +_,13 @@
}
}
+// DivineMC start - Hide unnecessary compilation warnings
+tasks.withType<JavaCompile> {
+ val compilerArgs = options.compilerArgs
+ compilerArgs.add("-Xlint:-module")
+ compilerArgs.add("-Xlint:-removal")
+ compilerArgs.add("-Xlint:-dep-ann")
+ compilerArgs.add("--add-modules=jdk.incubator.vector")
+}
+// DivineMC end - Hide unnecessary compilation warnings
+
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -176,14 +_,13 @@
val services = objects.newInstance<Services>() val services = objects.newInstance<Services>()
tasks.withType<Javadoc>().configureEach { tasks.withType<Javadoc>().configureEach {
@@ -137,7 +120,7 @@
"https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/", "https://www.javadocs.dev/org.jetbrains/annotations/$annotationsVersion/",
"https://www.javadocs.dev/org.joml/joml/1.10.8/", "https://www.javadocs.dev/org.joml/joml/1.10.8/",
"https://www.javadocs.dev/com.google.code.gson/gson/2.11.0", "https://www.javadocs.dev/com.google.code.gson/gson/2.11.0",
@@ -197,7 +_,7 @@ @@ -215,7 +_,7 @@
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://www.javadocs.dev/org.slf4j/slf4j-api/$slf4jVersion/", "https://www.javadocs.dev/org.slf4j/slf4j-api/$slf4jVersion/",
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/", "https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
@@ -146,13 +129,25 @@
) )
options.tags("apiNote:a:API Note:") options.tags("apiNote:a:API Note:")
@@ -221,6 +_,9 @@ @@ -239,7 +_,20 @@
into("build/docs/javadoc") into("build/docs/javadoc")
} }
} }
-}
+ +
+ options.addStringOption("Xdoclint:none", "-quiet") // DivineMC - Hide unnecessary javadoc warnings + options.addStringOption("Xdoclint:none", "-quiet") // DivineMC - Hide unnecessary javadoc warnings
+ options.addStringOption("-add-modules", "jdk.incubator.vector") // DivineMC - Required for simd + options.addStringOption("-add-modules", "jdk.incubator.vector") // DivineMC - Required for simd
} +}
+
+// DivineMC start - Hide unnecessary compilation warnings
+tasks.withType<JavaCompile> {
+ val compilerArgs = options.compilerArgs
+ compilerArgs.add("-Xlint:-module")
+ compilerArgs.add("-Xlint:-removal")
+ compilerArgs.add("-Xlint:-dep-ann")
+ compilerArgs.add("--add-modules=jdk.incubator.vector")
+}
+// DivineMC end - Hide unnecessary compilation warnings
tasks.test { tasks.test {
useJUnitPlatform()

View File

@@ -10,7 +10,7 @@ Original project: https://github.com/SparklyPower/SparklyPaper
This patch provides an API for performance monitoring plugins. This patch provides an API for performance monitoring plugins.
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index a17790d2da3008927b79814629e073b2091ce421..01feb47feaa977647d1b6cbf0e10589148f61414 100644 index 485af1c80e5e1cefbce3849a108a1acee1f81cf4..0e3d693aad335350e64b374fb978c74770632e67 100644
--- a/src/main/java/org/bukkit/Server.java --- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java
@@ -2894,4 +2894,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -2894,4 +2894,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -30,10 +30,10 @@ index a17790d2da3008927b79814629e073b2091ce421..01feb47feaa977647d1b6cbf0e105891
+ // DivineMC end - Parallel world ticking + // DivineMC end - Parallel world ticking
} }
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 07390a45222a593768d1338b4739131e915869a5..84afc14168351cf8f5c9ca3b32f7885b3c2a2522 100644 index 7822416f5cc4e453338f9257d5aa24e3ec4341a2..0ec03a25ae53ed2b542301ba829e4e2b9a201f72 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -4739,4 +4739,23 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -4745,4 +4745,23 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
} }
} }
} }

View File

@@ -7,8 +7,8 @@
+val bxTeamMavenPublicUrl = "https://repo.bxteam.org/snapshots/" +val bxTeamMavenPublicUrl = "https://repo.bxteam.org/snapshots/"
dependencies { dependencies {
mache("io.papermc:mache:1.21.10+build.9") mache("io.papermc:mache:1.21.11-rc3+build.1")
@@ -26,6 +_,7 @@ @@ -25,6 +_,7 @@
// Purpur start - Rebrand // Purpur start - Rebrand
val purpur = forks.register("purpur") { val purpur = forks.register("purpur") {
@@ -16,7 +16,7 @@
upstream.patchDir("paperServer") { upstream.patchDir("paperServer") {
upstreamPath = "paper-server" upstreamPath = "paper-server"
excludes = setOf("src/minecraft", "patches", "build.gradle.kts") excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
@@ -33,9 +_,27 @@ @@ -32,9 +_,27 @@
outputDir = rootDirectory.dir("paper-server") outputDir = rootDirectory.dir("paper-server")
} }
} }
@@ -43,9 +43,9 @@
+ // DivineMC end - Rebrand + // DivineMC end - Rebrand
+ +
spigot { spigot {
enabled = true enabled = false
buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e" buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e"
@@ -59,6 +_,7 @@ @@ -62,6 +_,7 @@
libraryRepositories.addAll( libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/", "https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl, paperMavenPublicUrl,
@@ -85,7 +85,7 @@
+ exclude(group="org.yaml", module="snakeyaml") + exclude(group="org.yaml", module="snakeyaml")
+ } + }
+ implementation("com.github.luben:zstd-jni:1.5.7-3") + implementation("com.github.luben:zstd-jni:1.5.7-3")
+ implementation("org.lz4:lz4-java:1.8.0") + implementation("at.yawk.lz4:lz4-java:1.10.1")
+ implementation("net.openhft:zero-allocation-hashing:0.16") + implementation("net.openhft:zero-allocation-hashing:0.16")
+ implementation("org.agrona:agrona:2.2.4") + implementation("org.agrona:agrona:2.2.4")
+ implementation("net.objecthunter:exp4j:0.4.8") + implementation("net.objecthunter:exp4j:0.4.8")
@@ -134,8 +134,8 @@
runtimeOnly("com.lmax:disruptor:3.4.4") runtimeOnly("com.lmax:disruptor:3.4.4")
implementation("com.googlecode.json-simple:json-simple:1.1.1") { // change to runtimeOnly once Timings is removed implementation("com.googlecode.json-simple:json-simple:1.1.1") { // change to runtimeOnly once Timings is removed
isTransitive = false // includes junit isTransitive = false // includes junit
@@ -196,11 +_,11 @@ @@ -197,11 +_,11 @@
testImplementation("io.github.classgraph:classgraph:4.8.179") // For mob goal test testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation("org.junit.jupiter:junit-jupiter:5.12.2") testImplementation("org.junit.jupiter:junit-jupiter:5.12.2")
testImplementation("org.junit.platform:junit-platform-suite-engine:1.12.2") testImplementation("org.junit.platform:junit-platform-suite-engine:1.12.2")
- testImplementation("org.hamcrest:hamcrest:2.2") - testImplementation("org.hamcrest:hamcrest:2.2")
@@ -150,7 +150,7 @@
implementation("net.neoforged:srgutils:1.0.9") // Mappings handling implementation("net.neoforged:srgutils:1.0.9") // Mappings handling
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins implementation("net.neoforged:AutoRenamingTool:2.0.3") // Remap plugins
@@ -216,30 +_,42 @@ @@ -217,30 +_,42 @@
implementation("me.lucko:spark-paper:1.10.152") implementation("me.lucko:spark-paper:1.10.152")
} }

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/core/BlockPos.java --- a/net/minecraft/core/BlockPos.java
+++ b/net/minecraft/core/BlockPos.java +++ b/net/minecraft/core/BlockPos.java
@@ -348,7 +_,18 @@ @@ -340,7 +_,18 @@
}; };
} }

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/MinecraftServer.java --- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java
@@ -1006,6 +_,13 @@ @@ -1008,6 +_,13 @@
if (this.hasStopped) return; if (this.hasStopped) return;
this.hasStopped = true; this.hasStopped = true;
} }
@@ -14,7 +14,7 @@
if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
shutdownThread = Thread.currentThread(); // Paper - Improved watchdog support shutdownThread = Thread.currentThread(); // Paper - Improved watchdog support
org.spigotmc.WatchdogThread.doStop(); // Paper - Improved watchdog support org.spigotmc.WatchdogThread.doStop(); // Paper - Improved watchdog support
@@ -1098,6 +_,7 @@ @@ -1100,6 +_,7 @@
// Paper end - rewrite chunk system // Paper end - rewrite chunk system
// Paper start - Improved watchdog support - move final shutdown items here // Paper start - Improved watchdog support - move final shutdown items here
Util.shutdownExecutors(); Util.shutdownExecutors();

View File

@@ -1,10 +1,10 @@
--- a/net/minecraft/server/PlayerAdvancements.java --- a/net/minecraft/server/PlayerAdvancements.java
+++ b/net/minecraft/server/PlayerAdvancements.java +++ b/net/minecraft/server/PlayerAdvancements.java
@@ -60,7 +_,7 @@ @@ -59,7 +_,7 @@
private AdvancementHolder lastSelectedTab; private @Nullable AdvancementHolder lastSelectedTab;
private boolean isFirstPacket = true; private boolean isFirstPacket = true;
private final Codec<PlayerAdvancements.Data> codec; private final Codec<PlayerAdvancements.Data> codec;
- public final Map<net.minecraft.advancements.critereon.SimpleCriterionTrigger<?>, Set<CriterionTrigger.Listener<?>>> criterionData = new java.util.IdentityHashMap<>(); // Paper - fix advancement data player leakage - public final Map<net.minecraft.advancements.criterion.SimpleCriterionTrigger<?>, Set<CriterionTrigger.Listener<?>>> criterionData = new java.util.IdentityHashMap<>(); // Paper - fix advancement data player leakage
+ public final Map<net.minecraft.advancements.critereon.SimpleCriterionTrigger<?>, Set<CriterionTrigger.Listener<?>>> criterionData = new it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap<>(); // Paper - fix advancement data player leakage // DivineMC - Use fastutil for criterion data + public final Map<net.minecraft.advancements.critereon.SimpleCriterionTrigger<?>, Set<CriterionTrigger.Listener<?>>> criterionData = new it.unimi.dsi.fastutil.objects.Reference2ReferenceOpenHashMap<>(); // Paper - fix advancement data player leakage // DivineMC - Use fastutil for criterion data
public PlayerAdvancements(DataFixer dataFixer, PlayerList playerList, ServerAdvancementManager manager, Path playerSavePath, ServerPlayer player) { public PlayerAdvancements(DataFixer dataFixer, PlayerList playerList, ServerAdvancementManager manager, Path playerSavePath, ServerPlayer player) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/dedicated/DedicatedServer.java --- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -287,6 +_,26 @@ @@ -293,6 +_,26 @@
org.purpurmc.purpur.PurpurConfig.registerCommands(); org.purpurmc.purpur.PurpurConfig.registerCommands();
// Purpur end - Purpur config files // Purpur end - Purpur config files
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
@@ -27,7 +27,7 @@
// this.worldData.setGameType(properties.gameMode.get()); // CraftBukkit - moved to world loading // this.worldData.setGameType(properties.gameMode.get()); // CraftBukkit - moved to world loading
LOGGER.info("Default game type: {}", properties.gameMode.get()); LOGGER.info("Default game type: {}", properties.gameMode.get());
@@ -363,7 +_,7 @@ @@ -369,7 +_,7 @@
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord"; 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/"; 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 // Paper end - Add Velocity IP Forwarding Support

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ChunkMap.java --- a/net/minecraft/server/level/ChunkMap.java
+++ b/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java
@@ -1345,7 +_,7 @@ @@ -1378,7 +_,7 @@
flag = flag && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z); flag = flag && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
// Paper end - Configurable entity tracking range by Y // Paper end - Configurable entity tracking range by Y
// CraftBukkit start - respect vanish API // CraftBukkit start - respect vanish API

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ServerChunkCache.java --- a/net/minecraft/server/level/ServerChunkCache.java
+++ b/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java
@@ -584,8 +_,10 @@ @@ -578,8 +_,10 @@
this.chunkMap.collectSpawningChunks(list); this.chunkMap.collectSpawningChunks(list);
profiler.popPush("shuffleSpawningChunks"); profiler.popPush("shuffleSpawningChunks");
// Paper start - chunk tick iteration optimisation // Paper start - chunk tick iteration optimisation

View File

@@ -1,10 +1,10 @@
--- a/net/minecraft/server/level/ServerPlayer.java --- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java
@@ -2345,6 +_,7 @@ @@ -2380,6 +_,7 @@
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId())); this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId()));
if (gameMode == GameType.SPECTATOR) { if (gameMode == GameType.SPECTATOR) {
this.removeEntitiesOnShoulder(); this.removeEntitiesOnShoulder();
+ this.stopSleeping(); // DivineMC - Fix MC-119417 + this.stopSleeping(); // DivineMC - Fix MC-119417
this.stopRiding(); this.stopRiding();
this.stopUsingItem();
EnchantmentHelper.stopLocationBasedEffects(this); EnchantmentHelper.stopLocationBasedEffects(this);
} else {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -316,6 +_,7 @@ @@ -320,6 +_,7 @@
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper - Limit client sign length private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper - Limit client sign length
private final io.papermc.paper.event.packet.ClientTickEndEvent tickEndEvent; // Paper - add client tick end event private final io.papermc.paper.event.packet.ClientTickEndEvent tickEndEvent; // Paper - add client tick end event
public final io.papermc.paper.connection.PaperPlayerGameConnection playerGameConnection; // Paper public final io.papermc.paper.connection.PaperPlayerGameConnection playerGameConnection; // Paper
@@ -8,7 +8,7 @@
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie cookie) { public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie cookie) {
super(server, connection, cookie); super(server, connection, cookie);
@@ -327,6 +_,7 @@ @@ -332,6 +_,7 @@
this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat
this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event
this.playerGameConnection = new io.papermc.paper.connection.PaperPlayerGameConnection(this); // Paper this.playerGameConnection = new io.papermc.paper.connection.PaperPlayerGameConnection(this); // Paper

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/players/PlayerList.java --- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java
@@ -1026,6 +_,7 @@ @@ -1029,6 +_,7 @@
player.connection.send(new ClientboundSetChunkCacheRadiusPacket(level.spigotConfig.viewDistance)); player.connection.send(new ClientboundSetChunkCacheRadiusPacket(level.spigotConfig.viewDistance));
player.connection.send(new ClientboundSetSimulationDistancePacket(level.spigotConfig.simulationDistance)); player.connection.send(new ClientboundSetSimulationDistancePacket(level.spigotConfig.simulationDistance));
// Paper end // Paper end

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/rcon/RconConsoleSource.java --- a/net/minecraft/server/rcon/RconConsoleSource.java
+++ b/net/minecraft/server/rcon/RconConsoleSource.java +++ b/net/minecraft/server/rcon/RconConsoleSource.java
@@ -51,7 +_,7 @@ @@ -60,7 +_,7 @@
@Override @Override
public void sendSystemMessage(Component message) { public void sendSystemMessage(Component message) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/stats/ServerStatsCounter.java --- a/net/minecraft/stats/ServerStatsCounter.java
+++ b/net/minecraft/stats/ServerStatsCounter.java +++ b/net/minecraft/stats/ServerStatsCounter.java
@@ -98,12 +_,6 @@ @@ -109,12 +_,6 @@
this.dirty.add(stat); this.dirty.add(stat);
} }
@@ -10,10 +10,10 @@
- return set; - return set;
- } - }
- -
public void parseLocal(DataFixer fixerUpper, String json) { public void parse(DataFixer fixerUpper, JsonElement json) {
try { Dynamic<JsonElement> dynamic = new Dynamic<>(JsonOps.INSTANCE, json);
JsonElement jsonElement = StrictJsonParser.parse(json); dynamic = DataFixTypes.STATS.updateToCurrentVersion(fixerUpper, dynamic, NbtUtils.getDataVersion(dynamic, 1343));
@@ -139,9 +_,11 @@ @@ -140,9 +_,11 @@
public void sendStats(ServerPlayer player) { public void sendStats(ServerPlayer player) {
Object2IntMap<Stat<?>> map = new Object2IntOpenHashMap<>(); Object2IntMap<Stat<?>> map = new Object2IntOpenHashMap<>();

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/Entity.java --- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java
@@ -375,6 +_,7 @@ @@ -376,6 +_,7 @@
public boolean isTemporarilyActive; public boolean isTemporarilyActive;
public long activatedImmunityTick = Integer.MIN_VALUE; public long activatedImmunityTick = Integer.MIN_VALUE;
public @Nullable Boolean immuneToFire = null; // Purpur - Fire immune API public @Nullable Boolean immuneToFire = null; // Purpur - Fire immune API
@@ -8,7 +8,7 @@
public void inactiveTick() { public void inactiveTick() {
} }
@@ -1130,6 +_,7 @@ @@ -1145,6 +_,7 @@
// Paper end - detailed watchdog information // Paper end - detailed watchdog information
public void move(MoverType type, Vec3 movement) { public void move(MoverType type, Vec3 movement) {
@@ -16,7 +16,7 @@
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
// Paper start - detailed watchdog information // Paper start - detailed watchdog information
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main"); ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
@@ -2625,6 +_,7 @@ @@ -2649,6 +_,7 @@
} }
this.addAdditionalSaveData(output, includeAll); // CraftBukkit - pass on includeAll this.addAdditionalSaveData(output, includeAll); // CraftBukkit - pass on includeAll
@@ -24,7 +24,7 @@
if (this.isVehicle()) { if (this.isVehicle()) {
ValueOutput.ValueOutputList valueOutputList = output.childrenList("Passengers"); ValueOutput.ValueOutputList valueOutputList = output.childrenList("Passengers");
@@ -2733,6 +_,7 @@ @@ -2757,6 +_,7 @@
this.tags.clear(); this.tags.clear();
input.read("Tags", TAG_LIST_CODEC).ifPresent(this.tags::addAll); input.read("Tags", TAG_LIST_CODEC).ifPresent(this.tags::addAll);
this.readAdditionalSaveData(input); this.readAdditionalSaveData(input);
@@ -32,7 +32,7 @@
if (this.repositionEntityAfterLoad()) { if (this.repositionEntityAfterLoad()) {
this.reapplyPosition(); this.reapplyPosition();
} }
@@ -4264,6 +_,7 @@ @@ -4284,6 +_,7 @@
} }
public boolean canTeleport(Level fromLevel, Level toLevel) { public boolean canTeleport(Level fromLevel, Level toLevel) {
@@ -40,7 +40,7 @@
if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) { if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
for (Entity entity : this.getPassengers()) { for (Entity entity : this.getPassengers()) {
@@ -4493,6 +_,7 @@ @@ -4512,6 +_,7 @@
} }
public final void setBoundingBox(AABB bb) { public final void setBoundingBox(AABB bb) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -757,6 +_,7 @@ @@ -754,6 +_,7 @@
super.remove(reason, eventCause); // CraftBukkit super.remove(reason, eventCause); // CraftBukkit
this.brain.clearMemories(); this.brain.clearMemories();
@@ -17,7 +17,7 @@
return; return;
} }
// CraftBukkit end // CraftBukkit end
@@ -2802,6 +_,7 @@ @@ -2837,6 +_,7 @@
} }
protected void updateSwingTime() { protected void updateSwingTime() {
@@ -25,7 +25,7 @@
int currentSwingDuration = this.getCurrentSwingDuration(); int currentSwingDuration = this.getCurrentSwingDuration();
if (this.swinging) { if (this.swinging) {
this.swingTime++; this.swingTime++;
@@ -3318,7 +_,13 @@ @@ -3383,7 +_,13 @@
} }
protected float getFlyingSpeed() { protected float getFlyingSpeed() {
@@ -40,7 +40,7 @@
} }
public float getSpeed() { public float getSpeed() {
@@ -3767,6 +_,7 @@ @@ -3897,6 +_,7 @@
protected void updateFallFlying() { protected void updateFallFlying() {
this.checkFallDistanceAccumulation(); this.checkFallDistanceAccumulation();
if (!this.level().isClientSide()) { if (!this.level().isClientSide()) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/Mob.java --- a/net/minecraft/world/entity/Mob.java
+++ b/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java
@@ -339,6 +_,8 @@ @@ -336,6 +_,8 @@
this.playAmbientSound(); this.playAmbientSound();
} }

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java --- a/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
+++ b/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java +++ b/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
@@ -114,6 +_,7 @@ @@ -113,6 +_,7 @@
} }
protected void alertOther(Mob mob, LivingEntity target) { protected void alertOther(Mob mob, LivingEntity target) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java --- a/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java
+++ b/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java
@@ -45,11 +_,11 @@ @@ -44,11 +_,11 @@
super.tick(); super.tick();
} else { } else {
if (this.pathToPosition != null) { if (this.pathToPosition != null) {

View File

@@ -12,4 +12,4 @@
+ // DivineMC end - lithium: skip useless secondary poi sensor + // DivineMC end - lithium: skip useless secondary poi sensor
// Purpur start - Option for Villager Clerics to farm Nether Wart - make sure clerics don't wander to soul sand when the option is off // Purpur start - Option for Villager Clerics to farm Nether Wart - make sure clerics don't wander to soul sand when the option is off
Brain<?> brain = entity.getBrain(); Brain<?> brain = entity.getBrain();
if (!level.purpurConfig.villagerClericsFarmWarts && entity.getVillagerData().profession().is(net.minecraft.world.entity.npc.VillagerProfession.CLERIC)) { if (!level.purpurConfig.villagerClericsFarmWarts && entity.getVillagerData().profession().is(net.minecraft.world.entity.npc.villager.VillagerProfession.CLERIC)) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/ZombieVillager.java --- a/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
+++ b/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
@@ -303,6 +_,12 @@ @@ -324,6 +_,12 @@
if (!this.isSilent()) { if (!this.isSilent()) {
level.levelEvent(null, LevelEvent.SOUND_ZOMBIE_CONVERTED, this.blockPosition(), 0); level.levelEvent(null, LevelEvent.SOUND_ZOMBIE_CONVERTED, this.blockPosition(), 0);
} }

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/player/Player.java --- a/net/minecraft/world/entity/player/Player.java
+++ b/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java
@@ -1670,6 +_,7 @@ @@ -1748,6 +_,7 @@
} }
public void causeFoodExhaustion(float exhaustion, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason reason) { public void causeFoodExhaustion(float exhaustion, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason reason) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/raid/Raid.java --- a/net/minecraft/world/entity/raid/Raid.java
+++ b/net/minecraft/world/entity/raid/Raid.java +++ b/net/minecraft/world/entity/raid/Raid.java
@@ -533,7 +_,7 @@ @@ -532,7 +_,7 @@
double d1 = vec3.z + 13.0 / squareRoot * (vec31.z - vec3.z); double d1 = vec3.z + 13.0 / squareRoot * (vec31.z - vec3.z);
if (squareRoot <= 64.0 || players.contains(serverPlayer)) { if (squareRoot <= 64.0 || players.contains(serverPlayer)) {
serverPlayer.connection serverPlayer.connection

View File

@@ -1,11 +0,0 @@
--- a/net/minecraft/world/level/GameRules.java
+++ b/net/minecraft/world/level/GameRules.java
@@ -300,7 +_,7 @@
}
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules, FeatureFlagSet enabledFeatures) {
- this.rules = rules;
+ this.rules = new it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap<>(rules); // DivineMC - lithium: collections/gamerules
this.enabledFeatures = enabledFeatures;
// Paper start - Perf: Use array for gamerule storage

View File

@@ -9,7 +9,7 @@
protected final CollectingNeighborUpdater neighborUpdater; protected final CollectingNeighborUpdater neighborUpdater;
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList(); private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities; private boolean tickingBlockEntities;
@@ -1453,13 +_,11 @@ @@ -1448,13 +_,11 @@
boolean runsNormally = this.tickRateManager().runsNormally(); boolean runsNormally = this.tickRateManager().runsNormally();
int tickedEntities = 0; // Paper - rewrite chunk system int tickedEntities = 0; // Paper - rewrite chunk system
@@ -24,7 +24,7 @@
} else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) { } else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) {
tickingBlockEntity.tick(); tickingBlockEntity.tick();
// Paper start - rewrite chunk system // Paper start - rewrite chunk system
@@ -1469,7 +_,7 @@ @@ -1464,7 +_,7 @@
// Paper end - rewrite chunk system // Paper end - rewrite chunk system
} }
} }

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/block/TripWireHookBlock.java --- a/net/minecraft/world/level/block/TripWireHookBlock.java
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java +++ b/net/minecraft/world/level/block/TripWireHookBlock.java
@@ -187,7 +_,6 @@ @@ -186,7 +_,6 @@
if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent
emitState(level, pos, flag2, flag3, flag, flag1); emitState(level, pos, flag2, flag3, flag, flag1);
if (!attaching) { if (!attaching) {
@@ -8,7 +8,7 @@
level.setBlock(pos, blockState1.setValue(FACING, direction), Block.UPDATE_ALL); level.setBlock(pos, blockState1.setValue(FACING, direction), Block.UPDATE_ALL);
if (shouldNotifyNeighbours) { if (shouldNotifyNeighbours) {
notifyNeighbors(block, level, pos, direction); notifyNeighbors(block, level, pos, direction);
@@ -200,10 +_,18 @@ @@ -199,10 +_,18 @@
BlockPos blockPos1 = pos.relative(direction, i2); BlockPos blockPos1 = pos.relative(direction, i2);
BlockState blockState2 = blockStates[i2]; BlockState blockState2 = blockStates[i2];
if (blockState2 != null) { if (blockState2 != null) {

View File

@@ -1,11 +1,11 @@
--- a/net/minecraft/world/level/block/entity/BlockEntity.java --- a/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -392,7 +_,7 @@ @@ -386,7 +_,7 @@
// CraftBukkit start - add method // CraftBukkit start - add method
public @Nullable org.bukkit.inventory.InventoryHolder getOwner() { public org.bukkit.inventory.@Nullable InventoryHolder getOwner() {
- return getOwner(true); - return getOwner(true);
+ return getOwner(org.bxteam.divinemc.config.DivineConfig.PerformanceCategory.createSnapshotOnRetrievingBlockState); // DivineMC - EMC: Don't use snapshots for acquiring blockstate; + return getOwner(org.bxteam.divinemc.config.DivineConfig.PerformanceCategory.createSnapshotOnRetrievingBlockState); // DivineMC - EMC: Don't use snapshots for acquiring blockstate;
} }
public @Nullable org.bukkit.inventory.InventoryHolder getOwner(boolean useSnapshot) { public org.bukkit.inventory.@Nullable InventoryHolder getOwner(boolean useSnapshot) {

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/chunk/LevelChunk.java --- a/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java
@@ -279,11 +_,18 @@ @@ -278,11 +_,18 @@
public BlockState getBlockStateFinal(final int x, final int y, final int z) { public BlockState getBlockStateFinal(final int x, final int y, final int z) {
// Copied and modified from below // Copied and modified from below
final int sectionIndex = this.getSectionIndex(y); final int sectionIndex = this.getSectionIndex(y);

View File

@@ -1,9 +1,9 @@
group = org.bxteam.divinemc group = org.bxteam.divinemc
version=1.21.10-R0.1-SNAPSHOT version=1.21.11-rc3-R0.1-SNAPSHOT
mcVersion=1.21.10 mcVersion=1.21.11-rc3
purpurRef=802b91662dad3e688cd03f39b02375454ca329c7 purpurRef=c51992977fc626e2019cb8ca4194507536754cbc
experimental=false experimental=true
org.gradle.configuration-cache=true org.gradle.configuration-cache=true
org.gradle.caching = true org.gradle.caching = true