mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
Goggles function in any curio slot (#6520)
This commit is contained in:
parent
1722d4dda0
commit
54f760feb1
1 changed files with 10 additions and 7 deletions
|
@ -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;
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue