diff options
Diffstat (limited to 'patches/server')
-rw-r--r-- | patches/server/1053-Adopt-MaterialRerouting.patch | 18 |
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 |