diff --git a/patches/server/0002-Divine-Configuration.patch b/patches/server/0002-Divine-Configuration.patch index 16a9deb..9e4b994 100644 --- a/patches/server/0002-Divine-Configuration.patch +++ b/patches/server/0002-Divine-Configuration.patch @@ -446,7 +446,7 @@ index 0000000000000000000000000000000000000000..c10403d781d25e4bb9e43d3f064fb1ae +} diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..fc16ce9039a26e93618bce66bdb0d1cfe8964681 +index 0000000000000000000000000000000000000000..3e64e0d2d925f9fca1eb38cc07c20cae785ef39f --- /dev/null +++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java @@ -0,0 +1,80 @@ @@ -530,4 +530,3 @@ index 0000000000000000000000000000000000000000..fc16ce9039a26e93618bce66bdb0d1cf + return value.isEmpty() ? fallback : value; + } +} -\ No newline at end of file diff --git a/patches/server/0008-Don-t-save-Fireworks.patch b/patches/server/0008-Don-t-save-Fireworks.patch index 263a222..d3a8bf6 100644 --- a/patches/server/0008-Don-t-save-Fireworks.patch +++ b/patches/server/0008-Don-t-save-Fireworks.patch @@ -21,7 +21,7 @@ index b2f08889139dc447f7071f1c81456035bf8de31e..3c364f5c4cafba917edb605de017aca2 + // DivineMC end } diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java -index fc16ce9039a26e93618bce66bdb0d1cfe8964681..38a42589b6b78dc534aef62bb36ba923544dbda2 100644 +index 3e64e0d2d925f9fca1eb38cc07c20cae785ef39f..243b3d4379f4f6f273222a3611d8a463053d3e70 100644 --- a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java +++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java @@ -77,4 +77,9 @@ public class DivineWorldConfig { @@ -34,4 +34,3 @@ index fc16ce9039a26e93618bce66bdb0d1cfe8964681..38a42589b6b78dc534aef62bb36ba923 + saveFireworks = getBoolean("gameplay-mechanics.should-save-fireworks", saveFireworks); + } } -\ No newline at end of file diff --git a/patches/server/0011-Boat-Settings.patch b/patches/server/0011-Boat-Settings.patch index 3d69dc1..40e3bcb 100644 --- a/patches/server/0011-Boat-Settings.patch +++ b/patches/server/0011-Boat-Settings.patch @@ -59,7 +59,7 @@ index 5036941829e4d98adbcfb0354b35244c52fc4472..76ef5000bbd805c40e0c927dc709c20c protected int getMaxPassengers() { diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java -index 38a42589b6b78dc534aef62bb36ba923544dbda2..ffe5929f317906a02b3178e33e83aba77c077d7f 100644 +index 243b3d4379f4f6f273222a3611d8a463053d3e70..e1274fe3b0ff369d1f6f229026ced2e03ea335ca 100644 --- a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java +++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java @@ -82,4 +82,11 @@ public class DivineWorldConfig { @@ -74,4 +74,3 @@ index 38a42589b6b78dc534aef62bb36ba923544dbda2..ffe5929f317906a02b3178e33e83aba7 + alwaysAllowToEnterTheBoat = getBoolean("gameplay-mechanics.boat.always-allow-to-enter-the-boat", alwaysAllowToEnterTheBoat); + } } -\ No newline at end of file diff --git a/patches/server/0013-Despawn-shulker-bullets-on-owner-death.patch b/patches/server/0013-Despawn-shulker-bullets-on-owner-death.patch index 9ab6950..e0442bc 100644 --- a/patches/server/0013-Despawn-shulker-bullets-on-owner-death.patch +++ b/patches/server/0013-Despawn-shulker-bullets-on-owner-death.patch @@ -27,7 +27,7 @@ index da0b7ee796c335875914481a5deda5eef5ddd442..ab1127b384cfd8a39543003b692121cc this.finalTarget = ((ServerLevel) this.level()).getEntity(this.targetId); if (this.finalTarget == null) { diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java -index ffe5929f317906a02b3178e33e83aba77c077d7f..2cd7a49e90c70a7f6e5e3861b9846d42d02c70ee 100644 +index e1274fe3b0ff369d1f6f229026ced2e03ea335ca..7e62ee9418d5add5b0b4ddb885d3a1745ce799b2 100644 --- a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java +++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java @@ -89,4 +89,9 @@ public class DivineWorldConfig { @@ -40,4 +40,3 @@ index ffe5929f317906a02b3178e33e83aba77c077d7f..2cd7a49e90c70a7f6e5e3861b9846d42 + despawnShulkerBulletsOnOwnerDeath = getBoolean("gameplay-mechanics.mob.shulker.despawn-bullets-on-player-death", despawnShulkerBulletsOnOwnerDeath); + } } -\ No newline at end of file diff --git a/patches/server/0023-Do-not-process-chat-commands-before-player-has-joine.patch b/patches/server/0023-Do-not-process-chat-commands-before-player-has-joine.patch index 353c7a5..82d160d 100644 --- a/patches/server/0023-Do-not-process-chat-commands-before-player-has-joine.patch +++ b/patches/server/0023-Do-not-process-chat-commands-before-player-has-joine.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Do not process chat/commands before player has joined diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5b37a0bc513a68e0696362fa53633c125eb1fa8b..8ac338aa5fbd5cc78aaadd3c6f834d1959f00712 100644 +index 5b37a0bc513a68e0696362fa53633c125eb1fa8b..a96c4f89bb45af13bc4126dc90d0f943b5240942 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -6,6 +6,7 @@ import com.mojang.authlib.GameProfile; import com.mojang.brigadier.ParseResults; import com.mojang.brigadier.StringReader; import com.mojang.logging.LogUtils; -+import gq.bxteam.divinemc.configuration.DivineConfig; ++import space.bxteam.divinemc.configuration.DivineConfig; import it.unimi.dsi.fastutil.ints.Int2ObjectMap.Entry; import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; diff --git a/patches/server/0025-Implement-Linear-region-format.patch b/patches/server/0025-Implement-Linear-region-format.patch index e440020..078f543 100644 --- a/patches/server/0025-Implement-Linear-region-format.patch +++ b/patches/server/0025-Implement-Linear-region-format.patch @@ -941,7 +941,7 @@ index ef7983863da3b4febef3da2fab93fe581fbd65af..d5ac67927dd2091733eaa096c903874f + } } diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java -index 2cd7a49e90c70a7f6e5e3861b9846d42d02c70ee..8ca0c51b901d2bdae8232e7fb7fdd56ada505bcb 100644 +index 7e62ee9418d5add5b0b4ddb885d3a1745ce799b2..02dfe1750f9955a4b1b945e90491bdee13fe2ef5 100644 --- a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java +++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java @@ -1,5 +1,6 @@ @@ -983,7 +983,6 @@ index 2cd7a49e90c70a7f6e5e3861b9846d42d02c70ee..8ca0c51b901d2bdae8232e7fb7fdd56a + linearCrashOnBrokenSymlink = getBoolean("region-format.linear.crash-on-broken-symlink", linearCrashOnBrokenSymlink); + } } -\ No newline at end of file diff --git a/src/main/java/space/bxteam/divinemc/region/AbstractRegionFile.java b/src/main/java/space/bxteam/divinemc/region/AbstractRegionFile.java new file mode 100644 index 0000000000000000000000000000000000000000..b9cdc044a582b1bcb0ee457aba2af1033f76702e diff --git a/patches/server/0026-Configurable-Chat-message-signatures.patch b/patches/server/0026-Configurable-Chat-message-signatures.patch index 3d5b243..93cfaf0 100644 --- a/patches/server/0026-Configurable-Chat-message-signatures.patch +++ b/patches/server/0026-Configurable-Chat-message-signatures.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Chat message signatures diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java -index e4fd372a1d585887287253a02531cd192929377b..dcc806bcbdcc18f8094b8aa55e8a92a6b12a5f7c 100644 +index e4fd372a1d585887287253a02531cd192929377b..b7eb830ae6ae0d7d8c79dc4ccde9ac73177b7c12 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 { @@ -13,12 +13,12 @@ index e4fd372a1d585887287253a02531cd192929377b..dcc806bcbdcc18f8094b8aa55e8a92a6 private void sendToServer(final ChatType.Bound chatType, final @Nullable Function 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, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) ? null : (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures ? null : "Not Secure")); // DivineMC - Configurable Chat message signatures ++ ChatProcessor.this.server.logChatMessage(toConsoleMessage.decoratedContent(), chatType, ChatProcessor.this.server.getPlayerList().verifyChatTrusted(toConsoleMessage) ? null : (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures ? null : "Not Secure")); // DivineMC - Configurable Chat message signatures } } 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..fbfd8cf782ec73a0498ccd6ec0b4110de83ffb2d 100644 +index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..37c6a8aee54b8ad093e80e735a0dd481f7697676 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatCommandPacket.java @@ -16,7 +16,7 @@ public record ServerboundChatCommandPacket(String command, Instant timeStamp, lo @@ -26,12 +26,12 @@ index b8c1f3b9afddc87d56541c8af63cffecfcdd2653..fbfd8cf782ec73a0498ccd6ec0b4110d buf.writeInstant(this.timeStamp); buf.writeLong(this.salt); - this.argumentSignatures.write(buf); -+ if (!gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) this.argumentSignatures.write(buf); // DivineMC - Configurable Chat message signatures ++ if (!space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) this.argumentSignatures.write(buf); // DivineMC - Configurable Chat message signatures this.lastSeenMessages.write(buf); } 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..fa19289a2bbe5e6b72a505e45586a14670bc0c0b 100644 +index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..c1be2300e10a58f9db7ad9197c4aa7eaa6d7e45b 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java @@ -17,7 +17,7 @@ public record ServerboundChatPacket(String message, Instant timeStamp, long salt @@ -39,12 +39,12 @@ index d1d2fc0c57523c1abf1e8bfec913c78927c3dafc..fa19289a2bbe5e6b72a505e45586a146 buf.writeInstant(this.timeStamp); buf.writeLong(this.salt); - buf.writeNullable(this.signature, MessageSignature::write); -+ if (!gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) buf.writeNullable(this.signature, MessageSignature::write); // DivineMC - Configurable Chat message signatures ++ if (!space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) buf.writeNullable(this.signature, MessageSignature::write); // DivineMC - Configurable Chat message signatures this.lastSeenMessages.write(buf); } diff --git a/src/main/java/net/minecraft/network/protocol/status/ServerStatus.java b/src/main/java/net/minecraft/network/protocol/status/ServerStatus.java -index c40979e2fa37acb2f3df493395f3ab6e185345d7..16250b44775b2ccd02e2112600c9f3bab5820a98 100644 +index c40979e2fa37acb2f3df493395f3ab6e185345d7..826e4a8618db5328ad2df21fd08e5b1cb02cd465 100644 --- a/src/main/java/net/minecraft/network/protocol/status/ServerStatus.java +++ b/src/main/java/net/minecraft/network/protocol/status/ServerStatus.java @@ -17,7 +17,7 @@ import net.minecraft.network.chat.ComponentSerialization; @@ -52,24 +52,24 @@ index c40979e2fa37acb2f3df493395f3ab6e185345d7..16250b44775b2ccd02e2112600c9f3ba public record ServerStatus(Component description, Optional players, Optional version, Optional favicon, boolean enforcesSecureChat) { public static final Codec CODEC = RecordCodecBuilder.create((instance) -> { - return instance.group(ComponentSerialization.CODEC.optionalFieldOf("description", CommonComponents.EMPTY).forGetter(ServerStatus::description), ServerStatus.Players.CODEC.optionalFieldOf("players").forGetter(ServerStatus::players), ServerStatus.Version.CODEC.optionalFieldOf("version").forGetter(ServerStatus::version), ServerStatus.Favicon.CODEC.optionalFieldOf("favicon").forGetter(ServerStatus::favicon), Codec.BOOL.optionalFieldOf("enforcesSecureChat", Boolean.valueOf(false)).forGetter(ServerStatus::enforcesSecureChat)).apply(instance, ServerStatus::new); -+ return gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures ? instance.group(ComponentSerialization.CODEC.optionalFieldOf("description", CommonComponents.EMPTY).forGetter(ServerStatus::description), ServerStatus.Players.CODEC.optionalFieldOf("players").forGetter(ServerStatus::players), ServerStatus.Version.CODEC.optionalFieldOf("version").forGetter(ServerStatus::version), ServerStatus.Favicon.CODEC.optionalFieldOf("favicon").forGetter(ServerStatus::favicon), Codec.BOOL.optionalFieldOf("enforcesSecureChat", Boolean.FALSE).forGetter(x -> true)).apply(instance, ServerStatus::new) : instance.group(ComponentSerialization.CODEC.optionalFieldOf("description", CommonComponents.EMPTY).forGetter(ServerStatus::description), ServerStatus.Players.CODEC.optionalFieldOf("players").forGetter(ServerStatus::players), ServerStatus.Version.CODEC.optionalFieldOf("version").forGetter(ServerStatus::version), ServerStatus.Favicon.CODEC.optionalFieldOf("favicon").forGetter(ServerStatus::favicon), Codec.BOOL.optionalFieldOf("enforcesSecureChat", Boolean.FALSE).forGetter(ServerStatus::enforcesSecureChat)).apply(instance, ServerStatus::new); // DivineMC - Configurable Chat message signatures ++ return space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures ? instance.group(ComponentSerialization.CODEC.optionalFieldOf("description", CommonComponents.EMPTY).forGetter(ServerStatus::description), ServerStatus.Players.CODEC.optionalFieldOf("players").forGetter(ServerStatus::players), ServerStatus.Version.CODEC.optionalFieldOf("version").forGetter(ServerStatus::version), ServerStatus.Favicon.CODEC.optionalFieldOf("favicon").forGetter(ServerStatus::favicon), Codec.BOOL.optionalFieldOf("enforcesSecureChat", Boolean.FALSE).forGetter(x -> true)).apply(instance, ServerStatus::new) : instance.group(ComponentSerialization.CODEC.optionalFieldOf("description", CommonComponents.EMPTY).forGetter(ServerStatus::description), ServerStatus.Players.CODEC.optionalFieldOf("players").forGetter(ServerStatus::players), ServerStatus.Version.CODEC.optionalFieldOf("version").forGetter(ServerStatus::version), ServerStatus.Favicon.CODEC.optionalFieldOf("favicon").forGetter(ServerStatus::favicon), Codec.BOOL.optionalFieldOf("enforcesSecureChat", Boolean.FALSE).forGetter(ServerStatus::enforcesSecureChat)).apply(instance, ServerStatus::new); // DivineMC - Configurable Chat message signatures }); public static record Favicon(byte[] iconBytes) { diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 2bb3735d650c5cb379f5a52cb9ae2e7d5df3803d..e6ab27f41d281b9a07bb04f5b2c849253b479216 100644 +index 2bb3735d650c5cb379f5a52cb9ae2e7d5df3803d..b7edd3581873c20b596f8bca2a2ba2a8b77be3d6 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -682,6 +682,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @Override public boolean enforceSecureProfile() { -+ if (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) return false; // DivineMC - Configurable Chat message signatures ++ if (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) return false; // DivineMC - Configurable Chat message signatures DedicatedServerProperties dedicatedserverproperties = this.getProperties(); // Paper start - Add setting for proxy online mode status diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 36b7686fdfeaab13cb1be9610ddc76fc70f6f6e5..5fbde0fc6263e7fd926c6791838050d956c3284f 100644 +index 36b7686fdfeaab13cb1be9610ddc76fc70f6f6e5..0b25278d87eed5fd334693c3cb3a93d1fe2f8164 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -2258,7 +2258,7 @@ public class ServerPlayer extends Player { @@ -77,12 +77,12 @@ index 36b7686fdfeaab13cb1be9610ddc76fc70f6f6e5..5fbde0fc6263e7fd926c6791838050d9 public void sendServerStatus(ServerStatus metadata) { - this.connection.send(new ClientboundServerDataPacket(metadata.description(), metadata.favicon().map(ServerStatus.Favicon::iconBytes), metadata.enforcesSecureChat())); -+ if (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) this.connection.send(new ClientboundServerDataPacket(metadata.description(), metadata.favicon().map(ServerStatus.Favicon::iconBytes), true)); else this.connection.send(new ClientboundServerDataPacket(metadata.description(), metadata.favicon().map(ServerStatus.Favicon::iconBytes), metadata.enforcesSecureChat())); // DivineMC - Configurable Chat message signatures ++ if (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) this.connection.send(new ClientboundServerDataPacket(metadata.description(), metadata.favicon().map(ServerStatus.Favicon::iconBytes), true)); else this.connection.send(new ClientboundServerDataPacket(metadata.description(), metadata.favicon().map(ServerStatus.Favicon::iconBytes), metadata.enforcesSecureChat())); // DivineMC - Configurable Chat message signatures } @Override diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 02e65b0bd212d46855baee48fab35dc95a88b43f..1a5b7bbe6638daa0876bbee810e9e1ed92157bf4 100644 +index 02e65b0bd212d46855baee48fab35dc95a88b43f..9d9c1bc8bdf55998172bca5edf78d9b8b048b2c9 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -4,7 +4,7 @@ import com.mojang.authlib.GameProfile; @@ -115,7 +115,7 @@ index 02e65b0bd212d46855baee48fab35dc95a88b43f..1a5b7bbe6638daa0876bbee810e9e1ed public void send(Packet packet) { + // DivineMC start - Configurable Chat message signatures -+ if (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) { + if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat) { + packet = new ClientboundSystemChatPacket(PaperAdventure.asAdventure(chat.chatType().resolve(this.player.level().registryAccess()) + .get().decorate(chat.unsignedContent() != null ? chat.unsignedContent() @@ -131,7 +131,7 @@ index 02e65b0bd212d46855baee48fab35dc95a88b43f..1a5b7bbe6638daa0876bbee810e9e1ed public void send(Packet packet, @Nullable PacketSendListener callbacks) { + // DivineMC start - Configurable Chat message signatures -+ if (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) { + if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat && callbacks != null) { + this.send(chat); + return; @@ -143,7 +143,7 @@ index 02e65b0bd212d46855baee48fab35dc95a88b43f..1a5b7bbe6638daa0876bbee810e9e1ed 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 323391509c2efd49c54d7b36d7aa880c63ae5fd4..5e5a80cfac803e5a6aba3e9eb7d161bcfcd6ad53 100644 +index 323391509c2efd49c54d7b36d7aa880c63ae5fd4..964b6df964fa4f74bef37f2f19683e5d2443e5ab 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1468,7 +1468,7 @@ public abstract class PlayerList { @@ -151,7 +151,7 @@ index 323391509c2efd49c54d7b36d7aa880c63ae5fd4..5e5a80cfac803e5a6aba3e9eb7d161bc boolean flag = this.verifyChatTrusted(message); - this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper -+ this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures ? null : "Not Secure")); // Paper // DivineMC - Configurable Chat message signatures ++ this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures ? null : "Not Secure")); // Paper // DivineMC - Configurable Chat message signatures OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message); boolean flag1 = false; @@ -159,7 +159,7 @@ index 323391509c2efd49c54d7b36d7aa880c63ae5fd4..5e5a80cfac803e5a6aba3e9eb7d161bc } public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public -+ if (gq.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) return true; // DivineMC - Configurable Chat message signatures ++ if (space.bxteam.divinemc.configuration.DivineConfig.chatMessageSignatures) return true; // DivineMC - Configurable Chat message signatures return message.hasSignature() && !message.hasExpiredServer(Instant.now()); } diff --git a/patches/server/0029-Carpet-Fixes-RecipeManager-Optimize.patch b/patches/server/0029-Carpet-Fixes-RecipeManager-Optimize.patch index d2ddc59..c7a59a1 100644 --- a/patches/server/0029-Carpet-Fixes-RecipeManager-Optimize.patch +++ b/patches/server/0029-Carpet-Fixes-RecipeManager-Optimize.patch @@ -7,7 +7,7 @@ Original project: https://github.com/fxmorin/carpet-fixes Improves: [Blast]Furnace/Campfire/Smoker/Stonecutter/Crafting/Sheep Color Choosing diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java -index d87124f5356180a37e581febc6141fdc5f1395a7..9eae72c87166efdaf783dd6779e03a981b641a20 100644 +index d87124f5356180a37e581febc6141fdc5f1395a7..4ae4d1203df960c109c1b70d6d710eaa00537008 100644 --- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java +++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java @@ -11,14 +11,9 @@ import com.google.gson.JsonParseException; @@ -32,7 +32,7 @@ index d87124f5356180a37e581febc6141fdc5f1395a7..9eae72c87166efdaf783dd6779e03a98 public > List> getAllRecipesFor(RecipeType type) { - return List.copyOf(this.byType(type).values()); -+ return gq.bxteam.divinemc.configuration.DivineConfig.recipeManagerOptimization ? new ArrayList<>(this.byType(type).values()) : List.copyOf(this.byType(type).values()); // DivineMC - Carpet-Fixes: RecipeManager Optimize ++ return space.bxteam.divinemc.configuration.DivineConfig.recipeManagerOptimization ? new ArrayList<>(this.byType(type).values()) : List.copyOf(this.byType(type).values()); // DivineMC - Carpet-Fixes: RecipeManager Optimize } public > List> getRecipesFor(RecipeType type, C inventory, Level world) { diff --git a/patches/server/0030-Carpet-Fixes-getBiome-Optimize.patch b/patches/server/0030-Carpet-Fixes-getBiome-Optimize.patch index 8cff3d6..d27a75e 100644 --- a/patches/server/0030-Carpet-Fixes-getBiome-Optimize.patch +++ b/patches/server/0030-Carpet-Fixes-getBiome-Optimize.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Carpet-Fixes: getBiome Optimize diff --git a/src/main/java/net/minecraft/world/level/biome/BiomeManager.java b/src/main/java/net/minecraft/world/level/biome/BiomeManager.java -index 5695c5116c8a338b2e41aafcb2dc9f2146856970..26dc7ca097d2b16d7cfa96abd847a8f5744eb45d 100644 +index 5695c5116c8a338b2e41aafcb2dc9f2146856970..b7f704cb1db4c1f588c3984d03c1289960675615 100644 --- a/src/main/java/net/minecraft/world/level/biome/BiomeManager.java +++ b/src/main/java/net/minecraft/world/level/biome/BiomeManager.java @@ -14,6 +14,7 @@ public class BiomeManager { @@ -47,7 +47,7 @@ index 5695c5116c8a338b2e41aafcb2dc9f2146856970..26dc7ca097d2b16d7cfa96abd847a8f5 - o = p; - g = v; + // DivineMC start - Carpet-Fixes: getBiome Optimize -+ if (gq.bxteam.divinemc.configuration.DivineConfig.biomeManagerOptimization) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.biomeManagerOptimization) { + int xMinus2 = pos.getX() - 2; + int yMinus2 = pos.getY() - 2; + int zMinus2 = pos.getZ() - 2; diff --git a/patches/server/0038-Carpet-Fixes-Sheep-Optimization.patch b/patches/server/0038-Carpet-Fixes-Sheep-Optimization.patch index 0a518ff..7be3c79 100644 --- a/patches/server/0038-Carpet-Fixes-Sheep-Optimization.patch +++ b/patches/server/0038-Carpet-Fixes-Sheep-Optimization.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Carpet-Fixes: Sheep Optimization Original project: https://github.com/fxmorin/carpet-fixes diff --git a/src/main/java/net/minecraft/world/entity/animal/Sheep.java b/src/main/java/net/minecraft/world/entity/animal/Sheep.java -index 658f7943d275267d3fc556572831cc095259d12e..3f16dd93e2e83ec14ca440c4f7266e973c49d6a0 100644 +index 658f7943d275267d3fc556572831cc095259d12e..5ee9005f65edcfc3e3d20198ec1f69108a6f8205 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Sheep.java +++ b/src/main/java/net/minecraft/world/entity/animal/Sheep.java @@ -70,6 +70,7 @@ import net.minecraft.world.item.Item; @@ -39,7 +39,7 @@ index 658f7943d275267d3fc556572831cc095259d12e..3f16dd93e2e83ec14ca440c4f7266e97 + DyeColor firstColor = ((Sheep) firstParent).getColor(); + DyeColor secondColor = ((Sheep) secondParent).getColor(); + -+ if (gq.bxteam.divinemc.configuration.DivineConfig.sheepOptimization) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.sheepOptimization) { + DyeColor col = ProperDyeMixin.properDye(firstColor, secondColor); + if (col == null) col = this.level().random.nextBoolean() ? firstColor : secondColor; + return col; diff --git a/patches/server/0039-Async-Pathfinding.patch b/patches/server/0039-Async-Pathfinding.patch index f270c10..8c3f5fa 100644 --- a/patches/server/0039-Async-Pathfinding.patch +++ b/patches/server/0039-Async-Pathfinding.patch @@ -9,7 +9,7 @@ You can find the original code on https://github.com/Bloom-host/Petal Makes most pathfinding-related work happen asynchronously diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -index abcc3ef59475ac170fd10b4dd4a4f3371faf17e0..bce3d4aa36aa51abb6a9a63cc60d886eb03c6189 100644 +index abcc3ef59475ac170fd10b4dd4a4f3371faf17e0..15d8cdedf1ab558f1009c41180c0d580372a3c24 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/AcquirePoi.java @@ -7,7 +7,6 @@ import java.util.HashSet; @@ -43,7 +43,7 @@ index abcc3ef59475ac170fd10b4dd4a4f3371faf17e0..bce3d4aa36aa51abb6a9a63cc60d886e - entityStatus.ifPresent((status) -> { - world.broadcastEntityEvent(entity, status); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + // await on path async + Path possiblePath = findPathToPois(entity, set); + @@ -105,7 +105,7 @@ index abcc3ef59475ac170fd10b4dd4a4f3371faf17e0..bce3d4aa36aa51abb6a9a63cc60d886e } diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/MoveToTargetSink.java b/src/main/java/net/minecraft/world/entity/ai/behavior/MoveToTargetSink.java -index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..bad8b9cc2f1d8880728bde687d43b1def83313c8 100644 +index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..aefa26d6f60d20041b8f7fcc5c87c06ed659644a 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/MoveToTargetSink.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/MoveToTargetSink.java @@ -21,6 +21,7 @@ public class MoveToTargetSink extends Behavior { @@ -121,10 +121,10 @@ index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..bad8b9cc2f1d8880728bde687d43b1de WalkTarget walkTarget = brain.getMemory(MemoryModuleType.WALK_TARGET).get(); boolean bl = this.reachedTarget(entity, walkTarget); - if (!bl && this.tryComputePath(entity, walkTarget, world.getGameTime())) { -+ if (!gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding && !bl && this.tryComputePath(entity, walkTarget, world.getGameTime())) { // DivineMC - Async Pathfinding ++ if (!space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding && !bl && this.tryComputePath(entity, walkTarget, world.getGameTime())) { // DivineMC - Async Pathfinding this.lastTargetPos = walkTarget.getTarget().currentBlockPosition(); return true; -+ } else if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding && !bl) { // DivineMC - Async Pathfinding ++ } else if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding && !bl) { // DivineMC - Async Pathfinding + return true; } else { brain.eraseMemory(MemoryModuleType.WALK_TARGET); @@ -133,7 +133,7 @@ index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..bad8b9cc2f1d8880728bde687d43b1de @Override protected boolean canStillUse(ServerLevel world, Mob entity, long time) { -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding && !this.finishedProcessing) return true; // DivineMC - Async Pathfinding ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding && !this.finishedProcessing) return true; // DivineMC - Async Pathfinding if (this.path != null && this.lastTargetPos != null) { Optional optional = entity.getBrain().getMemory(MemoryModuleType.WALK_TARGET); boolean bl = optional.map(MoveToTargetSink::isWalkTargetSpectator).orElse(false); @@ -142,7 +142,7 @@ index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..bad8b9cc2f1d8880728bde687d43b1de @Override protected void start(ServerLevel serverLevel, Mob mob, long l) { + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + Brain brain = mob.getBrain(); + WalkTarget walkTarget = brain.getMemory(MemoryModuleType.WALK_TARGET).get(); + @@ -165,7 +165,7 @@ index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..bad8b9cc2f1d8880728bde687d43b1de - brain.setMemory(MemoryModuleType.PATH, path); - } + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + if (this.path != null && !this.path.isProcessed()) return; // wait for processing - if (path != null && this.lastTargetPos != null) { @@ -249,7 +249,7 @@ index 1ab77f3518d1df30f66ae44d7d4fa69e5b32d93a..bad8b9cc2f1d8880728bde687d43b1de private boolean tryComputePath(Mob entity, WalkTarget walkTarget, long time) { BlockPos blockPos = walkTarget.getTarget().currentBlockPosition(); diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java b/src/main/java/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java -index 271efbb027f6f5d69ac5bc5dc51102a1eb00ab31..9ed0b8410382eee3418bf459df41678ee22dad0e 100644 +index 271efbb027f6f5d69ac5bc5dc51102a1eb00ab31..fd3c49a9a8f72d07cc1feeaa4ef7fc1da2da4b9e 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/SetClosestHomeAsWalkTarget.java @@ -20,6 +20,7 @@ import net.minecraft.world.entity.ai.village.poi.PoiTypes; @@ -276,7 +276,7 @@ index 271efbb027f6f5d69ac5bc5dc51102a1eb00ab31..9ed0b8410382eee3418bf459df41678e - long2LongMap.long2LongEntrySet().removeIf((entry) -> { - return entry.getLongValue() < mutableLong.getValue(); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + // await on path async + Path possiblePath = AcquirePoi.findPathToPois(entity, set); + @@ -325,7 +325,7 @@ index 6771f2dc974317b6b152288bf41d1a95bc78a8e4..770b8a6e54104873dfd5fcc2ac800ada Node node = path.getNode(i); this.doorPos = new BlockPos(node.x, node.y + 1, node.z); diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java -index 9d3b32c852d660356e0f16d4cc10072b1c603e64..19574b4062f17d68b7d5283f95d76019bf44736e 100644 +index 9d3b32c852d660356e0f16d4cc10072b1c603e64..63bbd2819fab3beee528321ebf19ef39f38fa8eb 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java @@ -6,17 +6,36 @@ import net.minecraft.world.level.Level; @@ -357,7 +357,7 @@ index 9d3b32c852d660356e0f16d4cc10072b1c603e64..19574b4062f17d68b7d5283f95d76019 this.nodeEvaluator.setCanPassDoors(true); - return new PathFinder(this.nodeEvaluator, range); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, nodeEvaluatorGenerator); + } else { + return new PathFinder(this.nodeEvaluator, range); @@ -367,7 +367,7 @@ index 9d3b32c852d660356e0f16d4cc10072b1c603e64..19574b4062f17d68b7d5283f95d76019 @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java -index e35c38feb62c3345d82636081decc09db9f061ab..31b851392cbb4453fb3c004e59ab1f4d86cd4ce9 100644 +index e35c38feb62c3345d82636081decc09db9f061ab..6bb6e386d66288d3776fde0f76774571d68f1550 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java @@ -10,17 +10,36 @@ import net.minecraft.world.level.pathfinder.FlyNodeEvaluator; @@ -399,7 +399,7 @@ index e35c38feb62c3345d82636081decc09db9f061ab..31b851392cbb4453fb3c004e59ab1f4d this.nodeEvaluator.setCanPassDoors(true); - return new PathFinder(this.nodeEvaluator, range); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, nodeEvaluatorGenerator); + } else { + return new PathFinder(this.nodeEvaluator, range); @@ -417,7 +417,7 @@ index e35c38feb62c3345d82636081decc09db9f061ab..31b851392cbb4453fb3c004e59ab1f4d if (!this.isDone()) { if (this.canUpdatePath()) { diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java -index 47de460ff5435ea6712c800c77093126908d0fce..a17c6f8eca559f5e5a0e394e1f90a93e76f795d9 100644 +index 47de460ff5435ea6712c800c77093126908d0fce..c880ed689b3521925c67817c5fc235810f521c30 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java @@ -15,6 +15,8 @@ import net.minecraft.world.level.pathfinder.Path; @@ -450,7 +450,7 @@ index 47de460ff5435ea6712c800c77093126908d0fce..a17c6f8eca559f5e5a0e394e1f90a93e this.nodeEvaluator.setCanPassDoors(true); - return new PathFinder(this.nodeEvaluator, range); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, nodeEvaluatorGenerator); + } else { + return new PathFinder(this.nodeEvaluator, range); @@ -460,7 +460,7 @@ index 47de460ff5435ea6712c800c77093126908d0fce..a17c6f8eca559f5e5a0e394e1f90a93e @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 43699f94dd0fd97513242fcdbc4ec4d0dc260f8e..b30a3de54e1043a3a60ac8c61ea47940c7285f86 100644 +index 43699f94dd0fd97513242fcdbc4ec4d0dc260f8e..1f93664d80ca0f78a04d844436da5741e01bb32b 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -25,6 +25,8 @@ import net.minecraft.world.level.pathfinder.PathFinder; @@ -492,7 +492,7 @@ index 43699f94dd0fd97513242fcdbc4ec4d0dc260f8e..b30a3de54e1043a3a60ac8c61ea47940 - this.reachRange = distance; - this.resetStuckTimeout(); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + // assign early a target position. most calls will only have 1 position + if (!positions.isEmpty()) this.targetPos = positions.iterator().next(); + @@ -554,7 +554,7 @@ index 43699f94dd0fd97513242fcdbc4ec4d0dc260f8e..b30a3de54e1043a3a60ac8c61ea47940 Vec3 vec3 = new Vec3(((double)node.x + this.mob.getX()) / 2.0D, ((double)node.y + this.mob.getY()) / 2.0D, ((double)node.z + this.mob.getZ()) / 2.0D); return pos.closerToCenterThan(vec3, (double)(this.path.getNodeCount() - this.path.getNextNodeIndex())); diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java -index ee8543afbbd681bf327a353530a7a635aa5ef592..ed3bca7236bf5ec60b9c610936848e2ea742a407 100644 +index ee8543afbbd681bf327a353530a7a635aa5ef592..f3d145fdaaa91ecdef49b596cbe6ee107e9d8c8a 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java @@ -7,6 +7,8 @@ import net.minecraft.world.level.Level; @@ -587,7 +587,7 @@ index ee8543afbbd681bf327a353530a7a635aa5ef592..ed3bca7236bf5ec60b9c610936848e2e this.nodeEvaluator = new SwimNodeEvaluator(this.allowBreaching); - return new PathFinder(this.nodeEvaluator, range); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, nodeEvaluatorGenerator); + } else { + return new PathFinder(this.nodeEvaluator, range); @@ -597,7 +597,7 @@ index ee8543afbbd681bf327a353530a7a635aa5ef592..ed3bca7236bf5ec60b9c610936848e2e @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java -index 8db20db72cd51046213625fac46c35854c59ec5d..4ddee5d12bfb42adc694f46b0ef7f7c3f1ccc9f5 100644 +index 8db20db72cd51046213625fac46c35854c59ec5d..baf8135a592c9667c2886b9b4bcab03c862331c3 100644 --- a/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java +++ b/src/main/java/net/minecraft/world/entity/ai/sensing/NearestBedSensor.java @@ -7,7 +7,7 @@ import it.unimi.dsi.fastutil.longs.Long2LongOpenHashMap; @@ -625,7 +625,7 @@ index 8db20db72cd51046213625fac46c35854c59ec5d..4ddee5d12bfb42adc694f46b0ef7f7c3 - this.batchCache.long2LongEntrySet().removeIf((entry) -> { - return entry.getLongValue() < this.lastUpdate; + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + Path possiblePath = AcquirePoi.findPathToPois(entity, new java.util.HashSet<>(poiposes)); + AsyncPathProcessor.awaitProcessing(entity, possiblePath, path -> { + // read canReach check @@ -682,7 +682,7 @@ index aea0b36a52b2e9794daf8043f6a4279e52fec931..9aa9e64e3e4ea60a8f1d98a0a76c7198 } } 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 bc991589effff1a0c9bd48a16c7d460bed3dfd95..4a7df53ec2f16bf1d9f56c43337a6a9f04a6e7a4 100644 +index bc991589effff1a0c9bd48a16c7d460bed3dfd95..7751d0762b30f3893a6d815099273cb07a93eda4 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 @@ -41,7 +41,6 @@ import net.minecraft.world.entity.VariantHolder; @@ -726,7 +726,7 @@ index bc991589effff1a0c9bd48a16c7d460bed3dfd95..4a7df53ec2f16bf1d9f56c43337a6a9f this.nodeEvaluator.setCanPassDoors(true); - return new PathFinder(this.nodeEvaluator, range); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, nodeEvaluatorGenerator); + } else { + return new PathFinder(this.nodeEvaluator, range); @@ -757,7 +757,7 @@ index 7600e747d91ae888eb801cfafcb09bffb76c8e62..9510fcd722d138337cc40b5ad35a758e if (blockposition != null) { diff --git a/src/main/java/net/minecraft/world/entity/monster/Strider.java b/src/main/java/net/minecraft/world/entity/monster/Strider.java -index 2f49b528601a1feb7246fe7a9b83ce828c2d78fc..eb83775257151450c095f52945a08a4171d67c9c 100644 +index 2f49b528601a1feb7246fe7a9b83ce828c2d78fc..c12aa0e7d3fbb70170bc1a6ff05d8ab866363da5 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Strider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Strider.java @@ -74,6 +74,8 @@ import net.minecraft.world.phys.AABB; @@ -790,7 +790,7 @@ index 2f49b528601a1feb7246fe7a9b83ce828c2d78fc..eb83775257151450c095f52945a08a41 this.nodeEvaluator.setCanPassDoors(true); - return new PathFinder(this.nodeEvaluator, range); + // DivineMC start - Async Pathfinding -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, nodeEvaluatorGenerator); + } else { + return new PathFinder(this.nodeEvaluator, range); @@ -800,7 +800,7 @@ index 2f49b528601a1feb7246fe7a9b83ce828c2d78fc..eb83775257151450c095f52945a08a41 @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 1bcdee570baf1499d660d019cf03b66dd4d05195..819eafb3d9eb6b180947a06b4eee2dc1bd60c79b 100644 +index 1bcdee570baf1499d660d019cf03b66dd4d05195..14de3afe98d425d8becd458bf65f4ec35d67678c 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 @@ -642,12 +642,21 @@ public class Warden extends Monster implements VibrationSystem { @@ -813,7 +813,7 @@ index 1bcdee570baf1499d660d019cf03b66dd4d05195..819eafb3d9eb6b180947a06b4eee2dc1 - return a.distanceToXZ(b); - } - }; -+ if (gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { ++ if (space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) { + return new PathFinder(this.nodeEvaluator, range, GroundPathNavigation.nodeEvaluatorGenerator) { + @Override + protected float distance(Node a, Node b) { @@ -875,7 +875,7 @@ index 3049edb5a8b5967e5242a3896b23665888eb3472..522ec4287b0d57a2034a69528f3ad971 return false; } else if (o.nodes.size() != this.nodes.size()) { diff --git a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java -index f039d6109ee6f55542adc8f30476ba9a9e4974bf..d2dec36a2c21c67b2f4b10d5453866e95ea30a29 100644 +index f039d6109ee6f55542adc8f30476ba9a9e4974bf..6683cf38493c7a48ad3436f28e02692e32f2b308 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/PathFinder.java @@ -1,21 +1,18 @@ @@ -927,7 +927,7 @@ index f039d6109ee6f55542adc8f30476ba9a9e4974bf..d2dec36a2c21c67b2f4b10d5453866e9 - this.openSet.clear(); - this.nodeEvaluator.prepare(world, mob); - Node node = this.nodeEvaluator.getStart(); -+ if (!gq.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) this.openSet.clear(); // DivineMC - Async Pathfinding ++ if (!space.bxteam.divinemc.configuration.DivineConfig.asyncPathfinding) this.openSet.clear(); // DivineMC - Async Pathfinding + // DivineMC start - Async Pathfinding + NodeEvaluator nodeEvaluator = this.nodeEvaluatorGenerator == null + ? this.nodeEvaluator diff --git a/patches/server/0043-Suppress-errors-from-dirty-attributes.patch b/patches/server/0043-Suppress-errors-from-dirty-attributes.patch index f5beb78..eb321a4 100644 --- a/patches/server/0043-Suppress-errors-from-dirty-attributes.patch +++ b/patches/server/0043-Suppress-errors-from-dirty-attributes.patch @@ -30,18 +30,16 @@ index 04b98e23eed926d8473cc2464e04a5b9f18f1140..68463f809aea61d818fc428f1c8b8068 } diff --git a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java -index 8ca0c51b901d2bdae8232e7fb7fdd56ada505bcb..c4b41a6a3fd2c3d7ff942fe8754a7333afb2c8ed 100644 +index 02dfe1750f9955a4b1b945e90491bdee13fe2ef5..c4b41a6a3fd2c3d7ff942fe8754a7333afb2c8ed 100644 --- a/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java +++ b/src/main/java/space/bxteam/divinemc/configuration/DivineWorldConfig.java @@ -115,4 +115,9 @@ public class DivineWorldConfig { } linearCrashOnBrokenSymlink = getBoolean("region-format.linear.crash-on-broken-symlink", linearCrashOnBrokenSymlink); } --} -\ No newline at end of file + + public boolean suppressErrorsFromDirtyAttributes = true; + private void suppressErrorsFromDirtyAttributes() { + suppressErrorsFromDirtyAttributes = getBoolean("suppress-errors-from-dirty-attributes", suppressErrorsFromDirtyAttributes); + } -+} + }