From e0f91f717826e0d626d1363ec79c8c1a7ee19a3d Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Thu, 19 Oct 2023 00:03:42 -0500 Subject: [PATCH] Fix ASWM server patch --- ...01-AdvancedSlimePaper-Server-Changes.patch | 357 ++---------------- ...ation.patch => 0003-UUID-validation.patch} | 0 ...=> 0004-ResourceLocation-validation.patch} | 0 ...used-by-invalid-entities-in-beehive.patch} | 0 ...emoves-useless-spammy-error-logging.patch} | 0 ...own-when-trying-to-remove-minecart-.patch} | 0 ...if-items-are-air-before-calling-set.patch} | 0 ...ooks-causing-log-spam-when-invalid-.patch} | 0 ...te-BlockState-and-SoundEvent-values.patch} | 0 ...d-items-in-HoverEvent-and-ItemFrame.patch} | 0 ... 0012-Change-version-fetcher-to-AMG.patch} | 2 +- ...handling-of-invalid-JSON-components.patch} | 0 ...=> 0014-Block-server-side-chunkbans.patch} | 0 ...-oversized-components-from-updating.patch} | 0 ...Scissors-configuration-file-command.patch} | 0 ...s-with-invalid-namespaces-from-bein.patch} | 0 ...ry-player-data-in-the-nbt-component.patch} | 0 ...tring-tag-visitors-to-1024-elements.patch} | 0 ...lling-potion-effects-and-certain-po.patch} | 0 ...ch => 0021-Fix-negative-death-times.patch} | 0 ...ehicle-collision-checks-to-3-and-di.patch} | 0 ...Add-custom-classes-used-by-Scissors.patch} | 0 ...tags.patch => 0024-Reset-large-tags.patch} | 0 ...-Don-t-log-invalid-teams-to-console.patch} | 0 ...-bounds-HangingEntity-crash-exploit.patch} | 0 ...ch => 0027-Add-MasterBlockFireEvent.patch} | 0 ...> 0028-Add-spectator-teleport-event.patch} | 0 ...29-Prevent-invalid-container-events.patch} | 0 ...unning-commands-in-books-by-default.patch} | 0 ...k-entity-entity-tag-query-positions.patch} | 0 ...ents-on-Signs-bypassing-permissions.patch} | 0 ...-legacy-messages-over-1k-characters.patch} | 0 ...tch => 0034-Prevent-velocity-freeze.patch} | 0 ...n-option-to-disable-chat-signatures.patch} | 0 ...Patch-large-selector-distance-crash.patch} | 0 ...ch-invalid-entity-rotation-log-spam.patch} | 0 ...mit-sculk-catalyst-cursor-positions.patch} | 0 ...patch => 0039-Limit-map-decorations.patch} | 0 ...layer-banning-using-duplicate-UUIDs.patch} | 0 ...on-t-warn-on-duplicate-entity-UUIDs.patch} | 0 ...component-extra-empty-array-exploit.patch} | 0 ...pth-limit-to-Component-deserializer.patch} | 0 ...0044-Implement-command-block-events.patch} | 0 ...tch => 0045-Add-depth-limit-to-SNBT.patch} | 0 ...ch => 0046-Limit-beacon-effectRange.patch} | 0 ...ove-validation-of-ResourceLocations.patch} | 0 ...n-t-log-on-too-many-chained-updates.patch} | 0 ...049-Fix-packet-related-lag-exploits.patch} | 0 ...-Limit-save-data-for-Bees-and-Vexes.patch} | 0 ...tch => 0051-Mute-invalid-attributes.patch} | 0 ...052-Mute-invalid-Enderdragon-phases.patch} | 0 ...l-Components-in-the-Component-codec.patch} | 0 ...dd-length-limit-to-note-block-sound.patch} | 0 53 files changed, 29 insertions(+), 330 deletions(-) rename patches/server/{0002-UUID-validation.patch => 0003-UUID-validation.patch} (100%) rename patches/server/{0003-ResourceLocation-validation.patch => 0004-ResourceLocation-validation.patch} (100%) rename patches/server/{0004-Fixes-log-spam-caused-by-invalid-entities-in-beehive.patch => 0005-Fixes-log-spam-caused-by-invalid-entities-in-beehive.patch} (100%) rename patches/server/{0005-Removes-useless-spammy-error-logging.patch => 0006-Removes-useless-spammy-error-logging.patch} (100%) rename patches/server/{0006-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch => 0007-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch} (100%) rename patches/server/{0007-ItemEntity-Check-if-items-are-air-before-calling-set.patch => 0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch} (100%) rename patches/server/{0008-Fixes-Knowledge-Books-causing-log-spam-when-invalid-.patch => 0009-Fixes-Knowledge-Books-causing-log-spam-when-invalid-.patch} (100%) rename patches/server/{0009-Validate-BlockState-and-SoundEvent-values.patch => 0010-Validate-BlockState-and-SoundEvent-values.patch} (100%) rename patches/server/{0010-Do-not-log-invalid-items-in-HoverEvent-and-ItemFrame.patch => 0011-Do-not-log-invalid-items-in-HoverEvent-and-ItemFrame.patch} (100%) rename patches/server/{0011-Change-version-fetcher-to-AMG.patch => 0012-Change-version-fetcher-to-AMG.patch} (98%) rename patches/server/{0012-Better-handling-of-invalid-JSON-components.patch => 0013-Better-handling-of-invalid-JSON-components.patch} (100%) rename patches/server/{0013-Block-server-side-chunkbans.patch => 0014-Block-server-side-chunkbans.patch} (100%) rename patches/server/{0014-Reject-oversized-components-from-updating.patch => 0015-Reject-oversized-components-from-updating.patch} (100%) rename patches/server/{0015-Add-Scissors-configuration-file-command.patch => 0016-Add-Scissors-configuration-file-command.patch} (100%) rename patches/server/{0016-Prevent-attributes-with-invalid-namespaces-from-bein.patch => 0017-Prevent-attributes-with-invalid-namespaces-from-bein.patch} (100%) rename patches/server/{0017-Don-t-query-player-data-in-the-nbt-component.patch => 0018-Don-t-query-player-data-in-the-nbt-component.patch} (100%) rename patches/server/{0018-Limit-string-tag-visitors-to-1024-elements.patch => 0019-Limit-string-tag-visitors-to-1024-elements.patch} (100%) rename patches/server/{0019-Fixes-creative-killing-potion-effects-and-certain-po.patch => 0020-Fixes-creative-killing-potion-effects-and-certain-po.patch} (100%) rename patches/server/{0020-Fix-negative-death-times.patch => 0021-Fix-negative-death-times.patch} (100%) rename patches/server/{0021-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch => 0022-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch} (100%) rename patches/server/{0022-Add-custom-classes-used-by-Scissors.patch => 0023-Add-custom-classes-used-by-Scissors.patch} (100%) rename patches/server/{0023-Reset-large-tags.patch => 0024-Reset-large-tags.patch} (100%) rename patches/server/{0024-Don-t-log-invalid-teams-to-console.patch => 0025-Don-t-log-invalid-teams-to-console.patch} (100%) rename patches/server/{0025-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch => 0026-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch} (100%) rename patches/server/{0026-Add-MasterBlockFireEvent.patch => 0027-Add-MasterBlockFireEvent.patch} (100%) rename patches/server/{0027-Add-spectator-teleport-event.patch => 0028-Add-spectator-teleport-event.patch} (100%) rename patches/server/{0028-Prevent-invalid-container-events.patch => 0029-Prevent-invalid-container-events.patch} (100%) rename patches/server/{0029-Disable-running-commands-in-books-by-default.patch => 0030-Disable-running-commands-in-books-by-default.patch} (100%) rename patches/server/{0030-Validate-block-entity-entity-tag-query-positions.patch => 0031-Validate-block-entity-entity-tag-query-positions.patch} (100%) rename patches/server/{0031-Fix-ClickEvents-on-Signs-bypassing-permissions.patch => 0032-Fix-ClickEvents-on-Signs-bypassing-permissions.patch} (100%) rename patches/server/{0032-Refuse-to-convert-legacy-messages-over-1k-characters.patch => 0033-Refuse-to-convert-legacy-messages-over-1k-characters.patch} (100%) rename patches/server/{0033-Prevent-velocity-freeze.patch => 0034-Prevent-velocity-freeze.patch} (100%) rename patches/server/{0034-Add-configuration-option-to-disable-chat-signatures.patch => 0035-Add-configuration-option-to-disable-chat-signatures.patch} (100%) rename patches/server/{0035-Patch-large-selector-distance-crash.patch => 0036-Patch-large-selector-distance-crash.patch} (100%) rename patches/server/{0036-Patch-invalid-entity-rotation-log-spam.patch => 0037-Patch-invalid-entity-rotation-log-spam.patch} (100%) rename patches/server/{0037-Limit-sculk-catalyst-cursor-positions.patch => 0038-Limit-sculk-catalyst-cursor-positions.patch} (100%) rename patches/server/{0038-Limit-map-decorations.patch => 0039-Limit-map-decorations.patch} (100%) rename patches/server/{0039-Prevent-player-banning-using-duplicate-UUIDs.patch => 0040-Prevent-player-banning-using-duplicate-UUIDs.patch} (100%) rename patches/server/{0040-Don-t-warn-on-duplicate-entity-UUIDs.patch => 0041-Don-t-warn-on-duplicate-entity-UUIDs.patch} (100%) rename patches/server/{0041-Fix-component-extra-empty-array-exploit.patch => 0042-Fix-component-extra-empty-array-exploit.patch} (100%) rename patches/server/{0042-Add-depth-limit-to-Component-deserializer.patch => 0043-Add-depth-limit-to-Component-deserializer.patch} (100%) rename patches/server/{0043-Implement-command-block-events.patch => 0044-Implement-command-block-events.patch} (100%) rename patches/server/{0044-Add-depth-limit-to-SNBT.patch => 0045-Add-depth-limit-to-SNBT.patch} (100%) rename patches/server/{0045-Limit-beacon-effectRange.patch => 0046-Limit-beacon-effectRange.patch} (100%) rename patches/server/{0046-Improve-validation-of-ResourceLocations.patch => 0047-Improve-validation-of-ResourceLocations.patch} (100%) rename patches/server/{0047-Don-t-log-on-too-many-chained-updates.patch => 0048-Don-t-log-on-too-many-chained-updates.patch} (100%) rename patches/server/{0048-Fix-packet-related-lag-exploits.patch => 0049-Fix-packet-related-lag-exploits.patch} (100%) rename patches/server/{0049-Limit-save-data-for-Bees-and-Vexes.patch => 0050-Limit-save-data-for-Bees-and-Vexes.patch} (100%) rename patches/server/{0050-Mute-invalid-attributes.patch => 0051-Mute-invalid-attributes.patch} (100%) rename patches/server/{0051-Mute-invalid-Enderdragon-phases.patch => 0052-Mute-invalid-Enderdragon-phases.patch} (100%) rename patches/server/{0052-Don-t-return-null-Components-in-the-Component-codec.patch => 0053-Don-t-return-null-Components-in-the-Component-codec.patch} (100%) rename patches/server/{0053-Add-length-limit-to-note-block-sound.patch => 0054-Add-length-limit-to-note-block-sound.patch} (100%) diff --git a/patches/server/0001-AdvancedSlimePaper-Server-Changes.patch b/patches/server/0001-AdvancedSlimePaper-Server-Changes.patch index afb0d1b..6f9df02 100644 --- a/patches/server/0001-AdvancedSlimePaper-Server-Changes.patch +++ b/patches/server/0001-AdvancedSlimePaper-Server-Changes.patch @@ -1,36 +1,9 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Mon, 26 Dec 2022 11:25:35 -0500 +From: Telesphoreo +Date: Thu, 19 Oct 2023 00:00:51 -0500 Subject: [PATCH] AdvancedSlimePaper Server Changes -AdvancedSlimePaper -Copyright (C) 2023 InfernalSuite -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . - -diff --git a/build.gradle.kts b/build.gradle.kts -index fb98936bb8a5488db75d676c5bcb4060597fbbf8..2143180a92ec6d0c0eba5559dd5497291348fdfa 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -13,6 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { - val alsoShade: Configuration by configurations.creating - - dependencies { -+ implementation(project(":aswm-core")) - implementation(project(":paper-api")) - implementation(project(":paper-mojangapi")) - // Paper start diff --git a/src/main/java/com/infernalsuite/aswm/Converter.java b/src/main/java/com/infernalsuite/aswm/Converter.java new file mode 100644 index 0000000000000000000000000000000000000000..7d1753c0b7e89bbf0c245a0231b62773eca2779e @@ -193,7 +166,7 @@ index 0000000000000000000000000000000000000000..61518ab2b68e7a41500f3c8c8a5ec123 \ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/SimpleDataFixerConverter.java b/src/main/java/com/infernalsuite/aswm/SimpleDataFixerConverter.java new file mode 100644 -index 0000000000000000000000000000000000000000..1affe4c94b490a05184deccc9eb80530f67fd5ea +index 0000000000000000000000000000000000000000..7dcfe5e080f567ab7d0cd6d0c47a6aaa4daae55f --- /dev/null +++ b/src/main/java/com/infernalsuite/aswm/SimpleDataFixerConverter.java @@ -0,0 +1,101 @@ @@ -203,13 +176,13 @@ index 0000000000000000000000000000000000000000..1affe4c94b490a05184deccc9eb80530 +import ca.spottedleaf.dataconverter.minecraft.walkers.generic.WalkerUtils; +import ca.spottedleaf.dataconverter.types.nbt.NBTMapType; +import com.flowpowered.nbt.CompoundTag; ++import com.infernalsuite.aswm.api.world.SlimeChunk; ++import com.infernalsuite.aswm.api.world.SlimeChunkSection; ++import com.infernalsuite.aswm.api.world.SlimeWorld; +import com.infernalsuite.aswm.serialization.SlimeWorldReader; +import com.infernalsuite.aswm.skeleton.SkeletonSlimeWorld; +import com.infernalsuite.aswm.skeleton.SlimeChunkSectionSkeleton; +import com.infernalsuite.aswm.skeleton.SlimeChunkSkeleton; -+import com.infernalsuite.aswm.api.world.SlimeChunk; -+import com.infernalsuite.aswm.api.world.SlimeChunkSection; -+import com.infernalsuite.aswm.api.world.SlimeWorld; +import net.minecraft.SharedConstants; + +import java.util.ArrayList; @@ -248,11 +221,11 @@ index 0000000000000000000000000000000000000000..1affe4c94b490a05184deccc9eb80530 + for (int i = 0; i < sections.length; i++) { + SlimeChunkSection dataSection = chunk.getSections()[i]; + -+ com.flowpowered.nbt.CompoundTag blockStateTag = blockStateTag = convertAndBack(dataSection.getBlockStatesTag(), (tag) -> { ++ CompoundTag blockStateTag = blockStateTag = convertAndBack(dataSection.getBlockStatesTag(), (tag) -> { + WalkerUtils.convertList(MCTypeRegistry.BLOCK_STATE, new NBTMapType(tag), "palette", currentVersion, newVersion); + }); + -+ com.flowpowered.nbt.CompoundTag biomeTag = convertAndBack(dataSection.getBiomeTag(), (tag) -> { ++ CompoundTag biomeTag = convertAndBack(dataSection.getBiomeTag(), (tag) -> { + WalkerUtils.convertList(MCTypeRegistry.BIOME, new NBTMapType(tag), "palette", currentVersion, newVersion); + }); + @@ -287,7 +260,7 @@ index 0000000000000000000000000000000000000000..1affe4c94b490a05184deccc9eb80530 + } + + -+ private static com.flowpowered.nbt.CompoundTag convertAndBack(com.flowpowered.nbt.CompoundTag value, Consumer acceptor) { ++ private static CompoundTag convertAndBack(CompoundTag value, Consumer acceptor) { + if (value == null) { + return null; + } @@ -295,16 +268,15 @@ index 0000000000000000000000000000000000000000..1affe4c94b490a05184deccc9eb80530 + net.minecraft.nbt.CompoundTag converted = (net.minecraft.nbt.CompoundTag) Converter.convertTag(value); + acceptor.accept(converted); + -+ return (com.flowpowered.nbt.CompoundTag) Converter.convertTag(value.getName(), converted); ++ return (CompoundTag) Converter.convertTag(value.getName(), converted); + } +} -\ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/SlimeNMSBridgeImpl.java b/src/main/java/com/infernalsuite/aswm/SlimeNMSBridgeImpl.java new file mode 100644 -index 0000000000000000000000000000000000000000..20f16757ba8b8da525ff17d51d4f7eb660c4d22b +index 0000000000000000000000000000000000000000..d014c27b896ea862bb3f7ff7d39df476513bb5f8 --- /dev/null +++ b/src/main/java/com/infernalsuite/aswm/SlimeNMSBridgeImpl.java -@@ -0,0 +1,206 @@ +@@ -0,0 +1,205 @@ +package com.infernalsuite.aswm; + +import com.infernalsuite.aswm.api.SlimeNMSBridge; @@ -315,7 +287,6 @@ index 0000000000000000000000000000000000000000..20f16757ba8b8da525ff17d51d4f7eb6 +import com.infernalsuite.aswm.level.SlimeInMemoryWorld; +import com.infernalsuite.aswm.level.SlimeLevelInstance; +import com.mojang.serialization.Lifecycle; -+import net.kyori.adventure.util.Services; +import net.minecraft.SharedConstants; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; @@ -511,19 +482,17 @@ index 0000000000000000000000000000000000000000..20f16757ba8b8da525ff17d51d4f7eb6 + } + +} -\ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/level/ChunkDataLoadTask.java b/src/main/java/com/infernalsuite/aswm/level/ChunkDataLoadTask.java new file mode 100644 -index 0000000000000000000000000000000000000000..41e652b568598926e838e81fdc338e51f8e97ef8 +index 0000000000000000000000000000000000000000..66093eaed9a45c7b714471915c8bd38f23ac7894 --- /dev/null +++ b/src/main/java/com/infernalsuite/aswm/level/ChunkDataLoadTask.java -@@ -0,0 +1,121 @@ +@@ -0,0 +1,113 @@ +package com.infernalsuite.aswm.level; + +import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor; +import com.infernalsuite.aswm.api.world.SlimeChunk; +import com.mojang.logging.LogUtils; -+import io.papermc.paper.chunk.system.poi.PoiChunk; +import io.papermc.paper.chunk.system.scheduling.ChunkLoadTask; +import io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler; +import io.papermc.paper.chunk.system.scheduling.GenericDataLoadTask; @@ -583,13 +552,6 @@ index 0000000000000000000000000000000000000000..41e652b568598926e838e81fdc338e51 + } + + protected ChunkAccess runOnMain(final SlimeChunk data) { -+ final PoiChunk poiChunk = this.chunkLoadTask.chunkHolder.getPoiChunk(); -+ if (poiChunk == null) { -+ LOGGER.error("Expected poi chunk to be loaded with chunk for task " + this.toString()); -+ } else { -+ poiChunk.load(); -+ } -+ + // have tasks to run (at this point, it's just the POI consistency checking) + try { + // if (data.tasks != null) { @@ -639,7 +601,6 @@ index 0000000000000000000000000000000000000000..41e652b568598926e838e81fdc338e51 + return true; + } +} -\ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/level/CommonLoadTask.java b/src/main/java/com/infernalsuite/aswm/level/CommonLoadTask.java new file mode 100644 index 0000000000000000000000000000000000000000..fc6e46972bcc77134ed718c8c157ec3893d4bcdf @@ -733,7 +694,7 @@ index 0000000000000000000000000000000000000000..c0e47f25e9be33da374dc737c96d8d3c \ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/level/NMSSlimeChunk.java b/src/main/java/com/infernalsuite/aswm/level/NMSSlimeChunk.java new file mode 100644 -index 0000000000000000000000000000000000000000..f1db2fe121bb3aabfad727a8133b645524b8f19a +index 0000000000000000000000000000000000000000..c94ee5460d3859d373ae81e9d3623db071d6c38b --- /dev/null +++ b/src/main/java/com/infernalsuite/aswm/level/NMSSlimeChunk.java @@ -0,0 +1,203 @@ @@ -744,10 +705,10 @@ index 0000000000000000000000000000000000000000..f1db2fe121bb3aabfad727a8133b6455 +import com.flowpowered.nbt.LongArrayTag; +import com.google.common.collect.Lists; +import com.infernalsuite.aswm.Converter; -+import com.infernalsuite.aswm.skeleton.SlimeChunkSectionSkeleton; +import com.infernalsuite.aswm.api.utils.NibbleArray; +import com.infernalsuite.aswm.api.world.SlimeChunk; +import com.infernalsuite.aswm.api.world.SlimeChunkSection; ++import com.infernalsuite.aswm.skeleton.SlimeChunkSectionSkeleton; +import com.mojang.logging.LogUtils; +import com.mojang.serialization.Codec; +import io.papermc.paper.world.ChunkEntitySlices; @@ -940,7 +901,6 @@ index 0000000000000000000000000000000000000000..f1db2fe121bb3aabfad727a8133b6455 + } + +} -\ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/level/NMSSlimeWorld.java b/src/main/java/com/infernalsuite/aswm/level/NMSSlimeWorld.java new file mode 100644 index 0000000000000000000000000000000000000000..9a27369c00345bbb94aa19f77687269dc94c0b0a @@ -1351,24 +1311,24 @@ index 0000000000000000000000000000000000000000..b159fc8751e9840b311cc1eda01e496e \ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/level/SlimeInMemoryWorld.java b/src/main/java/com/infernalsuite/aswm/level/SlimeInMemoryWorld.java new file mode 100644 -index 0000000000000000000000000000000000000000..fd4cfb9cceb4f23265cb3cce7f1f251051bfba92 +index 0000000000000000000000000000000000000000..043de6fba8387ce851d1d54c501cd834a1760c60 --- /dev/null +++ b/src/main/java/com/infernalsuite/aswm/level/SlimeInMemoryWorld.java -@@ -0,0 +1,251 @@ +@@ -0,0 +1,247 @@ +package com.infernalsuite.aswm.level; + +import com.flowpowered.nbt.CompoundTag; +import com.infernalsuite.aswm.ChunkPos; +import com.infernalsuite.aswm.api.exceptions.WorldAlreadyExistsException; +import com.infernalsuite.aswm.api.loaders.SlimeLoader; -+import com.infernalsuite.aswm.serialization.slime.SlimeSerializer; -+import com.infernalsuite.aswm.skeleton.SkeletonCloning; -+import com.infernalsuite.aswm.skeleton.SkeletonSlimeWorld; -+import com.infernalsuite.aswm.skeleton.SlimeChunkSkeleton; +import com.infernalsuite.aswm.api.world.SlimeChunk; +import com.infernalsuite.aswm.api.world.SlimeWorld; +import com.infernalsuite.aswm.api.world.SlimeWorldInstance; +import com.infernalsuite.aswm.api.world.properties.SlimePropertyMap; ++import com.infernalsuite.aswm.serialization.slime.SlimeSerializer; ++import com.infernalsuite.aswm.skeleton.SkeletonCloning; ++import com.infernalsuite.aswm.skeleton.SkeletonSlimeWorld; ++import com.infernalsuite.aswm.skeleton.SlimeChunkSkeleton; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.chunk.LevelChunk; +import net.minecraft.world.level.chunk.UpgradeData; @@ -1377,11 +1337,7 @@ index 0000000000000000000000000000000000000000..fd4cfb9cceb4f23265cb3cce7f1f2510 +import org.bukkit.World; + +import java.io.IOException; -+import java.util.ArrayList; -+import java.util.Collection; -+import java.util.HashMap; -+import java.util.List; -+import java.util.Map; ++import java.util.*; + +/* +The concept of this is a bit flawed, since ideally this should be a 1:1 representation of the MC world. @@ -1654,7 +1610,7 @@ index 0000000000000000000000000000000000000000..4f48b7a1a41aabc78cc9276fbf9f372c \ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/level/SlimeLevelInstance.java b/src/main/java/com/infernalsuite/aswm/level/SlimeLevelInstance.java new file mode 100644 -index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaafcb79e175 +index 0000000000000000000000000000000000000000..10fde8e966dd89b8371c764f0c6fc08a0e28ac44 --- /dev/null +++ b/src/main/java/com/infernalsuite/aswm/level/SlimeLevelInstance.java @@ -0,0 +1,195 @@ @@ -1663,12 +1619,12 @@ index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaaf +import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor; +import com.google.common.util.concurrent.ThreadFactoryBuilder; +import com.infernalsuite.aswm.Converter; -+import com.infernalsuite.aswm.serialization.slime.SlimeSerializer; +import com.infernalsuite.aswm.api.world.SlimeChunk; +import com.infernalsuite.aswm.api.world.SlimeWorld; +import com.infernalsuite.aswm.api.world.SlimeWorldInstance; +import com.infernalsuite.aswm.api.world.properties.SlimeProperties; +import com.infernalsuite.aswm.api.world.properties.SlimePropertyMap; ++import com.infernalsuite.aswm.serialization.slime.SlimeSerializer; +import io.papermc.paper.chunk.system.scheduling.ChunkLoadTask; +import io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler; +import io.papermc.paper.chunk.system.scheduling.GenericDataLoadTask; @@ -1685,6 +1641,7 @@ index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaaf +import net.minecraft.util.datafix.DataFixers; +import net.minecraft.world.Difficulty; +import net.minecraft.world.entity.EntityType; ++import net.minecraft.world.level.ChunkPos; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.chunk.ChunkAccess; +import net.minecraft.world.level.chunk.ChunkGenerator; @@ -1692,7 +1649,6 @@ index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaaf +import net.minecraft.world.level.storage.LevelStorageSource; +import net.minecraft.world.level.storage.PrimaryLevelData; +import net.minecraft.world.level.validation.DirectoryValidator; -+import net.minecraft.world.level.validation.PathAllowList; +import org.apache.commons.io.FileUtils; +import org.bukkit.Bukkit; +import org.bukkit.event.world.WorldSaveEvent; @@ -1745,7 +1701,7 @@ index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaaf + super(slimeBootstrap, MinecraftServer.getServer(), MinecraftServer.getServer().executor, + CUSTOM_LEVEL_STORAGE.createAccess(slimeBootstrap.initial().getName() + UUID.randomUUID(), dimensionKey), + primaryLevelData, worldKey, worldDimension, -+ MinecraftServer.getServer().progressListenerFactory.create(11), false, 0, ++ MinecraftServer.getServer().progressListenerFactory.create(11), false, null, 0, + Collections.emptyList(), true, environment, null, null); + this.slimeInstance = new SlimeInMemoryWorld(slimeBootstrap, this); + @@ -1843,7 +1799,7 @@ index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaaf + .map((tag) -> (net.minecraft.nbt.CompoundTag) Converter.convertTag(tag)) + .collect(Collectors.toList()), this) + .toList() -+ )); ++ ), new ChunkPos(chunkX, chunkZ)); + } + } + @@ -1853,7 +1809,6 @@ index 0000000000000000000000000000000000000000..2d18d76829b6dc590913d974d50dbaaf + // super.unload(chunk); + // } +} -\ No newline at end of file diff --git a/src/main/java/com/infernalsuite/aswm/util/NmsUtil.java b/src/main/java/com/infernalsuite/aswm/util/NmsUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..3500005bb09dc484bc333f1e0799613d097a37d3 @@ -1870,259 +1825,3 @@ index 0000000000000000000000000000000000000000..3500005bb09dc484bc333f1e0799613d + } +} \ No newline at end of file -diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java -index abd0217cf0bff183c8e262edc173a53403797c1a..ab450a0ffbfd914c33323d740b3c382a96cb0e8f 100644 ---- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java -+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java -@@ -165,7 +165,8 @@ public final class ChunkHolderManager { - return this.chunkHolders.size(); - } - -- public void close(final boolean save, final boolean halt) { -+ public void close(boolean save, final boolean halt) { // ASWM -+ if (this.world instanceof com.infernalsuite.aswm.level.SlimeLevelInstance) save = false; // ASWM - TickThread.ensureTickThread("Closing world off-main"); - if (halt) { - LOGGER.info("Waiting 60s for chunk system to halt for world '" + this.world.getWorld().getName() + "'"); -diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java -index e7fb084ddb88ab62f1d493a999cc82b9258d275e..7e5b9c4033e81d5c348ff9eb110b8c9cd1b3aeeb 100644 ---- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java -+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkLoadTask.java -@@ -6,6 +6,7 @@ import ca.spottedleaf.concurrentutil.lock.ReentrantAreaLock; - import ca.spottedleaf.concurrentutil.util.ConcurrentUtil; - import ca.spottedleaf.dataconverter.minecraft.MCDataConverter; - import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; -+import com.infernalsuite.aswm.level.CommonLoadTask; // ASWM - import com.mojang.logging.LogUtils; - import io.papermc.paper.chunk.system.io.RegionFileIOThread; - import io.papermc.paper.chunk.system.poi.PoiChunk; -@@ -32,8 +33,8 @@ public final class ChunkLoadTask extends ChunkProgressionTask { - - private static final Logger LOGGER = LogUtils.getClassLogger(); - -- private final NewChunkHolder chunkHolder; -- private final ChunkDataLoadTask loadTask; -+ public final NewChunkHolder chunkHolder; // ASWM - public -> private -+ private final CommonLoadTask loadTask; // ASWM - - private volatile boolean cancelled; - private NewChunkHolder.GenericDataLoadTaskCallback entityLoadTask; -@@ -45,11 +46,20 @@ public final class ChunkLoadTask extends ChunkProgressionTask { - final NewChunkHolder chunkHolder, final PrioritisedExecutor.Priority priority) { - super(scheduler, world, chunkX, chunkZ); - this.chunkHolder = chunkHolder; -- this.loadTask = new ChunkDataLoadTask(scheduler, world, chunkX, chunkZ, priority); -- this.loadTask.addCallback((final GenericDataLoadTask.TaskResult result) -> { -- ChunkLoadTask.this.loadResult = result; // must be before getAndDecrement -- ChunkLoadTask.this.tryCompleteLoad(); -- }); -+ // ASWM start -+ if (world instanceof com.infernalsuite.aswm.level.SlimeLevelInstance levelInstance) { -+ -+ this.loadTask = levelInstance.getLoadTask(this, scheduler, world, chunkX, chunkZ, priority, result -> { -+ ChunkLoadTask.this.complete(result == null ? null : result.left(), result == null ? null : result.right()); -+ }); -+ } else { -+ ChunkDataLoadTask task = new ChunkDataLoadTask(scheduler, world, chunkX, chunkZ, priority); -+ task.addCallback((final GenericDataLoadTask.TaskResult result) -> { -+ ChunkLoadTask.this.complete(result == null ? null : result.left(), result == null ? null : result.right()); -+ }); -+ this.loadTask = task; -+ } -+ // ASWM end - } - - private void tryCompleteLoad() { -@@ -274,7 +284,7 @@ public final class ChunkLoadTask extends ChunkProgressionTask { - } - } - -- public static final class ChunkDataLoadTask extends CallbackDataLoadTask { -+ public static final class ChunkDataLoadTask extends CallbackDataLoadTask implements CommonLoadTask { // ASWM - protected ChunkDataLoadTask(final ChunkTaskScheduler scheduler, final ServerLevel world, final int chunkX, - final int chunkZ, final PrioritisedExecutor.Priority priority) { - super(scheduler, world, chunkX, chunkZ, RegionFileIOThread.RegionFileType.CHUNK_DATA, priority); -diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -index 51304c5cf4b0ac7646693ef97ef4a3847d3342b5..56280c18be01deabc53932c1580dce7b3d83e06f 100644 ---- a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java -@@ -112,7 +112,10 @@ public final class NewChunkHolder { - } - - if (!transientChunk) { -- if (entityChunk != null) { -+ // ASWM start -+ if (this.world instanceof com.infernalsuite.aswm.level.SlimeLevelInstance world) { -+ world.loadEntities(this.chunkX, this.chunkZ); -+ } else if (entityChunk != null) { // ASWM end - final List entities = EntityStorage.readEntities(this.world, entityChunk); - - this.world.getEntityLookup().addEntityChunkEntities(entities); -diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java -index 7e8dc9e8f381abfdcce2746edc93122d623622d1..148db7995f8bb8bef8f1eeeadc338dffab891d57 100644 ---- a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java -+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java -@@ -36,7 +36,7 @@ public final class ChunkEntitySlices { - protected final EntityCollectionBySection allEntities; - protected final EntityCollectionBySection hardCollidingEntities; - protected final Reference2ObjectOpenHashMap, EntityCollectionBySection> entitiesByClass; -- protected final EntityList entities = new EntityList(); -+ public final EntityList entities = new EntityList(); // ASWM - protected -> public - - public FullChunkStatus status; - -diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 67ee3a4ca8a6cdeb275653d492a1fea8037c51fb..e62ebbb2e69df4a79b87cac542482ca913681b02 100644 ---- a/src/main/java/net/minecraft/server/MinecraftServer.java -+++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -272,7 +272,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop public - private final CustomBossEvents customBossEvents; - private final ServerFunctionManager functionManager; - private final FrameTimer frameTimer; -@@ -461,18 +461,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entityTickingChunks = new io.papermc.paper.util.maplist.IteratorSafeOrderedReferenceSet<>(4096, 0.75f, 4096, 0.15, true); - // Paper end - -- public ServerChunkCache(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory) { -+ // ASWM start -+ public final com.infernalsuite.aswm.level.SlimeBootstrap bootstrap; -+ public ServerChunkCache(com.infernalsuite.aswm.level.SlimeBootstrap bootstrap, ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor workerExecutor, ChunkGenerator chunkGenerator, int viewDistance, int simulationDistance, boolean dsync, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory) { // ASWM -+ this.bootstrap = bootstrap; -+ // ASWM end - this.level = world; - this.mainThreadProcessor = new ServerChunkCache.MainThreadExecutor(world); - this.mainThread = Thread.currentThread(); -diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 18aac3da3c88f33b1a71a5920a8daa27e9723913..20099425babf5325005d11bf25faa783e3bc2715 100644 ---- a/src/main/java/net/minecraft/server/level/ServerLevel.java -+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -643,6 +643,14 @@ public class ServerLevel extends Level implements WorldGenLevel { - - // Add env and gen to constructor, IWorldDataServer -> WorldDataServer - public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { -+ // ASWM start -+ this(null, minecraftserver, executor, convertable_conversionsession, iworlddataserver, resourcekey, worlddimension, worldloadlistener, flag, i, list, flag1, env, gen, biomeProvider); -+ } -+ -+ public com.infernalsuite.aswm.level.SlimeInMemoryWorld slimeInstance; -+ -+ public ServerLevel(com.infernalsuite.aswm.level.SlimeBootstrap bootstrap, MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { -+ // ASWM end - // IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error - // Holder holder = worlddimension.type(); // CraftBukkit - decompile error - -@@ -681,6 +689,10 @@ public class ServerLevel extends Level implements WorldGenLevel { - chunkgenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkgenerator, gen); - } - // CraftBukkit end -+ // ASWM start -+ ChunkGenerator result = this.getGenerator(bootstrap); -+ if (result != null) chunkgenerator = result; -+ // ASWM end - boolean flag2 = minecraftserver.forceSynchronousWrites(); - DataFixer datafixer = minecraftserver.getFixerUpper(); - this.entityStorage = new EntityRegionFileStorage(convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), flag2); // Paper - rewrite chunk system //EntityPersistentStorage entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver); -@@ -692,7 +704,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - //PersistentEntitySectionManager persistententitysectionmanager = this.entityManager; // Paper - rewrite chunk system - - //Objects.requireNonNull(this.entityManager); // Paper - rewrite chunk system -- this.chunkSource = new ServerChunkCache(this, convertable_conversionsession, datafixer, structuretemplatemanager, executor, chunkgenerator, j, k, flag2, worldloadlistener, null, () -> { // Paper - rewrite chunk system -+ this.chunkSource = new ServerChunkCache(bootstrap, this, convertable_conversionsession, datafixer, structuretemplatemanager, executor, chunkgenerator, j, k, flag2, worldloadlistener, null, () -> { // ASWM // Paper - rewrite chunk system - return minecraftserver.overworld().getDataStorage(); - }); - this.chunkSource.getGeneratorState().ensureStructuresGenerated(); -@@ -721,7 +733,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - - this.sleepStatus = new SleepStatus(); - this.gameEventDispatcher = new GameEventDispatcher(this); -- this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomsequences, () -> { -+ this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(getRandomSequences(), () -> { // ASWM - return (RandomSequences) this.getDataStorage().computeIfAbsent((nbttagcompound) -> { - return RandomSequences.load(l, nbttagcompound); - }, () -> { -@@ -748,6 +760,12 @@ public class ServerLevel extends Level implements WorldGenLevel { - this.dragonFight = enderDragonFight; - } - -+ // ASWM start -+ public ChunkGenerator getGenerator(com.infernalsuite.aswm.level.SlimeBootstrap bootstrap) { -+ return null; -+ } -+ // ASWM end -+ - public void setWeatherParameters(int clearDuration, int rainDuration, boolean raining, boolean thundering) { - this.serverLevelData.setClearWeatherTime(clearDuration); - this.serverLevelData.setRainTime(rainDuration); -diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 7f5547dc31aa53b2863f4c09f598fa88e7fe2afd..7b28346e8256013d071b265d9e382738bb4b33c8 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -@@ -30,7 +30,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer - }; - public final IdMap registry; - private final T @org.jetbrains.annotations.Nullable [] presetValues; // Paper - Anti-Xray - Add preset values -- private volatile PalettedContainer.Data data; -+ public volatile PalettedContainer.Data data; // ASWM - private -> public - private final PalettedContainer.Strategy strategy; - // private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer"); // Paper - unused - -@@ -398,7 +398,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer - void accept(T object, int count); - } - -- static record Data(PalettedContainer.Configuration configuration, BitStorage storage, Palette palette) { -+ public static record Data(PalettedContainer.Configuration configuration, BitStorage storage, Palette palette) { // ASWM - private -> public - public void copyFrom(Palette palette, BitStorage storage) { - for(int i = 0; i < storage.getSize(); ++i) { - T object = palette.valueFor(storage.get(i)); -diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 9c6a2884c34a9f6e775103da42480cd6b8c693b3..8f70e99dc48bd8b0e6ebe7a955b8e3e1a826aabf 100644 ---- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -434,7 +434,7 @@ public class ChunkSerializer { - ChunkSerializer.LOGGER.error("Recoverable errors when loading section [" + chunkPos.x + ", " + y + ", " + chunkPos.z + "]: " + message); - } - -- private static Codec>> makeBiomeCodec(Registry biomeRegistry) { -+ public static Codec>> makeBiomeCodec(Registry biomeRegistry) { // ASWM - private -> public - return PalettedContainer.codecRO(biomeRegistry.asHolderIdMap(), biomeRegistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomeRegistry.getHolderOrThrow(Biomes.PLAINS)); - } - -diff --git a/src/main/resources/META-INF/services/com.infernalsuite.aswm.api.SlimeNMSBridge b/src/main/resources/META-INF/services/com.infernalsuite.aswm.api.SlimeNMSBridge -new file mode 100644 -index 0000000000000000000000000000000000000000..916b4d2edba2f2a8a0fc1fdb6ab6a57e2a16f938 ---- /dev/null -+++ b/src/main/resources/META-INF/services/com.infernalsuite.aswm.api.SlimeNMSBridge -@@ -0,0 +1 @@ -+com.infernalsuite.aswm.SlimeNMSBridgeImpl diff --git a/patches/server/0002-UUID-validation.patch b/patches/server/0003-UUID-validation.patch similarity index 100% rename from patches/server/0002-UUID-validation.patch rename to patches/server/0003-UUID-validation.patch diff --git a/patches/server/0003-ResourceLocation-validation.patch b/patches/server/0004-ResourceLocation-validation.patch similarity index 100% rename from patches/server/0003-ResourceLocation-validation.patch rename to patches/server/0004-ResourceLocation-validation.patch diff --git a/patches/server/0004-Fixes-log-spam-caused-by-invalid-entities-in-beehive.patch b/patches/server/0005-Fixes-log-spam-caused-by-invalid-entities-in-beehive.patch similarity index 100% rename from patches/server/0004-Fixes-log-spam-caused-by-invalid-entities-in-beehive.patch rename to patches/server/0005-Fixes-log-spam-caused-by-invalid-entities-in-beehive.patch diff --git a/patches/server/0005-Removes-useless-spammy-error-logging.patch b/patches/server/0006-Removes-useless-spammy-error-logging.patch similarity index 100% rename from patches/server/0005-Removes-useless-spammy-error-logging.patch rename to patches/server/0006-Removes-useless-spammy-error-logging.patch diff --git a/patches/server/0006-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch b/patches/server/0007-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch similarity index 100% rename from patches/server/0006-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch rename to patches/server/0007-Ignore-errors-thrown-when-trying-to-remove-minecart-.patch diff --git a/patches/server/0007-ItemEntity-Check-if-items-are-air-before-calling-set.patch b/patches/server/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch similarity index 100% rename from patches/server/0007-ItemEntity-Check-if-items-are-air-before-calling-set.patch rename to patches/server/0008-ItemEntity-Check-if-items-are-air-before-calling-set.patch diff --git a/patches/server/0008-Fixes-Knowledge-Books-causing-log-spam-when-invalid-.patch b/patches/server/0009-Fixes-Knowledge-Books-causing-log-spam-when-invalid-.patch similarity index 100% rename from patches/server/0008-Fixes-Knowledge-Books-causing-log-spam-when-invalid-.patch rename to patches/server/0009-Fixes-Knowledge-Books-causing-log-spam-when-invalid-.patch diff --git a/patches/server/0009-Validate-BlockState-and-SoundEvent-values.patch b/patches/server/0010-Validate-BlockState-and-SoundEvent-values.patch similarity index 100% rename from patches/server/0009-Validate-BlockState-and-SoundEvent-values.patch rename to patches/server/0010-Validate-BlockState-and-SoundEvent-values.patch diff --git a/patches/server/0010-Do-not-log-invalid-items-in-HoverEvent-and-ItemFrame.patch b/patches/server/0011-Do-not-log-invalid-items-in-HoverEvent-and-ItemFrame.patch similarity index 100% rename from patches/server/0010-Do-not-log-invalid-items-in-HoverEvent-and-ItemFrame.patch rename to patches/server/0011-Do-not-log-invalid-items-in-HoverEvent-and-ItemFrame.patch diff --git a/patches/server/0011-Change-version-fetcher-to-AMG.patch b/patches/server/0012-Change-version-fetcher-to-AMG.patch similarity index 98% rename from patches/server/0011-Change-version-fetcher-to-AMG.patch rename to patches/server/0012-Change-version-fetcher-to-AMG.patch index 291a3c2..63696d5 100644 --- a/patches/server/0011-Change-version-fetcher-to-AMG.patch +++ b/patches/server/0012-Change-version-fetcher-to-AMG.patch @@ -77,7 +77,7 @@ index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..bc5ed619e05f24f3ad50a6a81306d120 switch (distance) { case -1: diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index e7746952417a3ca4ea97103e38568db42039f717..e3c230fd2a054a8cb60328c9309410a2f53dad26 100644 +index e4cacb17f56c618bef19e1165c07aac86af61150..ebec18e919885f9220693a8a419d239e8cddd567 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -300,7 +300,7 @@ public class Main { diff --git a/patches/server/0012-Better-handling-of-invalid-JSON-components.patch b/patches/server/0013-Better-handling-of-invalid-JSON-components.patch similarity index 100% rename from patches/server/0012-Better-handling-of-invalid-JSON-components.patch rename to patches/server/0013-Better-handling-of-invalid-JSON-components.patch diff --git a/patches/server/0013-Block-server-side-chunkbans.patch b/patches/server/0014-Block-server-side-chunkbans.patch similarity index 100% rename from patches/server/0013-Block-server-side-chunkbans.patch rename to patches/server/0014-Block-server-side-chunkbans.patch diff --git a/patches/server/0014-Reject-oversized-components-from-updating.patch b/patches/server/0015-Reject-oversized-components-from-updating.patch similarity index 100% rename from patches/server/0014-Reject-oversized-components-from-updating.patch rename to patches/server/0015-Reject-oversized-components-from-updating.patch diff --git a/patches/server/0015-Add-Scissors-configuration-file-command.patch b/patches/server/0016-Add-Scissors-configuration-file-command.patch similarity index 100% rename from patches/server/0015-Add-Scissors-configuration-file-command.patch rename to patches/server/0016-Add-Scissors-configuration-file-command.patch diff --git a/patches/server/0016-Prevent-attributes-with-invalid-namespaces-from-bein.patch b/patches/server/0017-Prevent-attributes-with-invalid-namespaces-from-bein.patch similarity index 100% rename from patches/server/0016-Prevent-attributes-with-invalid-namespaces-from-bein.patch rename to patches/server/0017-Prevent-attributes-with-invalid-namespaces-from-bein.patch diff --git a/patches/server/0017-Don-t-query-player-data-in-the-nbt-component.patch b/patches/server/0018-Don-t-query-player-data-in-the-nbt-component.patch similarity index 100% rename from patches/server/0017-Don-t-query-player-data-in-the-nbt-component.patch rename to patches/server/0018-Don-t-query-player-data-in-the-nbt-component.patch diff --git a/patches/server/0018-Limit-string-tag-visitors-to-1024-elements.patch b/patches/server/0019-Limit-string-tag-visitors-to-1024-elements.patch similarity index 100% rename from patches/server/0018-Limit-string-tag-visitors-to-1024-elements.patch rename to patches/server/0019-Limit-string-tag-visitors-to-1024-elements.patch diff --git a/patches/server/0019-Fixes-creative-killing-potion-effects-and-certain-po.patch b/patches/server/0020-Fixes-creative-killing-potion-effects-and-certain-po.patch similarity index 100% rename from patches/server/0019-Fixes-creative-killing-potion-effects-and-certain-po.patch rename to patches/server/0020-Fixes-creative-killing-potion-effects-and-certain-po.patch diff --git a/patches/server/0020-Fix-negative-death-times.patch b/patches/server/0021-Fix-negative-death-times.patch similarity index 100% rename from patches/server/0020-Fix-negative-death-times.patch rename to patches/server/0021-Fix-negative-death-times.patch diff --git a/patches/server/0021-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch b/patches/server/0022-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch similarity index 100% rename from patches/server/0021-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch rename to patches/server/0022-Limit-amount-of-vehicle-collision-checks-to-3-and-di.patch diff --git a/patches/server/0022-Add-custom-classes-used-by-Scissors.patch b/patches/server/0023-Add-custom-classes-used-by-Scissors.patch similarity index 100% rename from patches/server/0022-Add-custom-classes-used-by-Scissors.patch rename to patches/server/0023-Add-custom-classes-used-by-Scissors.patch diff --git a/patches/server/0023-Reset-large-tags.patch b/patches/server/0024-Reset-large-tags.patch similarity index 100% rename from patches/server/0023-Reset-large-tags.patch rename to patches/server/0024-Reset-large-tags.patch diff --git a/patches/server/0024-Don-t-log-invalid-teams-to-console.patch b/patches/server/0025-Don-t-log-invalid-teams-to-console.patch similarity index 100% rename from patches/server/0024-Don-t-log-invalid-teams-to-console.patch rename to patches/server/0025-Don-t-log-invalid-teams-to-console.patch diff --git a/patches/server/0025-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch b/patches/server/0026-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch similarity index 100% rename from patches/server/0025-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch rename to patches/server/0026-Fixes-out-of-bounds-HangingEntity-crash-exploit.patch diff --git a/patches/server/0026-Add-MasterBlockFireEvent.patch b/patches/server/0027-Add-MasterBlockFireEvent.patch similarity index 100% rename from patches/server/0026-Add-MasterBlockFireEvent.patch rename to patches/server/0027-Add-MasterBlockFireEvent.patch diff --git a/patches/server/0027-Add-spectator-teleport-event.patch b/patches/server/0028-Add-spectator-teleport-event.patch similarity index 100% rename from patches/server/0027-Add-spectator-teleport-event.patch rename to patches/server/0028-Add-spectator-teleport-event.patch diff --git a/patches/server/0028-Prevent-invalid-container-events.patch b/patches/server/0029-Prevent-invalid-container-events.patch similarity index 100% rename from patches/server/0028-Prevent-invalid-container-events.patch rename to patches/server/0029-Prevent-invalid-container-events.patch diff --git a/patches/server/0029-Disable-running-commands-in-books-by-default.patch b/patches/server/0030-Disable-running-commands-in-books-by-default.patch similarity index 100% rename from patches/server/0029-Disable-running-commands-in-books-by-default.patch rename to patches/server/0030-Disable-running-commands-in-books-by-default.patch diff --git a/patches/server/0030-Validate-block-entity-entity-tag-query-positions.patch b/patches/server/0031-Validate-block-entity-entity-tag-query-positions.patch similarity index 100% rename from patches/server/0030-Validate-block-entity-entity-tag-query-positions.patch rename to patches/server/0031-Validate-block-entity-entity-tag-query-positions.patch diff --git a/patches/server/0031-Fix-ClickEvents-on-Signs-bypassing-permissions.patch b/patches/server/0032-Fix-ClickEvents-on-Signs-bypassing-permissions.patch similarity index 100% rename from patches/server/0031-Fix-ClickEvents-on-Signs-bypassing-permissions.patch rename to patches/server/0032-Fix-ClickEvents-on-Signs-bypassing-permissions.patch diff --git a/patches/server/0032-Refuse-to-convert-legacy-messages-over-1k-characters.patch b/patches/server/0033-Refuse-to-convert-legacy-messages-over-1k-characters.patch similarity index 100% rename from patches/server/0032-Refuse-to-convert-legacy-messages-over-1k-characters.patch rename to patches/server/0033-Refuse-to-convert-legacy-messages-over-1k-characters.patch diff --git a/patches/server/0033-Prevent-velocity-freeze.patch b/patches/server/0034-Prevent-velocity-freeze.patch similarity index 100% rename from patches/server/0033-Prevent-velocity-freeze.patch rename to patches/server/0034-Prevent-velocity-freeze.patch diff --git a/patches/server/0034-Add-configuration-option-to-disable-chat-signatures.patch b/patches/server/0035-Add-configuration-option-to-disable-chat-signatures.patch similarity index 100% rename from patches/server/0034-Add-configuration-option-to-disable-chat-signatures.patch rename to patches/server/0035-Add-configuration-option-to-disable-chat-signatures.patch diff --git a/patches/server/0035-Patch-large-selector-distance-crash.patch b/patches/server/0036-Patch-large-selector-distance-crash.patch similarity index 100% rename from patches/server/0035-Patch-large-selector-distance-crash.patch rename to patches/server/0036-Patch-large-selector-distance-crash.patch diff --git a/patches/server/0036-Patch-invalid-entity-rotation-log-spam.patch b/patches/server/0037-Patch-invalid-entity-rotation-log-spam.patch similarity index 100% rename from patches/server/0036-Patch-invalid-entity-rotation-log-spam.patch rename to patches/server/0037-Patch-invalid-entity-rotation-log-spam.patch diff --git a/patches/server/0037-Limit-sculk-catalyst-cursor-positions.patch b/patches/server/0038-Limit-sculk-catalyst-cursor-positions.patch similarity index 100% rename from patches/server/0037-Limit-sculk-catalyst-cursor-positions.patch rename to patches/server/0038-Limit-sculk-catalyst-cursor-positions.patch diff --git a/patches/server/0038-Limit-map-decorations.patch b/patches/server/0039-Limit-map-decorations.patch similarity index 100% rename from patches/server/0038-Limit-map-decorations.patch rename to patches/server/0039-Limit-map-decorations.patch diff --git a/patches/server/0039-Prevent-player-banning-using-duplicate-UUIDs.patch b/patches/server/0040-Prevent-player-banning-using-duplicate-UUIDs.patch similarity index 100% rename from patches/server/0039-Prevent-player-banning-using-duplicate-UUIDs.patch rename to patches/server/0040-Prevent-player-banning-using-duplicate-UUIDs.patch diff --git a/patches/server/0040-Don-t-warn-on-duplicate-entity-UUIDs.patch b/patches/server/0041-Don-t-warn-on-duplicate-entity-UUIDs.patch similarity index 100% rename from patches/server/0040-Don-t-warn-on-duplicate-entity-UUIDs.patch rename to patches/server/0041-Don-t-warn-on-duplicate-entity-UUIDs.patch diff --git a/patches/server/0041-Fix-component-extra-empty-array-exploit.patch b/patches/server/0042-Fix-component-extra-empty-array-exploit.patch similarity index 100% rename from patches/server/0041-Fix-component-extra-empty-array-exploit.patch rename to patches/server/0042-Fix-component-extra-empty-array-exploit.patch diff --git a/patches/server/0042-Add-depth-limit-to-Component-deserializer.patch b/patches/server/0043-Add-depth-limit-to-Component-deserializer.patch similarity index 100% rename from patches/server/0042-Add-depth-limit-to-Component-deserializer.patch rename to patches/server/0043-Add-depth-limit-to-Component-deserializer.patch diff --git a/patches/server/0043-Implement-command-block-events.patch b/patches/server/0044-Implement-command-block-events.patch similarity index 100% rename from patches/server/0043-Implement-command-block-events.patch rename to patches/server/0044-Implement-command-block-events.patch diff --git a/patches/server/0044-Add-depth-limit-to-SNBT.patch b/patches/server/0045-Add-depth-limit-to-SNBT.patch similarity index 100% rename from patches/server/0044-Add-depth-limit-to-SNBT.patch rename to patches/server/0045-Add-depth-limit-to-SNBT.patch diff --git a/patches/server/0045-Limit-beacon-effectRange.patch b/patches/server/0046-Limit-beacon-effectRange.patch similarity index 100% rename from patches/server/0045-Limit-beacon-effectRange.patch rename to patches/server/0046-Limit-beacon-effectRange.patch diff --git a/patches/server/0046-Improve-validation-of-ResourceLocations.patch b/patches/server/0047-Improve-validation-of-ResourceLocations.patch similarity index 100% rename from patches/server/0046-Improve-validation-of-ResourceLocations.patch rename to patches/server/0047-Improve-validation-of-ResourceLocations.patch diff --git a/patches/server/0047-Don-t-log-on-too-many-chained-updates.patch b/patches/server/0048-Don-t-log-on-too-many-chained-updates.patch similarity index 100% rename from patches/server/0047-Don-t-log-on-too-many-chained-updates.patch rename to patches/server/0048-Don-t-log-on-too-many-chained-updates.patch diff --git a/patches/server/0048-Fix-packet-related-lag-exploits.patch b/patches/server/0049-Fix-packet-related-lag-exploits.patch similarity index 100% rename from patches/server/0048-Fix-packet-related-lag-exploits.patch rename to patches/server/0049-Fix-packet-related-lag-exploits.patch diff --git a/patches/server/0049-Limit-save-data-for-Bees-and-Vexes.patch b/patches/server/0050-Limit-save-data-for-Bees-and-Vexes.patch similarity index 100% rename from patches/server/0049-Limit-save-data-for-Bees-and-Vexes.patch rename to patches/server/0050-Limit-save-data-for-Bees-and-Vexes.patch diff --git a/patches/server/0050-Mute-invalid-attributes.patch b/patches/server/0051-Mute-invalid-attributes.patch similarity index 100% rename from patches/server/0050-Mute-invalid-attributes.patch rename to patches/server/0051-Mute-invalid-attributes.patch diff --git a/patches/server/0051-Mute-invalid-Enderdragon-phases.patch b/patches/server/0052-Mute-invalid-Enderdragon-phases.patch similarity index 100% rename from patches/server/0051-Mute-invalid-Enderdragon-phases.patch rename to patches/server/0052-Mute-invalid-Enderdragon-phases.patch diff --git a/patches/server/0052-Don-t-return-null-Components-in-the-Component-codec.patch b/patches/server/0053-Don-t-return-null-Components-in-the-Component-codec.patch similarity index 100% rename from patches/server/0052-Don-t-return-null-Components-in-the-Component-codec.patch rename to patches/server/0053-Don-t-return-null-Components-in-the-Component-codec.patch diff --git a/patches/server/0053-Add-length-limit-to-note-block-sound.patch b/patches/server/0054-Add-length-limit-to-note-block-sound.patch similarity index 100% rename from patches/server/0053-Add-length-limit-to-note-block-sound.patch rename to patches/server/0054-Add-length-limit-to-note-block-sound.patch