mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Adopt MaterialRerouting
Adopts the purpur-api to the material rerouting infrastructure introduced by upstream's upstream.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
|
||||
@@ -708,4 +_,32 @@
|
||||
meta.setCanPlaceOn(materials);
|
||||
}
|
||||
// Paper end
|
||||
+ // Purpur start - Adopt MaterialRerouting
|
||||
+ // 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 - Adopt MaterialRerouting
|
||||
}
|
||||
Reference in New Issue
Block a user