mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
46 lines
2.0 KiB
Diff
46 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: granny <granny@purpurmc.org>
|
|
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 db8d8e2a07296d62c3097f02b03319e2e1ba9394..e5c30847297e056782084d81fb9300f98d4a8f75 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
|
|
@@ -708,4 +708,32 @@ public class MaterialRerouting {
|
|
meta.setCanPlaceOn(materials);
|
|
}
|
|
// Paper end
|
|
+ // 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
|
|
}
|