aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-06-13 06:57:35 -0700
committerJake Potrebic <[email protected]>2024-06-13 06:57:35 -0700
commitffd503fa9e2969e70f953f9410ae20280d4acc74 (patch)
tree0ee9dcbffccf47185e419d77809b42d2333d19d3 /patches/server
parenta21ed1357000bff9da0dd725dc62e2fda589c1a0 (diff)
downloadPaper-ffd503fa9e2969e70f953f9410ae20280d4acc74.tar.gz
Paper-ffd503fa9e2969e70f953f9410ae20280d4acc74.zip
more material reroutingupdate-upstream
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/1053-Adopt-MaterialRerouting.patch18
1 files changed, 16 insertions, 2 deletions
diff --git a/patches/server/1053-Adopt-MaterialRerouting.patch b/patches/server/1053-Adopt-MaterialRerouting.patch
index 29760fa722..e628afe53a 100644
--- a/patches/server/1053-Adopt-MaterialRerouting.patch
+++ b/patches/server/1053-Adopt-MaterialRerouting.patch
@@ -7,16 +7,30 @@ Adopts the paper-api to the material rerouting infrastructure introduced
by upstream.
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
-index 3ff0f0e34356cee4c510fdd60af723b1c5df156a..deb121526016b0bffa8346e3074503fab9ef7c31 100644
+index 3ff0f0e34356cee4c510fdd60af723b1c5df156a..2ea35134bdb04244739ac6740242d4e4ec62623a 100644
--- a/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
-@@ -600,4 +600,8 @@ public class MaterialRerouting {
+@@ -600,4 +600,22 @@ public class MaterialRerouting {
public static void setBlocks(ToolComponent.ToolRule toolRule, Collection<Material> blocks) {
toolRule.setBlocks(blocks.stream().map(MaterialRerouting::transformToBlockType).toList());
}
+
+ // Paper start - register paper API specific material consumers in rerouting
++ public static org.bukkit.Material getMinecartMaterial(org.bukkit.entity.Minecart minecart, @InjectPluginVersion ApiVersion version) {
++ return minecart.getMinecartMaterial();
++ }
++
++ public static Material getBoatMaterial(Boat boat, @InjectPluginVersion ApiVersion version) {
++ return boat.getBoatMaterial();
++ }
+
++ public static Material getType(io.papermc.paper.event.player.PlayerItemCooldownEvent event, @InjectPluginVersion ApiVersion version) {
++ return event.getType();
++ }
++
++ public static Collection<Material> getInfiniburn(World world, @InjectPluginVersion ApiVersion version) {
++ return world.getInfiniburn();
++ }
+ // Paper end - register paper API specific material consumers in rerouting
}
diff --git a/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java b/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java