From cfbc38ebc2df33fda58f5632b244d27a438400a3 Mon Sep 17 00:00:00 2001 From: GrahamKracker <86011515+GrahamKracker@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:06:58 -0500 Subject: [PATCH] Update src/main/java/codes/cookies/mod/features/farming/garden/visitors/VisitorDropProtection.java Co-authored-by: Maik Z. <58326890+zFlxw@users.noreply.github.com> --- .../features/farming/garden/visitors/VisitorDropProtection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/codes/cookies/mod/features/farming/garden/visitors/VisitorDropProtection.java b/src/main/java/codes/cookies/mod/features/farming/garden/visitors/VisitorDropProtection.java index 268f73a3..c0e57f24 100644 --- a/src/main/java/codes/cookies/mod/features/farming/garden/visitors/VisitorDropProtection.java +++ b/src/main/java/codes/cookies/mod/features/farming/garden/visitors/VisitorDropProtection.java @@ -42,7 +42,7 @@ private void updateSlots(Slot slot) { protected final ItemStack disabledItem = new ItemBuilder(Items.BARRIER).hideAdditionalTooltips().set(CookiesDataComponentTypes.ITEM_CLICK_RUNNABLE, Runnables.doNothing()).setName(Text.of("Refusing temporarily disabled due to rare drop")).set(DataComponentTypes.RARITY, Rarity.COMMON).build(); private void handleRejectButton(ItemStack rejectButton, boolean visitorItemLore) { - if(rejectButton.isEmpty() || !rejectButton.isOf(Items.RED_TERRACOTTA) || !visitorItemLore) { + if(rejectButton == null || rejectButton.isEmpty() || !rejectButton.isOf(Items.RED_TERRACOTTA) || !visitorItemLore) { return; }