mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +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);
|
modEventBus.addListener(Curios::onClientSetup);
|
||||||
|
|
||||||
GogglesItem.addIsWearingPredicate(player -> resolveCuriosMap(player)
|
GogglesItem.addIsWearingPredicate(player -> resolveCuriosMap(player)
|
||||||
.map(curiosMap -> curiosMap.get("head"))
|
.map(curiosMap -> {
|
||||||
.map(stacksHandler -> {
|
for (ICurioStacksHandler stacksHandler : curiosMap.values()) {
|
||||||
// Check all the Head slots for Goggles existing
|
// Search all the curio slots for Goggles existing
|
||||||
int slots = stacksHandler.getSlots();
|
int slots = stacksHandler.getSlots();
|
||||||
for (int slot = 0; slot < slots; slot++)
|
for (int slot = 0; slot < slots; slot++) {
|
||||||
if (AllItems.GOGGLES.isIn(stacksHandler.getStacks().getStackInSlot(slot)))
|
if (AllItems.GOGGLES.isIn(stacksHandler.getStacks().getStackInSlot(slot))) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue