From be4efbaec66d700986969ad93466ce9d70e67bfb Mon Sep 17 00:00:00 2001 From: Christopher Bohn Date: Sun, 12 May 2024 21:59:35 -0700 Subject: [PATCH] remove chiseled bookshelf compat --- .../main/java/org/popcraft/bolt/listeners/BlockListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bukkit/src/main/java/org/popcraft/bolt/listeners/BlockListener.java b/bukkit/src/main/java/org/popcraft/bolt/listeners/BlockListener.java index 5cf95aae..196bd5c4 100644 --- a/bukkit/src/main/java/org/popcraft/bolt/listeners/BlockListener.java +++ b/bukkit/src/main/java/org/popcraft/bolt/listeners/BlockListener.java @@ -73,7 +73,6 @@ public final class BlockListener extends InteractionListener implements Listener { private static final SourceResolver REDSTONE_SOURCE_RESOLVER = new SourceTypeResolver(Source.of(SourceTypes.REDSTONE)); private static final EnumSet DYES = EnumSet.of(Material.WHITE_DYE, Material.ORANGE_DYE, Material.MAGENTA_DYE, Material.LIGHT_BLUE_DYE, Material.YELLOW_DYE, Material.LIME_DYE, Material.PINK_DYE, Material.GRAY_DYE, Material.LIGHT_GRAY_DYE, Material.CYAN_DYE, Material.PURPLE_DYE, Material.BLUE_DYE, Material.BROWN_DYE, Material.GREEN_DYE, Material.RED_DYE, Material.BLACK_DYE); - private static final Material CHISELED_BOOKSHELF = EnumUtil.valueOf(Material.class, "CHISELED_BOOKSHELF").orElse(null); private static final Material SCULK_SENSOR = EnumUtil.valueOf(Material.class, "SCULK_SENSOR").orElse(null); private static final Material CALIBRATED_SCULK_SENSOR = EnumUtil.valueOf(Material.class, "CALIBRATED_SCULK_SENSOR").orElse(null); private static final Material DECORATED_POT = EnumUtil.valueOf(Material.class, "DECORATED_POT").orElse(null); @@ -173,8 +172,7 @@ public void onPlayerInteract(final PlayerInteractEvent e) { e.setUseInteractedBlock(Event.Result.DENY); } } - if (CHISELED_BOOKSHELF != null && CHISELED_BOOKSHELF.equals(clicked.getType()) && clicked.getState() instanceof final ChiseledBookshelf chiseledBookshelf && clicked.getBlockData() instanceof final org.bukkit.block.data.type.ChiseledBookshelf chiseledBookshelfBlockData && chiseledBookshelfBlockData.getFacing() == e.getBlockFace()) { - // Future: Replace with Material.CHISELED_BOOKSHELF + if (Material.CHISELED_BOOKSHELF.equals(clicked.getType()) && clicked.getState() instanceof final ChiseledBookshelf chiseledBookshelf && clicked.getBlockData() instanceof final org.bukkit.block.data.type.ChiseledBookshelf chiseledBookshelfBlockData && chiseledBookshelfBlockData.getFacing() == e.getBlockFace()) { final Vector clickedPosition = PaperUtil.getClickedPosition(e); if (clickedPosition != null) { final int slot = chiseledBookshelf.getSlot(clickedPosition);