mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-27 13:28:00 +01:00
generalized checking in NetheriteDivingHandler
- allows for using custom diving helmets and backtanks out of netherite
This commit is contained in:
parent
fc56003450
commit
80785351d6
1 changed files with 2 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.equipment.armor;
|
||||
|
||||
import com.simibubi.create.AllItems;
|
||||
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
@ -28,13 +26,13 @@ public final class NetheriteDivingHandler {
|
|||
ItemStack to = event.getTo();
|
||||
|
||||
if (slot == EquipmentSlot.HEAD) {
|
||||
if (AllItems.NETHERITE_DIVING_HELMET.isIn(to)) {
|
||||
if (to.getItem() instanceof DivingHelmetItem && isNetheriteArmor(to)) {
|
||||
setBit(entity, slot);
|
||||
} else {
|
||||
clearBit(entity, slot);
|
||||
}
|
||||
} else if (slot == EquipmentSlot.CHEST) {
|
||||
if (AllItems.NETHERITE_BACKTANK.isIn(to) && BacktankUtil.hasAirRemaining(to)) {
|
||||
if (to.getItem() instanceof BacktankItem && isNetheriteArmor(to) && BacktankUtil.hasAirRemaining(to)) {
|
||||
setBit(entity, slot);
|
||||
} else {
|
||||
clearBit(entity, slot);
|
||||
|
|
Loading…
Reference in a new issue