From 54f760feb1a9b48bfca220fc04d89fda854f42ed Mon Sep 17 00:00:00 2001 From: littlej541 Date: Mon, 15 Jul 2024 06:14:48 -0700 Subject: [PATCH] Goggles function in any curio slot (#6520) --- .../simibubi/create/compat/curios/Curios.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/simibubi/create/compat/curios/Curios.java b/src/main/java/com/simibubi/create/compat/curios/Curios.java index 97eea93e2..7adbb59be 100644 --- a/src/main/java/com/simibubi/create/compat/curios/Curios.java +++ b/src/main/java/com/simibubi/create/compat/curios/Curios.java @@ -43,13 +43,16 @@ public class Curios { modEventBus.addListener(Curios::onClientSetup); GogglesItem.addIsWearingPredicate(player -> resolveCuriosMap(player) - .map(curiosMap -> curiosMap.get("head")) - .map(stacksHandler -> { - // Check all the Head slots for Goggles existing - int slots = stacksHandler.getSlots(); - for (int slot = 0; slot < slots; slot++) - if (AllItems.GOGGLES.isIn(stacksHandler.getStacks().getStackInSlot(slot))) - return true; + .map(curiosMap -> { + for (ICurioStacksHandler stacksHandler : curiosMap.values()) { + // Search all the curio slots for Goggles existing + int slots = stacksHandler.getSlots(); + for (int slot = 0; slot < slots; slot++) { + if (AllItems.GOGGLES.isIn(stacksHandler.getStacks().getStackInSlot(slot))) { + return true; + } + } + } return false; })