From 3d6c128ff1d487babccbf2e524a0443fed1a5db3 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 20 Mar 2023 10:05:43 +1100 Subject: [PATCH] #1149: Add BlockData#getPlacementMaterial By: Jishuna --- .../org/bukkit/craftbukkit/block/data/CraftBlockData.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java index c0556baa79..9925b78f1f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -617,4 +617,9 @@ public class CraftBlockData implements BlockData { return state.isFaceSturdy(BlockAccessAir.INSTANCE, BlockPosition.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support)); } + + @Override + public Material getPlacementMaterial() { + return CraftMagicNumbers.getMaterial(state.getBlock().asItem()); + } }