Update Upstream (Paper, Purpur)
This commit is contained in:
@@ -88,6 +88,10 @@ abstract class PurpurUpdateTask : Task() {
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), purpur.resolve("gradle.properties").toFile())
|
||||
updatePaperCommit(property.paperRepository.get(), property.paperBranch.get(), project.file("gradle.properties"))
|
||||
|
||||
val latestCommit = git("ls-remote", property.purpurRepository.get()).readText()?.lines()
|
||||
?.filterNot { "[a-z0-9]{40}\trefs/heads/${property.purpurBranch.get()}".toRegex().matches(it) }?.first()?.split("\t")?.first()
|
||||
?: throw AlwaysUpToDateException("Failed to get latest Purpur commit")
|
||||
|
||||
val purpurGradle = Gradle(purpur)
|
||||
val purpurPatches = purpur.resolve("patches").also {
|
||||
val puffefishPatches = pufferfish.resolve("patches").also { that -> that.toFile().deleteRecursively() }
|
||||
@@ -138,6 +142,8 @@ abstract class PurpurUpdateTask : Task() {
|
||||
copyPatch(this, target, "0002-Purpur-API-Changes.patch")
|
||||
}
|
||||
}
|
||||
|
||||
project.file("gradle.properties").writeText(project.file("gradle.properties").readText().replace("purpurCommit = .*".toRegex(), "purpurCommit = $latestCommit"))
|
||||
}
|
||||
|
||||
private fun copySource(dir: Path) {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
version = 1.20.4-R0.1-SNAPSHOT
|
||||
mcVersion = 1.20.4
|
||||
|
||||
paperCommit = 94807a1d2e74b26b1a3154974d4024daa4c95f51
|
||||
purpurCommit = c46cb7ef66675e00a48e20c40febed7ff914f35d
|
||||
pufferfishCommit = bc89152d4cd4bb0f9644da2fe10774df4cc25661
|
||||
paperCommit = 27cabc19a02e054276b58bfe0a40fc0add14d25e
|
||||
purpurCommit = 236b06a2a30dd4dc3850251d902b1a790c130366
|
||||
|
||||
org.gradle.caching = true
|
||||
org.gradle.parallel = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: granny <contact@granny.dev>
|
||||
Date: Thu, 18 Jan 2024 22:51:24 +0900
|
||||
Date: Mon, 22 Jan 2024 17:31:12 +0900
|
||||
Subject: [PATCH] Purpur API Changes
|
||||
|
||||
PurpurMC
|
||||
@@ -186,7 +186,7 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 48fab492609e0bae459d20cc2eae78b87e37ab75..109304f8064ab2fab57f9c0f1745e446e6748b3d 100644
|
||||
index 2d53675907f411046978b0a234c0b6f33c909973..2bb2b9ba757d18510e3f45304cfbb56c28113ed7 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2842,4 +2842,127 @@ public final class Bukkit {
|
||||
@@ -954,7 +954,7 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c
|
||||
// Paper start
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 1d0fd7ff8449f815a7d980af0b378181ea8bf8d8..42b8de355855baecd0a435314909116c210d002d 100644
|
||||
index 6ace3581f8d0c2a1b7e2188d5b6af5c984b74a0e..7dac01adb01fc5f37b55cf239883a96a51b68de1 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -1107,4 +1107,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -1039,7 +1039,7 @@ index 655e37cb3a09610a3f3df805d6dcad17d722da62..09fd716c8fc9ea34a1cbf87bcbe22df0
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
|
||||
index 58017fce436cdbda255f7172fbdadb726d4b113c..05600fc8bf2a61aca8094029bc4c208a710da952 100644
|
||||
index bcc6ba95bd21c7972865838c636a03f50b6c1f1a..c3fcd8dd7dbb1e1a18e17c014c1e641149ea5960 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Item.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Item.java
|
||||
@@ -153,4 +153,62 @@ public interface Item extends Entity, io.papermc.paper.entity.Frictional { // Pa
|
||||
@@ -1106,7 +1106,7 @@ index 58017fce436cdbda255f7172fbdadb726d4b113c..05600fc8bf2a61aca8094029bc4c208a
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 47b0154928b3d36e2602da202df07defbcf82108..7498179f6df47008c4da6ad6d67b2ce16f49e7a6 100644
|
||||
index 0f0b965ce48d13a64b5546a0abcfb45c4f5f4722..76c8601c1563c28cfce00f461c99805187db5178 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1276,4 +1276,41 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 14 Jan 2024 19:50:29 +0900
|
||||
Subject: [PATCH] Build system changes
|
||||
Subject: [PATCH] Use Gradle Version Catalogs
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1be7ca690 100644
|
||||
index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..033d510a10a630259e142b8a7bdfa57e7c22bb90 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,11 +9,13 @@ java {
|
||||
withJavadocJar()
|
||||
}
|
||||
|
||||
+/* // Plazma - Use libs.versions.toml
|
||||
+/* // Plazma - Use Gradle Version Catalogs
|
||||
val annotationsVersion = "24.0.1"
|
||||
val bungeeCordChatVersion = "1.20-R0.1"
|
||||
val adventureVersion = "4.15.0"
|
||||
val slf4jVersion = "2.0.9"
|
||||
val log4jVersion = "2.17.1"
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
+ */ // Plazma - Use Gradle Version Catalogs
|
||||
val apiAndDocs: Configuration by configurations.creating {
|
||||
attributes {
|
||||
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
|
||||
@@ -26,7 +26,7 @@ index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1
|
||||
|
||||
dependencies {
|
||||
// api dependencies are listed transitively to API consumers
|
||||
+ /* // Plazma - Use libs.versions.toml
|
||||
+ /* // Plazma - Use Gradle Version Catalogs
|
||||
api("com.google.guava:guava:32.1.2-jre")
|
||||
api("com.google.code.gson:gson:2.10.1")
|
||||
// Paper start - adventure
|
||||
@@ -35,7 +35,7 @@ index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1
|
||||
api("org.joml:joml:1.10.5")
|
||||
// Paper start
|
||||
- api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ */
|
||||
+ implementation(common.bundles.asm)
|
||||
+
|
||||
@@ -60,10 +60,10 @@ index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1
|
||||
+ apiAndDocs(platform(common.adventure.bom))
|
||||
+
|
||||
+ api(api.jsonsimple) {
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Use Gradle Version Catalogs
|
||||
isTransitive = false // includes junit
|
||||
}
|
||||
+ /* // Plazma - Use libs.versions.toml
|
||||
+ /* // Plazma - Use Gradle Version Catalogs
|
||||
api("it.unimi.dsi:fastutil:8.5.6")
|
||||
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
|
||||
apiAndDocs("net.kyori:adventure-api")
|
||||
@@ -71,7 +71,7 @@ index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
+ */ // Plazma - Use libs.versions.toml
|
||||
+ */ // Plazma - Use Gradle Version Catalogs
|
||||
}
|
||||
|
||||
// Paper start
|
||||
@@ -82,7 +82,7 @@ index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1
|
||||
- "https://guava.dev/releases/32.1.2-jre/api/docs/",
|
||||
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||
+ // Plazma start - Use libs.versions.toml
|
||||
+ // Plazma start - Use Gradle Version Catalogs
|
||||
+ "https://guava.dev/releases/${api.guava.orNull?.version}/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/${api.annotations.orNull?.version}/", // Paper - we don't want Java 5 annotations
|
||||
@@ -113,7 +113,7 @@ index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1
|
||||
// Paper end
|
||||
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.maven.connector.orNull?.version}", // Paper
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Use Gradle Version Catalogs
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 529fb1beadefc79ce6bf5755d5223301b9933152..c78eb34b20ed1a7bf793cfd4594219923c33f66f 100644
|
||||
index 529fb1beadefc79ce6bf5755d5223301b9933152..682d520df3beacd65c7e792bac0d469e0083267f 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2210,6 +2210,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Plazma Configuration API
|
||||
+ @NotNull
|
||||
+ public org.bukkit.configuration.file.YamlConfiguration getPlazmaConfig() {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Optimize-spigot-event-bus
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/Event.java b/src/main/java/org/bukkit/event/Event.java
|
||||
index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..45b8ee1945202cc673905aab5c90985c01cb205e 100644
|
||||
index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..f1b3559bf9d2023ca59330c65e6e34714759dd9d 100644
|
||||
--- a/src/main/java/org/bukkit/event/Event.java
|
||||
+++ b/src/main/java/org/bukkit/event/Event.java
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -48,7 +48,7 @@ index 8ec56cd6b8e0f5c5dd8c7c88b4671e18dcf109d0..45b8ee1945202cc673905aab5c90985c
|
||||
+ public final @NotNull net.kyori.adventure.util.TriState asynchronous() {
|
||||
+ return this.async;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Optimize Spigot event bus
|
||||
+
|
||||
// Paper start
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
Date: Thu, 18 Jan 2024 22:51:22 +0900
|
||||
Date: Mon, 22 Jan 2024 17:31:10 +0900
|
||||
Subject: [PATCH] Pufferfish Server Changes
|
||||
|
||||
Pufferfish
|
||||
@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 444ff797c70b0e285d4272ea2ce3d72453c9bda5..fd785a79b1708aadd760f5b62d49d4d4e55e9938 100644
|
||||
index 376e8983fdfdbb6c3e5fd8ad0f6a05e655b622bf..658e9b4590a82d179907feea04e129fdba9a2f42 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
|
||||
@@ -625,10 +625,10 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..61f21c0bf6658326a15b735c22001b4028b98800
|
||||
index 0000000000000000000000000000000000000000..ad368b58005b6b0453b709c2ef0ea23bca53d34a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -0,0 +1,315 @@
|
||||
@@ -0,0 +1,301 @@
|
||||
+package gg.pufferfish.pufferfish;
|
||||
+
|
||||
+import gg.pufferfish.pufferfish.simd.SIMDDetection;
|
||||
@@ -820,20 +820,6 @@ index 0000000000000000000000000000000000000000..61f21c0bf6658326a15b735c22001b40
|
||||
+ "spigot/paper) can cause mobs to move fast after a lag spike.");
|
||||
+ }
|
||||
+
|
||||
+ public static boolean enableAsyncWorldSaving;
|
||||
+ public static boolean asyncWorldSavingInitialized;
|
||||
+ private static void asyncWorldSaving() {
|
||||
+ boolean temp = getBoolean("enable-async-world-saving", false,
|
||||
+ "Save world changes asynchronously. This is disabled by default as it is not",
|
||||
+ "100% confident that this will not cause world corruption issues.");
|
||||
+
|
||||
+ // This prevents us from changing the value during a reload.
|
||||
+ if (!asyncWorldSavingInitialized) {
|
||||
+ asyncWorldSavingInitialized = true;
|
||||
+ enableAsyncWorldSaving = temp;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static boolean enableSuffocationOptimization;
|
||||
+ private static void suffocationOptimization() {
|
||||
+ enableSuffocationOptimization = getBoolean("enable-suffocation-optimization", true,
|
||||
@@ -935,13 +921,13 @@ index 0000000000000000000000000000000000000000..61f21c0bf6658326a15b735c22001b40
|
||||
+ "the ender dragon whenever a player places an end crystal.");
|
||||
+ }
|
||||
+
|
||||
+ public static boolean disableMethodProfiler;
|
||||
+ public static boolean disableMethodProfiler;
|
||||
+ public static boolean disableOutOfOrderChat;
|
||||
+ private static void miscSettings() {
|
||||
+ private static void miscSettings() {
|
||||
+ disableMethodProfiler = getBoolean("misc.disable-method-profiler", true);
|
||||
+ disableOutOfOrderChat = getBoolean("misc.disable-out-of-order-chat", false);
|
||||
+ setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
+ }
|
||||
+ setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishLogger.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishLogger.java
|
||||
@@ -1498,20 +1484,20 @@ index 200ed770b57e1a9240abf0473968d4b85cbefe3c..0acc7cfc0fb0264dd76a58f7582e79d8
|
||||
|
||||
public static long getCoordinateKey(final ChunkPos pair) {
|
||||
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
index 85a8a687b1568a56e3e646b37ef78b562c1b8a82..69971b2c59e541ac4100b84c84e2972de1b44ca9 100644
|
||||
index ba12919c3f9aec34a9e64993b143ae92be5eb172..9efeab9078e2d08903e482718b840797e22ab1c2 100644
|
||||
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
|
||||
@@ -38,7 +38,7 @@ public class SignedMessageChain {
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.chain_broken"), false); // Paper - diff on change (if disconnects, need a new kick event cause)
|
||||
} else if (playerPublicKey.data().hasExpired()) {
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.expiredProfileKey", org.bukkit.event.player.PlayerKickEvent.Cause.EXPIRED_PROFILE_PUBLIC_KEY), false); // Paper - kick event causes
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("chat.disabled.expiredProfileKey"), false, org.bukkit.event.player.PlayerKickEvent.Cause.EXPIRED_PROFILE_PUBLIC_KEY); // Paper - kick event causes
|
||||
- } else if (body.timeStamp().isBefore(this.lastTimeStamp)) {
|
||||
+ } else if (!gg.pufferfish.pufferfish.PufferfishConfig.disableOutOfOrderChat && body.timeStamp().isBefore(this.lastTimeStamp)) { // Pufferfish
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.out_of_order_chat", org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT), true); // Paper - kick event causes
|
||||
throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.out_of_order_chat"), true, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
|
||||
} else {
|
||||
this.lastTimeStamp = body.timeStamp();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 016b7628b289fb882f3ec15dd5b0cb4e0af72edc..1343649cd77a42dd502747581050b401840a6efe 100644
|
||||
index ec1197e498d0fa8d58466b8dffe46fb0683b530c..771a9c9f4c39fdfac26ee62db2a9cdcf15d9e1a6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -314,6 +314,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1554,7 +1540,7 @@ index 016b7628b289fb882f3ec15dd5b0cb4e0af72edc..1343649cd77a42dd502747581050b401
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 9d7e1b306f8c96883dbe1adbf7e77825da4cbc21..80e1dcef1eeb33f553c7d771a00d463e99e3f147 100644
|
||||
index 6de6dad36203479677a29ad61e21bc369d4e5513..c5f92c80d7ca1e1c7f5b9304a5a1173ebfd9c269 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -221,6 +221,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -1575,7 +1561,7 @@ index 9d7e1b306f8c96883dbe1adbf7e77825da4cbc21..80e1dcef1eeb33f553c7d771a00d463e
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 4160fff108cc83bc0a1f0a0389ab22f722d483b4..e4a6110a00c9ae78aafa13668e2ec2ea5f394b37 100644
|
||||
index 639c46a7d2b35f13d2310d9ded8a92a4703f6ebb..6dfff1ce0ee0a314816a47fd9d89c609f9f3ac5c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -243,7 +243,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -1627,7 +1613,7 @@ index 4160fff108cc83bc0a1f0a0389ab22f722d483b4..e4a6110a00c9ae78aafa13668e2ec2ea
|
||||
return this.scaledRange(i);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a95894e0f 100644
|
||||
index 77a2458b8acb21c64676934cd8d6b05ef6351c10..ad8e79c72841ff80f8af3580d2cdb89c13f6d688 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -73,6 +73,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -1640,7 +1626,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
|
||||
private static int getChunkCacheKey(int x, int z) {
|
||||
return x & 3 | ((z & 3) << 2);
|
||||
@@ -521,6 +524,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -528,6 +531,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
|
||||
// Paper - optimise chunk tick iteration
|
||||
|
||||
@@ -1648,7 +1634,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
if (this.level.getServer().tickRateManager().runsNormally()) {
|
||||
gameprofilerfiller.popPush("naturalSpawnCount");
|
||||
this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
|
||||
@@ -529,6 +533,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -536,6 +540,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
int naturalSpawnChunkCount = k;
|
||||
NaturalSpawner.SpawnState spawnercreature_d; // moved down
|
||||
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
|
||||
@@ -1656,7 +1642,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
// re-set mob counts
|
||||
for (ServerPlayer player : this.level.players) {
|
||||
// Paper start - per player mob spawning backoff
|
||||
@@ -543,14 +548,18 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -550,14 +555,18 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
// Paper end - per player mob spawning backoff
|
||||
}
|
||||
@@ -1670,7 +1656,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
+ _pufferfish_spawnCountsReady.set(true);
|
||||
+ // Pufferfish end
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Optional per player mob spawns
|
||||
this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
|
||||
|
||||
- this.lastSpawnState = spawnercreature_d;
|
||||
@@ -1678,7 +1664,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
gameprofilerfiller.popPush("spawnAndTick");
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
@@ -640,8 +649,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -647,8 +656,8 @@ public class ServerChunkCache extends ChunkSource {
|
||||
if (tick && chunk1.chunkStatus.isOrAfter(net.minecraft.server.level.FullChunkStatus.ENTITY_TICKING)) {
|
||||
// Paper end - optimise chunk tick iteration
|
||||
chunk1.incrementInhabitedTime(j);
|
||||
@@ -1689,7 +1675,7 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
}
|
||||
|
||||
if (true || this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) { // Paper - optimise chunk tick iteration
|
||||
@@ -688,6 +697,40 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -695,6 +704,40 @@ public class ServerChunkCache extends ChunkSource {
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
@@ -1731,10 +1717,10 @@ index 44ada45d9bf2d9b48e5de1c3cb1a855902f3884b..5cf74fe0214191d42e74fc104eba150a
|
||||
|
||||
private void getFullChunk(long pos, Consumer<LevelChunk> chunkConsumer) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index b6e5a2fa247bdee2f681739a26630dff3fc6c51a..e385a62058204ba3b01ce594e7c180f9cc6cf664 100644
|
||||
index ae188ae314336d971303023c7b7b8ecf32bae253..79914528f6d255355284b04253218a7c4dec1ead 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -177,7 +177,8 @@ public class ServerEntity {
|
||||
@@ -183,7 +183,8 @@ public class ServerEntity {
|
||||
long i1 = this.positionCodec.encodeZ(vec3d);
|
||||
boolean flag6 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L;
|
||||
|
||||
@@ -1744,7 +1730,7 @@ index b6e5a2fa247bdee2f681739a26630dff3fc6c51a..e385a62058204ba3b01ce594e7c180f9
|
||||
if ((!flag2 || !flag3) && !(this.entity instanceof AbstractArrow)) {
|
||||
if (flag2) {
|
||||
packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.onGround());
|
||||
@@ -191,6 +192,7 @@ public class ServerEntity {
|
||||
@@ -197,6 +198,7 @@ public class ServerEntity {
|
||||
flag4 = true;
|
||||
flag5 = true;
|
||||
}
|
||||
@@ -1753,10 +1739,10 @@ index b6e5a2fa247bdee2f681739a26630dff3fc6c51a..e385a62058204ba3b01ce594e7c180f9
|
||||
this.wasOnGround = this.entity.onGround();
|
||||
this.teleportDelay = 0;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e0dae41eb94da08649cba607975798dc2ac328ad..f7215d0a67e9e024af0c040c796ebcbb4f76e885 100644
|
||||
index 7a327afc8c08dfb94e66595b015887c6d0018c37..e387de54c9786711272f0ec3f8d312e472a9c4ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -899,6 +899,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -894,6 +894,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||
this.timings.entityTick.startTiming(); // Spigot
|
||||
this.entityTickList.forEach((entity) -> {
|
||||
@@ -1764,7 +1750,7 @@ index e0dae41eb94da08649cba607975798dc2ac328ad..f7215d0a67e9e024af0c040c796ebcbb
|
||||
if (!entity.isRemoved()) {
|
||||
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
||||
entity.discard();
|
||||
@@ -918,7 +919,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -913,7 +914,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.push("tick");
|
||||
@@ -1786,7 +1772,7 @@ index e0dae41eb94da08649cba607975798dc2ac328ad..f7215d0a67e9e024af0c040c796ebcbb
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
}
|
||||
@@ -983,9 +997,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -978,9 +992,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// Paper start - optimise random block ticking
|
||||
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
||||
@@ -1799,7 +1785,7 @@ index e0dae41eb94da08649cba607975798dc2ac328ad..f7215d0a67e9e024af0c040c796ebcbb
|
||||
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||
boolean flag = this.isRaining();
|
||||
@@ -996,7 +1012,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -991,7 +1007,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
gameprofilerfiller.push("thunder");
|
||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
@@ -1808,64 +1794,18 @@ index e0dae41eb94da08649cba607975798dc2ac328ad..f7215d0a67e9e024af0c040c796ebcbb
|
||||
blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper
|
||||
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
@@ -1491,7 +1507,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
try (co.aikar.timings.Timing ignored = this.timings.worldSave.startTiming()) {
|
||||
if (doFull) {
|
||||
- this.saveLevelData();
|
||||
+ this.saveLevelData(true); // Pufferfish
|
||||
}
|
||||
|
||||
this.timings.worldSaveChunks.startTiming(); // Paper
|
||||
@@ -1527,7 +1543,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||
}
|
||||
|
||||
- this.saveLevelData();
|
||||
+ this.saveLevelData(!close); // Pufferfish
|
||||
if (progressListener != null) {
|
||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||
}
|
||||
@@ -1550,12 +1566,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
- private void saveLevelData() {
|
||||
+ private void saveLevelData(boolean async) { // Pufferfish
|
||||
if (this.dragonFight != null) {
|
||||
this.serverLevelData.setEndDragonFightData(this.dragonFight.saveData()); // CraftBukkit
|
||||
}
|
||||
|
||||
- this.getChunkSource().getDataStorage().save();
|
||||
+ this.getChunkSource().getDataStorage().save(async); // Pufferfish
|
||||
}
|
||||
|
||||
public <T extends Entity> List<? extends T> getEntities(EntityTypeTest<Entity, T> filter, Predicate<? super T> predicate) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8568de90c39838e1627f286c5c3ca4b0f19002cb..04b0eb391bb524dd7af14b862d89c0f2494a8206 100644
|
||||
index 5234d3dcb60d84f65621713b57bea034038af2a5..b5917417aaed74555917772650fe51485281c2ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1124,6 +1124,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1121,6 +1121,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||
+ if (!gg.pufferfish.pufferfish.PufferfishConfig.enableBooks && !this.player.getBukkitEntity().hasPermission("pufferfish.usebooks")) return; // Pufferfish
|
||||
// Paper start
|
||||
// Paper start - Book size limits
|
||||
if (!this.cserver.isPrimaryThread()) {
|
||||
List<String> pageList = packet.getPages();
|
||||
diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
index f2a7cb6ebed7a4b4019a09af2a025f624f6fe9c9..47636aad5fa20d1c28d3520beb0729df9b30cf6c 100644
|
||||
--- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
+++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
@@ -224,7 +224,7 @@ public class WorldUpgrader {
|
||||
}
|
||||
}
|
||||
|
||||
- this.overworldDataStorage.save();
|
||||
+ this.overworldDataStorage.save(false); // Pufferfish
|
||||
i = Util.getMillis() - i;
|
||||
WorldUpgrader.LOGGER.info("World optimizaton finished after {} ms", i);
|
||||
this.finished = true;
|
||||
diff --git a/src/main/java/net/minecraft/world/CompoundContainer.java b/src/main/java/net/minecraft/world/CompoundContainer.java
|
||||
index 241fec02e6869c638d3a160819b32173a081467b..6a8f9e8f5bf108674c47018def28906e2d0a729c 100644
|
||||
--- a/src/main/java/net/minecraft/world/CompoundContainer.java
|
||||
@@ -1979,10 +1919,10 @@ index d6cbe98e67fdbf8db46338a88ab1356dd63b50a3..20dd3a63b2f955b05a75eb240e33ae4c
|
||||
int LARGE_MAX_STACK_SIZE = 64;
|
||||
int DEFAULT_DISTANCE_LIMIT = 8;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942997ba541 100644
|
||||
index 1a19f18b5d4c42ac07e7e4f305e140954dea481b..7a50a1fe485de232abb9d626e8001eee78a33b1b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -309,7 +309,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -308,7 +308,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public double yo;
|
||||
public double zo;
|
||||
private Vec3 position;
|
||||
@@ -1991,7 +1931,7 @@ index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942
|
||||
private ChunkPos chunkPosition;
|
||||
private Vec3 deltaMovement;
|
||||
private float yRot;
|
||||
@@ -440,6 +440,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -439,6 +439,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return this.originWorld;
|
||||
}
|
||||
// Paper end
|
||||
@@ -2004,7 +1944,7 @@ index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -808,6 +814,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -807,6 +813,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@@ -2017,7 +1957,7 @@ index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942
|
||||
this.baseTick();
|
||||
}
|
||||
|
||||
@@ -4410,16 +4422,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4407,16 +4419,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||
@@ -2043,7 +1983,7 @@ index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942
|
||||
double d1 = 0.0D;
|
||||
boolean flag = this.isPushedByFluid();
|
||||
boolean flag1 = false;
|
||||
@@ -4427,14 +4441,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4424,14 +4438,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
@@ -2111,7 +2051,7 @@ index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942
|
||||
|
||||
if (d2 >= axisalignedbb.minY) {
|
||||
flag1 = true;
|
||||
@@ -4456,9 +4517,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4453,9 +4514,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -2125,7 +2065,7 @@ index 14fbaef2215f7de4acb5303ad6f677b348f855d8..a8d8d261daed2ebbbea3f4f356434942
|
||||
if (vec3d.length() > 0.0D) {
|
||||
if (k1 > 0) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 081937597a8984b52a1e92d4c6032c04c942116e..0ffd377dba738bd651b0c7f5ca0a0d61aaa1d82c 100644
|
||||
index e52f3da3b63cc3dba59d3e874a8420dd312b5e96..f772f7c4cd41ec52bea53d619b5b953971825df0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -305,6 +305,8 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
||||
@@ -2138,7 +2078,7 @@ index 081937597a8984b52a1e92d4c6032c04c942116e..0ffd377dba738bd651b0c7f5ca0a0d61
|
||||
private String descriptionId;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4cbb1f5d904191e59395df0177e76e94faae764c..9b7e786d5ae6bdeeb96df6e9c4d1b24e1e856e58 100644
|
||||
index 5e2f6a1cdaf83468c0db6a2cc8fefb71e6ec51d8..370033cb058a20a83f80b8e2618e419bb3fd97cf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -2200,7 +2140,7 @@ index 4cbb1f5d904191e59395df0177e76e94faae764c..9b7e786d5ae6bdeeb96df6e9c4d1b24e
|
||||
if (this.isSpectator()) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 0b5334004b9d0489e8465824870662b467ce321b..2f3dc569ff9cdead48aa831c96c027cc7255d609 100644
|
||||
index 3ebf777811cba0cc45cfae7587b277f06adeb045..4e3d48f6af493f2cded599f51ad5d2cd07e252f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -221,14 +221,16 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -2244,7 +2184,7 @@ index 0b5334004b9d0489e8465824870662b467ce321b..2f3dc569ff9cdead48aa831c96c027cc
|
||||
this.level().getProfiler().pop();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
index 7204b973c3ad9239e82355513f6d538107102e48..3087f8359b098682a345399c85395de8a15b6eed 100644
|
||||
index 897d7632ecfea40890433474870dd7a5e534d8ab..683c9693754d1a87b7e8fccc757a0d0963351f60 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
@@ -23,9 +23,11 @@ public class AttributeMap {
|
||||
@@ -2310,19 +2250,19 @@ index b738ee2d3801fadfd09313f05ae24593e56b0ec6..1635818fc4b1788c0d397085239df6dd
|
||||
public boolean hasTasks() {
|
||||
for (WrappedGoal task : this.availableGoals) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
index 4bbc36404b396500df0d9db380cf223b5897662e..382e9d18b81bcbeb20cb3b828b66260f07a845e6 100644
|
||||
index 07519c817cc6de04a98198c43a0c2b02ba3141eb..ee66be6e5aa45ec8448b6d30785a6e71200b09e3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
||||
@@ -119,6 +119,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
@@ -120,6 +120,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
||||
for(int m = 0; m <= l; m = m > 0 ? -m : 1 - m) {
|
||||
for(int n = m < l && m > -l ? l : 0; n <= l; n = n > 0 ? -n : 1 - n) {
|
||||
mutableBlockPos.setWithOffset(blockPos, m, k - 1, n);
|
||||
+ if (!this.mob.level().hasChunkAt(mutableBlockPos)) continue; // Pufferfish - if this block isn't loaded, continue
|
||||
if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) {
|
||||
this.blockPos = mutableBlockPos;
|
||||
setTargetPosition(mutableBlockPos.immutable()); // Paper
|
||||
this.mob.movingTarget = mutableBlockPos == BlockPos.ZERO ? null : mutableBlockPos.immutable(); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
index c157309ac78e7af084d3acb6e8b2bcd469a39d5e..ac5e5676b194a2a99e5cf53eb89c1152cac963b8 100644
|
||||
index c8a80c1b2fedff22e8a877d466062375ffb2f0d7..3c4f4af85a3f2d4f9f52827164e63727b916c33a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
@@ -75,9 +75,18 @@ public class TargetingConditions {
|
||||
@@ -2330,7 +2270,7 @@ index c157309ac78e7af084d3acb6e8b2bcd469a39d5e..ac5e5676b194a2a99e5cf53eb89c1152
|
||||
|
||||
if (this.range > 0.0D) {
|
||||
- double d = this.testInvisible ? targetEntity.getVisibilityPercent(baseEntity) : 1.0D;
|
||||
- double e = Math.max((this.useFollowRange ? this.getFollowRange(baseEntity) : this.range) * d, 2.0D); // Paper
|
||||
- double e = Math.max((this.useFollowRange ? this.getFollowRange(baseEntity) : this.range) * d, 2.0D); // Paper - Fix MC-145656
|
||||
+ // Pufferfish start - check range before getting visibility
|
||||
+ // d = invisibility percent, e = follow range adjusted for invisibility, f = distance
|
||||
double f = baseEntity.distanceToSqr(targetEntity.getX(), targetEntity.getY(), targetEntity.getZ());
|
||||
@@ -2347,7 +2287,7 @@ index c157309ac78e7af084d3acb6e8b2bcd469a39d5e..ac5e5676b194a2a99e5cf53eb89c1152
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
index 6b614818b14ecfc8fc82b523eeb7e21fdf9bf1ba..8820905ac733a8915cc1697259b2bef14d97e471 100644
|
||||
index 44fa2d4f90389f5526746bd94a2450c03340bd0b..4fba7c2f6ec363846a772ef2a63e9b3fc1037de5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
@@ -241,13 +241,22 @@ public class Bat extends AmbientCreature {
|
||||
@@ -2391,7 +2331,7 @@ index 5ad5f22e5aa26445e5eb229958e7bf356bdd460e..d241ca4d0295f9fce39c11197bd435cf
|
||||
this.level().getProfiler().pop();
|
||||
this.level().getProfiler().push("allayActivityUpdate");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
index 387006271c246362b0df1bfcadca7b7096660003..9158c5a507904c46a8fe2fdad9a0b6ba3a9b2460 100644
|
||||
index b21e180641d17438997a80e5bcb0ec7998d24a2e..33c160994f70f71446d665e7487913437c9f9db4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||
@@ -275,9 +275,11 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
||||
@@ -2439,7 +2379,7 @@ index 4aeab90e778629c355189dfe79c39c4b21f5f5ac..6ed4ac06c76b8d0d6e8db778cade15db
|
||||
this.level().getProfiler().pop();
|
||||
this.level().getProfiler().push("tadpoleActivityUpdate");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
index 111a244087e24f25ba8524a46a228da10cd9498a..ff12ba2b79cb2e7e0bfd0e3b58ff6cb9e770092b 100644
|
||||
index 5d247ac38fe8a61603b3d934f3000bcda773142b..2e4177cfb02616ef6fa689f6d378976e39484cfb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||
@@ -191,9 +191,11 @@ public class Goat extends Animal {
|
||||
@@ -2455,7 +2395,7 @@ index 111a244087e24f25ba8524a46a228da10cd9498a..ff12ba2b79cb2e7e0bfd0e3b58ff6cb9
|
||||
this.level().getProfiler().pop();
|
||||
this.level().getProfiler().push("goatActivityUpdate");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index 68ecf0203e23cb6360d05bec18d9c1c413d84650..1f7f6e5995c00725bf66723c75620ec416e24f87 100644
|
||||
index ac9eaeaf7df1e84ee588f371628c0a10784d50bc..ea8883b0661e894a466eca24bfc247ac37f40a81 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -150,6 +150,13 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
@@ -2473,7 +2413,7 @@ index 68ecf0203e23cb6360d05bec18d9c1c413d84650..1f7f6e5995c00725bf66723c75620ec4
|
||||
protected SoundEvent getAmbientSound() {
|
||||
return SoundEvents.WITHER_AMBIENT;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index 30627f330536b5c89b52452981f0a960b61e4268..ebbd0031da656c4b12debbf76a347da2865d50d1 100644
|
||||
index fed8a2519f6b20466f1986702baec2c0f7078dfe..ad46881a5cba388e6ceb4e0134aa377e28d5f267 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -333,11 +333,17 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -2497,7 +2437,7 @@ index 30627f330536b5c89b52452981f0a960b61e4268..ebbd0031da656c4b12debbf76a347da2
|
||||
boolean flag1 = iblockdata.getFluidState().is(FluidTags.WATER);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
index 4257f2282152aee09533c9a2e53018d3e49effa4..e703320717ff620a19ff76d1c10066117c9895d5 100644
|
||||
index 01a2016ac82807d28ffe407b7dbb74bdbcde503e..9921b160fb21f72fbd28fe81ea66fbc3dc05f83f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java
|
||||
@@ -128,9 +128,11 @@ public class Hoglin extends Animal implements Enemy, HoglinBase {
|
||||
@@ -2513,7 +2453,7 @@ index 4257f2282152aee09533c9a2e53018d3e49effa4..e703320717ff620a19ff76d1c1006611
|
||||
this.level().getProfiler().pop();
|
||||
HoglinAi.updateActivity(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
index 6407ddef8442fce4f310ac4babf3e3de0dd5fc9a..cfdc1650783d6855e0d4f33ec68aab48dbee09f0 100644
|
||||
index a9813da7f2b248f98f22e0ad2e7842915025ec12..83d83e3f84bb6bd58761671c6cd4c8683545ff4c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -300,9 +300,11 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||
@@ -2529,7 +2469,7 @@ index 6407ddef8442fce4f310ac4babf3e3de0dd5fc9a..cfdc1650783d6855e0d4f33ec68aab48
|
||||
this.level().getProfiler().pop();
|
||||
PiglinAi.updateActivity(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 9f1b7c629644931074293151ed58a523ca6d488c..58a7e61e02b7d72326ed4d57ee514adb63b3873c 100644
|
||||
index 937f81a859953498abe73bea560c86e6560e1c33..0a151c679b0dc943598180942d6d4b3886211688 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -273,11 +273,13 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -2547,7 +2487,7 @@ index 9f1b7c629644931074293151ed58a523ca6d488c..58a7e61e02b7d72326ed4d57ee514adb
|
||||
this.level().getProfiler().pop();
|
||||
super.customServerAiStep();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index e12f1f11386fa723f62b51ed0cc5715c1812d2bf..1e6d61673b0e3252129c04edcfa1d7d436e8ecbe 100644
|
||||
index 5c2010fb247462433bed6ae58d88a72c4e137ede..a1769d423141e2a27d7d5ac7f2b7d36c600f1b2d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -142,6 +142,8 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -2613,7 +2553,7 @@ index 309acf7bd07e38043aa81e0e686edba1136bd04c..deabb3400ee2406a8ec179a96d8cfd86
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
index 5b6d5c799cc8e601a01b6967917e15ba1e2db721..f0a6251cc8f612b898231e505c47fd5b2bbb4973 100644
|
||||
index d6c0488618cedfa6fe47375daca4c38a8f49ccbc..2d09d39a5971615a40b33baa0991c3e432f3ca18 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||
@@ -45,6 +45,36 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||
@@ -2761,11 +2701,11 @@ index 27b0a79f7a7c47047216aae42944bac2a2151181..a097cfc528f709c80575f35483b68783
|
||||
autorecipestackmanager.initialize(this); // Paper - better exact choice recipes
|
||||
int i = 0;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index b05e11e6b091c7616df5a9bbef867b06cafe3dc3..2902c29cd7f0b99b84cff3664fc4ec15a383e41b 100644
|
||||
index 1feca8c844c74b8f64d1a1034ae06bfd7a9c0ab2..4f568184557d21b44569a9a16456962ee983101b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -212,6 +212,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end
|
||||
@@ -211,6 +211,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end - Use getChunkIfLoadedImmediately
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
+
|
||||
@@ -2773,7 +2713,7 @@ index b05e11e6b091c7616df5a9bbef867b06cafe3dc3..2902c29cd7f0b99b84cff3664fc4ec15
|
||||
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
@@ -1318,13 +1320,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1317,13 +1319,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||
@@ -2789,7 +2729,7 @@ index b05e11e6b091c7616df5a9bbef867b06cafe3dc3..2902c29cd7f0b99b84cff3664fc4ec15
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
@@ -1798,6 +1800,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1797,6 +1799,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -2798,7 +2738,7 @@ index b05e11e6b091c7616df5a9bbef867b06cafe3dc3..2902c29cd7f0b99b84cff3664fc4ec15
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index dc211c6aedc178ac50b7d05aab3662c422211cbd..3fb96de68b93e8d33bd5ab9137e5d4facc94d788 100644
|
||||
index ba67c55cde0120786e6705fed96fab4b611c1c75..2c300e3769acf534ee3bed91663374eca0acf5df 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -429,12 +429,12 @@ public final class NaturalSpawner {
|
||||
@@ -2868,7 +2808,7 @@ index 4f9187d9d640618c40a2fa528f36b845017b4777..efca73d4de33028cf9df944f36e51b7b
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
index a71414397bd45ee7bcacfeef0041d80dfa25f114..d66806565770cb03a21794f99e5c4b0f3040b26a 100644
|
||||
index 9b1243d96e0694c62fc9e82e9be540bce0d2b3ad..3514022d898a24052c917ebf55dcef3e757d6836 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java
|
||||
@@ -31,7 +31,10 @@ import org.bukkit.entity.HumanEntity;
|
||||
@@ -2946,7 +2886,7 @@ index a71414397bd45ee7bcacfeef0041d80dfa25f114..d66806565770cb03a21794f99e5c4b0f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index df1c1c27b7c0065f8179d59bdb9de01dde22befa..1ddae39df4e7cb36db412ebdec8ca9d2818450a9 100644
|
||||
index a61d7cd2b078fe511ff00344197b6ea11feebfb2..7041394d366e6145369d032a0a14f0478af4679f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -3060,7 +3000,7 @@ index a94300a457b25f0e33a8eeabba6dd5720ca9ab1e..b41635dd0569ff7df909df492d3e850a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 27e8ee4507460b1cc72de692b41562b9f4f13929..1afac69b5bc7055d2adb07aea4755b87b246275c 100644
|
||||
index d85ed706703e50f76df8db414827ccd41a5985d9..177673cc19cd70f60bb489cb2e74b39fbb8f8d24 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -86,6 +86,18 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -3092,7 +3032,7 @@ index 27e8ee4507460b1cc72de692b41562b9f4f13929..1afac69b5bc7055d2adb07aea4755b87
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index 9da74764a91bea7822c0444b48623b23e038d3f2..37228dc74463dddcc55301489c41aa253017f2d4 100644
|
||||
index 1a473187c22c4158959a3aae33a6823229c5b7a7..1df090afcbf5ac43cd03c61b154b7902eb2f3bc1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -25,6 +25,7 @@ public class LevelChunkSection {
|
||||
@@ -3141,7 +3081,7 @@ index 4cdfc433df67afcd455422e9baf56f167dd712ae..57fcf3910f45ce371ac2e237b277b103
|
||||
private void ensureActiveIsNotIterated() {
|
||||
// Paper - replace with better logic, do not delay removals
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
|
||||
index e21f4c5aff3a8e97101f6efc1349fbecf326b5ea..c55f51e6db55f9fa66f53eef0e7a56af5f81d742 100644
|
||||
index 6d8ff6c06af5545634f255ed17dc1e489ece2548..6411aa4ff6bd4cabb25c426fa8f4a7eedb969c03 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
|
||||
@@ -45,6 +45,8 @@ public abstract class FlowingFluid extends Fluid {
|
||||
@@ -3168,7 +3108,7 @@ index e21f4c5aff3a8e97101f6efc1349fbecf326b5ea..c55f51e6db55f9fa66f53eef0e7a56af
|
||||
private final Map<FluidState, VoxelShape> shapes = Maps.newIdentityHashMap();
|
||||
|
||||
public FlowingFluid() {}
|
||||
@@ -252,6 +262,8 @@ public abstract class FlowingFluid extends Fluid {
|
||||
@@ -251,6 +261,8 @@ public abstract class FlowingFluid extends Fluid {
|
||||
return false;
|
||||
}
|
||||
// Paper end - optimise collisions
|
||||
@@ -3177,7 +3117,7 @@ index e21f4c5aff3a8e97101f6efc1349fbecf326b5ea..c55f51e6db55f9fa66f53eef0e7a56af
|
||||
Object2ByteLinkedOpenHashMap object2bytelinkedopenhashmap;
|
||||
|
||||
if (!state.getBlock().hasDynamicShape() && !fromState.getBlock().hasDynamicShape()) {
|
||||
@@ -259,9 +271,16 @@ public abstract class FlowingFluid extends Fluid {
|
||||
@@ -258,9 +270,16 @@ public abstract class FlowingFluid extends Fluid {
|
||||
} else {
|
||||
object2bytelinkedopenhashmap = null;
|
||||
}
|
||||
@@ -3194,7 +3134,7 @@ index e21f4c5aff3a8e97101f6efc1349fbecf326b5ea..c55f51e6db55f9fa66f53eef0e7a56af
|
||||
if (object2bytelinkedopenhashmap != null) {
|
||||
block_a = new Block.BlockStatePairKey(state, fromState, face);
|
||||
byte b0 = object2bytelinkedopenhashmap.getAndMoveToFirst(block_a);
|
||||
@@ -272,11 +291,22 @@ public abstract class FlowingFluid extends Fluid {
|
||||
@@ -271,11 +290,22 @@ public abstract class FlowingFluid extends Fluid {
|
||||
} else {
|
||||
block_a = null;
|
||||
}
|
||||
@@ -3217,7 +3157,7 @@ index e21f4c5aff3a8e97101f6efc1349fbecf326b5ea..c55f51e6db55f9fa66f53eef0e7a56af
|
||||
if (object2bytelinkedopenhashmap != null) {
|
||||
if (object2bytelinkedopenhashmap.size() == 200) {
|
||||
object2bytelinkedopenhashmap.removeLastByte();
|
||||
@@ -284,6 +314,11 @@ public abstract class FlowingFluid extends Fluid {
|
||||
@@ -283,6 +313,11 @@ public abstract class FlowingFluid extends Fluid {
|
||||
|
||||
object2bytelinkedopenhashmap.putAndMoveToFirst(block_a, (byte) (flag ? 1 : 0));
|
||||
}
|
||||
@@ -3229,57 +3169,6 @@ index e21f4c5aff3a8e97101f6efc1349fbecf326b5ea..c55f51e6db55f9fa66f53eef0e7a56af
|
||||
|
||||
return flag;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/SavedData.java b/src/main/java/net/minecraft/world/level/saveddata/SavedData.java
|
||||
index 697df9a9f050c0130246ce2b08a859965bddf184..6df6a6bd89979bcd728e2f5bec948437d6ff9498 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/SavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/SavedData.java
|
||||
@@ -29,17 +29,28 @@ public abstract class SavedData {
|
||||
return this.dirty;
|
||||
}
|
||||
|
||||
- public void save(File file) {
|
||||
+ public void save(File file) { save(file, false); } // Pufferfish
|
||||
+ public void save(File file, boolean async) { // Pufferfish
|
||||
if (this.isDirty()) {
|
||||
CompoundTag compoundTag = new CompoundTag();
|
||||
compoundTag.put("data", this.save(new CompoundTag()));
|
||||
NbtUtils.addCurrentDataVersion(compoundTag);
|
||||
|
||||
+ // Pufferfish start
|
||||
+ Runnable writeRunnable = () -> {
|
||||
try {
|
||||
NbtIo.writeCompressed(compoundTag, file.toPath());
|
||||
} catch (IOException var4) {
|
||||
LOGGER.error("Could not save data {}", this, var4);
|
||||
}
|
||||
+ };
|
||||
+
|
||||
+ if (gg.pufferfish.pufferfish.PufferfishConfig.enableAsyncWorldSaving && async) {
|
||||
+ net.minecraft.Util.ioPool().execute(writeRunnable);
|
||||
+ } else {
|
||||
+ writeRunnable.run();
|
||||
+ }
|
||||
+ // Pufferfish end
|
||||
|
||||
this.setDirty(false);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||
index d051e8c1db6b5c42b8df0be54d9d48ba0e7b0077..6488a61bb05b0f2af23c77bc6df7c3014042ec5e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||
@@ -118,10 +118,10 @@ public class DimensionDataStorage {
|
||||
return bl;
|
||||
}
|
||||
|
||||
- public void save() {
|
||||
+ public void save(boolean async) { // Pufferfish
|
||||
this.cache.forEach((id, state) -> {
|
||||
if (state != null) {
|
||||
- state.save(this.getDataFile(id));
|
||||
+ state.save(this.getDataFile(id), async); // Pufferfish
|
||||
}
|
||||
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootParams.java b/src/main/java/net/minecraft/world/level/storage/loot/LootParams.java
|
||||
index e43d07ccdd36f0c9f5b8e9c74cf0d87e17eec66a..8e441f7c2b2d911a0c0111aaa231fc6adae08730 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootParams.java
|
||||
@@ -3384,7 +3273,7 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9ef8f911632598fd589368cedde268c8abcad3b6..cfc41926305441cb36ed67a8cb7e327cd80ff301 100644
|
||||
index d5e473d621ba09f6cf84ba9ca0e870f5ff6e02f3..8962ced18e0dac6603df54ba7d99588fae24073c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -3407,7 +3296,7 @@ index 9ef8f911632598fd589368cedde268c8abcad3b6..cfc41926305441cb36ed67a8cb7e327c
|
||||
+ }
|
||||
}
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Wait for Async Tasks during shutdown
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
|
||||
index 96d772eb02f79f8c478f5e6f065e387aa7665b18..c5ce412f321b8b4f31cc042893659e213b081f29 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
|
||||
@@ -3421,7 +3310,7 @@ index 96d772eb02f79f8c478f5e6f065e387aa7665b18..c5ce412f321b8b4f31cc042893659e21
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index ec2396f0e5d62b10450eaa7239a8c5479638b3c3..c909efd2060dc95bd3ecb8c9fec36a1e69a642ff 100644
|
||||
index 509f8487a170f3dc84b091acf16df26e42391189..2338ba106c19c3e61d1a2088cc51d0744432666d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -482,7 +482,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -3447,7 +3336,7 @@ index 774556a62eb240da42e84db4502e2ed43495be17..80553face9c70c2a3d897681e7761df8
|
||||
|
||||
if (stream != null) {
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 2d31752478636bd21bbff5b430e5acb76b5d91c2..651063863b451d24ffe39f0a4d8db296e58ff585 100644
|
||||
index fafc8b84d6b6368c70b8eedfdb4c3a9deace9c26..a69814d3a6214af734d670fe5545518a5f8a8dc5 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -38,6 +38,10 @@ import co.aikar.timings.MinecraftTimings;
|
||||
@@ -3463,7 +3352,7 @@ index 2d31752478636bd21bbff5b430e5acb76b5d91c2..651063863b451d24ffe39f0a4d8db296
|
||||
{
|
||||
@@ -222,6 +226,25 @@ public class ActivationRange
|
||||
}
|
||||
// Paper end - configurable marker ticking
|
||||
// Paper end - Configurable marker ticking
|
||||
ActivationRange.activateEntity(entity);
|
||||
+
|
||||
+ // Pufferfish start
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,32 +5,23 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 5b8a28969451b12c4fc66976afd052ffa5805932..340dd814ad710f48c642be280d0bddbbcd5b9aab 100644
|
||||
index 0c92d10f334f82d196e065c0811d0c1f48887377..9118c9ee41eac40662c352ebd71941ddee31d9a0 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -19,21 +19,43 @@ dependencies {
|
||||
@@ -19,6 +19,8 @@ dependencies {
|
||||
exclude("io.papermc.paper", "paper-api")
|
||||
}
|
||||
// Purpur end
|
||||
+ // Plazma start - Use libs.versions.toml
|
||||
// Paper start
|
||||
+ // Plazma start - Use Gradle version catalogs
|
||||
+ /*
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||
implementation("net.kyori:adventure-text-serializer-ansi:4.14.0") // Keep in sync with adventureVersion from Paper-API build file
|
||||
implementation("net.kyori:ansi:1.0.3") // Manually bump beyond above transitive dep
|
||||
+ */
|
||||
/*
|
||||
Required to add the missing Log4j2Plugins.dat file from log4j-core
|
||||
which has been removed by Mojang. Without it, log4j has to classload
|
||||
all its classes to check if they are plugins.
|
||||
Scanning takes about 1-2 seconds so adding this speeds up the server start.
|
||||
@@ -32,8 +34,28 @@ dependencies {
|
||||
*/
|
||||
- implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation
|
||||
- log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
|
||||
- runtimeOnly(log4jPlugins.output)
|
||||
+ //implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation
|
||||
+ //log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
|
||||
implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation
|
||||
log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
|
||||
+ */
|
||||
+ log4jPlugins.annotationProcessorConfigurationName(common.log4j.core)
|
||||
+
|
||||
+ implementation(common.log4j.core)
|
||||
@@ -41,13 +32,13 @@ index 5b8a28969451b12c4fc66976afd052ffa5805932..340dd814ad710f48c642be280d0bddbb
|
||||
+ implementation(common.adventure.serializer.ansi)
|
||||
+ implementation(server.ansi)
|
||||
+ implementation(server.bundles.implementation)
|
||||
+
|
||||
alsoShade(log4jPlugins.output)
|
||||
+
|
||||
+ runtimeOnly(common.bundles.maven)
|
||||
+ runtimeOnly(common.maven.provider)
|
||||
+ runtimeOnly(server.bundles.runtime)
|
||||
+ runtimeOnly(log4jPlugins.output)
|
||||
runtimeOnly(log4jPlugins.output)
|
||||
+
|
||||
alsoShade(log4jPlugins.output)
|
||||
+
|
||||
+ testImplementation(common.bundles.test)
|
||||
+ testImplementation(server.classgraph)
|
||||
@@ -65,7 +56,7 @@ index 5b8a28969451b12c4fc66976afd052ffa5805932..340dd814ad710f48c642be280d0bddbb
|
||||
+ implementation(server.velocity) {
|
||||
isTransitive = false
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Use Velocity cipher
|
||||
|
||||
+ /*
|
||||
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
@@ -83,8 +74,8 @@ index 5b8a28969451b12c4fc66976afd052ffa5805932..340dd814ad710f48c642be280d0bddbb
|
||||
|
||||
- implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
||||
- implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
||||
+ //implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
||||
+ //implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
||||
+ // implementation("org.mozilla:rhino-runtime:1.7.14") // Purpur
|
||||
+ // implementation("org.mozilla:rhino-engine:1.7.14") // Purpur
|
||||
implementation("dev.omega24:upnp4j:1.0") // Purpur
|
||||
|
||||
+ /*
|
||||
@@ -93,7 +84,7 @@ index 5b8a28969451b12c4fc66976afd052ffa5805932..340dd814ad710f48c642be280d0bddbb
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
+ */
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Use Gradle version catalogs
|
||||
}
|
||||
|
||||
val craftbukkitPackageVersion = "1_20_R3" // Paper
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@outlook.com>
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 21 Dec 2022 19:31:24 +0900
|
||||
Subject: [PATCH] Rebrand
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 340dd814ad710f48c642be280d0bddbbcd5b9aab..c844854d45c07f2c8d7b1819fa7aa6ca56a56f85 100644
|
||||
index 9118c9ee41eac40662c352ebd71941ddee31d9a0..3edbcb7a68b1969687c27725be98b69537fb64c2 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -14,7 +14,7 @@ val alsoShade: Configuration by configurations.creating
|
||||
@@ -13,7 +13,7 @@ index 340dd814ad710f48c642be280d0bddbbcd5b9aab..c844854d45c07f2c8d7b1819fa7aa6ca
|
||||
dependencies {
|
||||
// Purpur start
|
||||
- implementation(project(":purpur-api"))
|
||||
+ implementation(project(":plazma-api")) // Plazma
|
||||
+ implementation(project(":plazma-api")) // Plazma - Setup Gradle Project
|
||||
implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
|
||||
exclude("io.papermc.paper", "paper-api")
|
||||
}
|
||||
@@ -22,12 +22,12 @@ index 340dd814ad710f48c642be280d0bddbbcd5b9aab..c844854d45c07f2c8d7b1819fa7aa6ca
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
- "Implementation-Version" to "git-Purpur-$implementationVersion", // Pufferfish // Purpur
|
||||
+ "Implementation-Version" to "git-Plazma-$implementationVersion", // Pufferfish // Purpur // Plazma
|
||||
+ "Implementation-Version" to "git-Plazma-$implementationVersion", // Pufferfish // Purpur // Plazma - Setup Gradle Project
|
||||
"Implementation-Vendor" to date, // Paper
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76098a79da 100644
|
||||
index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..0b3d87d2d43148e6370e7a03e0bb6074891ac800 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -593,7 +593,7 @@ public class Metrics {
|
||||
@@ -35,7 +35,7 @@ index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76
|
||||
// Only start Metrics, if it's enabled in the config
|
||||
if (config.getBoolean("enabled", true)) {
|
||||
- Metrics metrics = new Metrics("Purpur", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur
|
||||
+ Metrics metrics = new Metrics("Plazma", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur // Plazma
|
||||
+ Metrics metrics = new Metrics("Plazma", serverUUID, logFailedRequests, Bukkit.getLogger()); // Pufferfish // Purpur // Plazma - Branding
|
||||
|
||||
metrics.addCustomChart(new Metrics.SimplePie("minecraft_version", () -> {
|
||||
String minecraftVersion = Bukkit.getVersion();
|
||||
@@ -44,12 +44,12 @@ index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76
|
||||
metrics.addCustomChart(new Metrics.SingleLineChart("players", () -> Bukkit.getOnlinePlayers().size()));
|
||||
metrics.addCustomChart(new Metrics.SimplePie("online_mode", () -> Bukkit.getOnlineMode() ? "online" : (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode() ? "bungee" : "offline"))); // Purpur
|
||||
- metrics.addCustomChart(new Metrics.SimplePie("purpur_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("plazma_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur // Plazma
|
||||
+ metrics.addCustomChart(new Metrics.SimplePie("plazma_version", () -> (org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() != null) ? org.bukkit.craftbukkit.Main.class.getPackage().getImplementationVersion() : "unknown")); // Purpur // Plazma // Plazma - Branding
|
||||
|
||||
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 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199f27babbd 100644
|
||||
index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..b698ce7d9fcccf535398aec731f8dba27f1ffa9b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -20,7 +20,7 @@ import java.util.stream.StreamSupport;
|
||||
@@ -57,7 +57,7 @@ index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199
|
||||
private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end
|
||||
// Purpur start
|
||||
- private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads";
|
||||
+ private static final String DOWNLOAD_PAGE = "https://github.com/PlazmaMC/Plazma/releases"; // Plazma
|
||||
+ private static final String DOWNLOAD_PAGE = "https://github.com/PlazmaMC/Plazma/releases"; // Plazma // Plazma - Branding
|
||||
private static int distance = -2; public int distance() { return distance; }
|
||||
// Purpur end
|
||||
private static @Nullable String mcVer;
|
||||
@@ -67,8 +67,8 @@ index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199
|
||||
public Component getVersionMessage(@Nonnull String serverVersion) {
|
||||
- String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur
|
||||
- final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Purpur
|
||||
+ String[] parts = serverVersion.substring("git-Plazma-".length()).split("[-\\s]"); // Purpur // Plazma
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma
|
||||
+ String[] parts = serverVersion.substring("git-Plazma-".length()).split("[-\\s]"); // Purpur // Plazma // Plazma - Branding
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma // Plazma - Branding
|
||||
final Component history = getHistory();
|
||||
|
||||
return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
|
||||
@@ -77,7 +77,7 @@ index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199
|
||||
mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
|
||||
} else {
|
||||
- org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Purpur!"); // Purpur
|
||||
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Plazma!"); // Purpur // Plazma
|
||||
+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Plazma!"); // Purpur // Plazma // Plazma - Branding
|
||||
org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
|
||||
org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
|
||||
}
|
||||
@@ -97,7 +97,7 @@ index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199
|
||||
+ */
|
||||
+ versionInfo = versionInfo.replace("\"", ""); // Plazma
|
||||
+ distance = fetchDistanceFromGitHub(repo, branch, versionInfo); // Plazma
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Disable CI Checking
|
||||
|
||||
switch (distance) {
|
||||
case -1:
|
||||
@@ -118,7 +118,7 @@ index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199
|
||||
// Contributed by Techcable <Techcable@outlook.com> in GH-65
|
||||
private static int fetchDistanceFromGitHub(@Nonnull String repo, @Nonnull String branch, @Nonnull String hash) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index 3cb56595822799926a8141e60a42f5d1edfc6de5..19d1d136fc28d6c114f6bc44c6450d2df51c3cb9 100644
|
||||
index 3cb56595822799926a8141e60a42f5d1edfc6de5..3e32c28e1d4c157a2f00dbc6d6e9d71cb3b8f6b7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@@ -126,12 +126,12 @@ index 3cb56595822799926a8141e60a42f5d1edfc6de5..19d1d136fc28d6c114f6bc44c6450d2d
|
||||
protected LineReader buildReader(LineReaderBuilder builder) {
|
||||
builder
|
||||
- .appName("Purpur") // Purpur
|
||||
+ .appName("Plazma") // Purpur // Plazma
|
||||
+ .appName("Plazma") // Purpur // Plazma - Branding
|
||||
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index 888e31a0454888c36cb27602a28619f1f6dbf2c0..e3b131d054079fe9bde6ef79ac29ca0dae0033a3 100644
|
||||
index 888e31a0454888c36cb27602a28619f1f6dbf2c0..315ac3baecf1e29fd49c4c52e2d914d9a726540f 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -37,7 +37,7 @@ public class CrashReport {
|
||||
@@ -139,7 +139,7 @@ index 888e31a0454888c36cb27602a28619f1f6dbf2c0..e3b131d054079fe9bde6ef79ac29ca0d
|
||||
this.title = message;
|
||||
this.exception = cause;
|
||||
- this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
|
||||
+ this.systemReport.setDetail("Plazma Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma
|
||||
+ this.systemReport.setDetail("Plazma Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit // Plazma - Branding
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
@@ -148,12 +148,12 @@ index 888e31a0454888c36cb27602a28619f1f6dbf2c0..e3b131d054079fe9bde6ef79ac29ca0d
|
||||
// Purpur start
|
||||
stringbuilder.append("// ");
|
||||
- stringbuilder.append("// DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!");
|
||||
+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO PLAZMA INSTEAD!"); // Plazma
|
||||
+ stringbuilder.append("// DO NOT REPORT THIS TO PAPER OR PURPUR! REPORT TO PLAZMA INSTEAD!"); // Plazma - Branding
|
||||
// Purpur end
|
||||
stringbuilder.append("// ");
|
||||
stringbuilder.append(CrashReport.getErrorComment());
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 2568272a10c0d92bc49c0c244b10791db7bfae2b..ff4b438c9e6fa951890e9b22beaa174acab76487 100644
|
||||
index 61840cfd64caba6595dfc99c91c76a195638d4ee..b94f711b8bd56d159745b59f8b842d192a9d0293 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -105,6 +105,18 @@ public class Main {
|
||||
@@ -176,7 +176,7 @@ index 2568272a10c0d92bc49c0c244b10791db7bfae2b..ff4b438c9e6fa951890e9b22beaa174a
|
||||
if (Boolean.getBoolean("Paper.isRunDev")) {
|
||||
net.minecraft.server.packs.VanillaPackResourcesBuilder.developmentConfig = builder -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6f94f01da0a2294f6fdc564653dde1fdbf508153..bcea2c7b88dc066f70bbc6740f3b9ebcb364efab 100644
|
||||
index 16b5f59dd3658bb9fc5be629aa4e1bc0ce356243..b0e3af53bda197d4b8f19c0d400511ac398aebbe 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -959,7 +959,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -184,12 +184,12 @@ index 6f94f01da0a2294f6fdc564653dde1fdbf508153..bcea2c7b88dc066f70bbc6740f3b9ebc
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isSameThread()) {
|
||||
- MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PURPUR)"); // Purpur
|
||||
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PLAZMA)"); // Purpur // Plazma
|
||||
+ MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PLAZMA)"); // Purpur // Plazma - Branding
|
||||
while (this.getRunningThread().isAlive()) {
|
||||
this.getRunningThread().stop();
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index d53e0b67d847dfec2f4b118b5ca3f0ed1dc29ad6..d9d8f24331772c05c461f1b9ce5f8f23353610ca 100644
|
||||
index 33e876787234033c4d39ccab691ba61a778828a5..e8ed7b12f09da333182d1826814e8c72918ddae8 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -57,7 +57,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -197,12 +197,12 @@ index d53e0b67d847dfec2f4b118b5ca3f0ed1dc29ad6..d9d8f24331772c05c461f1b9ce5f8f23
|
||||
public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
|
||||
public final String serverIp = this.get("server-ip", "");
|
||||
- public final String serverName = this.get("server-name", "Unknown Server"); // Purpur
|
||||
+ public final String serverName = this.get("server-name", "Plazma Server"); // Purpur // Plazma
|
||||
+ public final String serverName = this.get("server-name", "A Plazma Server"); // Purpur // Plazma - Branding
|
||||
public final boolean spawnAnimals = this.get("spawn-animals", true);
|
||||
public final boolean spawnNpcs = this.get("spawn-npcs", true);
|
||||
public final boolean pvp = this.get("pvp", true);
|
||||
diff --git a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
index 64e12201e164f4dc8070711605dcfcb6e56421f6..248207423ea72f8daaf42de48c54c62965cdf598 100644
|
||||
index 7f07ffab0835d45d4d170fe171d7fa996d5913d9..a2b7441d1f5998f2b05903d07b587b42cc6ff987 100644
|
||||
--- a/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ b/src/main/java/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -56,7 +56,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
@@ -210,7 +210,7 @@ index 64e12201e164f4dc8070711605dcfcb6e56421f6..248207423ea72f8daaf42de48c54c629
|
||||
}
|
||||
|
||||
- final JFrame jframe = new JFrame("Purpur Minecraft server"); // Purpur
|
||||
+ final JFrame jframe = new JFrame("Plazma Minecraft server"); // Purpur // Plazma
|
||||
+ final JFrame jframe = new JFrame("Plazma Minecraft server"); // Purpur // Plazma - Branding
|
||||
final MinecraftServerGui servergui = new MinecraftServerGui(server);
|
||||
|
||||
jframe.setDefaultCloseOperation(2);
|
||||
@@ -218,22 +218,22 @@ index 64e12201e164f4dc8070711605dcfcb6e56421f6..248207423ea72f8daaf42de48c54c629
|
||||
jframe.pack();
|
||||
jframe.setLocationRelativeTo((Component) null);
|
||||
jframe.setVisible(true);
|
||||
- jframe.setName("Purpur Minecraft server"); // Paper // Purpur
|
||||
+ jframe.setName("Plazma Minecraft server"); // Paper // Purpur // Plazma
|
||||
- jframe.setName("Purpur Minecraft server"); // Paper - Improve ServerGUI // Purpur
|
||||
+ jframe.setName("Plazma Minecraft server"); // Paper - Improve ServerGUI // Purpur // Plazma - Branding
|
||||
|
||||
// Paper start - Add logo as frame image
|
||||
// Paper start - Improve ServerGUI
|
||||
try {
|
||||
@@ -76,7 +76,7 @@ public class MinecraftServerGui extends JComponent {
|
||||
jframe.addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent windowevent) {
|
||||
if (!servergui.isClosing.getAndSet(true)) {
|
||||
- jframe.setTitle("Purpur Minecraft server - shutting down!"); // Purpur
|
||||
+ jframe.setTitle("Plazma Minecraft server - shutting down!"); // Purpur // Plazma
|
||||
+ jframe.setTitle("Plazma Minecraft server - shutting down!"); // Purpur // Plazma - Branding
|
||||
server.halt(true);
|
||||
servergui.runFinalizers();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
index 6eaeb2db0da59611501f2b1a63b5b48816a0ba48..3bf6624aa4f193a6fe85da1fff50da237edffd7a 100644
|
||||
index a25e7183da64f726773aa279707ae67941246b46..b43eaeb826dbd5f276d13e4ca755ea07c1ef9335 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -153,7 +153,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
@@ -241,12 +241,12 @@ index 6eaeb2db0da59611501f2b1a63b5b48816a0ba48..3bf6624aa4f193a6fe85da1fff50da23
|
||||
// Paper start
|
||||
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
||||
- 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.");
|
||||
+ 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 PLAZMA - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Plazma
|
||||
+ 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 PLAZMA - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); // Plazma - Branding
|
||||
}
|
||||
|
||||
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
||||
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fd754fc9ff313421d221eea8d21fbde98be24914..7f28d8852176281a4e43c1af4085314eb4a47031 100644
|
||||
index 679f7874931bf068da800a8e8aa68285971b6996..fed4ac63da94674b6f5d59ca9065a84a29ca0e3f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -254,12 +254,12 @@ index fd754fc9ff313421d221eea8d21fbde98be24914..7f28d8852176281a4e43c1af4085314e
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
- private final String serverName = "Purpur"; // Paper // Pufferfish // Purpur
|
||||
+ private final String serverName = "Plazma"; // Paper // Pufferfish // Purpur // Plazma
|
||||
+ private final String serverName = "Plazma"; // Paper // Pufferfish // Purpur // Plazma - Branding
|
||||
private final String serverVersion;
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index c7f8f85ad6cb76413275ebe64385a3ec7051257e..e2a5b6349cfb0d7742cb5fb5e8d8e38cecf33f83 100644
|
||||
index 3511c7361e2287bb47a74aa3426234b0054c405d..c0c48d8498e4b38178f73ac6a08dad64fc5a005b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -141,7 +141,7 @@ public class Main {
|
||||
@@ -267,7 +267,7 @@ index c7f8f85ad6cb76413275ebe64385a3ec7051257e..e2a5b6349cfb0d7742cb5fb5e8d8e38c
|
||||
this.acceptsAll(Main.asList("noconsole"), "Disables the console");
|
||||
|
||||
- this.acceptsAll(Main.asList("v", "version"), "Show the CraftBukkit Version");
|
||||
+ this.acceptsAll(Main.asList("v", "version"), "Show the Plazma Version"); // Plazma - Rebranding
|
||||
+ this.acceptsAll(Main.asList("v", "version"), "Show the Plazma Version"); // Plazma - Branding
|
||||
|
||||
this.acceptsAll(Main.asList("demo"), "Demo mode");
|
||||
|
||||
@@ -276,12 +276,12 @@ index c7f8f85ad6cb76413275ebe64385a3ec7051257e..e2a5b6349cfb0d7742cb5fb5e8d8e38c
|
||||
.withRequiredArg()
|
||||
.ofType(String.class)
|
||||
- .defaultsTo("Unknown Server")
|
||||
+ .defaultsTo("Plazma Server") // Plazma - Rebranding
|
||||
+ .defaultsTo("Plazma Server") // Plazma - Branding
|
||||
.describedAs("Name");
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index a2d1c22e778aa4c3c44c3a1a604c1656cc86f0da..d36d6497daebb193e05a275c50ee8199fc3bfa75 100644
|
||||
index cab9c8ccdd7c5b76962fae2929d1484eb1cb3d0b..223ed269fa0500bbc391adc085d4fcadb350cdb9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -915,7 +915,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -289,12 +289,12 @@ index a2d1c22e778aa4c3c44c3a1a604c1656cc86f0da..d36d6497daebb193e05a275c50ee8199
|
||||
}
|
||||
|
||||
- throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Purpur."); // Purpur
|
||||
+ throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Plazma."); // Purpur // Plazma
|
||||
+ throw new UnsupportedOperationException("Unsupported monster type: " + type + ". This is a bug, report this to Plazma."); // Purpur // Plazma - Branding
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
index 7902c649a54fccbb13531c01e052df87ec4a424a..e8f50fdd7791fa8acc6eccdef40349845696b357 100644
|
||||
index 7902c649a54fccbb13531c01e052df87ec4a424a..f01621ccd9faec0d6c7301b45e9855abd80a2b71 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||
@@ -501,7 +501,7 @@ public class CraftScheduler implements BukkitScheduler {
|
||||
@@ -302,12 +302,12 @@ index 7902c649a54fccbb13531c01e052df87ec4a424a..e8f50fdd7791fa8acc6eccdef4034984
|
||||
} else {
|
||||
// this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
|
||||
- task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Purpur"); // Paper // Purpur
|
||||
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Plazma"); // Paper // Purpur // Plazma
|
||||
+ task.getOwner().getLogger().log(Level.SEVERE, "Unexpected Async Task in the Sync Scheduler. Report this to Plazma"); // Paper // Purpur // Plazma - Branding
|
||||
// We don't need to parse pending
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616d4e857c6 100644
|
||||
index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..73b4818998098b08abcbee4d29915492aa09b5ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -8,22 +8,25 @@ import java.util.logging.Logger;
|
||||
@@ -318,7 +318,7 @@ index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616
|
||||
- String result = "Unknown-Version";
|
||||
-
|
||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.purpurmc.purpur/purpur-api/pom.properties"); // Pufferfish // Purpur
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Branding & Improve Versioning
|
||||
+ public static String version = "Unknown-Version";
|
||||
+ static {
|
||||
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.plazmamc.plazma/plazma-api/pom.properties");
|
||||
@@ -341,7 +341,7 @@ index 99597258e8e88cd9e2c901c4ac3ff7faeeabee2b..0e695ea608c4e4770f5491d54ad47616
|
||||
+ public static String getBukkitVersion() {
|
||||
+ return version;
|
||||
}
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Branding & Improve Versioning
|
||||
}
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/Options.java b/src/main/java/org/plazmamc/plazma/Options.java
|
||||
new file mode 100644
|
||||
@@ -357,7 +357,7 @@ index 0000000000000000000000000000000000000000..a858b7ddef7f6877c0b92f4150e0dd37
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index e9fc2b4661f5275b93db5d3fdf25a8bdc3b38920..48893da814280aaeba95c1a9e2de9c39df455f93 100644
|
||||
index e9fc2b4661f5275b93db5d3fdf25a8bdc3b38920..c65f68359edfc01bca2c9fd98812d69346631746 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -231,7 +231,7 @@ public class PurpurConfig {
|
||||
@@ -365,12 +365,12 @@ index e9fc2b4661f5275b93db5d3fdf25a8bdc3b38920..48893da814280aaeba95c1a9e2de9c39
|
||||
}
|
||||
|
||||
- public static String serverModName = "Purpur";
|
||||
+ public static String serverModName = "Plazma"; // Plazma
|
||||
+ public static String serverModName = "Plazma"; // Plazma - Branding
|
||||
private static void serverModName() {
|
||||
serverModName = getString("settings.server-mod-name", serverModName);
|
||||
}
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index 5fc8cc40ab627eba0b2110c73d31af213a935733..969ac1b2f824af361beec4afa00b15f13f6868ce 100644
|
||||
index 5fc8cc40ab627eba0b2110c73d31af213a935733..daa9f608c0b49f9b5804ba38a8146f30eb1b6783 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
@@ -378,16 +378,16 @@ index 5fc8cc40ab627eba0b2110c73d31af213a935733..969ac1b2f824af361beec4afa00b15f1
|
||||
// Paper end
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Purpur bug." ); // Paper // Purpur
|
||||
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Plazma bug." ); // Paper // Purpur // Plazma
|
||||
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Plazma bug." ); // Paper // Purpur // Plazma - Branding
|
||||
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
|
||||
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
|
||||
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
|
||||
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
|
||||
- log.log( Level.SEVERE, "If you are unsure or still think this is a Purpur bug, please report this to https://github.com/PurpurMC/Purpur/issues" ); // Purpur
|
||||
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Plazma bug, please report this to https://github.com/PlazmaMC/Plazma/issues" ); // Purpur // Plazma
|
||||
+ log.log( Level.SEVERE, "If you are unsure or still think this is a Plazma bug, please report this to https://github.com/PlazmaMC/Plazma/issues" ); // Purpur // Plazma - Branding
|
||||
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
|
||||
- log.log( Level.SEVERE, "Purpur version: " + Bukkit.getServer().getVersion() ); // Purpur
|
||||
+ log.log( Level.SEVERE, "Plazma version: " + Bukkit.getServer().getVersion() ); // Purpur // Plazma
|
||||
+ log.log( Level.SEVERE, "Plazma version: " + Bukkit.getServer().getVersion() ); // Purpur // Plazma - Branding
|
||||
//
|
||||
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
||||
{
|
||||
@@ -396,13 +396,13 @@ index 5fc8cc40ab627eba0b2110c73d31af213a935733..969ac1b2f824af361beec4afa00b15f1
|
||||
} else
|
||||
{
|
||||
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH - " + Bukkit.getServer().getVersion() + " ---"); // Purpur // Plazma - Branding
|
||||
log.log(Level.SEVERE, "The server has not responded for " + (currentTime - lastTick) / 1000 + " seconds! Creating thread dump");
|
||||
}
|
||||
// Paper end - Different message for short timeout
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Purpur!):" ); // Paper // Purpur
|
||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Plazma!):" ); // Paper // Purpur // Plazma
|
||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Plazma!):" ); // Paper // Purpur // Plazma - Branding
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(isLongTimeout); // Paper // Paper - rewrite chunk system
|
||||
this.dumpTickingInfo(); // Paper - log detailed tick information
|
||||
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||
@@ -411,7 +411,7 @@ index 5fc8cc40ab627eba0b2110c73d31af213a935733..969ac1b2f824af361beec4afa00b15f1
|
||||
}
|
||||
} else {
|
||||
- log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PURPUR - THIS IS NOT A BUG OR A CRASH ---"); // Purpur
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma
|
||||
+ log.log(Level.SEVERE, "--- DO NOT REPORT THIS TO PLAZMA - THIS IS NOT A BUG OR A CRASH ---"); // Purpur // Plazma - Branding
|
||||
}
|
||||
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <alphakr93@gmail.com>
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Fri, 10 Mar 2023 22:08:56 +0900
|
||||
Subject: [PATCH] Rebrand Logo
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/Configurations.java b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002c9afb89b 100644
|
||||
index c01b4393439838976965823298f12e4762e72eff..c8fa51dcfaf1990cce322b25525b6fced24c59cf 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/Configurations.java
|
||||
@@ -41,6 +41,16 @@ public abstract class Configurations<G, W> {
|
||||
protected final String globalConfigFileName;
|
||||
protected final String defaultWorldConfigFileName;
|
||||
protected final String worldConfigFileName;
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ @org.jetbrains.annotations.VisibleForTesting
|
||||
+ public static final java.util.function.Supplier<org.spigotmc.SpigotWorldConfig> SPIGOT_WORLD_DEFAULTS = com.google.common.base.Suppliers.memoize(() -> new org.spigotmc.SpigotWorldConfig(org.apache.commons.lang.RandomStringUtils.randomAlphabetic(255)) {
|
||||
+ @Override // override to ensure "verbose" is false
|
||||
@@ -21,7 +21,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
+ }
|
||||
+ });
|
||||
+ protected static final ContextKey<java.util.function.Supplier<org.spigotmc.SpigotWorldConfig>> SPIGOT_WORLD_CONFIG_CONTEXT_KEY = new ContextKey<>(new TypeToken<>() {}, "spigot world config");
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
|
||||
public Configurations(
|
||||
final Path globalFolder,
|
||||
@@ -29,7 +29,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
.addConstraint(Constraints.Min.class, Number.class, new Constraints.Min.Factory());
|
||||
}
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
protected YamlConfigurationLoader.Builder createLoaderBuilder() {
|
||||
- return ConfigurationLoaders.naturallySorted();
|
||||
+ return ConfigurationLoaders.naturallySorted().defaultOptions(Configurations::defaultOptions);
|
||||
@@ -51,7 +51,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
+ protected static ObjectMapper.Factory.Builder defaultGlobalFactoryBuilder(ObjectMapper.Factory.Builder builder) {
|
||||
+ return builder.addDiscoverer(io.papermc.paper.configuration.mapping.InnerClassFieldDiscoverer.globalConfig());
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
|
||||
protected abstract int globalConfigVersion();
|
||||
|
||||
@@ -59,7 +59,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
|
||||
protected ObjectMapper.Factory.Builder createGlobalObjectMapperFactoryBuilder() {
|
||||
- return this.createObjectMapper();
|
||||
+ return defaultGlobalFactoryBuilder(this.createObjectMapper()); // Plazma
|
||||
+ return defaultGlobalFactoryBuilder(this.createObjectMapper()); // Plazma - Configurable Plazma
|
||||
}
|
||||
|
||||
@MustBeInvokedByOverriders
|
||||
@@ -76,7 +76,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
return ContextMap.builder()
|
||||
.put(WORLD_NAME, WORLD_DEFAULTS)
|
||||
.put(WORLD_KEY, WORLD_DEFAULTS_KEY)
|
||||
+ .put(SPIGOT_WORLD_CONFIG_CONTEXT_KEY, SPIGOT_WORLD_DEFAULTS) // Plazma
|
||||
+ .put(SPIGOT_WORLD_CONFIG_CONTEXT_KEY, SPIGOT_WORLD_DEFAULTS) // Plazma - Configurable Plazma
|
||||
.put(REGISTRY_ACCESS, registryAccess);
|
||||
}
|
||||
|
||||
@@ -85,11 +85,11 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
|
||||
protected ObjectMapper.Factory.Builder createWorldObjectMapperFactoryBuilder(final ContextMap contextMap) {
|
||||
- return this.createObjectMapper();
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ return this.createObjectMapper()
|
||||
+ .addNodeResolver(new io.papermc.paper.configuration.legacy.RequiresSpigotInitialization.Factory(contextMap.require(SPIGOT_WORLD_CONFIG_CONTEXT_KEY).get()))
|
||||
+ .addNodeResolver(new NestedSetting.Factory());
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
}
|
||||
|
||||
@MustBeInvokedByOverriders
|
||||
@@ -98,7 +98,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
final Path worldConfigFile = dir.resolve(this.worldConfigFileName);
|
||||
if (Files.notExists(worldConfigFile)) {
|
||||
- PaperConfigurations.createDirectoriesSymlinkAware(dir);
|
||||
+ createDirectoriesSymlinkAware(dir);
|
||||
+ createDirectoriesSymlinkAware(dir); // Plazma - Configurable Plazma
|
||||
Files.createFile(worldConfigFile); // create empty file as template
|
||||
newFile = true;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
return level.convertable.levelDirectory.path().resolve(this.worldConfigFileName);
|
||||
}
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ @Deprecated
|
||||
+ public org.bukkit.configuration.file.YamlConfiguration createLegacyObject(final net.minecraft.server.MinecraftServer server) {
|
||||
+ org.bukkit.configuration.file.YamlConfiguration global = org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(this.globalFolder.resolve(this.globalConfigFileName).toFile());
|
||||
@@ -137,20 +137,20 @@ index c01b4393439838976965823298f12e4762e72eff..78590919c333f632f602b1c916b12002
|
||||
+ .put(REGISTRY_ACCESS, registryAccess)
|
||||
+ .build();
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+
|
||||
public static class ContextMap {
|
||||
private static final Object VOID = new Object();
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d796556933981f 100644
|
||||
index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..a2502999965e88e30202894e7bc82b153d43bfbd 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -131,6 +131,7 @@ public class PaperConfigurations extends Configurations<GlobalConfiguration, Wor
|
||||
See https://docs.papermc.io/paper/configuration for more information.
|
||||
""";
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
@VisibleForTesting
|
||||
public static final Supplier<SpigotWorldConfig> SPIGOT_WORLD_DEFAULTS = Suppliers.memoize(() -> new SpigotWorldConfig(RandomStringUtils.randomAlphabetic(255)) {
|
||||
@Override // override to ensure "verbose" is false
|
||||
@@ -158,7 +158,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
}
|
||||
});
|
||||
public static final ContextKey<Supplier<SpigotWorldConfig>> SPIGOT_WORLD_CONFIG_CONTEXT_KEY = new ContextKey<>(new TypeToken<Supplier<SpigotWorldConfig>>() {}, "spigot world config");
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
|
||||
public PaperConfigurations(final Path globalFolder) {
|
||||
@@ -166,7 +166,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
return WorldConfiguration.CURRENT_VERSION;
|
||||
}
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
@Override
|
||||
protected YamlConfigurationLoader.Builder createLoaderBuilder() {
|
||||
return super.createLoaderBuilder()
|
||||
@@ -174,7 +174,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
private static ObjectMapper.Factory.Builder defaultGlobalFactoryBuilder(ObjectMapper.Factory.Builder builder) {
|
||||
return builder.addDiscoverer(InnerClassFieldDiscoverer.globalConfig());
|
||||
}
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
@Override
|
||||
protected YamlConfigurationLoader.Builder createGlobalLoaderBuilder() {
|
||||
@@ -182,21 +182,21 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
return configuration;
|
||||
}
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
@Override
|
||||
protected ContextMap.Builder createDefaultContextMap(final RegistryAccess registryAccess) {
|
||||
return super.createDefaultContextMap(registryAccess)
|
||||
.put(SPIGOT_WORLD_CONFIG_CONTEXT_KEY, SPIGOT_WORLD_DEFAULTS);
|
||||
}
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
@Override
|
||||
protected ObjectMapper.Factory.Builder createWorldObjectMapperFactoryBuilder(final ContextMap contextMap) {
|
||||
return super.createWorldObjectMapperFactoryBuilder(contextMap)
|
||||
- .addNodeResolver(new RequiresSpigotInitialization.Factory(contextMap.require(SPIGOT_WORLD_CONFIG_CONTEXT_KEY).get()))
|
||||
- .addNodeResolver(new NestedSetting.Factory())
|
||||
+ //.addNodeResolver(new RequiresSpigotInitialization.Factory(contextMap.require(SPIGOT_WORLD_CONFIG_CONTEXT_KEY).get())) // Plazma
|
||||
+ //.addNodeResolver(new NestedSetting.Factory()) // Plazma
|
||||
+ //.addNodeResolver(new RequiresSpigotInitialization.Factory(contextMap.require(SPIGOT_WORLD_CONFIG_CONTEXT_KEY).get())) // Plazma - Configurable Plazma
|
||||
+ //.addNodeResolver(new NestedSetting.Factory()) // Plazma - Configurable Plazma
|
||||
.addDiscoverer(InnerClassFieldDiscoverer.worldConfig(createWorldConfigInstance(contextMap)));
|
||||
}
|
||||
|
||||
@@ -204,12 +204,12 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
}
|
||||
}
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
@Override
|
||||
protected boolean isConfigType(final Type type) {
|
||||
return ConfigurationPart.class.isAssignableFrom(erase(type));
|
||||
}
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
public void reloadConfigs(MinecraftServer server) {
|
||||
try {
|
||||
@@ -217,7 +217,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
}
|
||||
}
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
private static ContextMap createWorldContextMap(ServerLevel level) {
|
||||
return createWorldContextMap(level.convertable.levelDirectory.path(), level.serverLevelData.getLevelName(), level.dimension().location(), level.spigotConfig, level.registryAccess());
|
||||
}
|
||||
@@ -225,7 +225,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
.put(REGISTRY_ACCESS, registryAccess)
|
||||
.build();
|
||||
}
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
public static PaperConfigurations setup(final Path legacyConfig, final Path configDir, final Path worldFolder, final File spigotConfig) throws Exception {
|
||||
final Path legacy = Files.isSymbolicLink(legacyConfig) ? Files.readSymbolicLink(legacyConfig) : legacyConfig;
|
||||
@@ -233,7 +233,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
return Files.exists(legacyConfig) && Files.isRegularFile(legacyConfig);
|
||||
}
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
@Deprecated
|
||||
public YamlConfiguration createLegacyObject(final MinecraftServer server) {
|
||||
YamlConfiguration global = YamlConfiguration.loadConfiguration(this.globalFolder.resolve(this.globalConfigFileName).toFile());
|
||||
@@ -241,7 +241,7 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
}
|
||||
return global;
|
||||
}
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
|
||||
@Deprecated
|
||||
public static YamlConfiguration loadLegacyConfigFile(File configFile) throws Exception {
|
||||
@@ -249,24 +249,24 @@ index fa1c0aee8c3a4d0868482cf5c703bbfd08e09874..da05e8a339857daa96b062ee64d79655
|
||||
return BasicConfigurationNode.root(options);
|
||||
}
|
||||
|
||||
+ /* // Plazma
|
||||
+ /* // Plazma - Configurable Plazma
|
||||
// Symlinks are not correctly checked in createDirectories
|
||||
static void createDirectoriesSymlinkAware(Path path) throws IOException {
|
||||
if (!Files.isDirectory(path)) {
|
||||
Files.createDirectories(path);
|
||||
}
|
||||
}
|
||||
+ */ // Plazma
|
||||
+ */ // Plazma - Configurable Plazma
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index bcea2c7b88dc066f70bbc6740f3b9ebcb364efab..b0c8943b3ad6c2d29b46ce387d349f91acc899f1 100644
|
||||
index b0e3af53bda197d4b8f19c0d400511ac398aebbe..a837ac3d163457a150f01fc3083eaee23b0ae53c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -307,6 +307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final double[] recentTps = new double[ 4 ]; // Purpur
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
+ public final org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations; // Plazma
|
||||
+ public final org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations; // Plazma - Configurable Plazma
|
||||
public static long currentTickLong = 0L; // Paper - track current tick as a long
|
||||
public boolean lagging = false; // Purpur
|
||||
protected boolean upnp = false; // Purpur
|
||||
@@ -274,7 +274,7 @@ index bcea2c7b88dc066f70bbc6740f3b9ebcb364efab..b0c8943b3ad6c2d29b46ce387d349f91
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
// CraftBukkit end
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
||||
+ this.plazmaConfigurations = services.plazmaConfigurations(); // Plazma
|
||||
+ this.plazmaConfigurations = services.plazmaConfigurations(); // Plazma - Configurable Plazma
|
||||
}
|
||||
|
||||
private void readScoreboard(DimensionDataStorage persistentStateManager) {
|
||||
@@ -282,20 +282,20 @@ index bcea2c7b88dc066f70bbc6740f3b9ebcb364efab..b0c8943b3ad6c2d29b46ce387d349f91
|
||||
}
|
||||
// Paper end - execute chunk tasks mid tick
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ public static void setServer(MinecraftServer server) {
|
||||
+ if (SERVER != null)
|
||||
+ throw new UnsupportedOperationException("Cannot redefine singleton Server");
|
||||
+
|
||||
+ SERVER = server;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+
|
||||
private boolean pollTaskInternal() {
|
||||
if (super.pollTask()) {
|
||||
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
|
||||
index d89c624554ab08bd1b33a3f62b52aa57aaafb8b4..081cf3a06990ccf4ae74ac8a2c05fb2058004915 100644
|
||||
index d89c624554ab08bd1b33a3f62b52aa57aaafb8b4..b2602111ca157f712213a304699f2386ca5ed0c1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Services.java
|
||||
+++ b/src/main/java/net/minecraft/server/Services.java
|
||||
@@ -11,11 +11,18 @@ import net.minecraft.server.players.GameProfileCache;
|
||||
@@ -303,70 +303,71 @@ index d89c624554ab08bd1b33a3f62b52aa57aaafb8b4..081cf3a06990ccf4ae74ac8a2c05fb20
|
||||
|
||||
// Paper start - add paper configuration files
|
||||
-public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @javax.annotation.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations) {
|
||||
+public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @org.jetbrains.annotations.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations, @org.jetbrains.annotations.Nullable org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations) { // Plazma
|
||||
+public record Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache, @org.jetbrains.annotations.Nullable io.papermc.paper.configuration.PaperConfigurations paperConfigurations, @org.jetbrains.annotations.Nullable org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations) { // Plazma - Configurable Plazma
|
||||
|
||||
public Services(MinecraftSessionService sessionService, ServicesKeySet servicesKeySet, GameProfileRepository profileRepository, GameProfileCache profileCache) {
|
||||
- this(sessionService, servicesKeySet, profileRepository, profileCache, null);
|
||||
+ this(sessionService, servicesKeySet, profileRepository, profileCache, null, null);
|
||||
+ this(sessionService, servicesKeySet, profileRepository, profileCache, null, null); // Plazma - Configurable Plazma
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ @Override
|
||||
+ public org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations() {
|
||||
+ return java.util.Objects.requireNonNull(this.plazmaConfigurations);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
|
||||
@Override
|
||||
public io.papermc.paper.configuration.PaperConfigurations paperConfigurations() {
|
||||
@@ -32,7 +39,10 @@ public record Services(MinecraftSessionService sessionService, ServicesKeySet se
|
||||
@@ -32,7 +39,11 @@ public record Services(MinecraftSessionService sessionService, ServicesKeySet se
|
||||
final java.nio.file.Path legacyConfigPath = ((File) optionSet.valueOf("paper-settings")).toPath();
|
||||
final java.nio.file.Path configDirPath = ((File) optionSet.valueOf("paper-settings-directory")).toPath();
|
||||
io.papermc.paper.configuration.PaperConfigurations paperConfigurations = io.papermc.paper.configuration.PaperConfigurations.setup(legacyConfigPath, configDirPath, rootDirectory.toPath(), (File) optionSet.valueOf("spigot-settings"));
|
||||
- return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations);
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ final java.nio.file.Path plazmaConfigDirPath = ((File) optionSet.valueOf("plazma-settings-directory")).toPath();
|
||||
+ org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations = org.plazmamc.plazma.configurations.PlazmaConfigurations.setup(plazmaConfigDirPath);
|
||||
+ return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations, plazmaConfigurations);
|
||||
+ // Plazma end - Configurable Plazma
|
||||
// Paper end - load paper config files from cli options
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 7cc19060c24ad191b7dca779a18fbfbb65763189..8fc6b2e4be405d6738fedb91ffee5cbfe4fca67d 100644
|
||||
index 043a48d8c90e2e008b06fb5a643378a0fa948aaa..d2ea4c6470706138a1e6cebb8c591abb14c96a18 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -209,6 +209,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
// Paper start - initialize global and world-defaults configuration
|
||||
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
|
||||
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
+ this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma
|
||||
+ this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma
|
||||
+ this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
+ this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
// Paper start - convert old users earlier after PlayerList creation but before file load/save
|
||||
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
|
||||
if (this.convertOldUsers()) {
|
||||
@@ -219,6 +221,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 - start console thread after MinecraftServer.console & PaperConfig are initialized
|
||||
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
|
||||
+ org.plazmamc.plazma.commands.Commands.register(this); // Plazma
|
||||
+ org.plazmamc.plazma.commands.Commands.register(this); // Plazma - Configurable Plazma
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
// Purpur start
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1309c9e63095a0484ee0fa119a41c29ef1da3a01..9d5b6303fe1ecfe84c935b0811705dbefe6995d0 100644
|
||||
index 65a60983be85707883bd330e79a8c1f03428f2c9..fdc5b9e2c5dd5b99f06b21ddb42a00c7238bc84d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -700,7 +700,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -695,7 +695,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor
|
||||
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor
|
||||
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), spigotConfig -> minecraftserver.plazmaConfigurations.createWorldConfig(org.plazmamc.plazma.configurations.PlazmaConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig, minecraftserver.registryAccess())), executor); // Paper - create paper world configs; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma
|
||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index cbfd535d62acdde7789fa88332f4a607c381d450..0cb61ab6f8511fee3bfe8822e17fa05606af894c 100644
|
||||
index 361e0d5ec35219c2706c7344efc25ee6d50a2460..d96495237467adb38263c8925e7253c5387405c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -270,7 +270,7 @@ public final class ItemStack {
|
||||
@@ -374,49 +375,49 @@ index cbfd535d62acdde7789fa88332f4a607c381d450..0cb61ab6f8511fee3bfe8822e17fa056
|
||||
CompoundTag savedStack = new CompoundTag();
|
||||
this.save(savedStack);
|
||||
- savedStack = (CompoundTag) MinecraftServer.getServer().fixerUpper.update(References.ITEM_STACK, new Dynamic(NbtOps.INSTANCE, savedStack), version, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue();
|
||||
+ savedStack = (CompoundTag) MinecraftServer.getServer().getFixerUpper().update(References.ITEM_STACK, new Dynamic(NbtOps.INSTANCE, savedStack), version, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue(); // Plazma - Fix test
|
||||
+ savedStack = (CompoundTag) MinecraftServer.getServer().getFixerUpper().update(References.ITEM_STACK, new Dynamic(NbtOps.INSTANCE, savedStack), version, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue(); // Plazma - Configurable Plazma
|
||||
this.load(savedStack);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index b58402221840a9e72b30a31d884b0fb2d86883fd..cde722d3e381d214e2835b7dc5877e9add0a5eda 100644
|
||||
index f638224f8ae018030fa00962cd3c75fc31ab2488..a4d6b11a2d74f57bce7ad9797cd9ce32769d2de5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -177,7 +177,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -176,7 +176,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return this.paperConfig;
|
||||
}
|
||||
// Paper end - add paper world config
|
||||
-
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ private final org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig;
|
||||
+ public org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig() {
|
||||
+ return this.plazmaConfig;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||
public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
@@ -259,9 +264,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -258,9 +263,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
//protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI
|
||||
|
||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, org.plazmamc.plazma.configurations.WorldConfigurations> plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma
|
||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, org.plazmamc.plazma.configurations.WorldConfigurations> plazmaWorldConfigurationCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor // Plazma - Configurable Plazma
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||
+ this.plazmaConfig = plazmaWorldConfigurationCreator.apply(this.spigotConfig); // Plazma
|
||||
+ this.plazmaConfig = plazmaWorldConfigurationCreator.apply(this.spigotConfig); // Plazma - Configurable Plazma
|
||||
this.purpurConfig = new org.purpurmc.purpur.PurpurWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName(), env); // Purpur
|
||||
this.playerBreedingCooldowns = this.getNewBreedingCooldownCache(); // Purpur
|
||||
this.generator = gen;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7f28d8852176281a4e43c1af4085314eb4a47031..2ddc14cb855997bee88998b73c542b119be4ceda 100644
|
||||
index fed4ac63da94674b6f5d59ca9065a84a29ca0e3f..0a933294eafc179ec4c8a1145bfdd2be590853b3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1051,6 +1051,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
+ this.console.plazmaConfigurations.reloadConfigurations(this.console); // Plazma
|
||||
+ this.console.plazmaConfigurations.reloadConfigurations(this.console); // Plazma - Configurable Plazma
|
||||
org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||
@@ -424,32 +425,32 @@ index 7f28d8852176281a4e43c1af4085314eb4a47031..2ddc14cb855997bee88998b73c542b11
|
||||
}
|
||||
// Purpur end
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ @Override @org.jetbrains.annotations.NotNull
|
||||
+ public YamlConfiguration getPlazmaConfig() {
|
||||
+ return CraftServer.this.console.plazmaConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+
|
||||
@Override
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index e2a5b6349cfb0d7742cb5fb5e8d8e38cecf33f83..ca42f8e3c8819629788b62c3bc034b432bbb1271 100644
|
||||
index c0c48d8498e4b38178f73ac6a08dad64fc5a005b..268a2f3d4a04e9630190555d3ef211af23ca41cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -195,6 +195,14 @@ public class Main {
|
||||
.defaultsTo("Plazma Server") // Plazma - Rebranding
|
||||
.defaultsTo("Plazma Server") // Plazma - Branding
|
||||
.describedAs("Name");
|
||||
// Paper end
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ acceptsAll(asList("plazma-dir", "plazma-settings-directory"), "Directory for Plazma settings")
|
||||
+ .withRequiredArg()
|
||||
+ .ofType(File.class)
|
||||
+ .defaultsTo(new File(org.plazmamc.plazma.configurations.PlazmaConfigurations.CONFIG_DIR))
|
||||
+ .describedAs("Configuration Directory");
|
||||
+ // Plazma end
|
||||
+ .withRequiredArg()
|
||||
+ .ofType(File.class)
|
||||
+ .defaultsTo(new File(org.plazmamc.plazma.configurations.PlazmaConfigurations.CONFIG_DIR))
|
||||
+ .describedAs("Configuration Directory");
|
||||
+ // Plazma end - Configurable Plazma
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1064,39 +1065,31 @@ index 0000000000000000000000000000000000000000..842fb520a2d638aaa5bd0a7198190dbe
|
||||
+
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 381c1d681a982e28f1909bd954d21827549f7bcc..9feec76c21a61057e1aa274bd1243ee2741d8dbe 100644
|
||||
index 381c1d681a982e28f1909bd954d21827549f7bcc..ed88464eef3eea8b8d7432e869cdf8100d8c54dc 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -63,6 +63,7 @@ public abstract class AbstractTestingBase {
|
||||
|
||||
DummyServer.setup();
|
||||
io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper
|
||||
+ org.plazmamc.plazma.configurations.GlobalConfigurationTestingBase.setupGlobalConfigForTest(); // Plazma
|
||||
+ org.plazmamc.plazma.configurations.GlobalConfigurationTestingBase.setupGlobalConfigForTest(); // Plazma - Configurable Plazma
|
||||
|
||||
CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
index c20d5ed12efed109f3702a994188ac4af66c8b9a..dd5c15f4969f15a5eeef1fa068be5643197504be 100644
|
||||
index c20d5ed12efed109f3702a994188ac4af66c8b9a..e2842b967b12ca0d56f21f8dfc4af39846b5cf24 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
@@ -2,6 +2,7 @@ package org.bukkit.support;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
import java.util.logging.Logger;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
@@ -47,6 +48,13 @@ public final class DummyServer {
|
||||
@@ -47,6 +47,13 @@ public final class DummyServer {
|
||||
when(instance.getTag(anyString(), any(org.bukkit.NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.util.EmptyTag());
|
||||
// paper end - testing additions
|
||||
|
||||
+ // Plazma start - Fix tests
|
||||
+ // Plazma start - Configurable Plazma
|
||||
+ net.minecraft.server.MinecraftServer handle = mock(withSettings().stubOnly());
|
||||
+ when(handle.random()).thenReturn(net.minecraft.util.RandomSource.create());
|
||||
+ when(handle.getFixerUpper()).thenReturn(net.minecraft.util.datafix.DataFixers.getDataFixer());
|
||||
+ MinecraftServer.setServer(handle);
|
||||
+ // Plazma end
|
||||
+ net.minecraft.server.MinecraftServer.setServer(handle);
|
||||
+ // Plazma end - Configurable Plazma
|
||||
+
|
||||
Bukkit.setServer(instance);
|
||||
} catch (Throwable t) {
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Always agree EULA on development mode
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index ff4b438c9e6fa951890e9b22beaa174acab76487..81390751af65f0055bae807a976aa473cea917ac 100644
|
||||
index b94f711b8bd56d159745b59f8b842d192a9d0293..0f7ce26f2db698814dfd766dadca5bfa53a63eb6 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -175,6 +175,7 @@ public class Main {
|
||||
|
||||
// Spigot Start
|
||||
boolean eulaAgreed = Boolean.getBoolean( "com.mojang.eula.agree" );
|
||||
+ eulaAgreed = eulaAgreed || Boolean.getBoolean("Paper.isRunDev"); // Plazma
|
||||
+ eulaAgreed = eulaAgreed || Boolean.getBoolean("Paper.isRunDev"); // Plazma - Always agree EULA on development mode
|
||||
if ( eulaAgreed )
|
||||
{
|
||||
System.err.println( "You have used the Spigot command line EULA agreement flag." );
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Add more metrics
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131acec5c2fc 100644
|
||||
index 0b3d87d2d43148e6370e7a03e0bb6074891ac800..dce6445e02a16a87df3b0e81ed9076fe558da48b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -636,16 +636,52 @@ public class Metrics {
|
||||
return map;
|
||||
}));
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add more metrics information
|
||||
+ metrics.addCustomChart(new DrilldownPie("datapacks", () -> {
|
||||
+ int datapacks = Bukkit.getDatapackManager().getEnabledPacks().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(datapacks), 1);
|
||||
@@ -51,7 +51,7 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ else if (disabled <= 100) return Collections.singletonMap("50-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDC80", entry); // :skull:
|
||||
+ }));
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add more metrics information
|
||||
+
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH] Optimize default configurations
|
||||
- YouHaveTrouble/minecraft-exploits-and-how-to-fix-them
|
||||
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index 43397712cb13df5be3081c05eaa1a57c57f12c60..580ab3eb7664d5c51611a4b9635aa3c4872c8861 100644
|
||||
index ebbd115686de7a87dd422e8d2d92abcf953358a7..65de112fedeed8623186a778d791a6cdc4d284f6 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -64,7 +64,7 @@ public class PufferfishConfig {
|
||||
@@ -17,11 +17,11 @@ index 43397712cb13df5be3081c05eaa1a57c57f12c60..580ab3eb7664d5c51611a4b9635aa3c4
|
||||
setComment("info",
|
||||
"Pufferfish Configuration",
|
||||
- "Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host",
|
||||
+ //"Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma - Nope
|
||||
+ //"Check out Pufferfish Host for maximum performance server hosting: https://pufferfish.host", // Plazma - Sponsorblock
|
||||
"Join our Discord for support: https://discord.gg/reZw4vQV9H",
|
||||
"Download new builds at https://ci.pufferfish.host/job/Pufferfish");
|
||||
|
||||
@@ -233,7 +233,7 @@ public class PufferfishConfig {
|
||||
@@ -219,7 +219,7 @@ public class PufferfishConfig {
|
||||
public static int maxProjectileLoadsPerTick;
|
||||
public static int maxProjectileLoadsPerProjectile;
|
||||
private static void projectileLoading() {
|
||||
@@ -30,7 +30,7 @@ index 43397712cb13df5be3081c05eaa1a57c57f12c60..580ab3eb7664d5c51611a4b9635aa3c4
|
||||
maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
||||
|
||||
setComment("projectile", "Optimizes projectile settings");
|
||||
@@ -247,7 +247,7 @@ public class PufferfishConfig {
|
||||
@@ -233,7 +233,7 @@ public class PufferfishConfig {
|
||||
public static int activationDistanceMod;
|
||||
|
||||
private static void dynamicActivationOfBrains() throws IOException {
|
||||
@@ -39,7 +39,7 @@ index 43397712cb13df5be3081c05eaa1a57c57f12c60..580ab3eb7664d5c51611a4b9635aa3c4
|
||||
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
"This value determines how far away an entity has to be",
|
||||
"from the player to start being effected by DEAR.");
|
||||
@@ -255,7 +255,7 @@ public class PufferfishConfig {
|
||||
@@ -241,7 +241,7 @@ public class PufferfishConfig {
|
||||
maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20,
|
||||
"This value defines how often in ticks, the furthest entity",
|
||||
"will get their pathfinders and behaviors ticked. 20 = 1s");
|
||||
@@ -48,7 +48,7 @@ index 43397712cb13df5be3081c05eaa1a57c57f12c60..580ab3eb7664d5c51611a4b9635aa3c4
|
||||
"This value defines how much distance modifies an entity's",
|
||||
"tick frequency. freq = (distanceToPlayer^2) / (2^value)",
|
||||
"If you want further away entities to tick less often, use 7.",
|
||||
@@ -275,8 +275,18 @@ public class PufferfishConfig {
|
||||
@@ -261,8 +261,18 @@ public class PufferfishConfig {
|
||||
public static Map<String, Integer> projectileTimeouts;
|
||||
private static void projectileTimeouts() {
|
||||
// Set some defaults
|
||||
@@ -338,7 +338,7 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 81390751af65f0055bae807a976aa473cea917ac..29636e4adc2f3ce4cd9dc6f33420f3d9a9bdfc08 100644
|
||||
index 0f7ce26f2db698814dfd766dadca5bfa53a63eb6..e12dd19afff4a8249fc7c5aa5e12215f8fc30c14 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -160,7 +160,7 @@ public class Main {
|
||||
@@ -351,7 +351,7 @@ index 81390751af65f0055bae807a976aa473cea917ac..29636e4adc2f3ce4cd9dc6f33420f3d9
|
||||
|
||||
File commandFile = (File) optionset.valueOf("commands-settings");
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
index d9d8f24331772c05c461f1b9ce5f8f23353610ca..3d068c49106a52fd5485800dcc5c2e116411e29c 100644
|
||||
index e8ed7b12f09da333182d1826814e8c72918ddae8..4961fba3af3ef082e91de5aafe75a65dd3c9dd99 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -130,14 +130,14 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
||||
@@ -377,13 +377,13 @@ index d9d8f24331772c05c461f1b9ce5f8f23353610ca..3d068c49106a52fd5485800dcc5c2e11
|
||||
this.maxWorldSize = this.get("max-world-size", (integer) -> {
|
||||
return Mth.clamp(integer, 1, 29999984);
|
||||
}, 29999984);
|
||||
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag
|
||||
+ this.syncChunkWrites = this.get("sync-chunk-writes", Boolean.getBoolean("Paper.enable-sync-chunk-writes")); // Paper - hide behind flag // Plazma - Optimize default configurations
|
||||
- this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag
|
||||
+ this.syncChunkWrites = this.get("sync-chunk-writes", false) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag // Plazma - Show disabled by default
|
||||
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
|
||||
this.enableStatus = this.get("enable-status", true);
|
||||
this.hideOnlinePlayers = this.get("hide-online-players", false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2ddc14cb855997bee88998b73c542b119be4ceda..efdecbdb437f3ba03c11b0050a9bc1fff802531e 100644
|
||||
index 0a933294eafc179ec4c8a1145bfdd2be590853b3..c129cf5753a54891dc7379711298f826d16428d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -424,7 +424,7 @@ public final class CraftServer implements Server {
|
||||
@@ -407,7 +407,7 @@ index a858b7ddef7f6877c0b92f4150e0dd37bea121aa..eab5ea835a524482f8cc043c7be190a8
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 48893da814280aaeba95c1a9e2de9c39df455f93..3d5c0cf532d347602a08565b459697b0868f1a1c 100644
|
||||
index c65f68359edfc01bca2c9fd98812d69346631746..bdc0377822ee29abd941b2ac47adaa9b5a4a3770 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -49,6 +49,7 @@ public class PurpurConfig {
|
||||
|
||||
@@ -4,21 +4,8 @@ Date: Sun, 5 Nov 2023 10:40:49 +0900
|
||||
Subject: [PATCH] Tweak console logging
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
index e4fd372a1d585887287253a02531cd192929377b..6624fb97404c3032d60167e3fb108dcfcd066784 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
@@ -355,7 +355,7 @@ public final class ChatProcessor {
|
||||
|
||||
private void sendToServer(final ChatType.Bound chatType, final @Nullable Function<Audience, net.minecraft.network.chat.Component> msgFunction) {
|
||||
final PlayerChatMessage toConsoleMessage = msgFunction == null ? ChatProcessor.this.message : ChatProcessor.this.message.withUnsignedContent(msgFunction.apply(ChatProcessor.this.server.console));
|
||||
- ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) ? null : "Not Secure");
|
||||
+ ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, (!org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.notSecurePrefix || ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage)) ? null : "Not Secure"); // Plazma - Tweak console logging
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 8fc6b2e4be405d6738fedb91ffee5cbfe4fca67d..5c897d11e6ae17d8feaeedc7edf7ede02571a207 100644
|
||||
index d2ea4c6470706138a1e6cebb8c591abb14c96a18..84cf2b2e289af0a43c9cc64a9c7e045ffaf9c62b 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -180,16 +180,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -33,24 +20,16 @@ index 8fc6b2e4be405d6738fedb91ffee5cbfe4fca67d..5c897d11e6ae17d8feaeedc7edf7ede0
|
||||
- DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
- DedicatedServer.LOGGER.warn("****************************");
|
||||
- }
|
||||
- // Paper end
|
||||
- // Paper end - detect running as root
|
||||
-
|
||||
DedicatedServer.LOGGER.info("Loading properties");
|
||||
DedicatedServerProperties dedicatedserverproperties = this.settings.getProperties();
|
||||
|
||||
@@ -319,6 +309,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
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.offlineWarnings) // Plazma - Tweak console logging
|
||||
if (!this.usesAuthentication()) {
|
||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
@@ -335,6 +326,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
}
|
||||
|
||||
+ // Plazma - Moved down - Tweak console logging
|
||||
@@ -212,6 +202,17 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
this.plazmaConfigurations.initializeGlobalConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
this.plazmaConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Plazma - Configurable Plazma
|
||||
// Paper end - initialize global and world-defaults configuration
|
||||
+ // Plazma - Tweak console logging; Moved down
|
||||
+ // Paper start - detect running as root
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.rootUserWarnings && io.papermc.paper.util.ServerEnvironment.userIsRootOrAdmin()) {
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
@@ -59,13 +38,30 @@ index 8fc6b2e4be405d6738fedb91ffee5cbfe4fca67d..5c897d11e6ae17d8feaeedc7edf7ede0
|
||||
+ DedicatedServer.LOGGER.warn("FOR MORE INFORMATION, SEE https://madelinemiller.dev/blog/root-minecraft-server/");
|
||||
+ DedicatedServer.LOGGER.warn("****************************");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Plazma end
|
||||
+ // Paper end - detect running as root
|
||||
+ // Plazma end - Tweak console logging
|
||||
// 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
|
||||
@@ -319,6 +320,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
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().consoleLogs.offlineWarnings && !(io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled && io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.onlineMode)) // Plazma - Tweak console logging
|
||||
if (!this.usesAuthentication()) {
|
||||
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
@@ -332,7 +334,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
|
||||
}
|
||||
// Spigot end
|
||||
- DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
|
||||
+ DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file or set \"console-logs.offline-warnings\" to \"false\" in the config/plazma-global.yml file."); // Plazma - Tweak console logging
|
||||
}
|
||||
|
||||
|
||||
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 92717b7aa7ac94a2b1d11b5ba46522057903f981..80dc93b8c96d78a4080c0636b8cd7c470a1e3922 100644
|
||||
index e2f58fe299694db1b8975a502b42c832ef23ffb9..3803a04804fc11553c85507a257939552ce4890f 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1468,6 +1468,7 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add missing purpur configuration options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
index c783ce59ea766e6c46a3313628b961f27e01ee8b..3f36eedeae4b94ca684c57f4ec8d2d1ab5c51aae 100644
|
||||
index c783ce59ea766e6c46a3313628b961f27e01ee8b..8adcffc1e6434e06ca52d119a7326a1272897307 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -150,6 +150,23 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
@@ -13,7 +13,7 @@ index c783ce59ea766e6c46a3313628b961f27e01ee8b..3f36eedeae4b94ca684c57f4ec8d2d1a
|
||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.allayTakeDamageFromWater;
|
||||
@@ -28,12 +28,12 @@ index c783ce59ea766e6c46a3313628b961f27e01ee8b..3f36eedeae4b94ca684c57f4ec8d2d1a
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.allayMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index b46942c5fafe216039426531a4dbb19bda02c084..17f967569e3fafffa156580da91f03252f70749d 100644
|
||||
index fb50a3f3665cca4bb2e586fbd73c580a5d691f69..61d4a78bde54dd90fc7a207f88709be25593c9f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -95,6 +95,18 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
@@ -41,7 +41,7 @@ index b46942c5fafe216039426531a4dbb19bda02c084..17f967569e3fafffa156580da91f0325
|
||||
return this.level().purpurConfig.camelBreedingTicks;
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.camelTakeDamageFromWater;
|
||||
@@ -51,12 +51,12 @@ index b46942c5fafe216039426531a4dbb19bda02c084..17f967569e3fafffa156580da91f0325
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index d6340d0a1308bafd3ba176562bf08dcadec02b34..de5b3f19eea5f63732905fc1f2c95b05c720d134 100644
|
||||
index d6340d0a1308bafd3ba176562bf08dcadec02b34..e079f0994c81561510e5d223d2203e349daf07e1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -136,6 +136,23 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
@@ -64,7 +64,7 @@ index d6340d0a1308bafd3ba176562bf08dcadec02b34..de5b3f19eea5f63732905fc1f2c95b05
|
||||
return (getRider() != null && isControllable()) ? level().purpurConfig.frogRidableJumpHeight * this.getBlockJumpFactor() : super.getJumpPower();
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.frogTakeDamageFromWater;
|
||||
@@ -79,12 +79,12 @@ index d6340d0a1308bafd3ba176562bf08dcadec02b34..de5b3f19eea5f63732905fc1f2c95b05
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
public int getPurpurBreedTime() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
index 14135dac80dec4224715e21cef6556d22e569026..268b36763cdc1c7f001f6561f0812f6102f9b2c3 100644
|
||||
index 14135dac80dec4224715e21cef6556d22e569026..60db005620f01cf5f3bc912993c79585c2f5d65a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
@@ -87,6 +87,23 @@ public class Tadpole extends AbstractFish {
|
||||
@@ -92,7 +92,7 @@ index 14135dac80dec4224715e21cef6556d22e569026..268b36763cdc1c7f001f6561f0812f61
|
||||
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
|
||||
@@ -107,12 +107,12 @@ index 14135dac80dec4224715e21cef6556d22e569026..268b36763cdc1c7f001f6561f0812f61
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index dcb10e2ea1e0c7d0479adae5bc2ff57ece172aad..795c93352dfa69fad0e034a8377eceb6dc1e81da 100644
|
||||
index 5e7d76dcdc170b809ab82f6e2259c9b4d3d741be..24e351b40745d15e065f4c3cd904596c6daf4cfb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -106,6 +106,18 @@ public class Sniffer extends Animal {
|
||||
@@ -120,7 +120,7 @@ index dcb10e2ea1e0c7d0479adae5bc2ff57ece172aad..795c93352dfa69fad0e034a8377eceb6
|
||||
return level().purpurConfig.snifferControllable;
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.snifferTakeDamageFromWater;
|
||||
@@ -130,12 +130,12 @@ index dcb10e2ea1e0c7d0479adae5bc2ff57ece172aad..795c93352dfa69fad0e034a8377eceb6
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.snifferAlwaysDropExp;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 22263f219ce9e9f014abb76c43297c528acb36eb..2b25c6a85858fe2ad7f0e02f544332c2bfaf9e63 100644
|
||||
index bf7ef72a7d92db8f11789a69583270644de0dac7..1f476a4fd148ac9a4c9ad5d12de46a16e4116239 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -147,6 +147,23 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -143,7 +143,7 @@ index 22263f219ce9e9f014abb76c43297c528acb36eb..2b25c6a85858fe2ad7f0e02f544332c2
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
}
|
||||
+
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Add missing purpur configuration options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.wardenTakeDamageFromWater;
|
||||
@@ -158,12 +158,12 @@ index 22263f219ce9e9f014abb76c43297c528acb36eb..2b25c6a85858fe2ad7f0e02f544332c2
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
index bc3fe45d12ffc2069a03d1587b7623d31130565a..fd574aed480b980a231a017bab262acb7c1870b6 100644
|
||||
index bc3fe45d12ffc2069a03d1587b7623d31130565a..e11a04e037a18aab942a16ed455b7d3475c7e073 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
@@ -41,7 +41,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
@@ -171,7 +171,7 @@ index bc3fe45d12ffc2069a03d1587b7623d31130565a..fd574aed480b980a231a017bab262acb
|
||||
public ChestBoat(EntityType<? extends Boat> type, Level world) {
|
||||
super(type, world);
|
||||
- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma
|
||||
+ this.itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // Plazma - Add missing purpur configuration options
|
||||
}
|
||||
|
||||
public ChestBoat(Level world, double d0, double d1, double d2) {
|
||||
@@ -180,19 +180,19 @@ index bc3fe45d12ffc2069a03d1587b7623d31130565a..fd574aed480b980a231a017bab262acb
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
- return 27;
|
||||
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma
|
||||
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // Plazma - Add missing purpur configuration options
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 3d5c0cf532d347602a08565b459697b0868f1a1c..9b192ba1ef30a9b295de4971463ba31b2bdc681b 100644
|
||||
index bdc0377822ee29abd941b2ac47adaa9b5a4a3770..8d7bc4bb2bc28e962e300232eb5c6f41ce8c7351 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -329,6 +329,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
+ public static int chestBoatRows = 3; // Plazma
|
||||
+ public static int chestBoatRows = 3; // Plazma - Add missing purpur configuration options
|
||||
public static boolean enderChestSixRows = false;
|
||||
public static boolean enderChestPermissionRows = false;
|
||||
public static boolean cryingObsidianValidForPortalFrame = false;
|
||||
@@ -200,12 +200,12 @@ index 3d5c0cf532d347602a08565b459697b0868f1a1c..9b192ba1ef30a9b295de4971463ba31b
|
||||
case 1 -> 9;
|
||||
default -> 27;
|
||||
});
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // Plazma - Add missing purpur configuration options
|
||||
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
|
||||
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
|
||||
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a2270fd95a49 100644
|
||||
index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..39540b37592c7a9d2200b77aeff12887d7fee7fe 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1180,7 +1180,15 @@ public class PurpurWorldConfig {
|
||||
@@ -220,7 +220,7 @@ index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a227
|
||||
+ allayMaxHealth = getDouble("mobs.allay.max-health", allayMaxHealth);
|
||||
+ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater);
|
||||
+ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
||||
@@ -236,7 +236,7 @@ index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a227
|
||||
+ //camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
|
||||
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
|
||||
camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax);
|
||||
@@ -252,7 +252,7 @@ index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a227
|
||||
+ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth);
|
||||
+ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater);
|
||||
+ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
||||
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
||||
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
|
||||
@@ -266,7 +266,7 @@ index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a227
|
||||
private void snifferSettings() {
|
||||
+ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater);
|
||||
+ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
||||
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
||||
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
|
||||
@@ -282,7 +282,7 @@ index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a227
|
||||
+ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth);
|
||||
+ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater);
|
||||
+ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
||||
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
||||
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
|
||||
@@ -298,7 +298,7 @@ index fde8e2f6c58a2e36dab4cfbc2b1a13f3d7177195..81bb1f593f6f142e212fe6cff116a227
|
||||
+ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth);
|
||||
+ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater);
|
||||
+ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add missing purpur configuration options
|
||||
wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable);
|
||||
wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater);
|
||||
wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable);
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add some missing Pufferfish configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 17f967569e3fafffa156580da91f03252f70749d..affe9dc4b8ea092c92b6708ab3a864b04bbc8c9a 100644
|
||||
index 61d4a78bde54dd90fc7a207f88709be25593c9f4..ef09fae1a46f4b37adfad059b0accb80845c8b7c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -168,10 +168,12 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
|
||||
@@ -22,7 +22,7 @@ index 17f967569e3fafffa156580da91f03252f70749d..affe9dc4b8ea092c92b6708ab3a864b0
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
//this.level().getProfiler().push("camelActivityUpdate"); // Purpur
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 795c93352dfa69fad0e034a8377eceb6dc1e81da..e743b4891c1e56f82d40f798e456a701b0efbc73 100644
|
||||
index 24e351b40745d15e065f4c3cd904596c6daf4cfb..aa60c4a251de2877a9b4ea72899f07194ce15ed7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -527,9 +527,11 @@ public class Sniffer extends Animal {
|
||||
@@ -38,7 +38,7 @@ index 795c93352dfa69fad0e034a8377eceb6dc1e81da..e743b4891c1e56f82d40f798e456a701
|
||||
//this.level().getProfiler().popPush("snifferActivityUpdate"); // Purpur
|
||||
SnifferAi.updateActivity(this);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 2b25c6a85858fe2ad7f0e02f544332c2bfaf9e63..0386aeaeee04b62cc30badb30dd6dcd34d6045b7 100644
|
||||
index 1f476a4fd148ac9a4c9ad5d12de46a16e4116239..707fd662c7f17986fffcabe774de176741456227 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -320,7 +320,7 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
@@ -46,7 +46,7 @@ index 2b25c6a85858fe2ad7f0e02f544332c2bfaf9e63..0386aeaeee04b62cc30badb30dd6dcd3
|
||||
|
||||
//worldserver.getProfiler().push("wardenBrain"); // Purpur
|
||||
- if (this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma
|
||||
+ if ((getRider() == null || !this.isControllable()) && this.behaviorTick++ % this.activatedPriority == 0) // Pufferfish // Plazma - Add missing pufferfish configurations
|
||||
this.getBrain().tick(worldserver, this);
|
||||
//this.level().getProfiler().pop(); // Purpur
|
||||
super.customServerAiStep();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,10 @@ Subject: [PATCH] Reduce create random instance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6b98e5140e946b4d728c281417cc37dc60413ba1..bed08d24af02f6f9b4b50d630f4ab4b4fef69f70 100644
|
||||
index c25c6c55b5ef2f718acc7eda98837fc35e547783..83d98b630181890ad991bdd24112d3c7aa807d2b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -232,6 +232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -236,6 +236,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@Nullable
|
||||
private ServerStatus.Favicon statusIcon;
|
||||
private final RandomSource random;
|
||||
@@ -30,7 +30,7 @@ index b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046e
|
||||
double d1 = (double) (center.y - maxRange);
|
||||
double d2 = (double) (center.x + maxRange);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d5a5406284bf764c9f7a31a4ad85bbcda18f4df8..96ddf4ad0b708075acbfff6aa12de801e9059920 100644
|
||||
index 1bc71111393255dc2af6734241d29238f659b007..796de178d8acc66b68e6ee38fc8076a5bdd685fb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -456,7 +456,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -52,7 +52,7 @@ index d5a5406284bf764c9f7a31a4ad85bbcda18f4df8..96ddf4ad0b708075acbfff6aa12de801
|
||||
for (int l1 = 0; l1 < i1; ++l1) {
|
||||
int i2 = (k1 + j1 * l1) % i1;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index cbcb16a6ccab1681dea22407f859f86dc1b9fe22..c9dba75182bec18b775622ff188e222e383b2c66 100644
|
||||
index 62b7d2508463ef1a84d538f80e55a5f76b965126..0f53f8da792812f9a324843959939bff7bbc78ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -71,7 +71,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -78,7 +78,7 @@ index 1ef089dbf83de35d875c00efdf468c397be56978..832c3fa9f6f6706c48d5744e15d3c748
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
index 731ef21dbbd25d6924717de42f4569a9b5935643..54b0ecc7c88c0ec7bbb4862f31f80a706e5ab46a 100644
|
||||
index 9d01471da0571c92a60cd57ebd22a5f0b5648fb4..ec6c295f276f91ac7cc70f8fbfc04ba1148003b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.util.RandomSource;
|
||||
@@ -87,7 +87,7 @@ index 731ef21dbbd25d6924717de42f4569a9b5935643..54b0ecc7c88c0ec7bbb4862f31f80a70
|
||||
protected final List<ShufflingList.WeightedEntry<U>> entries;
|
||||
- private final RandomSource random = RandomSource.create();
|
||||
+ private final RandomSource random = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create(); // Plazma - Reduce create random instance
|
||||
private final boolean isUnsafe; // Paper
|
||||
private final boolean isUnsafe; // Paper - Fix Concurrency issue in ShufflingList during worldgen
|
||||
|
||||
public ShufflingList() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
|
||||
@@ -104,7 +104,7 @@ index 7094701d213c73ba47ace806962244c10fdf4dda..590c26307374edd65a2e22de18d12f34
|
||||
protected static final int TARGETING_RANGE = 16;
|
||||
private static final TargetingConditions TARGET_CONDITIONS = TargetingConditions.forNonCombat().range(16.0D);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
index ece82743df21f0b776382821ad75dee96d0a0748..44db438185d1ffb1adea09ba5f1cf4515a113700 100644
|
||||
index 1017c294b48bf0bbf733e1f41d580d1e6c927834..31cea7c1b73fdf3e47849ebbed28120be164e712 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java
|
||||
@@ -32,7 +32,7 @@ public class AngerManagement {
|
||||
@@ -117,7 +117,7 @@ index ece82743df21f0b776382821ad75dee96d0a0748..44db438185d1ffb1adea09ba5f1cf451
|
||||
private static final Codec<Pair<UUID, Integer>> SUSPECT_ANGER_PAIR = RecordCodecBuilder.create((instance) -> {
|
||||
return instance.group(UUIDUtil.CODEC.fieldOf("uuid").forGetter(Pair::getFirst), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("anger").forGetter(Pair::getSecond)).apply(instance, Pair::of);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
index a5443f92786427c42092aec8350e7ab37704db7a..0383c9e75a12c5832cf69daf14b8037365c43cfb 100644
|
||||
index 752b38d45d59d8b3cd492246e5aa4f378a78734d..38b534e4613641046ed3cd048f52dff0888acda2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
@@ -32,7 +32,7 @@ public class WanderingTraderSpawner implements CustomSpawner {
|
||||
@@ -178,7 +178,7 @@ index 849b6a30d412d10f1e2e6e88f2d8d990e4a720e4..5534c8c65588724f2c6f178caacc2dda
|
||||
this.costs = new int[3];
|
||||
this.enchantClue = new int[]{-1, -1, -1};
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 1223e678395e84859449a11e9e403454ddae0b15..d05d0114cf4a8b81576d1a792cec08af58284f64 100644
|
||||
index 2174456bbba763fd5581a55e9c5fab3cf4a145c1..be927f557a575c3c46cdc4ebba5a47c97ccf30f7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -92,7 +92,7 @@ public class Explosion {
|
||||
@@ -191,7 +191,7 @@ index 1223e678395e84859449a11e9e403454ddae0b15..d05d0114cf4a8b81576d1a792cec08af
|
||||
this.hitPlayers = Maps.newHashMap();
|
||||
this.level = world;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 7ce3756da66a7e6c42ac3220e660131f9fad2a76..9475a6953117906da85041436131f8c7175314f2 100644
|
||||
index c10bda36c8c9e5a6f5eb63471c54de8b1af20bac..08d748a876184b1ac4419cfa2da12356bc62b531 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -127,16 +127,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -227,7 +227,7 @@ index b7370e64fd0d50e8725d7d5afc30af2e8bc8455d..9ec2a60c8240f7a3e4cd7944d070156d
|
||||
private int lapis = 0; // Purpur
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index 21cbe88178fe2a63900209b9907646a983a209f9..25f679fef6fb843b43b04c574f57eec260e21bdb 100644
|
||||
index c3d25a26883f7cbe7106c2f3415af0b18f534ee2..5cf35474d2f55c3a70f8f40e423f9388669ba40d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -368,7 +368,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
@@ -240,7 +240,7 @@ index 21cbe88178fe2a63900209b9907646a983a209f9..25f679fef6fb843b43b04c574f57eec2
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
index 5d3d9164a05efbecc59ace6175f449f34d8d3ccd..e03a844fc87447bf39fd6b439a6e01786170e352 100644
|
||||
index 798e22fb4d685b5845ebf687e8004e94f13a9751..189f425565c9c38b29031ae26de667422eb3b6bb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
@@ -224,7 +224,7 @@ public class ChunkGeneratorStructureState {
|
||||
@@ -250,7 +250,7 @@ index 5d3d9164a05efbecc59ace6175f449f34d8d3ccd..e03a844fc87447bf39fd6b439a6e0178
|
||||
- RandomSource randomsource = RandomSource.create();
|
||||
+ RandomSource randomsource = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.reduceRandom ? net.minecraft.server.MinecraftServer.getServer().random() : RandomSource.create(); // Plazma - Reduce create random instace
|
||||
|
||||
// Paper start
|
||||
// Paper start - Add missing structure set seed configs
|
||||
if (this.conf.strongholdSeed != null && structureSetEntry.is(net.minecraft.world.level.levelgen.structure.BuiltinStructureSets.STRONGHOLDS)) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java b/src/main/java/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java
|
||||
index 18fce94f0d4b9d28e3afec61c7578f672973a71f..c98d65c146213bdf530916b8ec371e0b0b8f23e7 100644
|
||||
@@ -266,7 +266,7 @@ index 18fce94f0d4b9d28e3afec61c7578f672973a71f..c98d65c146213bdf530916b8ec371e0b
|
||||
} else if (bl) {
|
||||
fight.setRespawnStage(SUMMONING_DRAGON);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 6046dc009c59ac3472eca6a8cfb759eacbfbc70a..bcd74011e2d611884393640515a3b1d66390dbdc 100644
|
||||
index 4d2ec3b14ed3b6c527745111950bbdf111129c41..49d671be728a80d0712aa0c612e52ab4532290b0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -472,7 +472,7 @@ public class EndDragonFight {
|
||||
@@ -274,21 +274,21 @@ index 6046dc009c59ac3472eca6a8cfb759eacbfbc70a..bcd74011e2d611884393640515a3b1d6
|
||||
return iregistry.getHolder(EndFeatures.END_GATEWAY_DELAYED);
|
||||
}).ifPresent((holder_c) -> {
|
||||
- ((ConfiguredFeature) holder_c.value()).place(this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), pos);
|
||||
+ ((ConfiguredFeature) holder_c.value()).place(this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaConfig().misc.reduceRandom ? this.level.getRandom() : RandomSource.create()), pos); // Plazma - Reduce create random instace
|
||||
+ holder_c.value().place(this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaConfig().misc.reduceRandom ? this.level.getRandom() : RandomSource.create()), pos); // Plazma - Reduce create random instace
|
||||
});
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ public class EndDragonFight {
|
||||
this.portalLocation = this.portalLocation.atY(this.level.getMinBuildHeight() + 1);
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Prevent "softlocked" exit portal generation
|
||||
- if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), RandomSource.create(), this.portalLocation)) {
|
||||
+ if (worldgenendtrophy.place(FeatureConfiguration.NONE, this.level, this.level.getChunkSource().getGenerator(), (this.level.plazmaConfig().misc.reduceRandom ? this.level.getRandom() : RandomSource.create()), this.portalLocation)) { // Plazma - Reduce create random instace
|
||||
int i = Mth.positiveCeilDiv(4, 16);
|
||||
|
||||
this.level.getChunkSource().chunkMap.waitForLightBeforeSending(new ChunkPos(this.portalLocation), i);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
index 8694c0dd606ec4e0fd60be434f70860e7779a871..eb1033f645d55f7e7c36f9126254539add6c4582 100644
|
||||
index 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb814b56f6bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
|
||||
@@ -14,11 +14,12 @@ import org.bukkit.inventory.meta.FireworkMeta;
|
||||
@@ -303,7 +303,7 @@ index 8694c0dd606ec4e0fd60be434f70860e7779a871..eb1033f645d55f7e7c36f9126254539a
|
||||
super(server, entity);
|
||||
+ this.random = this.getHandle().level().plazmaConfig().misc.reduceRandom ? this.getHandle().level().getRandom() : net.minecraft.util.RandomSource.create(); // Plazma - Reduce create random instance
|
||||
|
||||
// Paper Start - Expose firework item directly
|
||||
// Paper start - Expose firework item directly
|
||||
// ItemStack item = this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM);
|
||||
diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java
|
||||
index 51413e828500792cc493b836bb1460a394ff4f75..3047ff4e8949a741d8e14b7061c5f735d1eb96f8 100644
|
||||
|
||||
@@ -7,26 +7,27 @@ Subject: [PATCH] Apply various optimizations
|
||||
Akarin - Swaps the predicate order of collision
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 93e558e1cfcdee33abf6f1c57e4cf47c7f53f750..0864624e060a32934208f80313cf08744509803d 100644
|
||||
index f10933fc78cbb0ead042c1870d93d0447f640896..8156e42e7e22cd64b981ee645c2b02e455f71ec4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2145,8 +2145,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2144,8 +2144,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public void playerTouch(Player player) {}
|
||||
|
||||
public void push(Entity entity) {
|
||||
+ if (entity.noPhysics || this.noPhysics) return; // Plazma
|
||||
+ if (entity.noPhysics || this.noPhysics) return; // Plazma - Swaps the predicate order of collision
|
||||
if (!this.isPassengerOfSameVehicle(entity)) {
|
||||
- if (!entity.noPhysics && !this.noPhysics) {
|
||||
+ //if (!entity.noPhysics && !this.noPhysics) { // Plazma - moved up
|
||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
|
||||
+ //if (!entity.noPhysics && !this.noPhysics) { // Plazma - Swaps the predicate order of collision
|
||||
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
|
||||
double d0 = entity.getX() - this.getX();
|
||||
double d1 = entity.getZ() - this.getZ();
|
||||
@@ -2175,7 +2176,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2173,8 +2174,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
entity.push(d0, 0.0D, d1);
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
- }
|
||||
+ //} // Plazma
|
||||
+ //} // Plazma - Swaps the predicate order of collision
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 12:03:06 +0900
|
||||
Subject: [PATCH] Don't refresh LootTable for non player interaction
|
||||
Subject: [PATCH] Do not refresh LootTable for non player interaction
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
index b41635dd0569ff7df909df492d3e850aef7214be..48a385145a6c4cc4de69895c3e1415698f3e6770 100644
|
||||
index b41635dd0569ff7df909df492d3e850aef7214be..afc567b789ee003e1b10059db2864a423c682669 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
@@ -68,6 +68,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
|
||||
@Override
|
||||
public void unpackLootTable(@org.jetbrains.annotations.Nullable final Player player) {
|
||||
+ if (player == null && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.refreshLootTableForNonPlayerInteraction) return; // Plazma
|
||||
+ if (player == null && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.refreshLootTableForNonPlayerInteraction) return; // Plazma - Do not refresh LootTable for non player interaction
|
||||
// Copied from super with changes, always check the original method
|
||||
net.minecraft.world.level.Level level = this.getLevel();
|
||||
BlockPos blockPos = this.getBlockPos();
|
||||
@@ -1,18 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Sun, 5 Nov 2023 12:07:06 +0900
|
||||
Subject: [PATCH] Don't load chunks to spawn phantom
|
||||
Subject: [PATCH] Do not load chunks to spawn phantom
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index e731fd6f196116f4995dc6de8ad06b1985abe22b..688984291b590334ea703e175f773be6bdac4965 100644
|
||||
index 0847aef56d8608cb1403485f231f30b2527f35ab..fee30f686a5d1ee50a00c2073efd5b0a80e85179 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -71,6 +71,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
|
||||
if (randomsource.nextInt(j) >= world.paperConfig().entities.behavior.playerInsomniaStartTicks) { // Paper - Ability to control player's insomnia and phantoms
|
||||
BlockPos blockposition1 = blockposition.above(20 + randomsource.nextInt(15)).east(-10 + randomsource.nextInt(21)).south(-10 + randomsource.nextInt(21));
|
||||
+ if (!world.plazmaConfig().entity.phantom.loadChunksToSpawn && !world.hasChunkAt(blockposition1)) continue; // Plazma
|
||||
+ if (!world.plazmaConfig().entity.phantom.loadChunksToSpawn && !world.hasChunkAt(blockposition1)) continue; // Plazma - Do not load chunks to spawn phantom
|
||||
BlockState iblockdata = world.getBlockState(blockposition1);
|
||||
FluidState fluid = world.getFluidState(blockposition1);
|
||||
|
||||
@@ -6,14 +6,14 @@ Subject: [PATCH] Add option to disable moved to quickly check for specific
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0b37acd48517d28efec716b93c33da6aa97c54f2..f9b21e850251172851a434261a6e0b20efb46042 100644
|
||||
index d7ff08767fe6b14f18386651666c42903a52ec1c..3a30fee71f0874f352690ed57ddf1bad069f3db1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1463,6 +1463,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -1458,6 +1458,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
|
||||
+ if (!this.player.getBukkitEntity().hasPermission("plazma.bypass-moved-to-quickly-check") || !(org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.checkSpectatorMovedToQuickly && this.player.isSpectator())) // Plazma
|
||||
+ if (!this.player.getBukkitEntity().hasPermission("plazma.bypass-moved-to-quickly-check") || !(org.plazmamc.plazma.configurations.GlobalConfiguration.get().player.checkSpectatorMovedToQuickly && this.player.isSpectator())) // Plazma - Options to bypass moved to quickly check
|
||||
if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
|
||||
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Thu, 28 Sep 2023 11:47:50 +0900
|
||||
Subject: [PATCH] Implement No Chat Reports
|
||||
|
||||
Implemented: 62fbdef42dfbfec551d8324b7084c4ccf248bab7
|
||||
Implemented: 644bb6bb4a8012c75900c643d9863fe92c799e1d
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
index bdcfd80f937c34956911373905d66424bbff8e1d..47cbafc08e3d87c448c69ff797afaf0eb5d78f9d 100644
|
||||
index bdcfd80f937c34956911373905d66424bbff8e1d..6c575aeeef323c8eb0837eb9d9eea8fcff21da17 100644
|
||||
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
|
||||
@@ -145,9 +145,13 @@ public class FriendlyByteBuf extends ByteBuf {
|
||||
@@ -22,12 +22,12 @@ index bdcfd80f937c34956911373905d66424bbff8e1d..47cbafc08e3d87c448c69ff797afaf0e
|
||||
+ && org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.queryData())
|
||||
+ element.getAsJsonObject().addProperty("preventsChatReports", true);
|
||||
+ this.writeUtf(GSON.toJson(element), maxLength);
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Implement No Chat Reports
|
||||
}
|
||||
|
||||
public <T> void writeId(IdMap<T> registry, T value) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||
index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..4f0d6ac849dda74c9180fa03d97d389cc4554b46 100644
|
||||
index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..4fe3de84fbbd16ecfe0b27922d5bfeaa9c89f61b 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java
|
||||
@@ -24,4 +24,13 @@ public record ServerboundChatCommandPacket(String command, Instant timeStamp, lo
|
||||
@@ -42,10 +42,10 @@ index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..4f0d6ac849dda74c9180fa03d97d389c
|
||||
+ return ArgumentSignatures.EMPTY;
|
||||
+ return this.argumentSignatures;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Implement No Chat Reports
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||
index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..b32e17ef1d7d65f2e3cf4fb5471d8182b3ba892f 100644
|
||||
index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..bd69821b153b692b508505264899bdfda4805f0f 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java
|
||||
@@ -25,4 +25,12 @@ public record ServerboundChatPacket(String message, Instant timeStamp, long salt
|
||||
@@ -59,10 +59,10 @@ index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..b32e17ef1d7d65f2e3cf4fb5471d8182
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled) return null;
|
||||
+ return this.signature;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Implement No Chat Reports
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java
|
||||
index 9d6db4a378036559efab91c8b7dcf2a6b0c2cce6..4d9f73add791cef03cc7aeaf1598a73c2195809a 100644
|
||||
index 9d6db4a378036559efab91c8b7dcf2a6b0c2cce6..587d89d67afe9108b5e810463fb3cb21f1b8accf 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatSessionUpdatePacket.java
|
||||
@@ -16,6 +16,15 @@ public record ServerboundChatSessionUpdatePacket(RemoteChatSession.Data chatSess
|
||||
@@ -77,12 +77,12 @@ index 9d6db4a378036559efab91c8b7dcf2a6b0c2cce6..4d9f73add791cef03cc7aeaf1598a73c
|
||||
+ );
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Implement No Chat Reports
|
||||
listener.handleChatSessionUpdate(this);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5c897d11e6ae17d8feaeedc7edf7ede02571a207..05dd190de9d45e245eb9f67ccec6b5c2e34ed6e0 100644
|
||||
index 84cf2b2e289af0a43c9cc64a9c7e045ffaf9c62b..3b7a0e6220e93157b171d227676147b0cb481d97 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -681,6 +681,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -94,13 +94,14 @@ index 5c897d11e6ae17d8feaeedc7edf7ede02571a207..05dd190de9d45e245eb9f67ccec6b5c2
|
||||
|
||||
// Paper start - Add setting for proxy online mode status
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index da499e0b21eba40d24d95047e3a9220567d4bae7..ef706612c7dd4ab703e442a488264244008b6227 100644
|
||||
index fa5107deb090a779ddc2fdd0fd6de05e1fcf85b9..901408f39509fab160180e13dcee6499542b49ca 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
@@ -271,10 +271,29 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
@@ -271,10 +271,31 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
|
||||
}
|
||||
|
||||
public void send(Packet<?> packet) {
|
||||
+ // Plazma start - Implement No Chat Reports
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.convertToSystemMessage()
|
||||
+ && this instanceof ServerGamePacketListenerImpl impl
|
||||
+ && packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket p) {
|
||||
@@ -111,6 +112,7 @@ index da499e0b21eba40d24d95047e3a9220567d4bae7..ef706612c7dd4ab703e442a488264244
|
||||
+ ));
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end - Implement No Chat Reports
|
||||
this.send(packet, (PacketSendListener) null);
|
||||
}
|
||||
|
||||
@@ -123,12 +125,12 @@ index da499e0b21eba40d24d95047e3a9220567d4bae7..ef706612c7dd4ab703e442a488264244
|
||||
+ impl.send(p);
|
||||
+ return;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Implement No Chat Reports
|
||||
// CraftBukkit start
|
||||
if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 80dc93b8c96d78a4080c0636b8cd7c470a1e3922..59afcfb957ea653e64b17385accf5c9449d33b2a 100644
|
||||
index 3803a04804fc11553c85507a257939552ce4890f..56ee7057defed5c9281aa557d20608c275fac9d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1499,6 +1499,7 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -3,25 +3,27 @@ From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Wed, 27 Sep 2023 22:35:19 +0900
|
||||
Subject: [PATCH] Ignore useless entity packets
|
||||
|
||||
[REFERENCE]
|
||||
- PurpurMC/Purpur
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 92ca330bee2f58bde93c8da12a8f5c14e29de540..05342f5fbe5cd62e81e09d3d6743cf47331b54c2 100644
|
||||
index 2568b4ad72a7b99484aaa048257a3b5465b63b9d..59f6f8474f77f0cb332072dfe0b4d47464c1b78a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -200,6 +200,8 @@ public class ServerEntity {
|
||||
@@ -206,6 +206,8 @@ public class ServerEntity {
|
||||
flag4 = true;
|
||||
flag5 = true;
|
||||
}
|
||||
+
|
||||
+ if (this.level.plazmaConfig().entity.ignoreUselessPackets && isUselessPacket(packet1)) packet1 = null; // Plazma
|
||||
+ if (this.level.plazmaConfig().entity.ignoreUselessPackets && isUselessPacket(packet1)) packet1 = null; // Plazma - Ignore useless entity packets
|
||||
}
|
||||
|
||||
if ((this.trackDelta || this.entity.hasImpulse || this.entity instanceof LivingEntity && ((LivingEntity) this.entity).isFallFlying()) && this.tickCount > 0) {
|
||||
@@ -272,6 +274,19 @@ public class ServerEntity {
|
||||
@@ -278,6 +280,19 @@ public class ServerEntity {
|
||||
});
|
||||
}
|
||||
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Ignore useless entity packets
|
||||
+ private boolean isUselessPacket(@Nullable Packet<?> packet) {
|
||||
+ if (!(packet instanceof ClientboundMoveEntityPacket p)) return false;
|
||||
+ if (p instanceof ClientboundMoveEntityPacket.Pos)
|
||||
@@ -32,7 +34,7 @@ index 92ca330bee2f58bde93c8da12a8f5c14e29de540..05342f5fbe5cd62e81e09d3d6743cf47
|
||||
+ return p.getXa() == 0 && p.getYa() == 0 && p.getZa() == 0 && p.getxRot() == 0 && p.getyRot() == 0;
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Ignore useless entity packets
|
||||
+
|
||||
public void removePairing(ServerPlayer player) {
|
||||
this.entity.stopSeenByPlayer(player);
|
||||
|
||||
@@ -3,6 +3,8 @@ From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 6 Nov 2023 10:39:01 +0900
|
||||
Subject: [PATCH] Improve biome temperature cache
|
||||
|
||||
[REFERENCE]
|
||||
- FxMorin/MemoryLeakFix
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
index efca73d4de33028cf9df944f36e51b7b50f7a4c5..a4aee46177a771c492d46e6996fb2c6e5eed3921 100644
|
||||
|
||||
@@ -6,14 +6,14 @@ Subject: [PATCH] Configurable cave lava sea level
|
||||
This patch also fix MC-237017.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
index 58609a0911c4e32b6f80f050cd3d23f70ad75b1b..2db6c1b9530b4b082ef6f6ec17c542ba8ad7fa5f 100644
|
||||
index 98c7f695093acbcf9382a5f07a7a89e373709763..a85b1ebb4236f131b9be0104c4aa56f22e661441 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||
@@ -72,6 +72,15 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
|
||||
}
|
||||
|
||||
private static Aquifer.FluidPicker createFluidPicker(NoiseGeneratorSettings settings) {
|
||||
+ // Plazma start
|
||||
+ // Plazma start - Configurable cave lava sea level
|
||||
+ if (true) {
|
||||
+ org.plazmamc.plazma.configurations.GlobalConfiguration config = org.plazmamc.plazma.configurations.GlobalConfiguration.get();
|
||||
+ return (x, y, z) -> new Aquifer.FluidStatus(
|
||||
@@ -21,7 +21,7 @@ index 58609a0911c4e32b6f80f050cd3d23f70ad75b1b..2db6c1b9530b4b082ef6f6ec17c542ba
|
||||
+ config.worldgen.caveLavaSeaLevel.customSeaLevel(settings)
|
||||
+ );
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Configurable cave lava sea level
|
||||
Aquifer.FluidStatus aquifer_b = new Aquifer.FluidStatus(-54, Blocks.LAVA.defaultBlockState());
|
||||
int i = settings.seaLevel();
|
||||
Aquifer.FluidStatus aquifer_b1 = new Aquifer.FluidStatus(i, settings.defaultFluid());
|
||||
|
||||
@@ -30,7 +30,7 @@ index b036b54d551c892cc48d0a6816382bce5e38efd4..459cba838468b95547b2a515c497fcbb
|
||||
|
||||
public Structure structure;
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
index 9357539c71e3a8408b1f055527ffd192b5f9f1d9..32add0d4aea7f5fe84aa16c969d5bbee550312b6 100644
|
||||
index 9113c8ebff5e71f859a19f024969582052c57546..ca8a8d1edb698b481ef48ae1d2cdddf652f6d249 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -68,29 +68,36 @@ public class ActivationRange
|
||||
@@ -42,35 +42,35 @@ index 9357539c71e3a8408b1f055527ffd192b5f9f1d9..32add0d4aea7f5fe84aa16c969d5bbee
|
||||
+ if (deviation == 0) return duration;
|
||||
+ return (int) Math.min(Integer.MAX_VALUE, Math.max(1, Math.round(duration * (1 + deviation * random.nextGaussian()))));
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Variable entity wakeup duration
|
||||
private static int checkInactiveWakeup(Entity entity) {
|
||||
Level world = entity.level();
|
||||
SpigotWorldConfig config = world.spigotConfig;
|
||||
+ org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig = world.plazmaConfig(); // Plazma
|
||||
+ org.plazmamc.plazma.configurations.WorldConfigurations plazmaConfig = world.plazmaConfig(); // Plazma - Variable entity wakeup duration
|
||||
long inactiveFor = MinecraftServer.currentTick - entity.activatedTick;
|
||||
if (entity.activationType == ActivationType.VILLAGER) {
|
||||
if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) {
|
||||
world.wakeupInactiveRemainingVillagers--;
|
||||
- return config.wakeUpInactiveVillagersFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveVillagersFor, plazmaConfig.entity.wakeUpDurationVariance.villager()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveVillagersFor, plazmaConfig.entity.wakeUpDurationVariance.villager()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
} else if (entity.activationType == ActivationType.ANIMAL) {
|
||||
if (inactiveFor > config.wakeUpInactiveAnimalsEvery && world.wakeupInactiveRemainingAnimals > 0) {
|
||||
world.wakeupInactiveRemainingAnimals--;
|
||||
- return config.wakeUpInactiveAnimalsFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveAnimalsFor, plazmaConfig.entity.wakeUpDurationVariance.animal()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveAnimalsFor, plazmaConfig.entity.wakeUpDurationVariance.animal()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
} else if (entity.activationType == ActivationType.FLYING_MONSTER) {
|
||||
if (inactiveFor > config.wakeUpInactiveFlyingEvery && world.wakeupInactiveRemainingFlying > 0) {
|
||||
world.wakeupInactiveRemainingFlying--;
|
||||
- return config.wakeUpInactiveFlyingFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveFlyingFor, plazmaConfig.entity.wakeUpDurationVariance.flying()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveFlyingFor, plazmaConfig.entity.wakeUpDurationVariance.flying()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
} else if (entity.activationType == ActivationType.MONSTER || entity.activationType == ActivationType.RAIDER) {
|
||||
if (inactiveFor > config.wakeUpInactiveMonstersEvery && world.wakeupInactiveRemainingMonsters > 0) {
|
||||
world.wakeupInactiveRemainingMonsters--;
|
||||
- return config.wakeUpInactiveMonstersFor;
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveMonstersFor, plazmaConfig.entity.wakeUpDurationVariance.monster()); // Plazma
|
||||
+ return getWakeupDuration(world.getRandom(), config.wakeUpInactiveMonstersFor, plazmaConfig.entity.wakeUpDurationVariance.monster()); // Plazma - Variable entity wakeup duration
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
|
||||
@@ -17,7 +17,7 @@ index 57d0cd3ad6f972e986c72a57f1a6e36003f190c2..50d97c5ab33f33b81dbafd7cf42da5af
|
||||
|
||||
public ZeroCollidingReferenceStateTable(final StateHolder<?, ?> state, final Map<Property<?>, Comparable<?>> this_map) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||
index 5f285d190186a2ff5a61d05070593e1d633dd79a..669c42f1598e2a06bb0b95aa0bc413911346f3ff 100644
|
||||
index 5f285d190186a2ff5a61d05070593e1d633dd79a..bcb0ba74f4162437d43199d365ff468222f59985 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/StateHolder.java
|
||||
@@ -114,6 +114,12 @@ public abstract class StateHolder<O, S> {
|
||||
@@ -29,7 +29,7 @@ index 5f285d190186a2ff5a61d05070593e1d633dd79a..669c42f1598e2a06bb0b95aa0bc41391
|
||||
+ if (ret == null) throw new IllegalArgumentException("Cannot set property " + property + " to " + value + " on " + this.owner + ", it is not an allowed value");
|
||||
+ return ret;
|
||||
+ /*
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Optimise state lookup more
|
||||
Comparable<?> comparable = this.values.get(property);
|
||||
if (comparable != null && !comparable.equals(value)) {
|
||||
S object = this.neighbours.get(property, value);
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Suppress errors from dirty attributes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 05342f5fbe5cd62e81e09d3d6743cf47331b54c2..f496e2f0e873e494fdf12ad6d2dd3bbc2fae9e56 100644
|
||||
index 59f6f8474f77f0cb332072dfe0b4d47464c1b78a..6808c73049ebe108c8229b3d2d92d9aeb246e3e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -395,7 +395,8 @@ public class ServerEntity {
|
||||
@@ -401,7 +401,8 @@ public class ServerEntity {
|
||||
}
|
||||
|
||||
if (this.entity instanceof LivingEntity) {
|
||||
@@ -18,7 +18,7 @@ index 05342f5fbe5cd62e81e09d3d6743cf47331b54c2..f496e2f0e873e494fdf12ad6d2dd3bbc
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
// CraftBukkit start - Send scaled max health
|
||||
@@ -406,7 +407,7 @@ public class ServerEntity {
|
||||
@@ -412,7 +413,7 @@ public class ServerEntity {
|
||||
this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), set));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Tue, 5 Dec 2023 13:29:28 +0900
|
||||
Subject: [PATCH] Add Entity spawn deadlock timer
|
||||
Subject: [PATCH] Add entity spawn deadlock timer
|
||||
|
||||
[REFERENCE]
|
||||
- AbsolemJackdaw/FixMySpawnR
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index ac6bdf21d5ff8ba563f8c9187f6a8dcc823587aa..94d79eb70ffdeaa41dce4ec7873fb6888eff272e 100644
|
||||
index 28e8403f1f91effd7eb5a50855f823f8adc90b6b..1b9989387d94429538e724329737b304232756e6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -48,6 +48,8 @@ public abstract class BaseSpawner {
|
||||
public int requiredPlayerRange = 16;
|
||||
public int spawnRange = 4;
|
||||
private int tickDelay = 0; // Paper
|
||||
+ private int blockExistsTick = 0; // Plazma - Implement FixMySpawnR
|
||||
+ private boolean blockLockedByTime = false; // Plazma - Implement FixMySpawnR
|
||||
+ private int blockExistsTick = 0; // Plazma - Add entity spawn deadlock timer
|
||||
+ private boolean blockLockedByTime = false; // Plazma - Add entity spawn deadlock timer
|
||||
|
||||
public BaseSpawner() {}
|
||||
|
||||
@@ -23,7 +23,7 @@ index ac6bdf21d5ff8ba563f8c9187f6a8dcc823587aa..94d79eb70ffdeaa41dce4ec7873fb688
|
||||
}
|
||||
|
||||
public void serverTick(ServerLevel world, BlockPos pos) {
|
||||
+ // Plazma start - Implement FixMySpawnR
|
||||
+ // Plazma start - Add entity spawn deadlock timer
|
||||
+ if (world.plazmaConfig().entity.spawnDeadlockTimer.enabled) {
|
||||
+ if (!this.blockLockedByTime) {
|
||||
+ if (this.blockExistsTick > world.plazmaConfig().entity.spawnDeadlockTimer.timerTimeout)
|
||||
@@ -33,7 +33,7 @@ index ac6bdf21d5ff8ba563f8c9187f6a8dcc823587aa..94d79eb70ffdeaa41dce4ec7873fb688
|
||||
+
|
||||
+ if (blockLockedByTime && world.getBestNeighborSignal(pos) > 0) return;
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add entity spawn deadlock timer
|
||||
if (spawnCount <= 0 || maxNearbyEntities <= 0) return; // Paper - Ignore impossible spawn tick
|
||||
// Paper start - Configurable mob spawner tick rate
|
||||
if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||
@@ -41,12 +41,12 @@ index ac6bdf21d5ff8ba563f8c9187f6a8dcc823587aa..94d79eb70ffdeaa41dce4ec7873fb688
|
||||
if (nbt.contains("SpawnRange", 99)) {
|
||||
this.spawnRange = nbt.getShort("SpawnRange");
|
||||
}
|
||||
+ // Plazma start - Implement FixMySpawnR
|
||||
+ // Plazma start - Add entity spawn deadlock timer
|
||||
+ if (nbt.contains("Plazma.SpawnerTicks", 99)) {
|
||||
+ this.blockExistsTick = nbt.getInt("Plazma.SpawnerTicks");
|
||||
+ this.blockLockedByTime = nbt.getBoolean("Plazma.SpawnerLocked");
|
||||
+ }
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Add entity spawn deadlock timer
|
||||
|
||||
this.displayEntity = null;
|
||||
}
|
||||
@@ -54,8 +54,8 @@ index ac6bdf21d5ff8ba563f8c9187f6a8dcc823587aa..94d79eb70ffdeaa41dce4ec7873fb688
|
||||
}));
|
||||
}
|
||||
|
||||
+ nbt.putInt("Plazma.SpawnerTicks", this.blockExistsTick); // Plazma - Implement FixMySpawnR
|
||||
+ nbt.putBoolean("Plazma.SpawnerLocked", this.blockLockedByTime); // Plazma - Implement FixMySpawnR
|
||||
+ nbt.putInt("Plazma.SpawnerTicks", this.blockExistsTick); // Plazma - Add entity spawn deadlock timer
|
||||
+ nbt.putBoolean("Plazma.SpawnerLocked", this.blockLockedByTime); // Plazma - Add entity spawn deadlock timer
|
||||
nbt.put("SpawnPotentials", (Tag) SpawnData.LIST_CODEC.encodeStart(NbtOps.INSTANCE, this.spawnPotentials).result().orElseThrow());
|
||||
return nbt;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ index 7e8dc9e8f381abfdcce2746edc93122d623622d1..bf882040399015b38b917c7982f01e74
|
||||
|
||||
protected E[] storage;
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index e3b131d054079fe9bde6ef79ac29ca0dae0033a3..3dda82c9c73e0d1b8a14a7c7d3ac87d568fa4edd 100644
|
||||
index 315ac3baecf1e29fd49c4c52e2d914d9a726540f..7259d86b568b38112ab420ea2b28f29e4ffcae71 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -30,7 +30,7 @@ public class CrashReport {
|
||||
@@ -206,10 +206,10 @@ index b54ddd0ba0b001fbcb1838a838ca4890df936f1b..2bfe33ed7e602ada8638d71ed8e91125
|
||||
public CrashReportCategory(String title) {
|
||||
this.title = title;
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index 22dfe70df68b35e313f94b17a87e4121392b17b4..4cba85293577616ebbc228e7290338524f0759c0 100644
|
||||
index b40864e41e1506884fdefefbf3cf4833a8f706c3..b8e3b6b69955ea81862f0297a5be6209088cd1f0 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -411,7 +411,7 @@ public class Util {
|
||||
@@ -408,7 +408,7 @@ public class Util {
|
||||
} else if (futures.size() == 1) {
|
||||
return futures.get(0).thenApply(List::of);
|
||||
} else {
|
||||
@@ -232,7 +232,7 @@ index 06648f9751fd8a322d0809ffebf6a544596ee1a4..b0ea87e2ed8f9bf04b33c2ff8a827d4f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index 4c8f2dbdd6e384be026ae1c890096f89fd744eb0..66ebefcca4846491cc32f3be9bef899bf9bb3ba5 100644
|
||||
index eea9866aecb7189455319d83561fcef35a777d7a..56cff647c4e89a12b116426ebf84df6675601a01 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@@ -420,7 +420,7 @@ public class CompoundTag implements Tag {
|
||||
@@ -339,7 +339,7 @@ index a2920b8a9eff77d9c5d1d7f70ad3abdacba8f0fa..70d776d5cfdb0612f65d92333d6f872a
|
||||
protected CipherBase(Cipher cipher) {
|
||||
this.cipher = cipher;
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index b7a6c7e737e7aba0324a5c3c61bbfbcc3b39ac43..725f67a0ed2294ef0b8bf05635bb4c82608df503 100644
|
||||
index 57d0fbca001da7cace3eeb69526e28e8a2ef5ac5..9f4cbb0164fffe6b69af36ddce6b9727a6f0f6da 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -321,7 +321,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@@ -398,7 +398,7 @@ index d45e39bc009281c298f3dfae113dc87f2b3b1fbd..d9deb14896c62c35ccc5758df1419e53
|
||||
|
||||
private static TranslatableContents create(String key, Optional<String> fallback, Optional<List<Object>> args) {
|
||||
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
index e3f355c85eb7cc8c1683e3009502c10a5ed32daa..838f07692c8e34c21c5a93611ab0f01b5059ab5e 100644
|
||||
index ccdc2345465313991f065e1176b58fb7d5e8722f..bb50e69a4d84e4753db77be071cc6fc73b08a981 100644
|
||||
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
|
||||
@@ -63,7 +63,7 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet<ClientGamePa
|
||||
@@ -408,30 +408,25 @@ index e3f355c85eb7cc8c1683e3009502c10a5ed32daa..838f07692c8e34c21c5a93611ab0f01b
|
||||
- this.states = blockChanges.values().toArray(new BlockState[0]);
|
||||
+ this.states = blockChanges.values().toArray(org.plazmamc.plazma.constants.Empty.BLOCK_STATE); // Plazma - Reduce allocations
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Multi Block Change API
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index bed08d24af02f6f9b4b50d630f4ab4b4fef69f70..53d44995a04f7a2ee18404010a408eb0e1ee5652 100644
|
||||
index 83d98b630181890ad991bdd24112d3c7aa807d2b..8dddbb894eb987e476923078b1632ef9d3def68c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1499,13 +1499,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
@@ -1504,10 +1504,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
private Optional<ServerStatus.Favicon> loadStatusIcon() {
|
||||
- Optional<Path> optional = Optional.of(this.getFile("server-icon.png").toPath()).filter((path) -> {
|
||||
Optional<Path> optional = Optional.of(this.getFile("server-icon.png").toPath()).filter((path) -> {
|
||||
- return Files.isRegularFile(path, new LinkOption[0]);
|
||||
- }).or(() -> {
|
||||
- return this.storageSource.getIconFile().filter((path) -> {
|
||||
+ return Files.isRegularFile(path/*, new LinkOption[0]*/); // Plazma - Reduce allocations
|
||||
}).or(() -> {
|
||||
return this.storageSource.getIconFile().filter((path) -> {
|
||||
- return Files.isRegularFile(path, new LinkOption[0]);
|
||||
- });
|
||||
- });
|
||||
+ // Plazma start - Reduce allocations
|
||||
+ Optional<Path> optional = Optional.of(this.getFile("server-icon.png").toPath()).filter(Files::isRegularFile)
|
||||
+ .or(() -> this.storageSource.getIconFile().filter(Files::isRegularFile));
|
||||
+ // Plazma end
|
||||
+ return Files.isRegularFile(path, /*new LinkOption[0]*/); // Plazma - Reduce allocations
|
||||
});
|
||||
});
|
||||
|
||||
return optional.flatMap((path) -> {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
index 9abce8a22246f449e1e508dc9972d14cfb8c7c6f..c77d87b0909d3f905882efb0d49f8b5d03020cc0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||
@@ -465,7 +460,7 @@ index 0f52e8a61ca7e57e9f52473dceb9cc3464c0c86d..f54bde32760541a653460682e5a3ddd0
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
||||
index 0a4caef179e1cbb280381a495dea4e922e4aafe8..d8afb01007e302312108720c6e4364bed3b96bb1 100644
|
||||
index f65d6dc2b1596232707be402cf0377b5ab90cc01..6735382b229bf6ab66f1ccdf6122215e51d8b10e 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerFunctionLibrary.java
|
||||
@@ -81,7 +81,7 @@ public class ServerFunctionLibrary implements PreparableReloadListener {
|
||||
@@ -478,18 +473,18 @@ index 0a4caef179e1cbb280381a495dea4e922e4aafe8..d8afb01007e302312108720c6e4364be
|
||||
return map;
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 5a8b27dc3c82396123f681dbf466cab3527055bf..d377a7bb17dffff3941b84445ca722e2d11c9e9f 100644
|
||||
index 14813ee7f00b082707539b6754b703375adf3c61..ff8c7b60836ef532c7bd5d41f6a83a4a9d8c9b06 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -143,6 +143,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
private final Long2LongMap chunkSaveCooldowns;
|
||||
private final Queue<Runnable> unloadQueue;
|
||||
public int serverViewDistance;
|
||||
+ private static final ServerPlayerConnection[] EMPTY_CONNECTION = new ServerPlayerConnection[0]; // Plazma - Reduce allocations
|
||||
@@ -109,6 +109,7 @@ import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
||||
|
||||
// Paper start - distance maps
|
||||
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
|
||||
@@ -1361,7 +1362,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider {
|
||||
|
||||
+ private static final ServerPlayerConnection[] EMPTY_CONNECTION = new ServerPlayerConnection[0]; // Plazma - Reduce allocations
|
||||
private static final byte CHUNK_TYPE_REPLACEABLE = -1;
|
||||
private static final byte CHUNK_TYPE_UNKNOWN = 0;
|
||||
private static final byte CHUNK_TYPE_FULL = 1;
|
||||
@@ -1357,7 +1358,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
// stuff could have been removed, so we need to check the trackedPlayers set
|
||||
// for players that were removed
|
||||
|
||||
@@ -499,10 +494,10 @@ index 5a8b27dc3c82396123f681dbf466cab3527055bf..d377a7bb17dffff3941b84445ca722e2
|
||||
this.updatePlayer(conn.getPlayer());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3902656486aa4fffc448a0f513b5e6564a20d3ad..61bae80e4f69e9c6210c591cd10eb1b9ba53c468 100644
|
||||
index 4f1d092d9bb41c87aa2db9d5b2ffc98907515e53..ed2eb73580b9f0dd0bb2e8de6fa86d7d1e9be59b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1454,7 +1454,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1449,7 +1449,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public static List<Entity> getCurrentlyTickingEntities() {
|
||||
Entity ticking = currentlyTickingEntity.get();
|
||||
@@ -512,13 +507,13 @@ index 3902656486aa4fffc448a0f513b5e6564a20d3ad..61bae80e4f69e9c6210c591cd10eb1b9
|
||||
return ret;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f9b21e850251172851a434261a6e0b20efb46042..2ce7a7657f9bc5d93699429efb7f832dce451efd 100644
|
||||
index 3a30fee71f0874f352690ed57ddf1bad069f3db1..5a49594e9deaa5fe4ddefc9919396f207dcae79e 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -795,13 +795,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@@ -792,13 +792,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - run this async
|
||||
// CraftBukkit start
|
||||
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
||||
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper - configurable tab spam limits
|
||||
- server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause
|
||||
+ server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam"/*, new Object[0]*/), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause // Plazma - Reduce allocations
|
||||
return;
|
||||
@@ -531,8 +526,8 @@ index f9b21e850251172851a434261a6e0b20efb46042..2ce7a7657f9bc5d93699429efb7f832d
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -3284,7 +3284,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Paper start
|
||||
@@ -3279,7 +3279,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Paper start - auto recipe limit
|
||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||
- this.server.scheduleOnMain(() -> this.disconnect(net.minecraft.network.chat.Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - kick event cause
|
||||
@@ -541,7 +536,7 @@ index f9b21e850251172851a434261a6e0b20efb46042..2ce7a7657f9bc5d93699429efb7f832d
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index c9dba75182bec18b775622ff188e222e383b2c66..84749f16f4b41d75f0b2075b1ffd093f1bbb5771 100644
|
||||
index 0f53f8da792812f9a324843959939bff7bbc78ed..5d4331fcded0788d2a38a64d49bdb8a26f2bdec9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -138,8 +138,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@@ -574,7 +569,7 @@ index c9dba75182bec18b775622ff188e222e383b2c66..84749f16f4b41d75f0b2075b1ffd093f
|
||||
ServerConfigurationPacketListenerImpl serverconfigurationpacketlistenerimpl = new ServerConfigurationPacketListenerImpl(this.server, this.connection, commonlistenercookie, this.player); // CraftBukkit
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 59afcfb957ea653e64b17385accf5c9449d33b2a..104eb183df2f44e5ff8658b8d07e4fc87ee845d2 100644
|
||||
index 56ee7057defed5c9281aa557d20608c275fac9d6..670519845bc4dc8c59f1fb48a4c7e35d0f986567 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -716,7 +716,7 @@ public abstract class PlayerList {
|
||||
@@ -587,10 +582,10 @@ index 59afcfb957ea653e64b17385accf5c9449d33b2a..104eb183df2f44e5ff8658b8d07e4fc8
|
||||
|
||||
// Instead of kicking then returning, we need to store the kick reason
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 665120a62525f56912263a3e1b6f12f6c3e15dec..78d2298d8cb0b028dc777106115d425b10cfd599 100644
|
||||
index 35f973cc2c0989256fa21abaf0327c2f36dbe4c9..2e7ef69361ec8e5c2e9c03653beb945fbd5877a1 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -79,7 +79,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -77,7 +77,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
}
|
||||
|
||||
public String[] getUserList() {
|
||||
@@ -625,7 +620,7 @@ index 311625277a26c9c187025a1036978229241b965f..33d70d547f614704e7ac36b9f49bbb7c
|
||||
|
||||
public ZeroBitStorage(int size) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index bdb78cc701543cfe91a6bafd1786fe2ea0bf1ddc..8f28c80cdb15005ddc0886581cd457e880f1f71c 100644
|
||||
index 997ab942be9f742804041b07d607e7dd6473ba96..14a61e58987464d7865caf98e6232fb1334c6d88 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -251,7 +251,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
@@ -638,7 +633,7 @@ index bdb78cc701543cfe91a6bafd1786fe2ea0bf1ddc..8f28c80cdb15005ddc0886581cd457e8
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
index 64aba511e615983988cdb6a0fd45b7d9d4f2f16d..e335c936f1f286c9bf8f19aff7202c5f7e413bbe 100644
|
||||
index 442eb602f5c82550a87e218e2013171b718abd62..b68f7d1fba18cf08a1844a179f07cb6d873c236b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
|
||||
@@ -122,7 +122,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
|
||||
@@ -651,7 +646,7 @@ index 64aba511e615983988cdb6a0fd45b7d9d4f2f16d..e335c936f1f286c9bf8f19aff7202c5f
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Mob.class, 5, false, false, (entityliving) -> {
|
||||
return entityliving instanceof Enemy && !(entityliving instanceof Creeper);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
index db04b2919b811cddf4b92dafe621bb54cfe8516d..f64296ab9f13765f70e90c47d06d526602770cdc 100644
|
||||
index 588048ad83486adc7e798fba6dbbfe9f4926d7b0..8568ff3d5790ac47d7332b9f132af8839e7a2829 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
|
||||
@@ -339,7 +339,7 @@ public class Panda extends Animal {
|
||||
@@ -677,7 +672,7 @@ index eae2488f2a46e543b496b7a2919aabbb55dcb825..3383d61551f28b44943c0e935aedfa3c
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Wolf.class, true));
|
||||
if (!this.hasCustomName()) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
index 5d49ed7ddf44a3d549b178ae548664194967776b..28131075d6cfd04e11a0ea24ac1466e34247b60e 100644
|
||||
index a90055fe8819a32180754b6060a0f88e81d1a3b6..68825a2ad5a6ea1b0784a935206bd150d29e25f9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java
|
||||
@@ -241,7 +241,7 @@ public class Wolf extends TamableAnimal implements NeutralMob {
|
||||
@@ -685,12 +680,12 @@ index 5d49ed7ddf44a3d549b178ae548664194967776b..28131075d6cfd04e11a0ea24ac1466e3
|
||||
this.targetSelector.addGoal(1, new OwnerHurtByTargetGoal(this));
|
||||
this.targetSelector.addGoal(2, new OwnerHurtTargetGoal(this));
|
||||
- this.targetSelector.addGoal(3, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers());
|
||||
+ this.targetSelector.addGoal(3, (new HurtByTargetGoal(this/*,new Class[0]*/)).setAlertOthers()); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(3, (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers()); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
// this.targetSelector.addGoal(5, new NonTameRandomTargetGoal<>(this, Animal.class, false, Wolf.PREY_SELECTOR)); // Purpur - moved to updatePathfinders()
|
||||
this.targetSelector.addGoal(6, new NonTameRandomTargetGoal<>(this, Turtle.class, false, Turtle.BABY_ON_LAND_SELECTOR));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
index 3f36eedeae4b94ca684c57f4ec8d2d1ab5c51aae..b9650c83324165fa9c50f4f51bb889b165d4a260 100644
|
||||
index 8adcffc1e6434e06ca52d119a7326a1272897307..a6a697868b22224a26d6c39e594533c3b33e724b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -84,7 +84,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
@@ -703,7 +698,7 @@ index 3f36eedeae4b94ca684c57f4ec8d2d1ab5c51aae..b9650c83324165fa9c50f4f51bb889b1
|
||||
private final DynamicGameEventListener<VibrationSystem.Listener> dynamicVibrationListener;
|
||||
private VibrationSystem.Data vibrationData;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
index d75f6032734ec76b498d32c952b15cb015f32674..2ffc0f90317399c24a3a6e635e6506852f48305a 100644
|
||||
index a8314521dd5d17fcf3ff1de4f6fc85804112d87c..7277022e1205185ad6b43e87820c733d9bb5c67d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -254,7 +254,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
@@ -711,12 +706,12 @@ index d75f6032734ec76b498d32c952b15cb015f32674..2ffc0f90317399c24a3a6e635e650685
|
||||
this.goalSelector.addGoal(7, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*,new Class[0]*/)); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, LivingEntity.class, 0, false, false, WitherBoss.LIVING_ENTITY_SELECTOR));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
index 68f45498405f5fd9a6f5525b9a59518a8b506aa8..f62cff35fce1288f6fb2a07cc2b9d812ad5dd239 100644
|
||||
index a00646bc8a9caefe56e48b7682e8fb0c464b81fa..a2b5d2f1be493148a0ed102f10fd8b762b8d3981 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
|
||||
@@ -79,7 +79,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
|
||||
@@ -724,12 +719,12 @@ index 68f45498405f5fd9a6f5525b9a59518a8b506aa8..f62cff35fce1288f6fb2a07cc2b9d812
|
||||
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*,new Class[0]*/)); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Turtle.class, 10, true, false, Turtle.BABY_ON_LAND_SELECTOR));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
index 64f6b5f44db4fd90e789032e3833da60cfcfbef1..a95aaeed03e16f258c2a749e366232f0988d37d8 100644
|
||||
index c01f641a58de999ab0772efc24900308aad8f04a..03df741744e1f2062aed3acf7f58a37c8c99172b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -153,7 +153,7 @@ public class Creeper extends Monster implements PowerableMob {
|
||||
@@ -737,12 +732,12 @@ index 64f6b5f44db4fd90e789032e3833da60cfcfbef1..a95aaeed03e16f258c2a749e366232f0
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
- this.targetSelector.addGoal(2, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*,new Class[0]*/)); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
index a5fcc85334474b29c3575bccbaeceaadc06eea5c..fb452417325863ee4f2d02f716530111d1ba072f 100644
|
||||
index f0c3ab07e97ff79ca3d04260e10d069fe6c432d4..536f967ea4f17cba3c754f66a71df269a7d8290f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
||||
@@ -138,7 +138,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
||||
@@ -750,7 +745,7 @@ index a5fcc85334474b29c3575bccbaeceaadc06eea5c..fb452417325863ee4f2d02f716530111
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
this.targetSelector.addGoal(1, new EnderMan.EndermanLookForPlayerGoal(this, this::isAngryAt));
|
||||
- this.targetSelector.addGoal(2, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*,new Class[0]*/)); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(2, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, Endermite.class, 10, true, false, (entityliving) -> entityliving.level().purpurConfig.endermanAggroEndermites && entityliving instanceof Endermite endermite && (!entityliving.level().purpurConfig.endermanAggroEndermitesOnlyIfPlayerSpawned || endermite.isPlayerSpawned()))); // Purpur
|
||||
this.targetSelector.addGoal(4, new ResetUniversalAngerTargetGoal<>(this, false));
|
||||
}
|
||||
@@ -768,7 +763,7 @@ index dbc27afbccb027963ae3f035c268835adedbb933..320916acbf22cd5d9a7aff7d3550de75
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
index 7d72188bfa921280dc5a1aff09ee3838821d17b6..ef0aa1123aa13d7dfa010197f309a7e2a801df6f 100644
|
||||
index ad643331e0ea388dc28329828d2cb005d176eb9f..867b543f45ea7a865f5326fbcc3d3517b50be16a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java
|
||||
@@ -95,7 +95,7 @@ public class Spider extends Monster {
|
||||
@@ -776,12 +771,12 @@ index 7d72188bfa921280dc5a1aff09ee3838821d17b6..ef0aa1123aa13d7dfa010197f309a7e2
|
||||
this.goalSelector.addGoal(6, new RandomLookAroundGoal(this));
|
||||
this.targetSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur
|
||||
- this.targetSelector.addGoal(1, new HurtByTargetGoal(this, new Class[0]));
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*,new Class[0]*/)); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(1, new HurtByTargetGoal(this/*, new Class[0]*/)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new Spider.SpiderTargetGoal<>(this, Player.class));
|
||||
this.targetSelector.addGoal(3, new Spider.SpiderTargetGoal<>(this, IronGolem.class));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index f6dd5fd56926215830ccebbd46098d4bc08e17e4..d13ed2b539b90dfe977b887db9738ca7266cf6dd 100644
|
||||
index a161f8316dc38148a60ad3a661eb2d50a34ec068..d196a70e8d02772c7cdb89bd85aad28bf9f2260b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -166,7 +166,7 @@ public class Zombie extends Monster {
|
||||
@@ -789,20 +784,20 @@ index f6dd5fd56926215830ccebbd46098d4bc08e17e4..d13ed2b539b90dfe977b887db9738ca7
|
||||
this.goalSelector.addGoal(6, new MoveThroughVillageGoal(this, 1.0D, true, 4, this::canBreakDoors));
|
||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
- this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[0])).setAlertOthers(ZombifiedPiglin.class));
|
||||
+ this.targetSelector.addGoal(1, (new HurtByTargetGoal(this/*,new Class[0]*/)).setAlertOthers(ZombifiedPiglin.class)); // Plazma - Reduce allocations
|
||||
+ this.targetSelector.addGoal(1, (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers(ZombifiedPiglin.class)); // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
|
||||
// Purpur start
|
||||
if ( this.level().spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
index df8c7a45eb49a8c667030eb67d6d49dcbaef4fcf..9aa3a54dcbcc2c62b3b816fbf6c0cbd62202cd57 100644
|
||||
index feba8a264bae656244f60296d0511a8046297f73..37dbf8ab18710fdd889073468c52cc0c6fc3ced2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombifiedPiglin.java
|
||||
@@ -120,7 +120,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||
protected void addBehaviourGoals() {
|
||||
this.goalSelector.addGoal(2, new ZombieAttackGoal(this, 1.0D, false));
|
||||
this.goalSelector.addGoal(7, new WaterAvoidingRandomStrollGoal(this, 1.0D));
|
||||
- this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - assign field
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this/*,new Class[0]*/)).setAlertOthers()); // Paper - assign field // Plazma - Reduce allocations
|
||||
- this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this, new Class[0])).setAlertOthers()); // Paper - fix PigZombieAngerEvent cancellation
|
||||
+ this.targetSelector.addGoal(1, pathfinderGoalHurtByTarget = (new HurtByTargetGoal(this/*, new Class[0]*/)).setAlertOthers()); // Paper - fix PigZombieAngerEvent cancellation // Plazma - Reduce allocations
|
||||
this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, 10, true, false, this::isAngryAt));
|
||||
this.targetSelector.addGoal(3, new ResetUniversalAngerTargetGoal<>(this, true));
|
||||
}
|
||||
@@ -880,7 +875,7 @@ index a907b79fd8291a0e92db138f37239d17424188a1..a402db6baa4b24b4c6750b01b8b2f56e
|
||||
int i = 0;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 9248769e6d357f6eec68945fd7700e79b2942c41..931806f365cf9a0587b18d115d98f5308a2f9407 100644
|
||||
index 0761096829e2afc5f8dd88b9a693874fc2f1bb8b..a65c350b2b0f662c3fd7d54465e7ff42d28715f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
@@ -444,7 +444,7 @@ public class RegionFile implements AutoCloseable {
|
||||
@@ -991,7 +986,7 @@ index 399da9d43aefbb95897df4697860d5bce5317152..df7816c1c5f069d89a22dbd876a2d663
|
||||
|
||||
public void close() throws IOException {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index eb1c8bb352bfcc81f61174fd65867390aa2cc2d2..e3e36d50a1ed2523c54213de060a58c6a751f9d0 100644
|
||||
index 3dca62446fbb7c92f5f2908b36926bbe5e905dbb..042617c7de30707f66e60536cebc31e210647b64 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -125,7 +125,7 @@ public class PlayerDataStorage {
|
||||
@@ -1017,7 +1012,7 @@ index 16d2aa4556bc9f32a2def7f9ca282aa3fa23fb87..8514da343ce287298477f2c977e49491
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index f21e29d173b89d072c8422b80ae0132f67e74f6c..162e31eda71db81ad3d35fed658da283af622d0b 100644
|
||||
index 27f4ef85818f1735371a7aedd8ce311d65a3b406..b250e673213e1cd1215260db0f0cb360c62cb288 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -462,7 +462,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@@ -288,7 +288,7 @@ index 0000000000000000000000000000000000000000..d11579075e653868a43fe826bdf9b41d
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/util/random/WeightedRandomList.java b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
|
||||
index 1bcb5a58b945cdb3dc94efb314d7ba41fbb38e07..34beb1b0af10877b3388e6f44913253eb51e7a51 100644
|
||||
index 1bcb5a58b945cdb3dc94efb314d7ba41fbb38e07..3bd989b2af76392a31d2aca23fdab20a79dc3933 100644
|
||||
--- a/src/main/java/net/minecraft/util/random/WeightedRandomList.java
|
||||
+++ b/src/main/java/net/minecraft/util/random/WeightedRandomList.java
|
||||
@@ -8,10 +8,10 @@ import net.minecraft.util.RandomSource;
|
||||
@@ -300,7 +300,7 @@ index 1bcb5a58b945cdb3dc94efb314d7ba41fbb38e07..34beb1b0af10877b3388e6f44913253e
|
||||
|
||||
WeightedRandomList(List<? extends E> entries) {
|
||||
- this.items = ImmutableList.copyOf(entries);
|
||||
+ this.items = entries.size() > 4 ? ImmutableList.copyOf(entries) : java.util.Collections.unmodifiableList(new me.jellysquid.mods.lithium.common.util.collections.HashedReferenceList<>(entries));// Plazma - Lithium: collections.mob_spawning
|
||||
+ this.items = entries.size() > 4 ? ImmutableList.copyOf(entries) : java.util.Collections.unmodifiableList(new me.jellysquid.mods.lithium.common.util.collections.HashedReferenceList<>(entries)); // Plazma - Lithium: collections.mob_spawning
|
||||
this.totalWeight = WeightedRandom.getTotalWeight(entries);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ Subject: [PATCH] Improve SwingTime ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 3b1c09f8afe1a008df4b75b605a796bfb1bf3899..339127ac7795b7647b2a3f6b2cdafff500b1d8d5 100644
|
||||
index d914eab93a1a282ce149e361015abd94269fa0be..cf848c35147a94d6dd07dfabb21703b06d3cffc7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2602,6 +2602,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
protected void updateSwingTime() {
|
||||
+ if (!this.swinging && this.swingTime == 0) return; // Plazma - de-sisyphus :skull:
|
||||
+ if (!this.swinging && this.swingTime == 0) return; // Plazma - Improve SwingTime ticking
|
||||
int i = this.getCurrentSwingDuration();
|
||||
|
||||
if (this.swinging) {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Save Json list asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
index 935dac757280731bfeb0a8f033cbe315ecac46da..038f370ac2cb768e14fe7605b32b2ac811c33b8f 100644
|
||||
index 1c9cf5e1c4ee05724ffcdbd77a19bca1ab2be4d3..bc3b251a3f8ad345bdaaf67be59ff2c143d4d130 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedPlayerList.java
|
||||
@@ -60,20 +60,20 @@ public class DedicatedPlayerList extends PlayerList {
|
||||
@@ -13,30 +13,30 @@ index 935dac757280731bfeb0a8f033cbe315ecac46da..038f370ac2cb768e14fe7605b32b2ac8
|
||||
|
||||
private void saveIpBanList() {
|
||||
- try {
|
||||
+ //try { // Plazma - Build fix
|
||||
+ //try { // Plazma - Save Json list asynchronously
|
||||
this.getIpBans().save();
|
||||
- } catch (IOException var2) {
|
||||
+ /*} catch (IOException var2) { // Plazma - Build fix
|
||||
+ /*} catch (IOException var2) { // Plazma - Save Json list asynchronously
|
||||
LOGGER.warn("Failed to save ip banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ }*/ // Plazma - Build fix
|
||||
+ }*/ // Plazma - Save Json list asynchronously
|
||||
|
||||
}
|
||||
|
||||
private void saveUserBanList() {
|
||||
- try {
|
||||
+ //try { // Plazma - Build fix
|
||||
+ //try { // Plazma - Save Json list asynchronously
|
||||
this.getBans().save();
|
||||
- } catch (IOException var2) {
|
||||
+ /*} catch (IOException var2) { // Plazma - Build fix
|
||||
+ /*} catch (IOException var2) { // Plazma - Save Json list asynchronously
|
||||
LOGGER.warn("Failed to save user banlist: ", (Throwable)var2);
|
||||
- }
|
||||
+ }*/ // Plazma - Build fix
|
||||
+ }*/ // Plazma - Save Json list asynchronously
|
||||
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
index 78d2298d8cb0b028dc777106115d425b10cfd599..cb5fbe78a4c3bffe91a579b9d8c24e35cd3d1021 100644
|
||||
index 2e7ef69361ec8e5c2e9c03653beb945fbd5877a1..43680e141f08ba8359401a17f2e2fe59fca12dfa 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
|
||||
@@ -44,11 +44,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -44,32 +44,32 @@ index 78d2298d8cb0b028dc777106115d425b10cfd599..cb5fbe78a4c3bffe91a579b9d8c24e35
|
||||
this.map.put(this.getKeyForUser(entry.getUser()), entry);
|
||||
|
||||
- try {
|
||||
+ //try { // Plazma - Fix build
|
||||
+ //try { // Plazma - Save Json list asynchronously
|
||||
this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Fix build
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Save Json list asynchronously
|
||||
StoredUserList.LOGGER.warn("Could not save the list after adding a user.", ioexception);
|
||||
- }
|
||||
+ }*/ // Plazma - Fix build
|
||||
+ }*/ // Plazma - Save Json list asynchronously
|
||||
|
||||
}
|
||||
|
||||
@@ -66,11 +66,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -64,11 +64,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
public void remove(K key) {
|
||||
this.map.remove(this.getKeyForUser(key));
|
||||
|
||||
- try {
|
||||
+ //try { // Plazma - Fix build
|
||||
+ //try { // Plazma - Save Json list asynchronously
|
||||
this.save();
|
||||
- } catch (IOException ioexception) {
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Fix build
|
||||
+ /*} catch (IOException ioexception) { // Plazma - Save Json list asynchronously
|
||||
StoredUserList.LOGGER.warn("Could not save the list after removing a user.", ioexception);
|
||||
- }
|
||||
+ }*/ // Plazma - Fix build
|
||||
+ }*/ // Plazma - Save Json list asynchronously
|
||||
|
||||
}
|
||||
|
||||
@@ -125,7 +125,10 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -102,7 +102,10 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
return this.map.values();
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ index 78d2298d8cb0b028dc777106115d425b10cfd599..cb5fbe78a4c3bffe91a579b9d8c24e35
|
||||
this.removeExpired(); // Paper - remove expired values before saving
|
||||
JsonArray jsonarray = new JsonArray();
|
||||
Stream<JsonObject> stream = this.map.values().stream().map((jsonlistentry) -> { // CraftBukkit - decompile error
|
||||
@@ -137,27 +140,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
@@ -114,27 +117,16 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
|
||||
|
||||
Objects.requireNonNull(jsonarray);
|
||||
stream.forEach(jsonarray::add);
|
||||
@@ -110,7 +110,7 @@ index 78d2298d8cb0b028dc777106115d425b10cfd599..cb5fbe78a4c3bffe91a579b9d8c24e35
|
||||
|
||||
+ });
|
||||
}
|
||||
+ // Plazma end
|
||||
+ // Plazma end - Save Json list asynchronously
|
||||
|
||||
public void load() throws IOException {
|
||||
if (this.file.exists()) {
|
||||
|
||||
Reference in New Issue
Block a user