From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny Date: Thu, 13 Jun 2024 16:00:30 -0700 Subject: [PATCH] Adopt MaterialRerouting Adopts the purpur-api to the material rerouting infrastructure introduced by upstream's upstream. diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java index 9c004e7cb46841d874ab997bf2e3b63ae763aec7..36003e5c7c61d964f11e81fa56845a52a8785468 100644 --- a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java @@ -678,4 +678,32 @@ public class MaterialRerouting { return itemStack.withType(material); } // Paper end - register paper API specific material consumers in rerouting + // Purpur start + // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) + public static void addFuel(Server server, Material material, int burnTime) { + server.addFuel(material, burnTime); + } + + // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) + public static void removeFuel(Server server, Material material) { + server.removeFuel(material); + } + + // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) + @RerouteStatic("org/bukkit/Bukkit") + public static void addFuel(Material material, int burnTime) { + Bukkit.addFuel(material, burnTime); + } + + // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/pull/570) + @RerouteStatic("org/bukkit/Bukkit") + public static void removeFuel(Material material) { + Bukkit.removeFuel(material); + } + + // Method added post 1.13, no-op (https://github.com/PurpurMC/Purpur/commit/607d909efba516893072b782c0393c53d048210e) + public static BlockData getBlockData(ItemStack itemStack, Material material) { + return itemStack.getBlockData(MaterialRerouting.transformToBlockType(material)); + } + // Purpur end }