Skip to content

Commit

Permalink
fix: support trapdoor yOffset for all block variations
Browse files Browse the repository at this point in the history
New trapdoor variations where added in some future versions
and I think it makes more sense to do this based on the Enum's name at this point.
There are a lot of trapdoor variations by now ;D
  • Loading branch information
SpraxDev committed Aug 17, 2024
1 parent e833592 commit b971a8e
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,7 @@ public static double getSitOffset(Block block, boolean sitsOnArmorStand, ChairNM

XMaterial blockType = XMaterial.matchXMaterial(block.getType());

if (blockType == XMaterial.ACACIA_TRAPDOOR ||
blockType == XMaterial.BIRCH_TRAPDOOR ||
blockType == XMaterial.CRIMSON_TRAPDOOR ||
blockType == XMaterial.DARK_OAK_TRAPDOOR ||
blockType == XMaterial.IRON_TRAPDOOR ||
blockType == XMaterial.JUNGLE_TRAPDOOR ||
blockType == XMaterial.OAK_TRAPDOOR ||
blockType == XMaterial.SPRUCE_TRAPDOOR ||
blockType == XMaterial.WARPED_TRAPDOOR) {
if (blockType.name().endsWith("_TRAPDOOR")) {
yOffset = -0.125;
}

Expand Down

0 comments on commit b971a8e

Please sign in to comment.