diff --git a/patches/api/Add-Material-Tags.patch b/patches/api/Add-Material-Tags.patch index 0d8e06e287..f7f0486065 100644 --- a/patches/api/Add-Material-Tags.patch +++ b/patches/api/Add-Material-Tags.patch @@ -223,7 +223,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag DOORS = new MaterialSetTag(keyFor("doors")) + .endsWith("_DOOR") -+ .ensureSize("DOORS", 11).lock(); ++ .ensureSize("DOORS", 12).lock(); + + /** + * Covers all dyes. @@ -237,14 +237,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag FENCE_GATES = new MaterialSetTag(keyFor("fence_gates")) + .endsWith("_GATE") -+ .ensureSize("FENCE_GATES", 10).lock(); ++ .ensureSize("FENCE_GATES", 11).lock(); + + /** + * Covers all variants of fences. + */ + public static final MaterialSetTag FENCES = new MaterialSetTag(keyFor("fences")) + .endsWith("_FENCE") -+ .ensureSize("FENCES", 11).lock(); ++ .ensureSize("FENCES", 12).lock(); + + /** + * Covers all variants of fish buckets. @@ -358,7 +358,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag PRESSURE_PLATES = new MaterialSetTag(keyFor("pressure_plates")) + .endsWith("_PRESSURE_PLATE") -+ .ensureSize("PRESSURE_PLATES", 14).lock(); ++ .ensureSize("PRESSURE_PLATES", 15).lock(); + + /** + * Covers the variants of prismarine blocks. @@ -429,6 +429,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static final MaterialSetTag SKULLS = new MaterialSetTag(keyFor("skulls")) + .endsWith("_HEAD") + .endsWith("_SKULL") ++ .not(Material.POTTERY_SHARD_SKULL) + .not(Material.PISTON_HEAD) + .ensureSize("SKULLS", 14).lock(); + @@ -437,7 +438,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag SPAWN_EGGS = new MaterialSetTag(keyFor("spawn_eggs")) + .endsWith("_SPAWN_EGG") -+ .ensureSize("SPAWN_EGGS", 76).lock(); ++ .ensureSize("SPAWN_EGGS", 77).lock(); + + /** + * Covers all colors of stained glass. @@ -458,7 +459,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag TRAPDOORS = new MaterialSetTag(keyFor("trapdoors")) + .endsWith("_TRAPDOOR") -+ .ensureSize("TRAPDOORS", 11).lock(); ++ .ensureSize("TRAPDOORS", 12).lock(); + + /** + * Covers all wood variants of doors. @@ -466,7 +467,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static final MaterialSetTag WOODEN_DOORS = new MaterialSetTag(keyFor("wooden_doors")) + .endsWith("_DOOR") + .not(Material.IRON_DOOR) -+ .ensureSize("WOODEN_DOORS", 10).lock(); ++ .ensureSize("WOODEN_DOORS", 11).lock(); + + /** + * Covers all wood variants of fences. @@ -474,7 +475,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static final MaterialSetTag WOODEN_FENCES = new MaterialSetTag(keyFor("wooden_fences")) + .endsWith("_FENCE") + .not(Material.NETHER_BRICK_FENCE) -+ .ensureSize("WOODEN_FENCES", 10).lock(); ++ .ensureSize("WOODEN_FENCES", 11).lock(); + + /** + * Covers all wood variants of trapdoors. @@ -482,14 +483,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public static final MaterialSetTag WOODEN_TRAPDOORS = new MaterialSetTag(keyFor("wooden_trapdoors")) + .endsWith("_TRAPDOOR") + .not(Material.IRON_TRAPDOOR) -+ .ensureSize("WOODEN_TRAPDOORS", 10).lock(); ++ .ensureSize("WOODEN_TRAPDOORS", 11).lock(); + + /** + * Covers the wood variants of gates. + */ + public static final MaterialSetTag WOODEN_GATES = new MaterialSetTag(keyFor("wooden_gates")) + .endsWith("_GATE") -+ .ensureSize("WOODEN_GATES", 10).lock(); ++ .ensureSize("WOODEN_GATES", 11).lock(); + + /** + * Covers the variants of purpur. @@ -503,7 +504,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public static final MaterialSetTag SIGNS = new MaterialSetTag(keyFor("signs")) + .endsWith("_SIGN") -+ .ensureSize("SIGNS", 40).lock(); ++ .ensureSize("SIGNS", 44).lock(); + + /** + * Covers the variants of a regular torch. diff --git a/patches/api/Add-missing-biome-enum.patch b/patches/api/Add-missing-biome-enum.patch new file mode 100644 index 0000000000..3e42dd2be5 --- /dev/null +++ b/patches/api/Add-missing-biome-enum.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Tue, 14 Mar 2023 16:28:02 -0700 +Subject: [PATCH] Add missing biome enum + + +diff --git a/src/main/java/org/bukkit/block/Biome.java b/src/main/java/org/bukkit/block/Biome.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/block/Biome.java ++++ b/src/main/java/org/bukkit/block/Biome.java +@@ -0,0 +0,0 @@ public enum Biome implements Keyed, net.kyori.adventure.translation.Translatable + LUSH_CAVES, + DEEP_DARK, + MEADOW, ++ // Paper start - add missing biome ++ @org.jetbrains.annotations.ApiStatus.Experimental ++ CHERRY_GROVE, ++ // Paper end + GROVE, + SNOWY_SLOPES, + FROZEN_PEAKS, diff --git a/patches/api/Add-missing-isFuel-Material-entries.patch b/patches/api/Add-missing-isFuel-Material-entries.patch index 72f607ed87..308aba4ee4 100644 --- a/patches/api/Add-missing-isFuel-Material-entries.patch +++ b/patches/api/Add-missing-isFuel-Material-entries.patch @@ -64,6 +64,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + case CHERRY_FENCE: + case CHERRY_FENCE_GATE: + case CHERRY_HANGING_SIGN: ++ case CHERRY_LOG: + case CHERRY_PLANKS: + case CHERRY_PRESSURE_PLATE: + case CHERRY_SAPLING: @@ -71,6 +72,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + case CHERRY_SLAB: + case CHERRY_STAIRS: + case CHERRY_TRAPDOOR: ++ case CHERRY_WOOD: + // Paper end case CHEST: case CHISELED_BOOKSHELF: @@ -122,4 +124,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + case STRIPPED_BAMBOO_BLOCK: // Paper case STRIPPED_BIRCH_LOG: case STRIPPED_BIRCH_WOOD: ++ case STRIPPED_CHERRY_LOG: // Paper ++ case STRIPPED_CHERRY_WOOD: // Paper case STRIPPED_DARK_OAK_LOG: + case STRIPPED_DARK_OAK_WOOD: + case STRIPPED_JUNGLE_LOG: diff --git a/patches/server/Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/Add-config-option-for-logging-player-ip-addresses.patch index 395f593cdf..1045aa893c 100644 --- a/patches/server/Add-config-option-for-logging-player-ip-addresses.patch +++ b/patches/server/Add-config-option-for-logging-player-ip-addresses.patch @@ -4,24 +4,6 @@ Date: Tue, 5 Oct 2021 20:04:21 +0200 Subject: [PATCH] Add config option for logging player ip addresses -diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java -+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -@@ -0,0 +0,0 @@ public class PacketUtils { - packet.handle(listener); - } catch (Exception exception) { - net.minecraft.network.Connection networkmanager = listener.getConnection(); -+ String playerIP = io.papermc.paper.configuration.GlobalConfiguration.get().logging.logPlayerIpAddresses ? String.valueOf(networkmanager.getRemoteAddress()) : ""; // Paper - if (networkmanager.getPlayer() != null) { -- LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getScoreboardName(), networkmanager.getRemoteAddress(), exception); -+ LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getScoreboardName(), playerIP, exception); // Paper - } else { -- LOGGER.error("Error whilst processing packet {} for connection from {}", packet, networkmanager.getRemoteAddress(), exception); -+ LOGGER.error("Error whilst processing packet {} for connection from {}", packet, playerIP, exception); // Paper - } - net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error"); - networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), net.minecraft.network.PacketSendListener.thenRun(() -> networkmanager.disconnect(error))); diff --git a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java b/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/LegacyQueryHandler.java diff --git a/patches/server/Added-missing-default-perms-for-commands.patch b/patches/server/Added-missing-default-perms-for-commands.patch index f76c09264e..3df7780af2 100644 --- a/patches/server/Added-missing-default-perms-for-commands.patch +++ b/patches/server/Added-missing-default-perms-for-commands.patch @@ -27,6 +27,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "bossbar", "Allows the user to create and modify bossbars", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "clear", "Allows the user to clear items from player inventory", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "clone", "Allows the user to copy blocks from one place to another", PermissionDefault.OP, commands); ++ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "damage", "Allows the user to use the damage command to damage entities", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "data", "Allows the user to get, merge, modify, and remove block entity and entity NBT data", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "datapack", "Allows the user to control loaded data packs", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "debug", "Allows the user to start or stop a debugging session", PermissionDefault.OP, commands); @@ -48,6 +49,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "particle", "Allows the user to create particles", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "perf", "Allows the user to start/stop the vanilla performance metrics capture", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "playsound", "Allows the user to play a sound", PermissionDefault.OP, commands); ++ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "ride", "Allows the user to use the /ride command to control passengers", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "recipe", "Allows the user to give or take recipes", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "reload", "Allows the user to reload loot tables, advancements, and functions from disk", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "item", "Allows the user to replace items in inventories", PermissionDefault.OP, commands); // Remove in 1.17 (replaced by /item) diff --git a/patches/server/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch index 8128bca9fe..8f8ea1f9e2 100644 --- a/patches/server/Implement-Mob-Goal-API.patch +++ b/patches/server/Implement-Mob-Goal-API.patch @@ -267,6 +267,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + bukkitMap.put(net.minecraft.world.entity.animal.frog.Tadpole.class, org.bukkit.entity.Tadpole.class); + bukkitMap.put(net.minecraft.world.entity.monster.warden.Warden.class, org.bukkit.entity.Warden.class); + bukkitMap.put(net.minecraft.world.entity.animal.allay.Allay.class, org.bukkit.entity.Allay.class); ++ bukkitMap.put(net.minecraft.world.entity.animal.sniffer.Sniffer.class, org.bukkit.entity.Sniffer.class); + } + + public static String getUsableName(Class clazz) { diff --git a/patches/server/Optimize-NetworkManager-Exception-Handling.patch b/patches/server/Optimize-NetworkManager-Exception-Handling.patch index 17c8a8fe76..1d668c284c 100644 --- a/patches/server/Optimize-NetworkManager-Exception-Handling.patch +++ b/patches/server/Optimize-NetworkManager-Exception-Handling.patch @@ -42,27 +42,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 for(int i = 0; i < bs.length; ++i) { if (!byteBuf.isReadable()) { -diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java -+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -@@ -0,0 +0,0 @@ public class PacketUtils { - try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings - packet.handle(listener); - } catch (Exception exception) { -- if (listener.shouldPropagateHandlingExceptions()) { -- throw exception; -+ net.minecraft.network.Connection networkmanager = listener.getConnection(); -+ if (networkmanager.getPlayer() != null) { -+ LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getScoreboardName(), networkmanager.getRemoteAddress(), exception); -+ } else { -+ LOGGER.error("Error whilst processing packet {} for connection from {}", packet, networkmanager.getRemoteAddress(), exception); - } -- -- PacketUtils.LOGGER.error("Failed to handle packet {}, suppressing error", packet, exception); -+ net.minecraft.network.chat.Component error = net.minecraft.network.chat.Component.literal("Packet processing error"); -+ networkmanager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(error), net.minecraft.network.PacketSendListener.thenRun(() -> networkmanager.disconnect(error))); -+ networkmanager.setReadOnly(); - } - } else { - PacketUtils.LOGGER.debug("Ignoring packet due to disconnection: {}", packet);