diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index 5b6f7d5ae6..fb2a4f4ef6 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -28,7 +28,7 @@ index 3df8c60ab5cd1454660980883f80668d535b742b..37c3a00659ce21623be07317f4f6a45b +/.factorypath diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..6aed6ea708639e43aea6ed467792a55b747fdad7 +index 0000000000000000000000000000000000000000..e090175d2fbe8eba664500feafc29c0567bb0c87 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,137 @@ @@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..6aed6ea708639e43aea6ed467792a55b + } + implementation("org.ow2.asm:asm:9.4") + implementation("commons-lang:commons-lang:2.6") -+ runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") ++ runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") + runtimeOnly("com.mysql:mysql-connector-j:8.0.32") + + runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5") diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch index 4e77d51cde..8dfb9058b1 100644 --- a/patches/server/0003-Build-system-changes.patch +++ b/patches/server/0003-Build-system-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes diff --git a/build.gradle.kts b/build.gradle.kts -index 6aed6ea708639e43aea6ed467792a55b747fdad7..e9c8ba234bdf28a6f8709b4966367d92a4ac9037 100644 +index e090175d2fbe8eba664500feafc29c0567bb0c87..d77f15c58f41f1e00c75e0a022919bb7dacc9926 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,10 +9,9 @@ plugins { @@ -19,7 +19,7 @@ index 6aed6ea708639e43aea6ed467792a55b747fdad7..e9c8ba234bdf28a6f8709b4966367d92 implementation("org.ow2.asm:asm:9.4") + implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation implementation("commons-lang:commons-lang:2.6") - runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") + runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") runtimeOnly("com.mysql:mysql-connector-j:8.0.32") @@ -23,6 +22,8 @@ dependencies { diff --git a/patches/server/0004-Test-changes.patch b/patches/server/0004-Test-changes.patch index 4311cd9cee..cd40fef9e9 100644 --- a/patches/server/0004-Test-changes.patch +++ b/patches/server/0004-Test-changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Test changes diff --git a/build.gradle.kts b/build.gradle.kts -index e9c8ba234bdf28a6f8709b4966367d92a4ac9037..eb5464230b52072eaa7a0e1e47c57a673bab6f53 100644 +index d77f15c58f41f1e00c75e0a022919bb7dacc9926..0d04c3af92f7d4e63b1178247e493174cedd9178 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,7 @@ dependencies { @@ -14,7 +14,7 @@ index e9c8ba234bdf28a6f8709b4966367d92a4ac9037..eb5464230b52072eaa7a0e1e47c57a67 implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation + testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito implementation("commons-lang:commons-lang:2.6") - runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") + runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") runtimeOnly("com.mysql:mysql-connector-j:8.0.32") diff --git a/src/test/java/io/papermc/paper/testing/DummyServer.java b/src/test/java/io/papermc/paper/testing/DummyServer.java new file mode 100644 diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 5034fb7e05..de50b64e6c 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -14,7 +14,7 @@ public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/Str public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES diff --git a/build.gradle.kts b/build.gradle.kts -index eb5464230b52072eaa7a0e1e47c57a673bab6f53..ae5c87ed6bde0ef4ad1d5f8164b371d8dd517c67 100644 +index 0d04c3af92f7d4e63b1178247e493174cedd9178..1c183e9083a5ce2a2995ae45864c564b7cde3f53 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,7 @@ dependencies { @@ -23,7 +23,7 @@ index eb5464230b52072eaa7a0e1e47c57a673bab6f53..ae5c87ed6bde0ef4ad1d5f8164b371d8 testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito + implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files implementation("commons-lang:commons-lang:2.6") - runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") + runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") runtimeOnly("com.mysql:mysql-connector-j:8.0.32") diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java new file mode 100644 diff --git a/patches/server/0015-Rewrite-dataconverter-system.patch b/patches/server/0015-Rewrite-dataconverter-system.patch index 005f8356e8..5da52c7dea 100644 --- a/patches/server/0015-Rewrite-dataconverter-system.patch +++ b/patches/server/0015-Rewrite-dataconverter-system.patch @@ -196,10 +196,10 @@ index 0000000000000000000000000000000000000000..dde9d36bf6212196caa18f3c9c535aec +} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java new file mode 100644 -index 0000000000000000000000000000000000000000..5ec18e5890541a9570cd08059ef3d8ec9a1aa6f9 +index 0000000000000000000000000000000000000000..23377022e21db0fcd281652d8dea255e836e79e6 --- /dev/null +++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersionRegistry.java -@@ -0,0 +1,366 @@ +@@ -0,0 +1,370 @@ +package ca.spottedleaf.dataconverter.minecraft; + +import ca.spottedleaf.dataconverter.converters.DataConverter; @@ -403,9 +403,13 @@ index 0000000000000000000000000000000000000000..5ec18e5890541a9570cd08059ef3d8ec + 3097, + 3108, + 3201, ++ 3203, ++ 3204, + 3209, -+ 3214 -+ // All up to 1.19.3-rc1 ++ 3214, ++ 3319, ++ 3322 ++ // All up to 1.19.4-pre1 + }; + Arrays.sort(converterVersions); + @@ -568,10 +572,10 @@ index 0000000000000000000000000000000000000000..5ec18e5890541a9570cd08059ef3d8ec +} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java new file mode 100644 -index 0000000000000000000000000000000000000000..40e71025a76623326ac1b9beb93b435624b2f03b +index 0000000000000000000000000000000000000000..fea3897437e6da9dfa0bb714c29d9f7002b92cd6 --- /dev/null +++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/MCVersions.java -@@ -0,0 +1,443 @@ +@@ -0,0 +1,450 @@ +package ca.spottedleaf.dataconverter.minecraft; + +@SuppressWarnings("unused") @@ -1013,6 +1017,13 @@ index 0000000000000000000000000000000000000000..40e71025a76623326ac1b9beb93b4356 + public static final int V1_19_3_PRE2 = 3212; + public static final int V1_19_3_PRE3 = 3213; + public static final int V1_19_3_RC1 = 3215; ++ public static final int V1_19_3 = 3218; ++ public static final int V23W03A = 3320; ++ public static final int V23W04A = 3321; ++ public static final int V23W05A = 3323; ++ public static final int V23W06A = 3326; ++ public static final int V23W07A = 3329; ++ public static final int V1_19_4_PRE1 = 3330; + +} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/advancements/ConverterAbstractAdvancementsRename.java @@ -6580,10 +6591,10 @@ index 0000000000000000000000000000000000000000..76a6e3efa5c69150e8f5e0063cb6357b +} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java new file mode 100644 -index 0000000000000000000000000000000000000000..d4be142e862a8f114e9cca6bd64b7be205e2b0b1 +index 0000000000000000000000000000000000000000..ef056d156e21a403136bae49597fb86a978c29c5 --- /dev/null +++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/datatypes/MCTypeRegistry.java -@@ -0,0 +1,242 @@ +@@ -0,0 +1,248 @@ +package ca.spottedleaf.dataconverter.minecraft.datatypes; + +import ca.spottedleaf.dataconverter.minecraft.versions.*; @@ -6818,10 +6829,16 @@ index 0000000000000000000000000000000000000000..d4be142e862a8f114e9cca6bd64b7be2 + V3108.register(); + V3201.register(); + // V3202 registers a simple tile entity -+ // V3203 registers a simple entity -+ // V3204 registers a simple tile entity ++ V3203.register(); ++ V3204.register(); + V3209.register(); + V3214.register(); ++ V3319.register(); ++ V3322.register(); ++ V3325.register(); ++ V3326.register(); ++ V3327.register(); ++ V3328.register(); + } + + private MCTypeRegistry() {} @@ -17739,6 +17756,50 @@ index 0000000000000000000000000000000000000000..24f661419cd08caa4f6d8b3ea66f0d48 + }); + } +} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3203.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3203.java +new file mode 100644 +index 0000000000000000000000000000000000000000..84572b5fb3930e005acb4ea3bce0441267247a40 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3203.java +@@ -0,0 +1,18 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; ++ ++public final class V3203 { ++ ++ private static final int VERSION = MCVersions.V1_19_2 + 83; ++ ++ private static void registerMob(final String id) { ++ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerItemLists("ArmorItems", "HandItems")); ++ } ++ ++ public static void register() { ++ registerMob("minecraft:camel"); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3204.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3204.java +new file mode 100644 +index 0000000000000000000000000000000000000000..dabaf437021ce7309ca005c21afc82d88d6b04c6 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3204.java +@@ -0,0 +1,14 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; ++ ++public final class V3204 { ++ ++ private static final int VERSION = MCVersions.V1_19_2 + 84; ++ ++ public static void register() { ++ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:chiseled_bookshelf", new DataWalkerItemLists("Items")); ++ } ++} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3209.java new file mode 100644 index 0000000000000000000000000000000000000000..f3a109ff01a96a750967e8becdc2a3e20b71b6dd @@ -17795,6 +17856,204 @@ index 0000000000000000000000000000000000000000..b01ae34d2e238f217eb8de8b2d3502e9 + }); + } +} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3319.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3319.java +new file mode 100644 +index 0000000000000000000000000000000000000000..7bda48947850559e5ccc92ea504a64996005f7d6 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3319.java +@@ -0,0 +1,21 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.converters.DataConverter; ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.types.MapType; ++ ++public final class V3319 { ++ ++ private static final int VERSION = MCVersions.V1_19_3 + 101; ++ ++ public static void register() { ++ MCTypeRegistry.OPTIONS.addStructureConverter(new DataConverter<>(VERSION) { ++ @Override ++ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { ++ data.setBoolean("onboardAccessibility", false); ++ return null; ++ } ++ }); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3322.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3322.java +new file mode 100644 +index 0000000000000000000000000000000000000000..b804325074c62744fd6d23d018a8bd6da9855951 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3322.java +@@ -0,0 +1,76 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.converters.DataConverter; ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.types.MapType; ++import java.util.HashSet; ++import java.util.Set; ++ ++public final class V3322 { ++ ++ private static final int VERSION = MCVersions.V23W04A + 1; ++ ++ private static final Set EFFECT_ITEM_TYPES = new HashSet<>( ++ Set.of( ++ "minecraft:potion", ++ "minecraft:splash_potion", ++ "minecraft:lingering_potion", ++ "minecraft:tipped_arrow" ++ ) ++ ); ++ ++ private static void updateEffectList(final MapType root, final String path) { ++ if (root == null) { ++ return; ++ } ++ ++ final MapType data = root.getMap(path); ++ ++ if (data == null) { ++ return; ++ } ++ ++ final MapType factorData = data.getMap("FactorCalculationData"); ++ if (factorData == null) { ++ return; ++ } ++ ++ final int timestamp = factorData.getInt("effect_changed_timestamp", -1); ++ factorData.remove("effect_changed_timestamp"); ++ ++ final int duration = data.getInt("Duration", -1); ++ ++ final int ticksActive = timestamp - duration; ++ factorData.setInt("ticks_active", ticksActive); ++ } ++ ++ public static void register() { ++ final DataConverter, MapType> entityEffectFix = new DataConverter<>(VERSION) { ++ @Override ++ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { ++ updateEffectList(data, "Effects"); ++ updateEffectList(data, "ActiveEffects"); ++ updateEffectList(data, "CustomPotionEffects"); ++ return null; ++ } ++ }; ++ ++ MCTypeRegistry.PLAYER.addStructureConverter(entityEffectFix); ++ MCTypeRegistry.ENTITY.addStructureConverter(entityEffectFix); ++ ++ MCTypeRegistry.ITEM_STACK.addStructureConverter(new DataConverter<>(VERSION) { ++ @Override ++ public MapType convert(final MapType data, final long sourceVersion, final long toVersion) { ++ final String id = data.getString("id"); ++ if (!EFFECT_ITEM_TYPES.contains(id)) { ++ return null; ++ } ++ ++ updateEffectList(data.getMap("tag"), "CustomPotionEffects"); ++ ++ return null; ++ } ++ }); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3325.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3325.java +new file mode 100644 +index 0000000000000000000000000000000000000000..4d451d496232a8f15f8daf3a2e56989155ff36a5 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3325.java +@@ -0,0 +1,17 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.minecraft.walkers.generic.DataWalkerTypePaths; ++import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; ++ ++public final class V3325 { ++ ++ private static final int VERSION = MCVersions.V23W05A + 2; ++ ++ public static void register() { ++ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:item_display", new DataWalkerItems("item")); ++ MCTypeRegistry.ENTITY.addWalker(VERSION, "minecraft:block_display", new DataWalkerTypePaths<>(MCTypeRegistry.BLOCK_STATE, "block_state")); ++ // text_display is a simple entity ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3326.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3326.java +new file mode 100644 +index 0000000000000000000000000000000000000000..e9decfa3a1f819354d3b3e6a1cb09b913609fe4d +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3326.java +@@ -0,0 +1,18 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; ++ ++public final class V3326 { ++ ++ private static final int VERSION = MCVersions.V23W06A; ++ ++ private static void registerMob(final String id) { ++ MCTypeRegistry.ENTITY.addWalker(VERSION, id, new DataWalkerItemLists("ArmorItems", "HandItems")); ++ } ++ ++ public static void register() { ++ registerMob("minecraft:sniffer"); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3327.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3327.java +new file mode 100644 +index 0000000000000000000000000000000000000000..40b8bf5583f130472bb61303a92783f9e5365253 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3327.java +@@ -0,0 +1,16 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItemLists; ++import ca.spottedleaf.dataconverter.minecraft.walkers.itemstack.DataWalkerItems; ++ ++public final class V3327 { ++ ++ private static final int VERSION = MCVersions.V23W06A + 1; ++ ++ public static void register() { ++ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:decorated_pot", new DataWalkerItemLists("shards")); ++ MCTypeRegistry.TILE_ENTITY.addWalker(VERSION, "minecraft:suspicious_sand", new DataWalkerItems("item")); ++ } ++} +diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3328.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3328.java +new file mode 100644 +index 0000000000000000000000000000000000000000..69674278a343ba44b55656b7105e9b7a731c6bc4 +--- /dev/null ++++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3328.java +@@ -0,0 +1,14 @@ ++package ca.spottedleaf.dataconverter.minecraft.versions; ++ ++import ca.spottedleaf.dataconverter.minecraft.MCVersions; ++import ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry; ++ ++public final class V3328 { ++ ++ private static final int VERSION = MCVersions.V23W06A + 1; ++ ++ public static void register() { ++ // registers simple entity "minecraft:interaction" ++ } ++ ++} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V501.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V501.java new file mode 100644 index 0000000000000000000000000000000000000000..6ab2bf99d72983fc2742a1f6f2f7fa671611526d @@ -18125,10 +18384,10 @@ index 0000000000000000000000000000000000000000..88d9c0fcd88ccfd6d6b46ae050914079 +} diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V704.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V704.java new file mode 100644 -index 0000000000000000000000000000000000000000..1b7e01593952390fcbe86e672050a4c37a73e44e +index 0000000000000000000000000000000000000000..2986cc9ae9d62902a15ce26d89c4b6fd807359eb --- /dev/null +++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V704.java -@@ -0,0 +1,383 @@ +@@ -0,0 +1,387 @@ +package ca.spottedleaf.dataconverter.minecraft.versions; + +import ca.spottedleaf.dataconverter.converters.DataConverter; @@ -18308,6 +18567,10 @@ index 0000000000000000000000000000000000000000..1b7e01593952390fcbe86e672050a4c3 + ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:crimson_hanging_sign", "minecraft:sign"); + ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:warped_hanging_sign", "minecraft:sign"); + ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:piglin_head", "minecraft:skull"); ++ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:suspicious_sand", "minecraft:suspicious_sand"); ++ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:decorated_pot", "minecraft:decorated_pot"); ++ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cherry_sign", "minecraft:sign"); ++ ITEM_ID_TO_TILE_ENTITY_ID.put("minecraft:cherry_hanging_sign", "minecraft:sign"); + } + + // This class is responsible for also integrity checking the item id to tile id map here, we just use the item registry to figure it out diff --git a/patches/unapplied/server/0034-Prevent-tile-entity-and-entity-crashes.patch b/patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch similarity index 92% rename from patches/unapplied/server/0034-Prevent-tile-entity-and-entity-crashes.patch rename to patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch index d14f470cae..13dc026c06 100644 --- a/patches/unapplied/server/0034-Prevent-tile-entity-and-entity-crashes.patch +++ b/patches/server/0034-Prevent-tile-entity-and-entity-crashes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity and entity crashes diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4b2aadae3a7595a5aee2bc71216adc34fa0f2cf9..e082e4a8c8fbce341bcf00115d1579b4bed4b2a4 100644 +index 0ce746ac2f448191854f6faa4e1876d869d8d38d..537ce62ba966cc5765b9e7e48e1ba043fa1a6df9 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -729,11 +729,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -735,11 +735,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); } catch (Throwable throwable) { @@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309 } } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 8c2b562e46a35369389da453012b7af570145380..f21ae1ae8af79c1c0c6f2feaa933638add0aa065 100644 +index b696638d63998c6dde6df700fd5c9244ffedb505..f30a5bd3c954afa063bf85d9d91340bd017cf896 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1184,11 +1184,11 @@ public class LevelChunk extends ChunkAccess { +@@ -1196,11 +1196,11 @@ public class LevelChunk extends ChunkAccess { gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/unapplied/server/0035-Configurable-top-of-nether-void-damage.patch b/patches/server/0035-Configurable-top-of-nether-void-damage.patch similarity index 95% rename from patches/unapplied/server/0035-Configurable-top-of-nether-void-damage.patch rename to patches/server/0035-Configurable-top-of-nether-void-damage.patch index c1b83958a8..e3f3ac2e24 100644 --- a/patches/unapplied/server/0035-Configurable-top-of-nether-void-damage.patch +++ b/patches/server/0035-Configurable-top-of-nether-void-damage.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable top of nether void damage Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5cf04b209ae3fa6c52ad45e726343418d0de311f..128dd4749590905fdfa85907d33adc4e4dbe6c33 100644 +index 3cc8426283f68db0a4cbda6934aa6bfde7663e42..28704015f17da94d8cb063af70bf4aca83d6eed7 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -705,7 +705,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -708,7 +708,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void checkOutOfWorld() { diff --git a/patches/unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch similarity index 92% rename from patches/unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch rename to patches/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch index 06f27ae774..0bdc8c4d4c 100644 --- a/patches/unapplied/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch +++ b/patches/server/0036-Check-online-mode-before-converting-and-renaming-pla.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Check online mode before converting and renaming player data diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index bf4c895794c2bc2ad65faa128c6fa92cb0656841..6909b6be840e8d4feadcc8b0c5a44fc1b9c81a54 100644 +index e0bb30446757045e89b227ff2f0136b371ca64cd..9d25ab52fac9e22d74f874491c7efbcaafa2ffc6 100644 --- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java @@ -56,7 +56,7 @@ public class PlayerDataStorage { diff --git a/patches/unapplied/server/0037-Always-tick-falling-blocks.patch b/patches/server/0037-Always-tick-falling-blocks.patch similarity index 100% rename from patches/unapplied/server/0037-Always-tick-falling-blocks.patch rename to patches/server/0037-Always-tick-falling-blocks.patch diff --git a/patches/unapplied/server/0038-Configurable-end-credits.patch b/patches/server/0038-Configurable-end-credits.patch similarity index 85% rename from patches/unapplied/server/0038-Configurable-end-credits.patch rename to patches/server/0038-Configurable-end-credits.patch index 173fd26d6e..78011802b3 100644 --- a/patches/unapplied/server/0038-Configurable-end-credits.patch +++ b/patches/server/0038-Configurable-end-credits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 650d28ce34239d3ae9caa3852e1bac518790fd83..ecb57a664da6be49611b95bf6bde3d9c3f893e82 100644 +index 531d0b0dcd499adf0d973bf336272aa1966069f3..dac816f64a60988291cba8f1a88fd6e0cd5ea1a7 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1011,6 +1011,7 @@ public class ServerPlayer extends Player { +@@ -1022,6 +1022,7 @@ public class ServerPlayer extends Player { this.unRide(); this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); if (!this.wonGame) { diff --git a/patches/unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch similarity index 92% rename from patches/unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch rename to patches/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch index bba5b9b5c4..eeb8a45109 100644 --- a/patches/unapplied/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/patches/server/0039-Fix-lag-from-explosions-processing-dead-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 5ab38db6305d885ab61ee2c25ccb5ee77bb31370..c5544f952be057bae9407725d885798f461081ea 100644 +index a1ef2b5bc6c93b6117fba4c5664cff8131f0df2e..594ac935ae8f77fc16be90ac178581cbdfc65eb7 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -202,7 +202,7 @@ public class Explosion { diff --git a/patches/unapplied/server/0040-Optimize-explosions.patch b/patches/server/0040-Optimize-explosions.patch similarity index 92% rename from patches/unapplied/server/0040-Optimize-explosions.patch rename to patches/server/0040-Optimize-explosions.patch index 7927aa4c7c..96bfdf7965 100644 --- a/patches/unapplied/server/0040-Optimize-explosions.patch +++ b/patches/server/0040-Optimize-explosions.patch @@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving an entity's exposure during an explosion. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ac81428f19e2d445f315000d34173c2d650a9aeb..28d58f402f15ee37cc1bfa3114839db281fc5f57 100644 +index 19d7a4da730cf260407d6216b8dbba958ec8f84c..efa4db568cf5189a3a83beb137748f57b34ca6e4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1396,6 +1396,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements diff --git a/patches/unapplied/server/0052-Ensure-commands-are-not-ran-async.patch b/patches/server/0052-Ensure-commands-are-not-ran-async.patch similarity index 93% rename from patches/unapplied/server/0052-Ensure-commands-are-not-ran-async.patch rename to patches/server/0052-Ensure-commands-are-not-ran-async.patch index 91ef061119..81a067316f 100644 --- a/patches/unapplied/server/0052-Ensure-commands-are-not-ran-async.patch +++ b/patches/server/0052-Ensure-commands-are-not-ran-async.patch @@ -21,10 +21,10 @@ character. Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fe315458cead06c3f01473e84b050dadb5ad2726..301d90618f51b90a4a7b0158deef7373fba9cca8 100644 +index 504f3ddca160797a13a39bc813eb12322359ce50..30a6be5487e0bff49d134c5dcae520071763d2ac 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2040,7 +2040,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return true; } @@ -33,7 +33,7 @@ index fe315458cead06c3f01473e84b050dadb5ad2726..301d90618f51b90a4a7b0158deef7373 for (int i = 0; i < message.length(); ++i) { if (!SharedConstants.isAllowedChatCharacter(message.charAt(i))) { return true; -@@ -2057,7 +2057,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2051,7 +2051,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } OutgoingChatMessage outgoing = OutgoingChatMessage.create(original); @@ -42,7 +42,7 @@ index fe315458cead06c3f01473e84b050dadb5ad2726..301d90618f51b90a4a7b0158deef7373 this.handleCommand(s); } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Do nothing, this is coming from a plugin -@@ -2147,7 +2147,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2141,7 +2141,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -74,10 +74,10 @@ index fe315458cead06c3f01473e84b050dadb5ad2726..301d90618f51b90a4a7b0158deef7373 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index babde3ac7af9b5659bcc7e0298d1d77e7b2d60e2..369657f5c54dae7b03b09aec1c672dc3f2cba090 100644 +index 07536b696f734fb9e8d0abe1f414ae536610f9ce..a8a9e109b11d124a2018857d0d13c1aacabfa37a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -857,6 +857,28 @@ public final class CraftServer implements Server { +@@ -852,6 +852,28 @@ public final class CraftServer implements Server { Validate.notNull(commandLine, "CommandLine cannot be null"); org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot @@ -107,10 +107,10 @@ index babde3ac7af9b5659bcc7e0298d1d77e7b2d60e2..369657f5c54dae7b03b09aec1c672dc3 return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 31172053e26a8df53d0987e816b3e03a560332e6..59e0a9b6f07342120ee5ca00434905b26faf04ca 100644 +index 10572393e1c45ed277f56e3f8978f73a02eed4c4..c0e3ac7448f50d861914c18a44537882f24709dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -504,7 +504,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -505,7 +505,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void chat(String msg) { if (this.getHandle().connection == null) return; diff --git a/patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 95% rename from patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch rename to patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch index 5551499519..49624760b3 100644 --- a/patches/unapplied/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/patches/server/0053-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -5,7 +5,7 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 64c4b88f0a64436c126cf32d6e289b3876af8dfb..85abd62434cbe3beb63f61262504372b971d9684 100644 +index ca1d97d6eeea2b0fd2a9b90624ca083026f549de..02aca470c3b41114204da54e2365ee29adad7554 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java @@ -318,7 +318,7 @@ public class Slime extends Mob implements Enemy { diff --git a/patches/unapplied/server/0054-Expose-server-CommandMap.patch b/patches/server/0054-Expose-server-CommandMap.patch similarity index 78% rename from patches/unapplied/server/0054-Expose-server-CommandMap.patch rename to patches/server/0054-Expose-server-CommandMap.patch index 01e0d1eedb..78c730394a 100644 --- a/patches/unapplied/server/0054-Expose-server-CommandMap.patch +++ b/patches/server/0054-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 369657f5c54dae7b03b09aec1c672dc3f2cba090..5d2ac8720d38b9c8485a3c3da906b0124bb99a03 100644 +index a8a9e109b11d124a2018857d0d13c1aacabfa37a..3a62e416e5d67bff401d5d8fd7e794c213997ae4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1992,6 +1992,7 @@ public final class CraftServer implements Server { +@@ -1991,6 +1991,7 @@ public final class CraftServer implements Server { return this.helpMap; } diff --git a/patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch b/patches/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 93% rename from patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to patches/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch index 72602b87ec..59b0315e79 100644 --- a/patches/unapplied/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/patches/server/0055-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 489153b3d22b37f01a027b0effc091d4715e7f7b..c2407224e8bc5e872e153de14090d60e66bb07bc 100644 +index f6b795ad57aec40231e262549839fa049458c634..1f67ac4484e3ee2e0a25030e0080a671f34e1a58 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -102,7 +102,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch b/patches/server/0056-Player-Tab-List-and-Title-APIs.patch similarity index 96% rename from patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch rename to patches/server/0056-Player-Tab-List-and-Title-APIs.patch index a964f4dfaf..d3c8666472 100644 --- a/patches/unapplied/server/0056-Player-Tab-List-and-Title-APIs.patch +++ b/patches/server/0056-Player-Tab-List-and-Title-APIs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index e5ef4acbc74f3ef50ed8e162d3b2a7ae881a4b7a..76914b08c17a62a117319d458a6693070fc46348 100644 +index 9020bc6d9ff6bc0c9b3f00470813f3258554cf45..c2f56f4628e42c130e4c55030432cb43aa0d8458 100644 --- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java +++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -@@ -501,6 +501,11 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -548,6 +548,11 @@ public class FriendlyByteBuf extends ByteBuf { public FriendlyByteBuf writeComponent(final net.kyori.adventure.text.Component component) { return this.writeUtf(PaperAdventure.asJsonString(component, this.adventure$locale), 262144); } @@ -63,7 +63,7 @@ index bd808eb312ade7122973a47f4b96505829511da5..bf0f9cab7c66c089f35b851e799ba4a4 // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 59e0a9b6f07342120ee5ca00434905b26faf04ca..0a92f895922f5eacb87fc6cf4cd9e3783703cdf9 100644 +index c0e3ac7448f50d861914c18a44537882f24709dd..ebbf77b1620a08ecee8917cd6a8f6beee69a645a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ @@ -73,7 +73,7 @@ index 59e0a9b6f07342120ee5ca00434905b26faf04ca..0a92f895922f5eacb87fc6cf4cd9e378 import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableSet; import com.google.common.io.BaseEncoding; -@@ -350,6 +351,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -351,6 +352,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch b/patches/server/0057-Add-configurable-portal-search-radius.patch similarity index 94% rename from patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch rename to patches/server/0057-Add-configurable-portal-search-radius.patch index c2ff288804..517ec4d3fa 100644 --- a/patches/unapplied/server/0057-Add-configurable-portal-search-radius.patch +++ b/patches/server/0057-Add-configurable-portal-search-radius.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 128dd4749590905fdfa85907d33adc4e4dbe6c33..575ce3bb03c7eef215e71d238a46aa1cc8510f89 100644 +index 28704015f17da94d8cb063af70bf4aca83d6eed7..a29f831eca7191f3145477e88921f8f972e580a9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3029,7 +3029,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3050,7 +3050,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { double d0 = DimensionType.getTeleportationScale(this.level.dimensionType(), destination.dimensionType()); BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0); // CraftBukkit start diff --git a/patches/unapplied/server/0058-Add-velocity-warnings.patch b/patches/server/0058-Add-velocity-warnings.patch similarity index 93% rename from patches/unapplied/server/0058-Add-velocity-warnings.patch rename to patches/server/0058-Add-velocity-warnings.patch index 98cdb06bac..b7d4e9b2cc 100644 --- a/patches/unapplied/server/0058-Add-velocity-warnings.patch +++ b/patches/server/0058-Add-velocity-warnings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5d2ac8720d38b9c8485a3c3da906b0124bb99a03..7f32015fbcbd94ed514a5749484527c2b1657036 100644 +index 3a62e416e5d67bff401d5d8fd7e794c213997ae4..8aa3e84d5414fecb22069c385103660737132dbb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -294,6 +294,7 @@ public final class CraftServer implements Server { +@@ -289,6 +289,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -17,10 +17,10 @@ index 5d2ac8720d38b9c8485a3c3da906b0124bb99a03..7f32015fbcbd94ed514a5749484527c2 static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 62c2780b165a520e85f17fdf5c0d1c29b7579ebc..91c0354f554edbf2fc68748a8fbf182cd8d93de5 100644 +index 7a3ae4daa0f1f8dd2dd200fbfa1010f70f4b1f91..9318c47c9e52f8cde5c0ece1dc3723203a41e261 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -454,10 +454,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -465,10 +465,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public void setVelocity(Vector velocity) { Preconditions.checkArgument(velocity != null, "velocity"); velocity.checkFinite(); diff --git a/patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch b/patches/server/0059-Configurable-inter-world-teleportation-safety.patch similarity index 91% rename from patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch rename to patches/server/0059-Configurable-inter-world-teleportation-safety.patch index e711fe672c..6d8ca27037 100644 --- a/patches/unapplied/server/0059-Configurable-inter-world-teleportation-safety.patch +++ b/patches/server/0059-Configurable-inter-world-teleportation-safety.patch @@ -16,10 +16,10 @@ The wanted destination was on top of the emerald block however the player ended This only is the case if the player is teleporting between worlds. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a92f895922f5eacb87fc6cf4cd9e3783703cdf9..8b97cf87bff848b60f506ae0cde14e369e4afca8 100644 +index ebbf77b1620a08ecee8917cd6a8f6beee69a645a..120461eb5d4129453ccff4304b376045ccf6f2e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1155,7 +1155,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1178,7 +1178,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.connection.teleport(to); } else { diff --git a/patches/unapplied/server/0060-Add-exception-reporting-event.patch b/patches/server/0060-Add-exception-reporting-event.patch similarity index 96% rename from patches/unapplied/server/0060-Add-exception-reporting-event.patch rename to patches/server/0060-Add-exception-reporting-event.patch index bab900397c..ba017307e6 100644 --- a/patches/unapplied/server/0060-Add-exception-reporting-event.patch +++ b/patches/server/0060-Add-exception-reporting-event.patch @@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..fed09b886f4fa0006d160e5f2abb00df } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 6457384bded7b65f22547704eba74875a6b84ebb..383bf9fe7263bc6153a2e1cbc21657215a3bdb79 100644 +index 8b554a7310c740f2a67476a189e8d15fb61f3fba..cff0be79e2dbb761ad2971bc3fcbd0d264505f1d 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1,5 +1,10 @@ @@ -102,7 +102,7 @@ index 6457384bded7b65f22547704eba74875a6b84ebb..383bf9fe7263bc6153a2e1cbc2165721 import com.google.common.collect.Lists; import com.mojang.serialization.Codec; import java.io.IOException; -@@ -731,6 +736,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -737,6 +742,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper start - Prevent tile entity and entity crashes final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); @@ -111,7 +111,7 @@ index 6457384bded7b65f22547704eba74875a6b84ebb..383bf9fe7263bc6153a2e1cbc2165721 // Paper end } diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 0e4f6893a2fce69782c4246c52e03926fe2df26f..5c58031279c0b74d2061c802e60b7bed50f27156 100644 +index f1675e35be0ab7670c875c6b0d1e982a3ae09d1e..b2bb9bbd3af414c50ec3f8e3e171a679e95ef75e 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -291,6 +291,7 @@ public final class NaturalSpawner { @@ -131,7 +131,7 @@ index 0e4f6893a2fce69782c4246c52e03926fe2df26f..5c58031279c0b74d2061c802e60b7bed } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index f21ae1ae8af79c1c0c6f2feaa933638add0aa065..ba24e32f96797ed8c8bd82391d1903f6ad2a9813 100644 +index f30a5bd3c954afa063bf85d9d91340bd017cf896..58048d90a66cf3291a31d7c1f13ae66eac04ed64 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -1,6 +1,7 @@ @@ -163,7 +163,7 @@ index f21ae1ae8af79c1c0c6f2feaa933638add0aa065..ba24e32f96797ed8c8bd82391d1903f6 // CraftBukkit end } } -@@ -1187,6 +1194,7 @@ public class LevelChunk extends ChunkAccess { +@@ -1199,6 +1206,7 @@ public class LevelChunk extends ChunkAccess { // Paper start - Prevent tile entity and entity crashes final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ()); net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable); diff --git a/patches/unapplied/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch b/patches/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch similarity index 100% rename from patches/unapplied/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch rename to patches/server/0061-Don-t-nest-if-we-don-t-need-to-when-cerealising-text.patch diff --git a/patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0062-Disable-Scoreboards-for-non-players-by-default.patch similarity index 83% rename from patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch rename to patches/server/0062-Disable-Scoreboards-for-non-players-by-default.patch index af35b90ec0..f391e4bd75 100644 --- a/patches/unapplied/server/0062-Disable-Scoreboards-for-non-players-by-default.patch +++ b/patches/server/0062-Disable-Scoreboards-for-non-players-by-default.patch @@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team" logic which is most likely to be true. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 575ce3bb03c7eef215e71d238a46aa1cc8510f89..98067f625b49d93fdd91af5114790848a2228ac0 100644 +index a29f831eca7191f3145477e88921f8f972e580a9..fe003518ac0f884115af0ce0822a3382c274597a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2660,6 +2660,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2681,6 +2681,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @Nullable public Team getTeam() { @@ -23,10 +23,10 @@ index 575ce3bb03c7eef215e71d238a46aa1cc8510f89..98067f625b49d93fdd91af5114790848 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7e4f95e04a880ecb459228c90be462cbbec14620..eec1467eaaadaa66febc06e51372c5f602216fb5 100644 +index 38495e221f0b0584ec8fcd04cd6cd98c2cfa9d10..202eed643693363aa1c052f468d6bd15bb072ff8 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -822,6 +822,7 @@ public abstract class LivingEntity extends Entity { +@@ -816,6 +816,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (nbt.contains("Team", 8)) { String s = nbt.getString("Team"); PlayerTeam scoreboardteam = this.level.getScoreboard().getPlayerTeam(s); diff --git a/patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch similarity index 94% rename from patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch rename to patches/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch index 37d747ca4a..ea0e8d4bb9 100644 --- a/patches/unapplied/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/patches/server/0063-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -7,7 +7,7 @@ Upstream added methods for this, original methods are now deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index c2407224e8bc5e872e153de14090d60e66bb07bc..3fae28c52f2aac63ac6a4e8eb6af2d7226e6bec6 100644 +index 1f67ac4484e3ee2e0a25030e0080a671f34e1a58..3084fa8000b36f06e8d432bff124a5af4ea675ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -266,9 +266,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0064-Chunk-Save-Reattempt.patch b/patches/server/0064-Chunk-Save-Reattempt.patch similarity index 100% rename from patches/unapplied/server/0064-Chunk-Save-Reattempt.patch rename to patches/server/0064-Chunk-Save-Reattempt.patch diff --git a/patches/unapplied/server/0065-Complete-resource-pack-API.patch b/patches/server/0065-Complete-resource-pack-API.patch similarity index 90% rename from patches/unapplied/server/0065-Complete-resource-pack-API.patch rename to patches/server/0065-Complete-resource-pack-API.patch index 1ed931325f..ea825e4a82 100644 --- a/patches/unapplied/server/0065-Complete-resource-pack-API.patch +++ b/patches/server/0065-Complete-resource-pack-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 301d90618f51b90a4a7b0158deef7373fba9cca8..eaf0e468d7ebf54290ae9e2df9f4a2c252142f65 100644 +index 30a6be5487e0bff49d134c5dcae520071763d2ac..f5b8da00f641a401d7ff4641908dd7de55cbe683 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1764,8 +1764,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1754,8 +1754,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect")); } @@ -23,10 +23,10 @@ index 301d90618f51b90a4a7b0158deef7373fba9cca8..eaf0e468d7ebf54290ae9e2df9f4a2c2 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8b97cf87bff848b60f506ae0cde14e369e4afca8..673e4dc85e5c3ae43170564108f6b74187720d07 100644 +index 120461eb5d4129453ccff4304b376045ccf6f2e7..f4d4164b7a6b4715616712d939f423f0f2ab9e54 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -152,6 +152,7 @@ import org.bukkit.plugin.Plugin; +@@ -153,6 +153,7 @@ import org.bukkit.plugin.Plugin; import org.bukkit.plugin.messaging.StandardMessenger; import org.bukkit.profile.PlayerProfile; import org.bukkit.scoreboard.Scoreboard; @@ -34,7 +34,7 @@ index 8b97cf87bff848b60f506ae0cde14e369e4afca8..673e4dc85e5c3ae43170564108f6b741 import net.md_5.bungee.api.chat.BaseComponent; // Spigot -@@ -170,6 +171,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -171,6 +172,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private double healthScale = 20; private CraftWorldBorder clientWorldBorder = null; private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener(); @@ -45,7 +45,7 @@ index 8b97cf87bff848b60f506ae0cde14e369e4afca8..673e4dc85e5c3ae43170564108f6b741 public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2236,6 +2241,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2310,6 +2315,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public boolean getAffectsSpawning() { return this.getHandle().affectsSpawning; } diff --git a/patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0066-Default-loading-permissions.yml-before-plugins.patch similarity index 89% rename from patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch rename to patches/server/0066-Default-loading-permissions.yml-before-plugins.patch index ea80f59050..6533d53954 100644 --- a/patches/unapplied/server/0066-Default-loading-permissions.yml-before-plugins.patch +++ b/patches/server/0066-Default-loading-permissions.yml-before-plugins.patch @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7f32015fbcbd94ed514a5749484527c2b1657036..6c7b1fe353a4d9bd9e307e7984f9348dd5914ff1 100644 +index 8aa3e84d5414fecb22069c385103660737132dbb..6934e0f34d47d2697d9d1326674e7986f510cd40 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -454,6 +454,7 @@ public final class CraftServer implements Server { +@@ -449,6 +449,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { this.helpMap.clear(); this.helpMap.initializeGeneralTopics(); @@ -27,7 +27,7 @@ index 7f32015fbcbd94ed514a5749484527c2b1657036..6c7b1fe353a4d9bd9e307e7984f9348d } Plugin[] plugins = this.pluginManager.getPlugins(); -@@ -473,7 +474,7 @@ public final class CraftServer implements Server { +@@ -468,7 +469,7 @@ public final class CraftServer implements Server { this.commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch similarity index 90% rename from patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch rename to patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch index c65bde7ca4..06d2b7d733 100644 --- a/patches/unapplied/server/0067-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0067-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6c7b1fe353a4d9bd9e307e7984f9348dd5914ff1..318b3e22cad28ef3a49ff005808c5e3525ccbcf4 100644 +index 6934e0f34d47d2697d9d1326674e7986f510cd40..3ec1ed8137b1f6de5cafaab340ad983d9093775d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2546,5 +2546,23 @@ public final class CraftServer implements Server { +@@ -2544,5 +2544,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/patches/unapplied/server/0068-Remove-Metadata-on-reload.patch b/patches/server/0068-Remove-Metadata-on-reload.patch similarity index 88% rename from patches/unapplied/server/0068-Remove-Metadata-on-reload.patch rename to patches/server/0068-Remove-Metadata-on-reload.patch index 12e065a6b1..095f010c1a 100644 --- a/patches/unapplied/server/0068-Remove-Metadata-on-reload.patch +++ b/patches/server/0068-Remove-Metadata-on-reload.patch @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 318b3e22cad28ef3a49ff005808c5e3525ccbcf4..3a046d3eb6bca6f45f8018a3844c58ac8cba43ac 100644 +index 3ec1ed8137b1f6de5cafaab340ad983d9093775d..844cef6971ae6520edcd6d794ff76040509c4552 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -944,8 +944,16 @@ public final class CraftServer implements Server { +@@ -939,8 +939,16 @@ public final class CraftServer implements Server { world.spigotConfig.init(); // Spigot } diff --git a/patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0069-Handle-Item-Meta-Inconsistencies.patch similarity index 97% rename from patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch rename to patches/server/0069-Handle-Item-Meta-Inconsistencies.patch index f559f9ab4a..15b9759073 100644 --- a/patches/unapplied/server/0069-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0069-Handle-Item-Meta-Inconsistencies.patch @@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index cf810a1d645dd63595702a5f07456cd48393ee79..87031aa69148118d9f5bf16cb8a55cf72f9d0a1d 100644 +index 83af6f1af55ab9b0b7ad6f635e24b7c4d1d1829b..a36dac14b03a9af1303ac7f572f2cb71196f644c 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -155,6 +155,23 @@ public final class ItemStack { +@@ -156,6 +156,23 @@ public final class ItemStack { return this.getItem().getTooltipImage(this); } @@ -45,7 +45,7 @@ index cf810a1d645dd63595702a5f07456cd48393ee79..87031aa69148118d9f5bf16cb8a55cf7 public ItemStack(ItemLike item) { this(item, 1); } -@@ -206,6 +223,7 @@ public final class ItemStack { +@@ -207,6 +224,7 @@ public final class ItemStack { // CraftBukkit start - make defensive copy as this data may be coming from the save thread this.tag = nbttagcompound.getCompound("tag").copy(); // CraftBukkit end @@ -53,7 +53,7 @@ index cf810a1d645dd63595702a5f07456cd48393ee79..87031aa69148118d9f5bf16cb8a55cf7 this.getItem().verifyTagAfterLoad(this.tag); } -@@ -780,6 +798,7 @@ public final class ItemStack { +@@ -794,6 +812,7 @@ public final class ItemStack { public void setTag(@Nullable CompoundTag nbt) { this.tag = nbt; @@ -61,7 +61,7 @@ index cf810a1d645dd63595702a5f07456cd48393ee79..87031aa69148118d9f5bf16cb8a55cf7 if (this.getItem().canBeDepleted()) { this.setDamageValue(this.getDamageValue()); } -@@ -1073,6 +1092,7 @@ public final class ItemStack { +@@ -1091,6 +1110,7 @@ public final class ItemStack { ListTag nbttaglist = this.tag.getList("Enchantments", 10); nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level)); @@ -70,7 +70,7 @@ index cf810a1d645dd63595702a5f07456cd48393ee79..87031aa69148118d9f5bf16cb8a55cf7 public boolean isEnchanted() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 781a1e5e4220d2198467c0fd3956f5e0387a7aff..3c3f5a4b7109ec8b47b550f9e766556f8d1546ec 100644 +index 1e5ec95e19aca0530c141b6415fe6daca4f2d066..da5e660860a46227c59567f6458a9cf4ac4092eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -6,7 +6,6 @@ import java.util.Map; diff --git a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch similarity index 93% rename from patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch rename to patches/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch index 6a09b0d45d..993acf56fe 100644 --- a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch +++ b/patches/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate Can set a much shorter despawn rate for arrows that players can not pick up. diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 3e1f5fcf589ad7916adb44b53490ccac947a8799..d4b8364fd860ee2cc632d8c752435b9b311c7ece 100644 +index 1d5fea45453b2d17639e2c97a0cb18d4b02db339..aabb5ad09dd7b11a7dfbaa0849726541c0401951 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -312,7 +312,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/unapplied/server/0071-Add-World-Util-Methods.patch b/patches/server/0071-Add-World-Util-Methods.patch similarity index 88% rename from patches/unapplied/server/0071-Add-World-Util-Methods.patch rename to patches/server/0071-Add-World-Util-Methods.patch index dbd28ae14a..414debe431 100644 --- a/patches/unapplied/server/0071-Add-World-Util-Methods.patch +++ b/patches/server/0071-Add-World-Util-Methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods Methods that can be used for other patches to help improve logic. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9c9c8178cd11e37aaef400e40092fb1095fa6c5f..d4b101d0f1835b57f34f68653d728df2bb78faa1 100644 +index a08c81030cf4974397205b200d27c559cdb75a12..9e593a50b36a13b45c6ab279a7f6656045ccdf35 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -219,7 +219,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -217,7 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -19,10 +19,10 @@ index 9c9c8178cd11e37aaef400e40092fb1095fa6c5f..d4b101d0f1835b57f34f68653d728df2 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 383bf9fe7263bc6153a2e1cbc21657215a3bdb79..47d24d64d16f00e481d4773487163bc1e46ae4a8 100644 +index cff0be79e2dbb761ad2971bc3fcbd0d264505f1d..3b3da7340af0b97f900b5eb7fc2ba90f39c4c503 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -337,6 +337,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -343,6 +343,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return chunk == null ? null : chunk.getFluidState(blockposition); } diff --git a/patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch b/patches/server/0072-Custom-replacement-for-eaten-items.patch similarity index 86% rename from patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch rename to patches/server/0072-Custom-replacement-for-eaten-items.patch index f5a77873fd..bf79bf3bb6 100644 --- a/patches/unapplied/server/0072-Custom-replacement-for-eaten-items.patch +++ b/patches/server/0072-Custom-replacement-for-eaten-items.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index eec1467eaaadaa66febc06e51372c5f602216fb5..29495ff2d2c31f6b6ef6e2817662d143e538f926 100644 +index 202eed643693363aa1c052f468d6bd15bb072ff8..92da7117f56c1a5087d589f241a8b9dbe55c9b67 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3639,10 +3639,11 @@ public abstract class LivingEntity extends Entity { +@@ -3599,10 +3599,11 @@ public abstract class LivingEntity extends Entity implements Attackable { this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; @@ -21,7 +21,7 @@ index eec1467eaaadaa66febc06e51372c5f602216fb5..29495ff2d2c31f6b6ef6e2817662d143 level.getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { -@@ -3656,6 +3657,13 @@ public abstract class LivingEntity extends Entity { +@@ -3616,6 +3617,13 @@ public abstract class LivingEntity extends Entity implements Attackable { } else { itemstack = this.useItem.finishUsingItem(this.level, this); } @@ -35,7 +35,7 @@ index eec1467eaaadaa66febc06e51372c5f602216fb5..29495ff2d2c31f6b6ef6e2817662d143 // CraftBukkit end if (itemstack != this.useItem) { -@@ -3663,6 +3671,11 @@ public abstract class LivingEntity extends Entity { +@@ -3623,6 +3631,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch similarity index 80% rename from patches/unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch rename to patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch index fbca2d3be2..5981dd9712 100644 --- a/patches/unapplied/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0073-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 29495ff2d2c31f6b6ef6e2817662d143e538f926..b2871726eb4dd7f16d161097cbf0f287839e10ba 100644 +index 92da7117f56c1a5087d589f241a8b9dbe55c9b67..b14723d093f8a7aa44750b6d0e7eb9db9e2ac34b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -783,7 +783,13 @@ public abstract class LivingEntity extends Entity { +@@ -777,7 +777,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void readAdditionalSaveData(CompoundTag nbt) { @@ -23,7 +23,7 @@ index 29495ff2d2c31f6b6ef6e2817662d143e538f926..b2871726eb4dd7f16d161097cbf0f287 if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); } -@@ -1270,6 +1276,10 @@ public abstract class LivingEntity extends Entity { +@@ -1264,6 +1270,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void setHealth(float health) { @@ -34,7 +34,7 @@ index 29495ff2d2c31f6b6ef6e2817662d143e538f926..b2871726eb4dd7f16d161097cbf0f287 // CraftBukkit start - Handle scaled health if (this instanceof ServerPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity(); -@@ -3472,7 +3482,7 @@ public abstract class LivingEntity extends Entity { +@@ -3432,7 +3442,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void setAbsorptionAmount(float amount) { @@ -44,10 +44,10 @@ index 29495ff2d2c31f6b6ef6e2817662d143e538f926..b2871726eb4dd7f16d161097cbf0f287 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 673e4dc85e5c3ae43170564108f6b74187720d07..b08b72f8c029faae9b9d425e8ce77a1ff23addd7 100644 +index f4d4164b7a6b4715616712d939f423f0f2ab9e54..023e477ebe24aff03767a3179e7b2f0e653ffa12 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2041,6 +2041,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2115,6 +2115,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/patches/unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch b/patches/server/0074-Use-a-Shared-Random-for-Entities.patch similarity index 93% rename from patches/unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch rename to patches/server/0074-Use-a-Shared-Random-for-Entities.patch index a9fce10a96..346d409c9d 100644 --- a/patches/unapplied/server/0074-Use-a-Shared-Random-for-Entities.patch +++ b/patches/server/0074-Use-a-Shared-Random-for-Entities.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 98067f625b49d93fdd91af5114790848a2228ac0..c070fd1b224aeeaa9ebb054105a0f73285956da1 100644 +index fe003518ac0f884115af0ce0822a3382c274597a..7f32aae16af188ec0c3dcbcdd7aeae5f1b9526b6 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -159,6 +159,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -161,6 +161,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; } @@ -89,7 +89,7 @@ index 98067f625b49d93fdd91af5114790848a2228ac0..c070fd1b224aeeaa9ebb054105a0f732 private CraftEntity bukkitEntity; public CraftEntity getBukkitEntity() { -@@ -398,7 +471,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -401,7 +474,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -99,7 +99,7 @@ index 98067f625b49d93fdd91af5114790848a2228ac0..c070fd1b224aeeaa9ebb054105a0f732 this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java -index 8e63ab510e4c2e458da726ca67be4d3b5274e7b7..a51424d29ac353cf1bec4d1484db0acb63bebba5 100644 +index 24846bcbf0e3983a26ac1e8058a96c0e7ad28e40..72eea6e512060fc622ca79ca87437f19a64604cc 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Squid.java +++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java @@ -46,7 +46,7 @@ public class Squid extends WaterAnimal { diff --git a/patches/unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch similarity index 94% rename from patches/unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch rename to patches/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch index 20f3f8ebaa..074c8554fb 100644 --- a/patches/unapplied/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/patches/server/0075-Configurable-spawn-chances-for-skeleton-horses.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index d4b101d0f1835b57f34f68653d728df2bb78faa1..87a81cdd00b19ba020f6506eedd8ac4bf20d32ef 100644 +index 9e593a50b36a13b45c6ab279a7f6656045ccdf35..faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -696,7 +696,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch similarity index 92% rename from patches/unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch rename to patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch index 2a4d28d799..b11ae54fff 100644 --- a/patches/unapplied/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch +++ b/patches/server/0076-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch @@ -12,11 +12,11 @@ Replace all calls to the new place to the unnecessary forward. Optimize getType and getBlockData to manually inline and optimize the calls diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java -index 3b254a89484ac8a9dba399c7eb081328ff69a7b2..a6a6aaf226655d0e44bc229288112882a9c04e3b 100644 +index 1b29c6872ebe54351f28c1f1f38b22561ba785ee..40950db0c242c65dfd4de247c86249354d12108f 100644 --- a/src/main/java/net/minecraft/core/Vec3i.java +++ b/src/main/java/net/minecraft/core/Vec3i.java -@@ -33,6 +33,12 @@ public class Vec3i implements Comparable { - return CODEC.flatXmap(checkOffsetAxes(maxAbsValue), checkOffsetAxes(maxAbsValue)); +@@ -31,6 +31,12 @@ public class Vec3i implements Comparable { + }); } + // Paper start @@ -29,10 +29,10 @@ index 3b254a89484ac8a9dba399c7eb081328ff69a7b2..a6a6aaf226655d0e44bc229288112882 this.x = x; this.y = y; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 47d24d64d16f00e481d4773487163bc1e46ae4a8..4d2a64a38a94cc82767030dbdf219b5ee1002a7d 100644 +index 3b3da7340af0b97f900b5eb7fc2ba90f39c4c503..6d6145de1db2d57aa7f342e2467401231c3e38ae 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -279,7 +279,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -285,7 +285,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public boolean isInWorldBounds(BlockPos pos) { @@ -88,7 +88,7 @@ index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd @Override public FluidState getFluidState(BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index ba24e32f96797ed8c8bd82391d1903f6ad2a9813..2efeccb33d1d5fb148a12f71eae870fbdcb6e0fd 100644 +index 58048d90a66cf3291a31d7c1f13ae66eac04ed64..8775163c42d639516a533559eaf312ee16c19f10 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -342,12 +342,29 @@ public class LevelChunk extends ChunkAccess { @@ -125,7 +125,7 @@ index ba24e32f96797ed8c8bd82391d1903f6ad2a9813..2efeccb33d1d5fb148a12f71eae870fb BlockState iblockdata = null; diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index dddae1e226d8f58cdcfc597e25d4228cd3245cb4..ae37e97e52557b48f129cc02eeea395378a48444 100644 +index bc707432af738ad39de9f8df253913db941a4850..becc4c101e40d9b11e5e89a69e25dc0160bfaa32 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -21,7 +21,7 @@ public class LevelChunkSection { diff --git a/patches/unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch similarity index 88% rename from patches/unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch rename to patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 09bc7a5d68..e6715e879c 100644 --- a/patches/unapplied/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 28d58f402f15ee37cc1bfa3114839db281fc5f57..e62aa86afb05d8f00d8dd2b676407bfa7d0ed9fb 100644 +index efa4db568cf5189a3a83beb137748f57b34ca6e4..1b153a4f323635f1f48ef49a95103e25d5b6ce21 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1357,6 +1357,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 87a81cdd00b19ba020f6506eedd8ac4bf20d32ef..a487331d9df8fa0d58cfb0859c25a8fffe376ac2 100644 +index faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef..0f7c0bf3e773485737aa4a116a712fc7b8ed221e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -218,6 +218,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; @@ -30,10 +30,10 @@ index 87a81cdd00b19ba020f6506eedd8ac4bf20d32ef..a487331d9df8fa0d58cfb0859c25a8ff @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4d2a64a38a94cc82767030dbdf219b5ee1002a7d..00911231201f84b781048d052495b60a47fb5277 100644 +index 6d6145de1db2d57aa7f342e2467401231c3e38ae..ebad2e1bac84bade6dd2b893de832b77705a6f57 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -497,7 +497,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -503,7 +503,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam CraftWorld world = ((ServerLevel) this).getWorld(); @@ -56,7 +56,7 @@ index d40e791529911ca81398ac267a819415da91502a..03fde6e47c4a347c62fe9b4a3351769a } } diff --git a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java -index 12bf4125bc697092a038600955318f8436bdb5d7..e234ae13fe9793db237adb6f6216fa32638cfc4f 100644 +index ec66f00703fcb68aa567b2d14a756729371320e0..9db66b393e057d93a8025b803ae0ad2a1bca61f6 100644 --- a/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DoublePlantBlock.java @@ -95,7 +95,7 @@ public class DoublePlantBlock extends BushBlock { diff --git a/patches/unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch similarity index 83% rename from patches/unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch rename to patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch index bc0bf9a47e..b9dcdea640 100644 --- a/patches/unapplied/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a487331d9df8fa0d58cfb0859c25a8fffe376ac2..e7d07d1f86af49b8729f6ac66b398ee6aae5ab4a 100644 +index 0f7c0bf3e773485737aa4a116a712fc7b8ed221e..70d695b20bdb214129e67dd1e869ae0736f1cfeb 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2225,6 +2225,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2224,6 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); } // Paper end @@ -16,7 +16,7 @@ index a487331d9df8fa0d58cfb0859c25a8fffe376ac2..e7d07d1f86af49b8729f6ac66b398ee6 } public void onTrackingEnd(Entity entity) { -@@ -2300,6 +2301,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2299,6 +2300,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // CraftBukkit end diff --git a/patches/unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch similarity index 92% rename from patches/unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch rename to patches/server/0079-Configurable-Chunk-Inhabited-Time.patch index 83eb060041..9bb9893262 100644 --- a/patches/unapplied/server/0079-Configurable-Chunk-Inhabited-Time.patch +++ b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch @@ -11,7 +11,7 @@ For people who want all chunks to be treated equally, you can chose a fixed valu This allows to fine-tune vanilla gameplay. diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 2efeccb33d1d5fb148a12f71eae870fbdcb6e0fd..b4c76e53eef8dc0efec98848352a243931ffc1f3 100644 +index 8775163c42d639516a533559eaf312ee16c19f10..b55080c38b1ac4581b73f0d55ac8a432824a13a4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -327,6 +327,13 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/unapplied/server/0080-EntityPathfindEvent.patch b/patches/server/0080-EntityPathfindEvent.patch similarity index 93% rename from patches/unapplied/server/0080-EntityPathfindEvent.patch rename to patches/server/0080-EntityPathfindEvent.patch index 13e17ab2db..cd96ad1e9e 100644 --- a/patches/unapplied/server/0080-EntityPathfindEvent.patch +++ b/patches/server/0080-EntityPathfindEvent.patch @@ -19,7 +19,7 @@ index a8f69e48937b3ebd2f57a4da747e6762c4a77934..acd0b946cab86eb173e713535194d3a9 @Override 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 6b24f94f1762570547c0fc484b3939de73fbd309..80b3fd4150d749af7d584f95ee3d0b8ed664ead9 100644 +index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb378891b5c0 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 @@ -39,14 +39,14 @@ public class GroundPathNavigation extends PathNavigation { @@ -63,10 +63,10 @@ index 6b24f94f1762570547c0fc484b3939de73fbd309..80b3fd4150d749af7d584f95ee3d0b8e private int getSurfaceY() { 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 ec1bd2fff121aa00b50b0d65c0e53e4146c3deb9..bd782c8935db6e0aa3489725d3c4ee401f9bf242 100644 +index a9bd5bbffaa1f281a799bf132f58cfb725c21c9c..64b64fb0b72eccade63fac99b7b363aafe59169b 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 -@@ -109,7 +109,13 @@ public abstract class PathNavigation { +@@ -110,7 +110,13 @@ public abstract class PathNavigation { @Nullable public Path createPath(BlockPos target, int distance) { @@ -81,7 +81,7 @@ index ec1bd2fff121aa00b50b0d65c0e53e4146c3deb9..bd782c8935db6e0aa3489725d3c4ee40 } @Nullable -@@ -119,7 +125,7 @@ public abstract class PathNavigation { +@@ -120,7 +126,7 @@ public abstract class PathNavigation { @Nullable public Path createPath(Entity entity, int distance) { @@ -90,7 +90,7 @@ index ec1bd2fff121aa00b50b0d65c0e53e4146c3deb9..bd782c8935db6e0aa3489725d3c4ee40 } @Nullable -@@ -129,6 +135,16 @@ public abstract class PathNavigation { +@@ -130,6 +136,16 @@ public abstract class PathNavigation { @Nullable protected Path createPath(Set positions, int range, boolean useHeadPos, int distance, float followRange) { @@ -107,7 +107,7 @@ index ec1bd2fff121aa00b50b0d65c0e53e4146c3deb9..bd782c8935db6e0aa3489725d3c4ee40 if (positions.isEmpty()) { return null; } else if (this.mob.getY() < (double)this.level.getMinBuildHeight()) { -@@ -138,6 +154,23 @@ public abstract class PathNavigation { +@@ -139,6 +155,23 @@ public abstract class PathNavigation { } else if (this.path != null && !this.path.isDone() && positions.contains(this.targetPos)) { return this.path; } else { @@ -132,7 +132,7 @@ index ec1bd2fff121aa00b50b0d65c0e53e4146c3deb9..bd782c8935db6e0aa3489725d3c4ee40 BlockPos blockPos = useHeadPos ? this.mob.blockPosition().above() : this.mob.blockPosition(); int i = (int)(followRange + (float)range); diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java -index d11e9f4f7ae5f2666d67878309b4a1359ef90e39..de1f178fa18ae3ff3c73bc59b10eb39857800bf9 100644 +index e9b49c72aa73dfcef6c136d9ed7bb5044fe8405d..2d1b2b84d7cf5bafe2cccfa0dec2bae805dbe7cf 100644 --- a/src/main/java/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/WallClimberNavigation.java @@ -16,9 +16,9 @@ public class WallClimberNavigation extends GroundPathNavigation { diff --git a/patches/unapplied/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch b/patches/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch similarity index 100% rename from patches/unapplied/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch rename to patches/server/0081-Sanitise-RegionFileCache-and-make-configurable.patch diff --git a/patches/unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch b/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch similarity index 79% rename from patches/unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch rename to patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch index 05e5bc47e7..a19d0d7dcb 100644 --- a/patches/unapplied/server/0082-Do-not-load-chunks-for-Pathfinding.patch +++ b/patches/server/0082-Do-not-load-chunks-for-Pathfinding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not load chunks for Pathfinding diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index 243740ee9debe3ca0a988b0a448af09a5845b96d..04406fdb2961a85d8e6bffbb8e233e8c4dcf4390 100644 +index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804ac1620ab3 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -@@ -465,7 +465,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -457,7 +457,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { for(int n = -1; n <= 1; ++n) { if (l != 0 || n != 0) { pos.set(i + l, j + m, k + n); @@ -19,10 +19,10 @@ index 243740ee9debe3ca0a988b0a448af09a5845b96d..04406fdb2961a85d8e6bffbb8e233e8c + return BlockPathTypes.BLOCKED; + } else { + // Paper end - if (blockState.is(Blocks.CACTUS)) { - return BlockPathTypes.DANGER_CACTUS; + if (blockState.is(Blocks.CACTUS) || blockState.is(Blocks.SWEET_BERRY_BUSH)) { + return BlockPathTypes.DANGER_OTHER; } -@@ -481,6 +486,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -469,6 +474,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { if (world.getFluidState(pos).is(FluidTags.WATER)) { return BlockPathTypes.WATER_BORDER; } @@ -30,7 +30,7 @@ index 243740ee9debe3ca0a988b0a448af09a5845b96d..04406fdb2961a85d8e6bffbb8e233e8c } } } -@@ -490,7 +496,8 @@ public class WalkNodeEvaluator extends NodeEvaluator { +@@ -478,7 +484,8 @@ public class WalkNodeEvaluator extends NodeEvaluator { } protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) { diff --git a/patches/unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch similarity index 95% rename from patches/unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch rename to patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch index 0123731b3d..0535488630 100644 --- a/patches/unapplied/server/0083-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch @@ -22,10 +22,10 @@ index a5d57cc862036012d83b090bb1b3ccf4115a88b3..21068f766b75c414d5818073b7dca083 static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() { @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index eaf0e468d7ebf54290ae9e2df9f4a2c252142f65..050e8f545f5cc86985d3dbbe3192f632b64af66f 100644 +index f5b8da00f641a401d7ff4641908dd7de55cbe683..76f7ddbbba4be5c31d70ce9af9e041e69ee31662 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2525,8 +2525,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2534,8 +2534,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic }); } } diff --git a/patches/unapplied/server/0084-Configurable-Grass-Spread-Tick-Rate.patch b/patches/server/0084-Configurable-Grass-Spread-Tick-Rate.patch similarity index 100% rename from patches/unapplied/server/0084-Configurable-Grass-Spread-Tick-Rate.patch rename to patches/server/0084-Configurable-Grass-Spread-Tick-Rate.patch diff --git a/patches/unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch similarity index 82% rename from patches/unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch rename to patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch index f5f59665cb..f7a4a906f9 100644 --- a/patches/unapplied/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch +++ b/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e7d07d1f86af49b8729f6ac66b398ee6aae5ab4a..0d08690aade0e3334c583b62e0abf7bbab9a0c59 100644 +index 70d695b20bdb214129e67dd1e869ae0736f1cfeb..c4bf60739b0f73729f331f2bb82d9d08f346f19c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1458,6 +1458,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1457,6 +1457,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void updateNeighborsAt(BlockPos pos, Block sourceBlock) { diff --git a/patches/unapplied/server/0086-Optimize-DataBits.patch b/patches/server/0086-Optimize-DataBits.patch similarity index 100% rename from patches/unapplied/server/0086-Optimize-DataBits.patch rename to patches/server/0086-Optimize-DataBits.patch diff --git a/patches/unapplied/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch b/patches/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch similarity index 100% rename from patches/unapplied/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch rename to patches/server/0087-Option-to-use-vanilla-per-world-scoreboard-coloring-.patch diff --git a/patches/unapplied/server/0088-Configurable-Player-Collision.patch b/patches/server/0088-Configurable-Player-Collision.patch similarity index 91% rename from patches/unapplied/server/0088-Configurable-Player-Collision.patch rename to patches/server/0088-Configurable-Player-Collision.patch index c358f3a6fe..21881abab3 100644 --- a/patches/unapplied/server/0088-Configurable-Player-Collision.patch +++ b/patches/server/0088-Configurable-Player-Collision.patch @@ -18,10 +18,10 @@ index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c8 buf.writeComponent(this.playerPrefix); buf.writeComponent(this.playerSuffix); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e62aa86afb05d8f00d8dd2b676407bfa7d0ed9fb..aab7ea2bbc9066b206b15cceb4db49aa230ebafd 100644 +index 1b153a4f323635f1f48ef49a95103e25d5b6ce21..3068831dbfbda5fc4dea5f0fb6eb48636fba4052 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -586,6 +586,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop playersByName = new java.util.HashMap<>(); @@ -62,7 +62,7 @@ index ea766e18fb19dbb78e07357748bbf83095253275..e39619717f089162e2e3bf12cd00eb39 public PlayerList(MinecraftServer server, LayeredRegistryAccess registryManager, PlayerDataStorage saveHandler, int maxPlayers) { this.cserver = server.server = new CraftServer((DedicatedServer) server, this); -@@ -399,6 +401,13 @@ public abstract class PlayerList { +@@ -406,6 +408,13 @@ public abstract class PlayerList { player.initInventoryMenu(); // CraftBukkit - Moved from above, added world @@ -76,7 +76,7 @@ index ea766e18fb19dbb78e07357748bbf83095253275..e39619717f089162e2e3bf12cd00eb39 PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ()); } -@@ -518,6 +527,16 @@ public abstract class PlayerList { +@@ -525,6 +534,16 @@ public abstract class PlayerList { entityplayer.doTick(); // SPIGOT-924 // CraftBukkit end @@ -93,7 +93,7 @@ index ea766e18fb19dbb78e07357748bbf83095253275..e39619717f089162e2e3bf12cd00eb39 this.save(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getRootVehicle(); -@@ -1149,6 +1168,13 @@ public abstract class PlayerList { +@@ -1156,6 +1175,13 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/patches/unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch b/patches/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch similarity index 96% rename from patches/unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch rename to patches/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch index 9cc30eaeda..cbef416185 100644 --- a/patches/unapplied/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch +++ b/patches/server/0089-Add-handshake-event-to-allow-plugins-to-handle-clien.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 5948138f3697c0cce9638524a0f481eb368da911..8284d49c8e30645d00be952c847bab7ce5753d78 100644 +index 994db7a175fdbd4688d9392d6b343348d1ada04e..2be1bd39ee1341128f02e38afe5698b837735827 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -88,9 +88,36 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -89,9 +89,36 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL this.connection.disconnect(ichatmutablecomponent); } else { this.connection.setListener(new ServerLoginPacketListenerImpl(this.server, this.connection)); diff --git a/patches/unapplied/server/0090-Configurable-RCON-IP-address.patch b/patches/server/0090-Configurable-RCON-IP-address.patch similarity index 96% rename from patches/unapplied/server/0090-Configurable-RCON-IP-address.patch rename to patches/server/0090-Configurable-RCON-IP-address.patch index 1835f96f94..c3060e2f21 100644 --- a/patches/unapplied/server/0090-Configurable-RCON-IP-address.patch +++ b/patches/server/0090-Configurable-RCON-IP-address.patch @@ -9,7 +9,7 @@ For servers with multiple IP's, ability to bind to a specific interface. public net.minecraft.server.dedicated.Settings getStringRaw(Ljava/lang/String;)Ljava/lang/String; diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index 666dc4b22569e1ae26ff988c7d4ac1113acd32f3..e72fb5c548a9baef09ae547863c4bdc439ce28b2 100644 +index d2d5a6cd70299c169f50684e442ce90be5840f62..d144fc518442762e45f213550a9b0a21f77fcdd1 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java @@ -108,6 +108,8 @@ public class DedicatedServerProperties extends Settings= this.saturatedRegenRate) { // CraftBukkit float f = Math.min(this.saturationLevel, 6.0F); diff --git a/patches/unapplied/server/0092-Add-ability-to-configure-frosted_ice-properties.patch b/patches/server/0092-Add-ability-to-configure-frosted_ice-properties.patch similarity index 100% rename from patches/unapplied/server/0092-Add-ability-to-configure-frosted_ice-properties.patch rename to patches/server/0092-Add-ability-to-configure-frosted_ice-properties.patch diff --git a/patches/unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch similarity index 89% rename from patches/unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch rename to patches/server/0093-remove-null-possibility-for-getServer-singleton.patch index dde28793b1..132260619a 100644 --- a/patches/unapplied/server/0093-remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index aab7ea2bbc9066b206b15cceb4db49aa230ebafd..3ed50490121f34ab5b247565b9a4555bf6a46dff 100644 +index 3068831dbfbda5fc4dea5f0fb6eb48636fba4052..12d0bddfdb156c07fdba87e960d0cbf0639b26a5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -193,6 +193,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -17,7 +17,7 @@ index aab7ea2bbc9066b206b15cceb4db49aa230ebafd..3ed50490121f34ab5b247565b9a4555b public static final Logger LOGGER = LogUtils.getLogger(); public static final String VANILLA_BRAND = "vanilla"; private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F; -@@ -318,6 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -@@ -2304,9 +2306,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop transaction = new java.util.ArrayList(); private int maxStack = MAX_STACK; diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java -index e2a9782e0ae60eb5557dce0831084c5722687df6..6ae9cccb28b2354ee47e6682082f92f3ecd56a67 100644 +index d5cb231495bae089b3ad21e3259ab08afbbcd46b..e30938ed1782d59177e24bb3989d87d3945af0e4 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java -@@ -61,7 +61,7 @@ public interface ContainerEntity extends Container, MenuProvider { +@@ -59,7 +59,7 @@ public interface ContainerEntity extends Container, MenuProvider { if (this.getLootTableSeed() != 0L) { nbt.putLong("LootTableSeed", this.getLootTableSeed()); } @@ -594,7 +594,7 @@ index e2a9782e0ae60eb5557dce0831084c5722687df6..6ae9cccb28b2354ee47e6682082f92f3 ContainerHelper.saveAllItems(nbt, this.getItemStacks()); } -@@ -72,7 +72,7 @@ public interface ContainerEntity extends Container, MenuProvider { +@@ -70,7 +70,7 @@ public interface ContainerEntity extends Container, MenuProvider { if (nbt.contains("LootTable", 8)) { this.setLootTable(new ResourceLocation(nbt.getString("LootTable"))); this.setLootTableSeed(nbt.getLong("LootTableSeed")); @@ -603,7 +603,7 @@ index e2a9782e0ae60eb5557dce0831084c5722687df6..6ae9cccb28b2354ee47e6682082f92f3 ContainerHelper.loadAllItems(nbt, this.getItemStacks()); } -@@ -104,13 +104,15 @@ public interface ContainerEntity extends Container, MenuProvider { +@@ -96,13 +96,15 @@ public interface ContainerEntity extends Container, MenuProvider { default void unpackChestVehicleLootTable(@Nullable Player player) { MinecraftServer minecraftServer = this.getLevel().getServer(); @@ -621,7 +621,7 @@ index e2a9782e0ae60eb5557dce0831084c5722687df6..6ae9cccb28b2354ee47e6682082f92f3 LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.getLevel())).withParameter(LootContextParams.ORIGIN, this.position()).withOptionalRandomSeed(this.getLootTableSeed()); if (player != null) { builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); -@@ -184,4 +186,13 @@ public interface ContainerEntity extends Container, MenuProvider { +@@ -176,4 +178,13 @@ public interface ContainerEntity extends Container, MenuProvider { default boolean isChestVehicleStillValid(Player player) { return !this.isRemoved() && this.position().closerThan(player.position(), 8.0D); } @@ -636,10 +636,10 @@ index e2a9782e0ae60eb5557dce0831084c5722687df6..6ae9cccb28b2354ee47e6682082f92f3 + // Paper end } diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -index 216fc20326d71121098430dc1b9f7477265a91b7..e3bee2df77d87630e96621470e940d9d9e152e7f 100644 +index ce0f766fd5f4bb30102f25ed4c68efa6f3c73835..b9f0dae1ec96194fe78c086b63d8a18b1d0cfcf7 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -@@ -28,6 +28,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc +@@ -29,6 +29,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc @Nullable public ResourceLocation lootTable; public long lootTableSeed; @@ -647,7 +647,7 @@ index 216fc20326d71121098430dc1b9f7477265a91b7..e3bee2df77d87630e96621470e940d9d protected RandomizableContainerBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { super(type, pos, state); -@@ -42,16 +43,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc +@@ -43,16 +44,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc } protected boolean tryLoadLootTable(CompoundTag nbt) { @@ -668,7 +668,7 @@ index 216fc20326d71121098430dc1b9f7477265a91b7..e3bee2df77d87630e96621470e940d9d if (this.lootTable == null) { return false; } else { -@@ -60,18 +64,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc +@@ -61,18 +65,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc nbt.putLong("LootTableSeed", this.lootTableSeed); } diff --git a/patches/unapplied/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch similarity index 100% rename from patches/unapplied/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch rename to patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch diff --git a/patches/unapplied/server/0097-System-property-for-disabling-watchdoge.patch b/patches/server/0097-System-property-for-disabling-watchdoge.patch similarity index 100% rename from patches/unapplied/server/0097-System-property-for-disabling-watchdoge.patch rename to patches/server/0097-System-property-for-disabling-watchdoge.patch diff --git a/patches/unapplied/server/0098-Async-GameProfileCache-saving.patch b/patches/server/0098-Async-GameProfileCache-saving.patch similarity index 95% rename from patches/unapplied/server/0098-Async-GameProfileCache-saving.patch rename to patches/server/0098-Async-GameProfileCache-saving.patch index f7d915bad3..5eac415257 100644 --- a/patches/unapplied/server/0098-Async-GameProfileCache-saving.patch +++ b/patches/server/0098-Async-GameProfileCache-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3ed50490121f34ab5b247565b9a4555bf6a46dff..0a419ec121bbddffa0424147c642f79d4e5eb817 100644 +index 12d0bddfdb156c07fdba87e960d0cbf0639b26a5..e7b8e53a8709babb147a1ee3f375e96638f425a4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -934,7 +934,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> trackedDataValues; // CraftBukkit start @@ -18,10 +18,10 @@ index 6b372ac843e992820ac0a8ebb9c3c5d9795cc6b0..841bb7741ae6b0e9cb98120ee1649b93 public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer> consumer, Set trackedPlayers) { this.trackedPlayers = trackedPlayers; diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -index aa0dfd08aefbb9363ec96080432f0f75d71b0b95..4b81d62d3250b99cbcb4eb2468ef81c149bf177e 100644 +index ab5817df2c98d24ee627fd5cf1f71e40b044e43e..94e3ce40da0401a94a24a6c0f9e7ffa3d0ef850d 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -@@ -94,6 +94,27 @@ public class PrimedTnt extends Entity { +@@ -95,6 +95,27 @@ public class PrimedTnt extends Entity implements TraceableEntity { } } @@ -49,7 +49,7 @@ index aa0dfd08aefbb9363ec96080432f0f75d71b0b95..4b81d62d3250b99cbcb4eb2468ef81c1 } private void explode() { -@@ -144,4 +165,11 @@ public class PrimedTnt extends Entity { +@@ -146,4 +167,11 @@ public class PrimedTnt extends Entity implements TraceableEntity { public int getFuse() { return (Integer) this.entityData.get(PrimedTnt.DATA_FUSE_ID); } diff --git a/patches/unapplied/server/0100-Faster-redstone-torch-rapid-clock-removal.patch b/patches/server/0100-Faster-redstone-torch-rapid-clock-removal.patch similarity index 96% rename from patches/unapplied/server/0100-Faster-redstone-torch-rapid-clock-removal.patch rename to patches/server/0100-Faster-redstone-torch-rapid-clock-removal.patch index ba923a0651..85d53edff4 100644 --- a/patches/unapplied/server/0100-Faster-redstone-torch-rapid-clock-removal.patch +++ b/patches/server/0100-Faster-redstone-torch-rapid-clock-removal.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal Only resize the the redstone torch list once, since resizing arrays / lists is costly diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 00911231201f84b781048d052495b60a47fb5277..c834428e04eab9639cfa9d07513d695dcb3bfce9 100644 +index ebad2e1bac84bade6dd2b893de832b77705a6f57..7ea68dc8e8bf3795013acbbde0c55a9ff833dfbd 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -174,6 +174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { private org.spigotmc.TickLimiter tileLimiter; private int tileTickPosition; public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions diff --git a/patches/unapplied/server/0101-Add-server-name-parameter.patch b/patches/server/0101-Add-server-name-parameter.patch similarity index 86% rename from patches/unapplied/server/0101-Add-server-name-parameter.patch rename to patches/server/0101-Add-server-name-parameter.patch index 14a157c89c..f2e3b715a9 100644 --- a/patches/unapplied/server/0101-Add-server-name-parameter.patch +++ b/patches/server/0101-Add-server-name-parameter.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add server-name parameter diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 49f6d20706e8fb94c41834f5addcd015d18acd7e..ef46dc1ed538b783213651f624326b2d49c786e0 100644 +index 2d1df61cc7ec645add8f729cc6cfdea0c56755aa..34dc3555dbff9942a3ee39b27da44831f280b5a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -156,6 +156,14 @@ public class Main { +@@ -166,6 +166,14 @@ public class Main { .defaultsTo(new File[] {}) .describedAs("Jar file"); // Paper end diff --git a/patches/unapplied/server/0102-Only-send-global-sounds-to-same-world-if-limiting-ra.patch b/patches/server/0102-Only-send-global-sounds-to-same-world-if-limiting-ra.patch similarity index 92% rename from patches/unapplied/server/0102-Only-send-global-sounds-to-same-world-if-limiting-ra.patch rename to patches/server/0102-Only-send-global-sounds-to-same-world-if-limiting-ra.patch index c1bdee3bd7..7808ba83d9 100644 --- a/patches/unapplied/server/0102-Only-send-global-sounds-to-same-world-if-limiting-ra.patch +++ b/patches/server/0102-Only-send-global-sounds-to-same-world-if-limiting-ra.patch @@ -7,10 +7,10 @@ Co-authored-by: Evan McCarthy Co-authored-by: lexikiq diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index fb26b6919acfb036affbe5519f5e4bd77955534f..89366ca29386fcbd03c3fc94d58451e714a1d779 100644 +index 6c951d25de5fb9301daf46fb412dd766e90c6379..039a5246a2e9a5e84f3b712f1d138053605b33ec 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -654,7 +654,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -656,7 +656,7 @@ public class EnderDragon extends Mob implements Enemy { // CraftBukkit start - Use relative location for far away sounds // this.world.b(1028, this.getChunkCoordinates(), 0); int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; @@ -20,10 +20,10 @@ index fb26b6919acfb036affbe5519f5e4bd77955534f..89366ca29386fcbd03c3fc94d58451e7 double deltaZ = this.getZ() - player.getZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index ae3931d65f6d8b91a654f3a7a4448d168eb526fc..807c8e18fdf5b0704638d7d084d6892556cc1525 100644 +index e6f51c5cc960de30be32df45c1f01d7b4cf314ed..2cbcd304b1117d4791d7e32d7738c12cfd4d1c9e 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -270,7 +270,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -271,7 +271,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob // CraftBukkit start - Use relative location for far away sounds // this.world.globalLevelEvent(1023, new BlockPosition(this), 0); int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; diff --git a/patches/unapplied/server/0103-Fix-Old-Sign-Conversion.patch b/patches/server/0103-Fix-Old-Sign-Conversion.patch similarity index 95% rename from patches/unapplied/server/0103-Fix-Old-Sign-Conversion.patch rename to patches/server/0103-Fix-Old-Sign-Conversion.patch index aa29dcdccb..3fbfa6af5a 100644 --- a/patches/unapplied/server/0103-Fix-Old-Sign-Conversion.patch +++ b/patches/server/0103-Fix-Old-Sign-Conversion.patch @@ -34,10 +34,10 @@ index 15695c9da294caf8531c59f72279aaeda6ceb23b..149728fa6371b4d8b0afaae769aacac2 continue; } diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 4f3a247a844844aa55d73089595d5f0b7ed49965..76666318690368bab672c2302c90dd3abb050299 100644 +index 9f2f1d286e887a2c47eb4ac6fdd7f41c595adcaf..2ed4453c7744c1c99210d581af8d68bced4659c6 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -286,7 +286,9 @@ public class StructureTemplate { +@@ -284,7 +284,9 @@ public class StructureTemplate { definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong()); } diff --git a/patches/unapplied/server/0104-Avoid-blocking-on-Network-Manager-creation.patch b/patches/server/0104-Avoid-blocking-on-Network-Manager-creation.patch similarity index 73% rename from patches/unapplied/server/0104-Avoid-blocking-on-Network-Manager-creation.patch rename to patches/server/0104-Avoid-blocking-on-Network-Manager-creation.patch index 4c0273aeef..6b2244d6ee 100644 --- a/patches/unapplied/server/0104-Avoid-blocking-on-Network-Manager-creation.patch +++ b/patches/server/0104-Avoid-blocking-on-Network-Manager-creation.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Avoid blocking on Network Manager creation Per Paper issue 294 diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index a44520e8fb35d349d6481f369e39db1fdb475749..0e04532b8f1d48116eb46dcef7952bfcc0d11394 100644 +index 6c4e41d1d9e16492b1e47b5047810b8ffca992e5..776528e50a5abc0e02d9de99231fb47352aa4f43 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -@@ -63,6 +63,15 @@ public class ServerConnectionListener { +@@ -60,6 +60,15 @@ public class ServerConnectionListener { public volatile boolean running; private final List channels = Collections.synchronizedList(Lists.newArrayList()); final List connections = Collections.synchronizedList(Lists.newArrayList()); @@ -25,17 +25,17 @@ index a44520e8fb35d349d6481f369e39db1fdb475749..0e04532b8f1d48116eb46dcef7952bfc public ServerConnectionListener(MinecraftServer server) { this.server = server; -@@ -98,7 +107,8 @@ public class ServerConnectionListener { +@@ -97,7 +106,8 @@ public class ServerConnectionListener { int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond(); - Object object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); + Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error -- ServerConnectionListener.this.connections.add((Connection) object); // CraftBukkit - decompile error -+ // ServerConnectionListener.this.connections.add((Connection) object); // CraftBukkit - decompile error -+ pending.add((Connection) object); // Paper - channel.pipeline().addLast("packet_handler", (ChannelHandler) object); +- ServerConnectionListener.this.connections.add(object); ++ //ServerConnectionListener.this.connections.add(object); ++ pending.add(object); // Paper + channelpipeline.addLast("packet_handler", (ChannelHandler) object); ((Connection) object).setListener(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object)); } -@@ -157,6 +167,7 @@ public class ServerConnectionListener { +@@ -158,6 +168,7 @@ public class ServerConnectionListener { synchronized (this.connections) { // Spigot Start diff --git a/patches/unapplied/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch b/patches/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch similarity index 100% rename from patches/unapplied/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch rename to patches/server/0105-Don-t-lookup-game-profiles-that-have-no-UUID-and-no-.patch diff --git a/patches/unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0106-Add-setting-for-proxy-online-mode-status.patch similarity index 95% rename from patches/unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch rename to patches/server/0106-Add-setting-for-proxy-online-mode-status.patch index fd1dbb6512..c035f73293 100644 --- a/patches/unapplied/server/0106-Add-setting-for-proxy-online-mode-status.patch +++ b/patches/server/0106-Add-setting-for-proxy-online-mode-status.patch @@ -43,10 +43,10 @@ index da98f074ccd5a40c635824112c97fd174c393cb1..6599f874d9f97e9ef4862039ecad7277 } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3a046d3eb6bca6f45f8018a3844c58ac8cba43ac..84a7c0b7826fba63adef2fe7a81fbe9b255d2ecf 100644 +index 844cef6971ae6520edcd6d794ff76040509c4552..423b76b6852cf1eabd491d4c654b78e29a84e44b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1715,7 +1715,7 @@ public final class CraftServer implements Server { +@@ -1714,7 +1714,7 @@ public final class CraftServer implements Server { // Spigot Start GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/patches/unapplied/server/0107-Optimise-BlockState-s-hashCode-equals.patch b/patches/server/0107-Optimise-BlockState-s-hashCode-equals.patch similarity index 95% rename from patches/unapplied/server/0107-Optimise-BlockState-s-hashCode-equals.patch rename to patches/server/0107-Optimise-BlockState-s-hashCode-equals.patch index 53db895e2e..25c77d7328 100644 --- a/patches/unapplied/server/0107-Optimise-BlockState-s-hashCode-equals.patch +++ b/patches/server/0107-Optimise-BlockState-s-hashCode-equals.patch @@ -51,10 +51,10 @@ index 59b5b22a567e4e2be499a2a35aedb10218a7432a..bdbe0362e49e73c05237f9f3143230e0 return true; } else if (object instanceof IntegerProperty && super.equals(object)) { diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java -index 5a973c1536291e79aa8377ca5bda8ef84127e20a..a37424bbc6bee02354abaa793aa0865c556c6bbe 100644 +index d1f2e29623b15fdb99ba082fd757a54fd4713761..66b8e23d799adaf872233ea44c54330d75135544 100644 --- a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java +++ b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java -@@ -68,14 +68,7 @@ public abstract class Property> { +@@ -70,14 +70,7 @@ public abstract class Property> { @Override public boolean equals(Object object) { diff --git a/patches/unapplied/server/0108-Configurable-packet-in-spam-threshold.patch b/patches/server/0108-Configurable-packet-in-spam-threshold.patch similarity index 90% rename from patches/unapplied/server/0108-Configurable-packet-in-spam-threshold.patch rename to patches/server/0108-Configurable-packet-in-spam-threshold.patch index 252915bd57..3ec6ee244d 100644 --- a/patches/unapplied/server/0108-Configurable-packet-in-spam-threshold.patch +++ b/patches/server/0108-Configurable-packet-in-spam-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 050e8f545f5cc86985d3dbbe3192f632b64af66f..f0303267251e9f9b30897159b239db85d1170591 100644 +index 76f7ddbbba4be5c31d70ce9af9e041e69ee31662..dc723382685e9b50ffe0fea3118a1121db1da9fb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1604,13 +1604,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1594,13 +1594,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot start - limit place/interactions private int limitedPackets; private long lastLimitedPacket = -1; diff --git a/patches/unapplied/server/0109-Configurable-flying-kick-messages.patch b/patches/server/0109-Configurable-flying-kick-messages.patch similarity index 86% rename from patches/unapplied/server/0109-Configurable-flying-kick-messages.patch rename to patches/server/0109-Configurable-flying-kick-messages.patch index cd55262734..20eb89113d 100644 --- a/patches/unapplied/server/0109-Configurable-flying-kick-messages.patch +++ b/patches/server/0109-Configurable-flying-kick-messages.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Configurable flying kick messages diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f0303267251e9f9b30897159b239db85d1170591..534ae13641f36f94abb3a62538b072c7afc587fe 100644 +index dc723382685e9b50ffe0fea3118a1121db1da9fb..4ccb315828005258f5bd4c4a651d572e439c4909 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -351,7 +351,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) { +@@ -353,7 +353,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) { if (++this.aboveGroundTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); - this.disconnect(Component.translatable("multiplayer.disconnect.flying")); @@ -17,7 +17,7 @@ index f0303267251e9f9b30897159b239db85d1170591..534ae13641f36f94abb3a62538b072c7 return; } } else { -@@ -370,7 +370,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -372,7 +372,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); diff --git a/patches/unapplied/server/0110-Add-EntityZapEvent.patch b/patches/server/0110-Add-EntityZapEvent.patch similarity index 91% rename from patches/unapplied/server/0110-Add-EntityZapEvent.patch rename to patches/server/0110-Add-EntityZapEvent.patch index ed04da07aa..23ba8ae8b1 100644 --- a/patches/unapplied/server/0110-Add-EntityZapEvent.patch +++ b/patches/server/0110-Add-EntityZapEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityZapEvent diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 18ba4b9d9b68088afd48d1f12cec6b155ea84159..dfc67cd0ef52939be5e5a9952cfcdb4d87bf0d82 100644 +index efbf6b316a70b94e4bd490df8ebe77cd9f638ba4..cad8854cc7523d60c06ca1f03bfd4fbff984087c 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -837,10 +837,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -849,10 +849,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public void thunderHit(ServerLevel world, LightningBolt lightning) { if (world.getDifficulty() != Difficulty.PEACEFUL) { @@ -28,7 +28,7 @@ index 18ba4b9d9b68088afd48d1f12cec6b155ea84159..dfc67cd0ef52939be5e5a9952cfcdb4d entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null); entitywitch.setNoAi(this.isNoAi()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3b520b1301eb0225cdcbb271c8032726c59d3990..d8ebe20844136f2a5b395669dcfdd7f6bbc6fff3 100644 +index 7bcbd1aac8826c76b74ef0e517b9d94e615df347..8451c482eb92e7f9394490c9380cd1d6357306dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1158,6 +1158,14 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0111-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch b/patches/server/0111-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch similarity index 85% rename from patches/unapplied/server/0111-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch rename to patches/server/0111-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch index d71e5f98da..97e3512461 100644 --- a/patches/unapplied/server/0111-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch +++ b/patches/server/0111-Filter-bad-tile-entity-nbt-data-from-falling-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Filter bad tile entity nbt data from falling blocks diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 561b8d6fcf4d511fb026bcc2c02054e56589d0b7..97b2d12713d2245f1621d3ade5b5655b5897cbf4 100644 +index 5e93e55df24941a21721295ef8a3381ae19e1f26..d5c30c48a6b59b01041dffc8b4b7b70ea27f0c7d 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -331,7 +331,7 @@ public class FallingBlockEntity extends Entity { +@@ -332,7 +332,7 @@ public class FallingBlockEntity extends Entity { this.dropItem = nbt.getBoolean("DropItem"); } diff --git a/patches/unapplied/server/0112-Cache-user-authenticator-threads.patch b/patches/server/0112-Cache-user-authenticator-threads.patch similarity index 97% rename from patches/unapplied/server/0112-Cache-user-authenticator-threads.patch rename to patches/server/0112-Cache-user-authenticator-threads.patch index d595f3d256..f213709d7c 100644 --- a/patches/unapplied/server/0112-Cache-user-authenticator-threads.patch +++ b/patches/server/0112-Cache-user-authenticator-threads.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index a6e90e70730e106d1cac01abf7a41df8df787d89..453a9dd794c39be5e7221b05fabb71b802691003 100644 +index 7983033160b77e28eb8135f8709dacd6b806ebe3..9fd44505c33b7ad578d6a471aca8e1c2df5c7dcd 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -112,6 +112,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0113-Allow-Reloading-of-Command-Aliases.patch similarity index 90% rename from patches/unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch rename to patches/server/0113-Allow-Reloading-of-Command-Aliases.patch index 3aa6006a4b..842ef3bf21 100644 --- a/patches/unapplied/server/0113-Allow-Reloading-of-Command-Aliases.patch +++ b/patches/server/0113-Allow-Reloading-of-Command-Aliases.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 84a7c0b7826fba63adef2fe7a81fbe9b255d2ecf..6396640956daf60bdd885face69425e8ca177d8f 100644 +index 423b76b6852cf1eabd491d4c654b78e29a84e44b..9044c35ab2d747c89312c2d98fe4c910ddd1365b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2572,5 +2572,24 @@ public final class CraftServer implements Server { +@@ -2570,5 +2570,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/patches/unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch b/patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch similarity index 92% rename from patches/unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch rename to patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch index 62afde20c7..d18f4cf552 100644 --- a/patches/unapplied/server/0114-Add-source-to-PlayerExpChangeEvent.patch +++ b/patches/server/0114-Add-source-to-PlayerExpChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index baa5cc93ec210032fcbe493d473396964288933f..c12493cc369f632c4aa9535cde9b8629a0b2eb86 100644 +index 5391c60398c8a7d1d49dc2e73116b27862653873..5a79b49e321cba352d8e4189dfbfdd0506ec3e5a 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -248,7 +248,7 @@ public class ExperienceOrb extends Entity { @@ -18,7 +18,7 @@ index baa5cc93ec210032fcbe493d473396964288933f..c12493cc369f632c4aa9535cde9b8629 --this.count; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d8ebe20844136f2a5b395669dcfdd7f6bbc6fff3..71364663b577dedd62993808d764b4e4a91322d5 100644 +index 8451c482eb92e7f9394490c9380cd1d6357306dc..6bb518a2d9610157b48209241f98c29b1f80158d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1117,6 +1117,17 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0115-Add-ProjectileCollideEvent.patch b/patches/server/0115-Add-ProjectileCollideEvent.patch similarity index 96% rename from patches/unapplied/server/0115-Add-ProjectileCollideEvent.patch rename to patches/server/0115-Add-ProjectileCollideEvent.patch index 47440e34b8..9d9ecfa83d 100644 --- a/patches/unapplied/server/0115-Add-ProjectileCollideEvent.patch +++ b/patches/server/0115-Add-ProjectileCollideEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add ProjectileCollideEvent Deprecated now and replaced with ProjectileHitEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 71364663b577dedd62993808d764b4e4a91322d5..24814f91088b835e398d4d5fa1c895a3b1cdb086 100644 +index 6bb518a2d9610157b48209241f98c29b1f80158d..71b43f56119977c8c28fc255933a851c1f88260f 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1261,6 +1261,17 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0116-Prevent-Pathfinding-out-of-World-Border.patch b/patches/server/0116-Prevent-Pathfinding-out-of-World-Border.patch similarity index 91% rename from patches/unapplied/server/0116-Prevent-Pathfinding-out-of-World-Border.patch rename to patches/server/0116-Prevent-Pathfinding-out-of-World-Border.patch index 86761f9443..ab2c4ff13d 100644 --- a/patches/unapplied/server/0116-Prevent-Pathfinding-out-of-World-Border.patch +++ b/patches/server/0116-Prevent-Pathfinding-out-of-World-Border.patch @@ -13,10 +13,10 @@ by adding code to all overrides in: to return BLOCKED if it is outside the world border. 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 bd782c8935db6e0aa3489725d3c4ee401f9bf242..bf89b3a484334ec23f96426bdcf29e54725512c3 100644 +index 64b64fb0b72eccade63fac99b7b363aafe59169b..46c2885097ab768bb9d62187fe0ad2d61007d353 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 -@@ -157,7 +157,7 @@ public abstract class PathNavigation { +@@ -158,7 +158,7 @@ public abstract class PathNavigation { // Paper start - Pathfind event boolean copiedSet = false; for (BlockPos possibleTarget : positions) { diff --git a/patches/unapplied/server/0117-Optimize-World.isLoaded-BlockPosition-Z.patch b/patches/server/0117-Optimize-World.isLoaded-BlockPosition-Z.patch similarity index 86% rename from patches/unapplied/server/0117-Optimize-World.isLoaded-BlockPosition-Z.patch rename to patches/server/0117-Optimize-World.isLoaded-BlockPosition-Z.patch index 502ee4a5fd..294953144f 100644 --- a/patches/unapplied/server/0117-Optimize-World.isLoaded-BlockPosition-Z.patch +++ b/patches/server/0117-Optimize-World.isLoaded-BlockPosition-Z.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c834428e04eab9639cfa9d07513d695dcb3bfce9..64abe2a075c1b2ee18cb691599ef5223953108f3 100644 +index 7ea68dc8e8bf3795013acbbde0c55a9ff833dfbd..1a0accca970ca5eb895c63c5a45a5261440d0e12 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -338,6 +338,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -344,6 +344,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return chunk == null ? null : chunk.getFluidState(blockposition); } diff --git a/patches/unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch b/patches/server/0118-Bound-Treasure-Maps-to-World-Border.patch similarity index 93% rename from patches/unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch rename to patches/server/0118-Bound-Treasure-Maps-to-World-Border.patch index f98ee93868..ebccf361c8 100644 --- a/patches/unapplied/server/0118-Bound-Treasure-Maps-to-World-Border.patch +++ b/patches/server/0118-Bound-Treasure-Maps-to-World-Border.patch @@ -11,7 +11,7 @@ that is outside happens to be closer, but unreachable, yet another reachable one is in border that would of been missed. diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java -index 6ec5a1525d0b8ced8fe78d3eab29c5eb82996844..2442c287a7f26cfee10a19e9015558cdebdcf3ac 100644 +index 52325a99ea38530ad69a39ac0215233139f35268..dd74e8a034022fe72a1652f92712182b4910f651 100644 --- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java +++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java @@ -37,6 +37,18 @@ public class WorldBorder { @@ -34,7 +34,7 @@ index 6ec5a1525d0b8ced8fe78d3eab29c5eb82996844..2442c287a7f26cfee10a19e9015558cd return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ(); } diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index 2d89c415fe4e76bff51374d50f1a7efbaace134e..b6df6077107759963ee8205dddb90501d5ccb4d6 100644 +index 5ca3987683f7cecbce24bac434dc387bb5e9bf08..56033c41c2be567d6787420d319d4603fc0a1d10 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java @@ -217,6 +217,7 @@ public abstract class ChunkGenerator { diff --git a/patches/unapplied/server/0119-Configurable-Cartographer-Treasure-Maps.patch b/patches/server/0119-Configurable-Cartographer-Treasure-Maps.patch similarity index 84% rename from patches/unapplied/server/0119-Configurable-Cartographer-Treasure-Maps.patch rename to patches/server/0119-Configurable-Cartographer-Treasure-Maps.patch index 1b025a3399..bd827dfdda 100644 --- a/patches/unapplied/server/0119-Configurable-Cartographer-Treasure-Maps.patch +++ b/patches/server/0119-Configurable-Cartographer-Treasure-Maps.patch @@ -9,10 +9,10 @@ Also allow turning off treasure maps all together as they can eat up Map ID's which are limited in quantity. diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java -index 155301c03e6553de8aed55e87ece40e8f5f3f495..44a237426739fad0096b2f5108f1d25bd388ea08 100644 +index baaaac692df14a7ef66c3fa3bacaf7108d0712da..abb39a5b9d9ce50dbba80661f5c63dc9f31b784a 100644 --- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java +++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java -@@ -386,7 +386,8 @@ public class VillagerTrades { +@@ -387,7 +387,8 @@ public class VillagerTrades { return null; } else { ServerLevel serverLevel = (ServerLevel)entity.level; @@ -23,14 +23,14 @@ index 155301c03e6553de8aed55e87ece40e8f5f3f495..44a237426739fad0096b2f5108f1d25b ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true); MapItem.renderBiomePreviewMap(serverLevel, itemStack); diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java -index 5762bb0725a0e206a24d3056d9330af45afea1bd..9d40469f92db025e760ed1603018fcb1f43dace5 100644 +index a8a1e71cfa1cc956d81e5c0d118c57658d272a2d..481456fd69d773e8f3b4eaede3849ce4e599c80f 100644 --- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java +++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java @@ -68,7 +68,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction { Vec3 vec3 = context.getParamOrNull(LootContextParams.ORIGIN); if (vec3 != null) { ServerLevel serverLevel = context.getLevel(); -- BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, new BlockPos(vec3), this.searchRadius, this.skipKnownStructures); +- BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, BlockPos.containing(vec3), this.searchRadius, this.skipKnownStructures); + // Paper start + if (!serverLevel.paperConfig().environment.treasureMaps.enabled) { + /* @@ -40,7 +40,7 @@ index 5762bb0725a0e206a24d3056d9330af45afea1bd..9d40469f92db025e760ed1603018fcb1 + return stack; + } + // Paper end -+ BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, new BlockPos(vec3), this.searchRadius, !serverLevel.paperConfig().environment.treasureMaps.findAlreadyDiscoveredLootTable.or(!this.skipKnownStructures)); // Paper ++ BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, BlockPos.containing(vec3), this.searchRadius, !serverLevel.paperConfig().environment.treasureMaps.findAlreadyDiscoveredLootTable.or(!this.skipKnownStructures)); // Paper if (blockPos != null) { ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), this.zoom, true, true); MapItem.renderBiomePreviewMap(serverLevel, itemStack); diff --git a/patches/unapplied/server/0120-Optimize-ItemStack.isEmpty.patch b/patches/server/0120-Optimize-ItemStack.isEmpty.patch similarity index 85% rename from patches/unapplied/server/0120-Optimize-ItemStack.isEmpty.patch rename to patches/server/0120-Optimize-ItemStack.isEmpty.patch index 3e2d20df38..41fc66ad8c 100644 --- a/patches/unapplied/server/0120-Optimize-ItemStack.isEmpty.patch +++ b/patches/server/0120-Optimize-ItemStack.isEmpty.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty() Remove hashMap lookup every check, simplify code to remove ternary diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 87031aa69148118d9f5bf16cb8a55cf72f9d0a1d..cf47b0bed013b3242b516198ff7006aab5452d7e 100644 +index a36dac14b03a9af1303ac7f572f2cb71196f644c..58de6780b208934af9fe608c8a47978392b5f6d2 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -249,7 +249,7 @@ public final class ItemStack { +@@ -250,7 +250,7 @@ public final class ItemStack { } public boolean isEmpty() { diff --git a/patches/unapplied/server/0121-Add-API-methods-to-control-if-armour-stands-can-move.patch b/patches/server/0121-Add-API-methods-to-control-if-armour-stands-can-move.patch similarity index 90% rename from patches/unapplied/server/0121-Add-API-methods-to-control-if-armour-stands-can-move.patch rename to patches/server/0121-Add-API-methods-to-control-if-armour-stands-can-move.patch index 59fc5fcbf3..cf45718015 100644 --- a/patches/unapplied/server/0121-Add-API-methods-to-control-if-armour-stands-can-move.patch +++ b/patches/server/0121-Add-API-methods-to-control-if-armour-stands-can-move.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add API methods to control if armour stands can move diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 3869aae0bcf3d4fb53009b314f8b869198e26ce5..58882569595a21b0499921dfddcbc9d01248cf1c 100644 +index 426364e0d47c022000813d2945a98d9edb6f6028..970beff5d2c5b3ba3e3b733183d6876d8bc37da9 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -91,6 +91,7 @@ public class ArmorStand extends LivingEntity { +@@ -92,6 +92,7 @@ public class ArmorStand extends LivingEntity { public Rotations rightArmPose; public Rotations leftLegPose; public Rotations rightLegPose; @@ -16,7 +16,7 @@ index 3869aae0bcf3d4fb53009b314f8b869198e26ce5..58882569595a21b0499921dfddcbc9d0 public ArmorStand(EntityType type, Level world) { super(type, world); -@@ -926,4 +927,13 @@ public class ArmorStand extends LivingEntity { +@@ -943,4 +944,13 @@ public class ArmorStand extends LivingEntity { public boolean canBeSeenByAnyone() { return !this.isInvisible() && !this.isMarker(); } diff --git a/patches/unapplied/server/0122-String-based-Action-Bar-API.patch b/patches/server/0122-String-based-Action-Bar-API.patch similarity index 94% rename from patches/unapplied/server/0122-String-based-Action-Bar-API.patch rename to patches/server/0122-String-based-Action-Bar-API.patch index 11977035cf..6564d5f81b 100644 --- a/patches/unapplied/server/0122-String-based-Action-Bar-API.patch +++ b/patches/server/0122-String-based-Action-Bar-API.patch @@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad // Paper end buf.writeComponent(this.text); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b08b72f8c029faae9b9d425e8ce77a1ff23addd7..aa81018c455629659df34802002105966bd89de3 100644 +index 023e477ebe24aff03767a3179e7b2f0e653ffa12..981ac7ad6efb4024216a0967fd4c2f01245a8816 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -357,6 +357,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -358,6 +358,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper start diff --git a/patches/unapplied/server/0123-Properly-fix-item-duplication-bug.patch b/patches/server/0123-Properly-fix-item-duplication-bug.patch similarity index 81% rename from patches/unapplied/server/0123-Properly-fix-item-duplication-bug.patch rename to patches/server/0123-Properly-fix-item-duplication-bug.patch index c143764110..efdd133d52 100644 --- a/patches/unapplied/server/0123-Properly-fix-item-duplication-bug.patch +++ b/patches/server/0123-Properly-fix-item-duplication-bug.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug Credit to prplz for figuring out the real issue diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index cba9b5586048500d91081cc8ef2ad7ae2bb7a816..04912bd14a2b03ca123561a3e21a812b8f806366 100644 +index b3d285b920a2ec83c320b842183ae8e2d491c455..66705a8fb0ba4ca27136ee75420a08bc99ebd965 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2243,7 +2243,7 @@ public class ServerPlayer extends Player { +@@ -2268,7 +2268,7 @@ public class ServerPlayer extends Player { @Override public boolean isImmobile() { @@ -19,10 +19,10 @@ index cba9b5586048500d91081cc8ef2ad7ae2bb7a816..04912bd14a2b03ca123561a3e21a812b @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 534ae13641f36f94abb3a62538b072c7afc587fe..d0cef1be518aa788a6a2ce7788887afb66259b66 100644 +index 4ccb315828005258f5bd4c4a651d572e439c4909..487031aec842719a72abf0037409520ca98ce3f7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3169,7 +3169,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3178,7 +3178,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public final boolean isDisconnected() { diff --git a/patches/unapplied/server/0124-Firework-API-s.patch b/patches/server/0124-Firework-API-s.patch similarity index 87% rename from patches/unapplied/server/0124-Firework-API-s.patch rename to patches/server/0124-Firework-API-s.patch index e5656b6c22..1b23b10a05 100644 --- a/patches/unapplied/server/0124-Firework-API-s.patch +++ b/patches/server/0124-Firework-API-s.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Firework API's public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72cea7bfc3a1 100644 +index 26a7e2fb8d403c748925bc34a0a9b0e63a6c3452..fca27f98989bf106060ba08196255fe32f850df5 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -@@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { +@@ -38,6 +38,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { public int lifetime; @Nullable public LivingEntity attachedToEntity; @@ -18,7 +18,7 @@ index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72ce public FireworkRocketEntity(EntityType type, Level world) { super(type, world); -@@ -318,6 +319,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { +@@ -317,6 +318,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { } nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE)); @@ -30,7 +30,7 @@ index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72ce } @Override -@@ -334,7 +340,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { +@@ -333,7 +339,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { if (nbt.contains("ShotAtAngle")) { this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle")); } @@ -44,10 +44,10 @@ index 4abcdc515411372006ff5d33510bdd64092c186a..5406925cd66f46ab8744123c670d72ce @Override diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java -index 4b8ad27c8682f112c4964849d9bdfcf4c355701f..48626d564c9fb4630b51858edd124b56af2d7ca0 100644 +index 98b353d059aa0a08d41973344ee0b56cde90b8be..e6249409d01aee2bdc84821d40ce4551c102d307 100644 --- a/src/main/java/net/minecraft/world/item/CrossbowItem.java +++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java -@@ -220,6 +220,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable { +@@ -221,6 +221,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable { if (flag1) { object = new FireworkRocketEntity(world, projectile, shooter, shooter.getX(), shooter.getEyeY() - 0.15000000596046448D, shooter.getZ(), true); @@ -56,10 +56,10 @@ index 4b8ad27c8682f112c4964849d9bdfcf4c355701f..48626d564c9fb4630b51858edd124b56 object = CrossbowItem.getArrow(world, shooter, crossbow, projectile); if (creative || simulated != 0.0F) { diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -index 1d99d03c1ce0a647b053e8b7bd1e2da58805c4f8..854856ca742dff800ac5d7bf0af4f79cf631540b 100644 +index 5cafb6f0b507127665393741b372286da098d603..7c627d27300247db9122ab2081049345ef306073 100644 --- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java +++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -@@ -45,6 +45,7 @@ public class FireworkRocketItem extends Item { +@@ -46,6 +46,7 @@ public class FireworkRocketItem extends Item { Vec3 vec3 = context.getClickLocation(); Direction direction = context.getClickedFace(); FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(level, context.getPlayer(), vec3.x + (double)direction.getStepX() * 0.15D, vec3.y + (double)direction.getStepY() * 0.15D, vec3.z + (double)direction.getStepZ() * 0.15D, itemStack); @@ -67,7 +67,7 @@ index 1d99d03c1ce0a647b053e8b7bd1e2da58805c4f8..854856ca742dff800ac5d7bf0af4f79c level.addFreshEntity(fireworkRocketEntity); itemStack.shrink(1); } -@@ -58,6 +59,7 @@ public class FireworkRocketItem extends Item { +@@ -59,6 +60,7 @@ public class FireworkRocketItem extends Item { ItemStack itemStack = user.getItemInHand(hand); if (!world.isClientSide) { FireworkRocketEntity fireworkRocketEntity = new FireworkRocketEntity(world, itemStack, user); diff --git a/patches/unapplied/server/0125-PlayerTeleportEndGatewayEvent.patch b/patches/server/0125-PlayerTeleportEndGatewayEvent.patch similarity index 94% rename from patches/unapplied/server/0125-PlayerTeleportEndGatewayEvent.patch rename to patches/server/0125-PlayerTeleportEndGatewayEvent.patch index 6aad00dd7a..98163ff384 100644 --- a/patches/unapplied/server/0125-PlayerTeleportEndGatewayEvent.patch +++ b/patches/server/0125-PlayerTeleportEndGatewayEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent Allows you to access the Gateway being used in a teleport event diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 553f8314118adc64a6af9aee9351598b2991d18d..9c4469d46cb7a2cc781f6498d3e4ec6a9415d12e 100644 +index 904e23ad2f148f991ab8d94e5d8d989cdc98268a..7d2b15edbd1a6bf663c29b7bc63c73d34fefd999 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java @@ -12,6 +12,7 @@ import net.minecraft.data.worldgen.features.EndFeatures; diff --git a/patches/unapplied/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch similarity index 92% rename from patches/unapplied/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch rename to patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch index 925242874d..be8b776bd5 100644 --- a/patches/unapplied/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 64abe2a075c1b2ee18cb691599ef5223953108f3..94e527fa7db9822a15711c80107a2d99eacbaac5 100644 +index 1a0accca970ca5eb895c63c5a45a5261440d0e12..35eecb719a813fda6113da24a858188aef31466b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -115,7 +115,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -117,7 +117,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public static final int TICKS_PER_DAY = 24000; public static final int MAX_ENTITY_SPAWN_Y = 20000000; public static final int MIN_ENTITY_SPAWN_Y = -20000000; @@ -20,7 +20,7 @@ index 64abe2a075c1b2ee18cb691599ef5223953108f3..94e527fa7db9822a15711c80107a2d99 private final List pendingBlockEntityTickers = Lists.newArrayList(); private boolean tickingBlockEntities; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 958c5faeddd3ee54ac2880eb3eb9e4ab2bba2540..3f6e5e4d36e8170def4ce50e29cdfcc7e25f4f4d 100644 +index 30137f60a3796cf845e8fd7bd3c291be979b8b0c..030ad193dc657810709817c55fb3eb9a08d41459 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -151,6 +151,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0127-Enforce-Sync-Player-Saves.patch b/patches/server/0127-Enforce-Sync-Player-Saves.patch similarity index 87% rename from patches/unapplied/server/0127-Enforce-Sync-Player-Saves.patch rename to patches/server/0127-Enforce-Sync-Player-Saves.patch index a5bd8157cc..510eaf2f15 100644 --- a/patches/unapplied/server/0127-Enforce-Sync-Player-Saves.patch +++ b/patches/server/0127-Enforce-Sync-Player-Saves.patch @@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main the same way we handle async chunk loads. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e39619717f089162e2e3bf12cd00eb390a59c4bf..274f396d5bc01ac1cbeec4a1f2010b3e79fa1568 100644 +index 75385e9b0886978b4c435ecce354498a26f9ec4c..175041e2560203712e1a826abcf732efcdec97cc 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1052,11 +1052,13 @@ public abstract class PlayerList { +@@ -1059,11 +1059,13 @@ public abstract class PlayerList { } public void saveAll() { diff --git a/patches/unapplied/server/0128-Don-t-allow-entities-to-ride-themselves-572.patch b/patches/server/0128-Don-t-allow-entities-to-ride-themselves-572.patch similarity index 84% rename from patches/unapplied/server/0128-Don-t-allow-entities-to-ride-themselves-572.patch rename to patches/server/0128-Don-t-allow-entities-to-ride-themselves-572.patch index cbd3e1b0c8..f50e947abd 100644 --- a/patches/unapplied/server/0128-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/patches/server/0128-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0c0060cdc35e0d8d3098a0ade8080f91dbc81a2b..a28aa788f46dc944e174957fbed23dfeeff1eb72 100644 +index 384e4371e56d877118cb68e4ca94a0cc38b4d101..6d76be16ba1b35a65b851c2c861093c9998fcc61 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2404,6 +2404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2417,6 +2417,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/patches/unapplied/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch similarity index 91% rename from patches/unapplied/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch rename to patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index 9e41b0f23a..04019fdf60 100644 --- a/patches/unapplied/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/patches/server/0129-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -21,7 +21,7 @@ index 7f87800a8371c80ef216f4ed0526639f43a20232..2775203a5bb7392428f1305730761e42 return true; diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index c12493cc369f632c4aa9535cde9b8629a0b2eb86..2ba92563f95e2899db29bf9b017e1b385a5bda3c 100644 +index 5a79b49e321cba352d8e4189dfbfdd0506ec3e5a..f9488311524bb8ff8a5686763973c9ae0053668d 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -38,13 +38,65 @@ public class ExperienceOrb extends Entity { @@ -131,10 +131,10 @@ index c12493cc369f632c4aa9535cde9b8629a0b2eb86..2ba92563f95e2899db29bf9b017e1b38 @Override diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 16ec3763e6d13a2dd3e1cc8cd898c6d783ac070c..728370332d284fbe95fed57f4e5a88cabbe3f146 100644 +index d0d38e39010ba3398a0b8960bc674c39d9a9ff51..e004dffee9f1efe44c78f9b2e938b98cc4b2b847 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1727,7 +1727,8 @@ public abstract class LivingEntity extends Entity { +@@ -1716,7 +1716,8 @@ public abstract class LivingEntity extends Entity implements Attackable { protected void dropExperience() { // CraftBukkit start - Update getExpReward() above if the removed if() changes! if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time @@ -158,10 +158,10 @@ index 3cdd7180a41b87caa942d2b3436ba90726686ecb..6216513805add7c8f52e1ed6c77e2d26 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 125498c2cd1c3846e05a91774bb028e7a01fb238..dd124ccbdc7efe0e41b3a04abddcb328cac44948 100644 +index 18344ba254756bcf81061f46bc44c0cc37358433..13061aed29649acfc52d13207aaebcd8ba339ebe 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java -@@ -897,7 +897,7 @@ public class Fox extends Animal implements VariantHolder { +@@ -898,7 +898,7 @@ public class Fox extends Animal implements VariantHolder { if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // CraftBukkit start - use event experience if (experience > 0) { @@ -171,10 +171,10 @@ index 125498c2cd1c3846e05a91774bb028e7a01fb238..dd124ccbdc7efe0e41b3a04abddcb328 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index 721b6a5b4775877cc9f75d25379b4fb7c7cb3178..ab4e8ff5fe4f53bfda1d7b152aa89e6772bc3a16 100644 +index a42f419524ddb5263467b59075850ff24920d21d..fb5af59559bc18ce2850d95ef73e5545dcab5ebc 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -@@ -450,7 +450,7 @@ public class Turtle extends Animal { +@@ -455,7 +455,7 @@ public class Turtle extends Animal { RandomSource randomsource = this.animal.getRandom(); if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { @@ -184,10 +184,10 @@ index 721b6a5b4775877cc9f75d25379b4fb7c7cb3178..ab4e8ff5fe4f53bfda1d7b152aa89e67 } 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 8852cc6253c8bc1a9f7591cd2b0beb95bb4f4d33..f2e84e832ad95df26fe3b9ba439ce38fc59b3585 100644 +index c12b8831deb54deb191908ba8a769d4c78825d5b..1b3d462e1e229970c53f763b5cdce7d21f1b1703 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 -@@ -277,7 +277,7 @@ public class Frog extends Animal implements VariantHolder { +@@ -264,7 +264,7 @@ public class Frog extends Animal implements VariantHolder { this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE); world.broadcastEntityEvent(this, (byte)18); if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { @@ -197,10 +197,10 @@ index 8852cc6253c8bc1a9f7591cd2b0beb95bb4f4d33..f2e84e832ad95df26fe3b9ba439ce38f } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 89366ca29386fcbd03c3fc94d58451e714a1d779..a889be9dd2a94b531a227ff69a5e761e103067be 100644 +index 039a5246a2e9a5e84f3b712f1d138053605b33ec..18a9050158f71245d5d88f9c0833fd5d4e5fdca6 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -647,7 +647,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -649,7 +649,7 @@ public class EnderDragon extends Mob implements Enemy { if (this.level instanceof ServerLevel) { if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp @@ -210,7 +210,7 @@ index 89366ca29386fcbd03c3fc94d58451e714a1d779..a889be9dd2a94b531a227ff69a5e761e if (this.dragonDeathTime == 1 && !this.isSilent()) { @@ -677,7 +677,7 @@ public class EnderDragon extends Mob implements Enemy { - this.yBodyRot = this.getYRot(); + this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D)); if (this.dragonDeathTime == 200 && this.level instanceof ServerLevel) { if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp - ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.2F)); @@ -219,10 +219,10 @@ index 89366ca29386fcbd03c3fc94d58451e714a1d779..a889be9dd2a94b531a227ff69a5e761e if (this.dragonFight != null) { diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index dfc67cd0ef52939be5e5a9952cfcdb4d87bf0d82..bbbb26550b0c5b36d9c7204f075aa90b79b85ff0 100644 +index cad8854cc7523d60c06ca1f03bfd4fbff984087c..806c49c127578a8f0a0bde11a4ad213e18d629af 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -624,7 +624,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -636,7 +636,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler } if (offer.shouldRewardExp()) { @@ -232,10 +232,10 @@ index dfc67cd0ef52939be5e5a9952cfcdb4d87bf0d82..bbbb26550b0c5b36d9c7204f075aa90b } diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index 9bc9307966b77e34cb091fc895db3d3a66f7be82..e594cf4b8084b7448c29208a2070e766e391713d 100644 +index 6a56b3c12a733662b23c984975f8dfdb43cf6f9b..69ab58f2d8d9287a64f330a02e7cd3be3fe02402 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -186,7 +186,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill +@@ -197,7 +197,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill if (offer.shouldRewardExp()) { int i = 3 + this.random.nextInt(4); @@ -245,7 +245,7 @@ index 9bc9307966b77e34cb091fc895db3d3a66f7be82..e594cf4b8084b7448c29208a2070e766 } diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index 9d0df8d64a2cfd2458295a214829f277798030f0..75449d8575ac1b67aaa94d0f3fc08244728ec8a8 100644 +index d9a01dbd9bcdf634b906b369222e6e7ba90dc7c5..7d058efff8820727e2e8531bdd57f85059b5ca30 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -514,7 +514,7 @@ public class FishingHook extends Projectile { @@ -271,7 +271,7 @@ index db6b1a9804a6d75dce22b780044beb04ca69cc94..dcbbff3a8dfcac869f07025e0e8e3d9c } diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -index 3a4808cd669d68e030de081ba17e028cbb652386..e3c3d202a9852adf32d5e94c9011c3799668419b 100644 +index 2ad1bffec6242af06b33cc777f27034ed6d6c437..5bcd3857fd30ec43e0191a862fc9c7712149e3dd 100644 --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java @@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -284,7 +284,7 @@ index 3a4808cd669d68e030de081ba17e028cbb652386..e3c3d202a9852adf32d5e94c9011c379 world.levelEvent(1042, blockposition, 0); diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 6b22de4b22aeec101076199f1e20376dd4b31f4d..11b0b1a217648496ccf08f09bb3aa53904ffa9cb 100644 +index 6603be2c0906c8d78e7de5c3dbed56f9552ff9c1..f475926cfa6fc98f9f8f4fe8be6fd200cce39c7e 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -374,8 +374,13 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -303,10 +303,10 @@ index 6b22de4b22aeec101076199f1e20376dd4b31f4d..11b0b1a217648496ccf08f09bb3aa539 } diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index 04e7716f7a9b5d203aacd83b89b610760a19bb9e..8137682be60eb617738f7b257780a49182ef970c 100644 +index 9b54fd08fae889ac9db09ba67deb5eaae0f3d010..4ed87cc5a46d9e10c755631a16f0e0cb388fb7f2 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -636,7 +636,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -637,7 +637,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit j = event.getExpToDrop(); // CraftBukkit end @@ -316,10 +316,10 @@ index 04e7716f7a9b5d203aacd83b89b610760a19bb9e..8137682be60eb617738f7b257780a491 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 6dbfd907766422258790f23a3279d2013db3de24..7e16cb08ca1ab2c0b6c0079ac7ffe00cfd758e18 100644 +index 9682b8ddc3b2f127217fcd569881691098cf9973..f8399f63d7b511dfeb7a7ee9d24f848afd16e8c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -915,7 +915,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -925,7 +925,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { } else if (TNTPrimed.class.isAssignableFrom(clazz)) { entity = new PrimedTnt(world, x, y, z, null); } else if (ExperienceOrb.class.isAssignableFrom(clazz)) { diff --git a/patches/unapplied/server/0130-Cap-Entity-Collisions.patch b/patches/server/0130-Cap-Entity-Collisions.patch similarity index 84% rename from patches/unapplied/server/0130-Cap-Entity-Collisions.patch rename to patches/server/0130-Cap-Entity-Collisions.patch index aff47fba24..999a259ec2 100644 --- a/patches/unapplied/server/0130-Cap-Entity-Collisions.patch +++ b/patches/server/0130-Cap-Entity-Collisions.patch @@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped. You can set this to 0 to disable collisions. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a28aa788f46dc944e174957fbed23dfeeff1eb72..760596375e26b4cd73cc378758f4bf761c3352a5 100644 +index 6d76be16ba1b35a65b851c2c861093c9998fcc61..7d839daeca968df2044bf2071bf1b5ff2b2aa3d6 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -379,6 +379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -382,6 +382,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void inactiveTick() { } // Spigot end // Paper start @@ -24,10 +24,10 @@ index a28aa788f46dc944e174957fbed23dfeeff1eb72..760596375e26b4cd73cc378758f4bf76 private org.bukkit.util.Vector origin; @javax.annotation.Nullable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 728370332d284fbe95fed57f4e5a88cabbe3f146..b6aaebb5359c8162359b377b3485c3fcf91587e1 100644 +index e004dffee9f1efe44c78f9b2e938b98cc4b2b847..2cd9c02fd664e263d9dae030d2c438a082c9e1b4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3313,8 +3313,11 @@ public abstract class LivingEntity extends Entity { +@@ -3277,8 +3277,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } } diff --git a/patches/unapplied/server/0131-Remove-CraftScheduler-Async-Task-Debugger.patch b/patches/server/0131-Remove-CraftScheduler-Async-Task-Debugger.patch similarity index 100% rename from patches/unapplied/server/0131-Remove-CraftScheduler-Async-Task-Debugger.patch rename to patches/server/0131-Remove-CraftScheduler-Async-Task-Debugger.patch diff --git a/patches/unapplied/server/0132-Do-not-let-armorstands-drown.patch b/patches/server/0132-Do-not-let-armorstands-drown.patch similarity index 83% rename from patches/unapplied/server/0132-Do-not-let-armorstands-drown.patch rename to patches/server/0132-Do-not-let-armorstands-drown.patch index a248b55fa2..d2dc0bd607 100644 --- a/patches/unapplied/server/0132-Do-not-let-armorstands-drown.patch +++ b/patches/server/0132-Do-not-let-armorstands-drown.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not let armorstands drown diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 58882569595a21b0499921dfddcbc9d01248cf1c..4398a33df4e0f0e9d28c51af3d48e41d957d7c9e 100644 +index 970beff5d2c5b3ba3e3b733183d6876d8bc37da9..8de5a556d364f29706e3391825288c8a3a75c9c8 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -935,5 +935,12 @@ public class ArmorStand extends LivingEntity { +@@ -952,5 +952,12 @@ public class ArmorStand extends LivingEntity { super.move(type, movement); } } diff --git a/patches/unapplied/server/0133-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0133-Properly-handle-async-calls-to-restart-the-server.patch similarity index 96% rename from patches/unapplied/server/0133-Properly-handle-async-calls-to-restart-the-server.patch rename to patches/server/0133-Properly-handle-async-calls-to-restart-the-server.patch index 190274f8ab..54d45acd92 100644 --- a/patches/unapplied/server/0133-Properly-handle-async-calls-to-restart-the-server.patch +++ b/patches/server/0133-Properly-handle-async-calls-to-restart-the-server.patch @@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result in corruption/dataloss. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0a419ec121bbddffa0424147c642f79d4e5eb817..ddc446e54b69c79fa0153478bb859bf981e9da5c 100644 +index e7b8e53a8709babb147a1ee3f375e96638f425a4..24f9d7314ab6c70fec42150e6065a7546c5de828 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -233,6 +233,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, ServerLevel> levels; private PlayerList playerList; private volatile boolean running; @@ -41,7 +41,7 @@ index 0a419ec121bbddffa0424147c642f79d4e5eb817..ddc446e54b69c79fa0153478bb859bf9 private boolean stopped; private int tickCount; protected final Proxy proxy; -@@ -902,7 +903,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) { diff --git a/patches/unapplied/server/0135-Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/0135-Add-configuration-option-to-prevent-player-names-fro.patch similarity index 83% rename from patches/unapplied/server/0135-Add-configuration-option-to-prevent-player-names-fro.patch rename to patches/server/0135-Add-configuration-option-to-prevent-player-names-fro.patch index 3e47a7c3ef..817ac48bdb 100644 --- a/patches/unapplied/server/0135-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/patches/server/0135-Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6396640956daf60bdd885face69425e8ca177d8f..50218a10a86926fb050b7e9ef3b17ba17fec59f7 100644 +index 9044c35ab2d747c89312c2d98fe4c910ddd1365b..3aabd7aaad60c157740d12932d0cb071ae259c21 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2591,5 +2591,10 @@ public final class CraftServer implements Server { +@@ -2589,5 +2589,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/patches/unapplied/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch similarity index 94% rename from patches/unapplied/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch rename to patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch index 44ff255f6b..834af37198 100644 --- a/patches/unapplied/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0136-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -19,7 +19,7 @@ Other changes: configuration diff --git a/build.gradle.kts b/build.gradle.kts -index 4294f230f91f03db2181d355d3be84bf032eeffb..26987f66704ae01dc25edc52734c95b9b73f4b57 100644 +index 1c183e9083a5ce2a2995ae45864c564b7cde3f53..3e8f983cd7c69e9a95bcd863349adaf22be85128 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,17 @@ plugins { @@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ddc446e54b69c79fa0153478bb859bf981e9da5c..fc040a4424144ecae03a039899f53227777cce05 100644 +index 24f9d7314ab6c70fec42150e6065a7546c5de828..44c9135e8d63df11009d5eea509c6c57e8d841c4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -168,7 +168,7 @@ import com.mojang.datafixers.util.Pair; @@ -124,7 +124,7 @@ index ddc446e54b69c79fa0153478bb859bf981e9da5c..fc040a4424144ecae03a039899f53227 import joptsimple.OptionSet; import net.minecraft.core.HolderLookup; import net.minecraft.resources.RegistryOps; -@@ -282,7 +282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; -@@ -367,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop registryManager, PlayerDataStorage saveHandler, int maxPlayers) { this.cserver = server.server = new CraftServer((DedicatedServer) server, this); @@ -236,10 +236,10 @@ index 8062488d8d9e830d07cd136465c5d9227ba1ac1d..a4e2509dbcc5bd1af309cda23f73c751 this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 50218a10a86926fb050b7e9ef3b17ba17fec59f7..5f6ddee55b2289d80c55015f44c431b7025ae944 100644 +index 3aabd7aaad60c157740d12932d0cb071ae259c21..8aaba38c7f4dc17c8536a0049be8bdea204f6481 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -48,7 +48,6 @@ import java.util.logging.Level; +@@ -41,7 +41,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; import javax.imageio.ImageIO; @@ -247,7 +247,7 @@ index 50218a10a86926fb050b7e9ef3b17ba17fec59f7..5f6ddee55b2289d80c55015f44c431b7 import net.minecraft.advancements.Advancement; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; -@@ -1285,9 +1284,13 @@ public final class CraftServer implements Server { +@@ -1280,9 +1279,13 @@ public final class CraftServer implements Server { return this.logger; } @@ -262,19 +262,18 @@ index 50218a10a86926fb050b7e9ef3b17ba17fec59f7..5f6ddee55b2289d80c55015f44c431b7 @Override public PluginCommand getPluginCommand(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ef46dc1ed538b783213651f624326b2d49c786e0..d50be10ddc8c215374c97662f839a9710fc863b4 100644 +index 34dc3555dbff9942a3ee39b27da44831f280b5a8..a736afdd6671ad36157d1d0c908b6ccb37f602b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -12,7 +12,7 @@ import java.util.logging.Level; - import java.util.logging.Logger; +@@ -13,7 +13,6 @@ import java.util.logging.Logger; import joptsimple.OptionParser; import joptsimple.OptionSet; + import joptsimple.util.PathConverter; -import org.fusesource.jansi.AnsiConsole; -+import net.minecrell.terminalconsole.TerminalConsoleAppender; // Paper public class Main { public static boolean useJline = true; -@@ -202,6 +202,8 @@ public class Main { +@@ -212,6 +211,8 @@ public class Main { } try { @@ -283,14 +282,14 @@ index ef46dc1ed538b783213651f624326b2d49c786e0..d50be10ddc8c215374c97662f839a971 // This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'}); String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'}); -@@ -219,9 +221,18 @@ public class Main { +@@ -229,9 +230,18 @@ public class Main { // This ensures the terminal literal will always match the jline implementation System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName()); } + */ + + if (options.has("nojline")) { -+ System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); ++ System.setProperty(net.minecrell.terminalconsole.TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); + useJline = false; + } + // Paper end @@ -298,11 +297,11 @@ index ef46dc1ed538b783213651f624326b2d49c786e0..d50be10ddc8c215374c97662f839a971 if (options.has("noconsole")) { Main.useConsole = false; + useJline = false; // Paper -+ System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper ++ System.setProperty(net.minecrell.terminalconsole.TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper } if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { -@@ -249,7 +260,7 @@ public class Main { +@@ -259,7 +269,7 @@ public class Main { System.out.println("Unable to read system info"); } // Paper end diff --git a/patches/unapplied/server/0137-provide-a-configurable-option-to-disable-creeper-lin.patch b/patches/server/0137-provide-a-configurable-option-to-disable-creeper-lin.patch similarity index 86% rename from patches/unapplied/server/0137-provide-a-configurable-option-to-disable-creeper-lin.patch rename to patches/server/0137-provide-a-configurable-option-to-disable-creeper-lin.patch index 89e8fa9f01..483f0ef3b7 100644 --- a/patches/unapplied/server/0137-provide-a-configurable-option-to-disable-creeper-lin.patch +++ b/patches/server/0137-provide-a-configurable-option-to-disable-creeper-lin.patch @@ -6,10 +6,10 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 93a0d0ab483fd525accc8bf8b9df5bbbd81c644e..c418c0b2fa757f29dfa3c07977093c67416959f5 100644 +index 6bde61ffd2b46755a5e90c116f0ee5ff30bc3d9b..baa30d4bdc8c31d04c84e4992062575709c4f2a4 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -@@ -281,7 +281,7 @@ public class Creeper extends Monster implements PowerableMob { +@@ -285,7 +285,7 @@ public class Creeper extends Monster implements PowerableMob { private void spawnLingeringCloud() { Collection collection = this.getActiveEffects(); diff --git a/patches/unapplied/server/0138-Item-canEntityPickup.patch b/patches/server/0138-Item-canEntityPickup.patch similarity index 80% rename from patches/unapplied/server/0138-Item-canEntityPickup.patch rename to patches/server/0138-Item-canEntityPickup.patch index 6ab634db2b..35734d9354 100644 --- a/patches/unapplied/server/0138-Item-canEntityPickup.patch +++ b/patches/server/0138-Item-canEntityPickup.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index bb7c459c126be789bb12d08a569fe344e08914b8..458a90529959d3ceae424236461cdeb4c588eedb 100644 +index eee466e718f52329f8200ff830f5f1e44cda3e7e..dad26405e90c7a784266a336ff1b0aa58b961261 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -635,6 +635,11 @@ public abstract class Mob extends LivingEntity { +@@ -665,6 +665,11 @@ public abstract class Mob extends LivingEntity implements Targeting { ItemEntity entityitem = (ItemEntity) iterator.next(); if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) { @@ -21,11 +21,11 @@ index bb7c459c126be789bb12d08a569fe344e08914b8..458a90529959d3ceae424236461cdeb4 } } diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 9e986a9efcda63fa20aef392aaca314478b1fbea..b98ebf2d580c27a7e55afe3a54827e471cc5e845 100644 +index 9ffcccef6266e1a61cfae36cbc205b8178a732de..62288f9152a6fb2c272c7e84649af06b24032542 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -50,6 +50,7 @@ public class ItemEntity extends Entity { - private UUID owner; +@@ -51,6 +51,7 @@ public class ItemEntity extends Entity implements TraceableEntity { + public UUID target; public final float bobOffs; private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit + public boolean canMobPickup = true; // Paper @@ -33,7 +33,7 @@ index 9e986a9efcda63fa20aef392aaca314478b1fbea..b98ebf2d580c27a7e55afe3a54827e47 public ItemEntity(EntityType type, Level world) { super(type, world); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java -index 4ca76a7530f8679567d887cdf1491d110e7465ec..30c954efba587d69ff55df509339f03e7d5a476e 100644 +index d08869c92f15a63f857d88e506f744f5ff9eb15e..5f36b0fd12ccd0e7ec9a7f61c56f08307844935f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -66,6 +66,18 @@ public class CraftItem extends CraftEntity implements Item { @@ -54,4 +54,4 @@ index 4ca76a7530f8679567d887cdf1491d110e7465ec..30c954efba587d69ff55df509339f03e + @Override public void setOwner(UUID uuid) { - this.item.setOwner(uuid); + this.item.setTarget(uuid); diff --git a/patches/unapplied/server/0139-PlayerPickupItemEvent-setFlyAtPlayer.patch b/patches/server/0139-PlayerPickupItemEvent-setFlyAtPlayer.patch similarity index 72% rename from patches/unapplied/server/0139-PlayerPickupItemEvent-setFlyAtPlayer.patch rename to patches/server/0139-PlayerPickupItemEvent-setFlyAtPlayer.patch index adceac1377..7524649eeb 100644 --- a/patches/unapplied/server/0139-PlayerPickupItemEvent-setFlyAtPlayer.patch +++ b/patches/server/0139-PlayerPickupItemEvent-setFlyAtPlayer.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index b98ebf2d580c27a7e55afe3a54827e471cc5e845..6a1bc0874ca0d07a2fcb98f3a8d1fff4625a35f0 100644 +index 62288f9152a6fb2c272c7e84649af06b24032542..a6d2bacfa186a0b1c72d3761a134ce623fa6ccec 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -386,6 +386,7 @@ public class ItemEntity extends Entity { +@@ -395,6 +395,7 @@ public class ItemEntity extends Entity implements TraceableEntity { // CraftBukkit start - fire PlayerPickupItemEvent int canHold = player.getInventory().canHold(itemstack); int remaining = i - canHold; @@ -16,7 +16,7 @@ index b98ebf2d580c27a7e55afe3a54827e471cc5e845..6a1bc0874ca0d07a2fcb98f3a8d1fff4 if (this.pickupDelay <= 0 && canHold > 0) { itemstack.setCount(canHold); -@@ -393,8 +394,14 @@ public class ItemEntity extends Entity { +@@ -402,8 +403,14 @@ public class ItemEntity extends Entity implements TraceableEntity { PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining); playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems()); this.level.getCraftServer().getPluginManager().callEvent(playerEvent); @@ -31,16 +31,11 @@ index b98ebf2d580c27a7e55afe3a54827e471cc5e845..6a1bc0874ca0d07a2fcb98f3a8d1fff4 return; } -@@ -424,7 +431,11 @@ public class ItemEntity extends Entity { +@@ -433,6 +440,7 @@ public class ItemEntity extends Entity implements TraceableEntity { // CraftBukkit end - if (this.pickupDelay == 0 && (this.owner == null || this.owner.equals(player.getUUID())) && player.getInventory().add(itemstack)) { -- player.take(this, i); -+ // Paper Start -+ if (flyAtPlayer) { -+ player.take(this, i); -+ } -+ // Paper End + if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) { ++ if (flyAtPlayer) // Paper + player.take(this, i); if (itemstack.isEmpty()) { this.discard(); - itemstack.setCount(i); diff --git a/patches/unapplied/server/0140-PlayerAttemptPickupItemEvent.patch b/patches/server/0140-PlayerAttemptPickupItemEvent.patch similarity index 84% rename from patches/unapplied/server/0140-PlayerAttemptPickupItemEvent.patch rename to patches/server/0140-PlayerAttemptPickupItemEvent.patch index ff3ac64292..98a493034a 100644 --- a/patches/unapplied/server/0140-PlayerAttemptPickupItemEvent.patch +++ b/patches/server/0140-PlayerAttemptPickupItemEvent.patch @@ -5,18 +5,18 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 6a1bc0874ca0d07a2fcb98f3a8d1fff4625a35f0..42b056d58146991b86de0690fce595716ee5455b 100644 +index a6d2bacfa186a0b1c72d3761a134ce623fa6ccec..298dff12c511e8b767d5a7ee14f94fe0745e5338 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -34,6 +34,7 @@ import net.minecraft.util.Mth; +@@ -35,6 +35,7 @@ import net.minecraft.stats.Stats; import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.player.PlayerPickupItemEvent; // CraftBukkit end +import org.bukkit.event.player.PlayerAttemptPickupItemEvent; // Paper - public class ItemEntity extends Entity { + public class ItemEntity extends Entity implements TraceableEntity { -@@ -388,6 +389,22 @@ public class ItemEntity extends Entity { +@@ -397,6 +398,22 @@ public class ItemEntity extends Entity implements TraceableEntity { int remaining = i - canHold; boolean flyAtPlayer = false; // Paper diff --git a/patches/unapplied/server/0141-Do-not-submit-profile-lookups-to-worldgen-threads.patch b/patches/server/0141-Do-not-submit-profile-lookups-to-worldgen-threads.patch similarity index 86% rename from patches/unapplied/server/0141-Do-not-submit-profile-lookups-to-worldgen-threads.patch rename to patches/server/0141-Do-not-submit-profile-lookups-to-worldgen-threads.patch index 87ccb015be..92fd8128c8 100644 --- a/patches/unapplied/server/0141-Do-not-submit-profile-lookups-to-worldgen-threads.patch +++ b/patches/server/0141-Do-not-submit-profile-lookups-to-worldgen-threads.patch @@ -10,12 +10,12 @@ out due to a sync load, as the worldgen threads will be stalling on profile lookups. diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 4423140df56e64527db470ada17a117656b93114..c085ed233eb4d1f2100ec23a77447ef799ecdf1f 100644 +index c5fb6adb353538360ef420faee41565626eea1dc..33ec55ed1f7d10a5235330ad082e7c7b54c42368 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java @@ -81,6 +81,22 @@ public class Util { + private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads"; private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1); - private static final ExecutorService BOOTSTRAP_EXECUTOR = makeExecutor("Bootstrap"); private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main"); + // Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread + public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() { @@ -50,18 +50,18 @@ index 58e923f4ef1980bc7fff1e3b3fcdaad8c4eded53..4038bb76339d43f18770624bd7fecc79 }, this.executor).whenCompleteAsync((optional, throwable) -> { consumer.accept(optional); diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -index bb7dd7a81a2af3d2a7df9d117f0d6395ecaed61b..28ce257b54f224b801a5206dd6d39cbae0ef248b 100644 +index 24ed280a31a10c822cb8b2d2e9bf43ad81d92924..a2fc2c0437999dd09f080eafe8ea466b16cdf57b 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -@@ -140,7 +140,7 @@ public class SkullBlockEntity extends BlockEntity { +@@ -137,7 +137,7 @@ public class SkullBlockEntity extends BlockEntity { public static void updateGameprofile(@Nullable GameProfile owner, Consumer callback) { - if (owner != null && !StringUtil.isNullOrEmpty(owner.getName()) && (!owner.isComplete() || !owner.getProperties().containsKey("textures")) && SkullBlockEntity.profileCache != null && SkullBlockEntity.sessionService != null) { - SkullBlockEntity.profileCache.getAsync(owner.getName(), (optional) -> { + if (owner != null && !StringUtil.isNullOrEmpty(owner.getName()) && (!owner.isComplete() || !owner.getProperties().containsKey("textures")) && profileCache != null && sessionService != null) { + profileCache.getAsync(owner.getName(), (profile) -> { - Util.backgroundExecutor().execute(() -> { + Util.PROFILE_EXECUTOR.execute(() -> { // Paper - not a good idea to use BLOCKING OPERATIONS on the worldgen executor - Util.ifElse(optional, (gameprofile1) -> { - Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null); - + Util.ifElse(profile, (profilex) -> { + Property property = Iterables.getFirst(profilex.getProperties().get("textures"), (Property)null); + if (property == null) { diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java index 3030c153725415802f68c144e0b577d919307058..3e40d47f504248cd7caeef6b841a8aa6f1976170 100644 --- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java diff --git a/patches/unapplied/server/0142-Add-UnknownCommandEvent.patch b/patches/server/0142-Add-UnknownCommandEvent.patch similarity index 92% rename from patches/unapplied/server/0142-Add-UnknownCommandEvent.patch rename to patches/server/0142-Add-UnknownCommandEvent.patch index 123dab7533..9ee7c313bc 100644 --- a/patches/unapplied/server/0142-Add-UnknownCommandEvent.patch +++ b/patches/server/0142-Add-UnknownCommandEvent.patch @@ -25,10 +25,10 @@ index 36bbe7d0b2089361beda89097c15eca9ab48a57d..65d8c7d5aab8c6afe3c5671a90ad0fbc } diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..4cf76403098cc8565199b29757a29c80150bbaae 100644 +index 971fc7f5f51ba82a7e8abafa6a5139c24a9aac0b..7f561ab6e56cd1749da8eff950080d3ae3f5e028 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -133,6 +133,7 @@ public class Commands { +@@ -136,6 +136,7 @@ public class Commands { public static final int LEVEL_ADMINS = 3; public static final int LEVEL_OWNERS = 4; private final com.mojang.brigadier.CommandDispatcher dispatcher = new com.mojang.brigadier.CommandDispatcher(); @@ -36,7 +36,7 @@ index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..4cf76403098cc8565199b29757a29c80 public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) { this(); // CraftBukkit -@@ -220,6 +221,7 @@ public class Commands { +@@ -226,6 +227,7 @@ public class Commands { if (environment.includeIntegrated) { PublishCommand.register(this.dispatcher); } @@ -44,7 +44,7 @@ index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..4cf76403098cc8565199b29757a29c80 // CraftBukkit start } -@@ -311,7 +313,16 @@ public class Commands { +@@ -317,7 +319,16 @@ public class Commands { b1 = 0; return b1; } catch (CommandSyntaxException commandsyntaxexception) { @@ -62,7 +62,7 @@ index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..4cf76403098cc8565199b29757a29c80 if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) { int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor()); MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> { -@@ -330,7 +341,18 @@ public class Commands { +@@ -336,7 +347,18 @@ public class Commands { } ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC)); @@ -83,10 +83,10 @@ index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..4cf76403098cc8565199b29757a29c80 b1 = 0; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 5f6ddee55b2289d80c55015f44c431b7025ae944..df2ad713d169f458890fc54d53415139d878a4d7 100644 +index 8aaba38c7f4dc17c8536a0049be8bdea204f6481..39e51bbc941b7381c901304d69758b2bca2f02d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -512,6 +512,7 @@ public final class CraftServer implements Server { +@@ -507,6 +507,7 @@ public final class CraftServer implements Server { if (command instanceof VanillaCommandWrapper) { LiteralCommandNode node = (LiteralCommandNode) ((VanillaCommandWrapper) command).vanillaCommand; @@ -94,7 +94,7 @@ index 5f6ddee55b2289d80c55015f44c431b7025ae944..df2ad713d169f458890fc54d53415139 if (!node.getLiteral().equals(label)) { LiteralCommandNode clone = new LiteralCommandNode(label, node.getCommand(), node.getRequirement(), node.getRedirect(), node.getRedirectModifier(), node.isFork()); -@@ -886,7 +887,13 @@ public final class CraftServer implements Server { +@@ -881,7 +882,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/patches/unapplied/server/0143-Basic-PlayerProfile-API.patch b/patches/server/0143-Basic-PlayerProfile-API.patch similarity index 98% rename from patches/unapplied/server/0143-Basic-PlayerProfile-API.patch rename to patches/server/0143-Basic-PlayerProfile-API.patch index ecadae1158..77f0133203 100644 --- a/patches/unapplied/server/0143-Basic-PlayerProfile-API.patch +++ b/patches/server/0143-Basic-PlayerProfile-API.patch @@ -596,10 +596,10 @@ index d58d44faa40be2421f4cb54740a3abdbad72875c..9ee4dc54039cbe6b8c9bd3018044c73f * Calculates distance between 2 entities * @param e1 diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index b04f7240ba96d06ab51199059d29b0faa554b09a..c5224aac75df248df57018b6245f909f19904d7d 100644 +index 26fa789a44a1d934944e78eae21f489213f50ae3..12ff7071a5b78a8ae5567aa42b69191166a7cbca 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -159,7 +159,7 @@ public class Main { +@@ -170,7 +170,7 @@ public class Main { } File file = (File) optionset.valueOf("universe"); // CraftBukkit @@ -631,10 +631,10 @@ index 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a String s1 = name.toLowerCase(Locale.ROOT); GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index df2ad713d169f458890fc54d53415139d878a4d7..527e22973cb0f7fca9d19a41abf943e48980db19 100644 +index 39e51bbc941b7381c901304d69758b2bca2f02d1..3b110b947b13f1d3bec1e48e1abf530c425bb043 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -257,6 +257,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -252,6 +252,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -644,7 +644,7 @@ index df2ad713d169f458890fc54d53415139d878a4d7..527e22973cb0f7fca9d19a41abf943e4 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -298,6 +301,7 @@ public final class CraftServer implements Server { +@@ -293,6 +296,7 @@ public final class CraftServer implements Server { static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftPlayerProfile.class); @@ -652,7 +652,7 @@ index df2ad713d169f458890fc54d53415139d878a4d7..527e22973cb0f7fca9d19a41abf943e4 CraftItemFactory.instance(); } -@@ -2606,5 +2610,37 @@ public final class CraftServer implements Server { +@@ -2604,5 +2608,37 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } diff --git a/patches/unapplied/server/0144-Shoulder-Entities-Release-API.patch b/patches/server/0144-Shoulder-Entities-Release-API.patch similarity index 96% rename from patches/unapplied/server/0144-Shoulder-Entities-Release-API.patch rename to patches/server/0144-Shoulder-Entities-Release-API.patch index f20c39ec01..f1a8917af1 100644 --- a/patches/unapplied/server/0144-Shoulder-Entities-Release-API.patch +++ b/patches/server/0144-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index dbfb979a9ee826ed771da8d0593732ac74bc167b..095d459962841f7247a9365aff3bdf83bc0b3589 100644 +index 34bcdda9b3e9040e8afc63db4ccb8292ebea3413..f98e25965c9d8fe348a209ef8d2a2109cd2294f2 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -2008,20 +2008,44 @@ public abstract class Player extends LivingEntity { +@@ -2003,20 +2003,44 @@ public abstract class Player extends LivingEntity { } diff --git a/patches/unapplied/server/0145-Profile-Lookup-Events.patch b/patches/server/0145-Profile-Lookup-Events.patch similarity index 100% rename from patches/unapplied/server/0145-Profile-Lookup-Events.patch rename to patches/server/0145-Profile-Lookup-Events.patch diff --git a/patches/unapplied/server/0146-Block-player-logins-during-server-shutdown.patch b/patches/server/0146-Block-player-logins-during-server-shutdown.patch similarity index 92% rename from patches/unapplied/server/0146-Block-player-logins-during-server-shutdown.patch rename to patches/server/0146-Block-player-logins-during-server-shutdown.patch index d034ffd001..e99c14fc18 100644 --- a/patches/unapplied/server/0146-Block-player-logins-during-server-shutdown.patch +++ b/patches/server/0146-Block-player-logins-during-server-shutdown.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Block player logins during server shutdown diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 453a9dd794c39be5e7221b05fabb71b802691003..897b72d230976594c33cdb80706e9ce594d0b0f5 100644 +index 9fd44505c33b7ad578d6a471aca8e1c2df5c7dcd..bab2b06992800885dca42868186163a712ef9d73 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -71,6 +71,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, diff --git a/patches/unapplied/server/0147-Entity-fromMobSpawner.patch b/patches/server/0147-Entity-fromMobSpawner.patch similarity index 84% rename from patches/unapplied/server/0147-Entity-fromMobSpawner.patch rename to patches/server/0147-Entity-fromMobSpawner.patch index a26f31e6ce..76cd51f360 100644 --- a/patches/unapplied/server/0147-Entity-fromMobSpawner.patch +++ b/patches/server/0147-Entity-fromMobSpawner.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 760596375e26b4cd73cc378758f4bf761c3352a5..66b727c533d3a2b7b5938ab9b9b7b4a76bb62966 100644 +index 7d839daeca968df2044bf2071bf1b5ff2b2aa3d6..9d82842982a387287a9c2de36f26a1fc80dd948a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -380,6 +380,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -383,6 +383,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // Spigot end // Paper start protected int numCollisions = 0; // Paper @@ -16,7 +16,7 @@ index 760596375e26b4cd73cc378758f4bf761c3352a5..66b727c533d3a2b7b5938ab9b9b7b4a7 @javax.annotation.Nullable private org.bukkit.util.Vector origin; @javax.annotation.Nullable -@@ -2035,6 +2036,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2049,6 +2050,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ())); } @@ -27,7 +27,7 @@ index 760596375e26b4cd73cc378758f4bf761c3352a5..66b727c533d3a2b7b5938ab9b9b7b4a7 // Paper end return nbt; } catch (Throwable throwable) { -@@ -2174,6 +2179,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2189,6 +2194,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.originWorld = originWorld; origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2)); } @@ -37,7 +37,7 @@ index 760596375e26b4cd73cc378758f4bf761c3352a5..66b727c533d3a2b7b5938ab9b9b7b4a7 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index b214a79efc4f5279d3dd29feb1f79efc45788a8d..7e436a2cbf1920c985cb9febf1839adc589c2619 100644 +index 3d4e77327295344a5ef8d1fcde96f1ed2fecfbfa..faa4b1bfe8dcd2dcf897470964e7d0619bfcffaf 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -163,6 +163,7 @@ public abstract class BaseSpawner { @@ -49,10 +49,10 @@ index b214a79efc4f5279d3dd29feb1f79efc45788a8d..7e436a2cbf1920c985cb9febf1839adc if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) { Entity vehicle = entity.getVehicle(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 91c0354f554edbf2fc68748a8fbf182cd8d93de5..5199609a6eec4f3785f31091f294612d4941e71c 100644 +index 9318c47c9e52f8cde5c0ece1dc3723203a41e261..5a44b9a94992f3703ae1353dbaad40fe25e89a50 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1262,5 +1262,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1297,5 +1297,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { //noinspection ConstantConditions return originVector.toLocation(world); } diff --git a/patches/unapplied/server/0148-Improve-the-Saddle-API-for-Horses.patch b/patches/server/0148-Improve-the-Saddle-API-for-Horses.patch similarity index 100% rename from patches/unapplied/server/0148-Improve-the-Saddle-API-for-Horses.patch rename to patches/server/0148-Improve-the-Saddle-API-for-Horses.patch diff --git a/patches/unapplied/server/0149-Implement-ensureServerConversions-API.patch b/patches/server/0149-Implement-ensureServerConversions-API.patch similarity index 87% rename from patches/unapplied/server/0149-Implement-ensureServerConversions-API.patch rename to patches/server/0149-Implement-ensureServerConversions-API.patch index 97dcf12fe7..b43014ca31 100644 --- a/patches/unapplied/server/0149-Implement-ensureServerConversions-API.patch +++ b/patches/server/0149-Implement-ensureServerConversions-API.patch @@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 102e3572424478375a2d175e4d5b6aacba8412a8..45d4a2951e0c4ab331b0e928451d0490b2df30c8 100644 +index 4c76692e222d8505558aade9c03b3686612f7c0c..70607c9458f58a05ccc94bfcb38dae79bd7ad483 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -422,5 +422,11 @@ public final class CraftItemFactory implements ItemFactory { +@@ -429,5 +429,11 @@ public final class CraftItemFactory implements ItemFactory { public net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component displayName(@org.jetbrains.annotations.NotNull ItemStack itemStack) { return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName()); } diff --git a/patches/unapplied/server/0150-Implement-getI18NDisplayName.patch b/patches/server/0150-Implement-getI18NDisplayName.patch similarity index 89% rename from patches/unapplied/server/0150-Implement-getI18NDisplayName.patch rename to patches/server/0150-Implement-getI18NDisplayName.patch index 5c8e817cdc..c3783748ed 100644 --- a/patches/unapplied/server/0150-Implement-getI18NDisplayName.patch +++ b/patches/server/0150-Implement-getI18NDisplayName.patch @@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 45d4a2951e0c4ab331b0e928451d0490b2df30c8..42724d209b4fd5f246a2cedbc297ca2aa81fd5fe 100644 +index 70607c9458f58a05ccc94bfcb38dae79bd7ad483..45f37c894a9d862fd9d73908d1dae2e8c62262ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -428,5 +428,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -435,5 +435,18 @@ public final class CraftItemFactory implements ItemFactory { public ItemStack ensureServerConversions(ItemStack item) { return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); } diff --git a/patches/unapplied/server/0151-ProfileWhitelistVerifyEvent.patch b/patches/server/0151-ProfileWhitelistVerifyEvent.patch similarity index 93% rename from patches/unapplied/server/0151-ProfileWhitelistVerifyEvent.patch rename to patches/server/0151-ProfileWhitelistVerifyEvent.patch index 6e92ca16d0..8dce88891f 100644 --- a/patches/unapplied/server/0151-ProfileWhitelistVerifyEvent.patch +++ b/patches/server/0151-ProfileWhitelistVerifyEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a4e2509dbcc5bd1af309cda23f73c7516679453c..c8f17cb40d18bd03e6f612218747ecd62254ff32 100644 +index dcb14a1be689fe228f740abc1a2b3c2c57b35f40..2cde0807c224f008bd2e652ff8a46244ebc53059 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -629,9 +629,9 @@ public abstract class PlayerList { +@@ -636,9 +636,9 @@ public abstract class PlayerList { // return chatmessage; event.disallow(PlayerLoginEvent.Result.KICK_BANNED, PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure @@ -21,7 +21,7 @@ index a4e2509dbcc5bd1af309cda23f73c7516679453c..c8f17cb40d18bd03e6f612218747ecd6 } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) { IpBanListEntry ipbanentry = this.ipBans.get(socketaddress); -@@ -1015,7 +1015,23 @@ public abstract class PlayerList { +@@ -1022,7 +1022,23 @@ public abstract class PlayerList { } public boolean isWhiteListed(GameProfile profile) { diff --git a/patches/unapplied/server/0152-Fix-this-stupid-bullshit.patch b/patches/server/0152-Fix-this-stupid-bullshit.patch similarity index 93% rename from patches/unapplied/server/0152-Fix-this-stupid-bullshit.patch rename to patches/server/0152-Fix-this-stupid-bullshit.patch index 0e38e136bf..6331ad3c3c 100644 --- a/patches/unapplied/server/0152-Fix-this-stupid-bullshit.patch +++ b/patches/server/0152-Fix-this-stupid-bullshit.patch @@ -31,12 +31,12 @@ index e43096e69a00f9ea96badd7c966443cfcf3e7b95..ac2b7b5161eaaca3620268ae865d6f2a Bootstrap.isBootstrapped = true; if (BuiltInRegistries.REGISTRY.keySet().isEmpty()) { diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index d50be10ddc8c215374c97662f839a9710fc863b4..c9c0c17651b05094f96840b4fc0fd60825eef146 100644 +index a736afdd6671ad36157d1d0c908b6ccb37f602b6..7968b883847877f7ddc11f7a25efbbb71605d2bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -241,10 +241,12 @@ public class Main { +@@ -250,10 +250,12 @@ public class Main { Calendar deadline = Calendar.getInstance(); - deadline.add(Calendar.DAY_OF_YEAR, -28); + deadline.add(Calendar.DAY_OF_YEAR, -3); if (buildDate.before(deadline.getTime())) { - System.err.println("*** Error, this build is outdated ***"); + // Paper start - This is some stupid bullshit diff --git a/patches/unapplied/server/0153-LivingEntity-setKiller.patch b/patches/server/0153-LivingEntity-setKiller.patch similarity index 93% rename from patches/unapplied/server/0153-LivingEntity-setKiller.patch rename to patches/server/0153-LivingEntity-setKiller.patch index 1f6e2fc934..0612bec621 100644 --- a/patches/unapplied/server/0153-LivingEntity-setKiller.patch +++ b/patches/server/0153-LivingEntity-setKiller.patch @@ -7,7 +7,7 @@ Subject: [PATCH] LivingEntity#setKiller public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 3fae28c52f2aac63ac6a4e8eb6af2d7226e6bec6..cae153b184af9ef87ca2f335692b396800f00cf2 100644 +index 3084fa8000b36f06e8d432bff124a5af4ea675ea..31f31f0a3dcd5764fffb710111b47359f793b9a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -353,6 +353,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {