Don't add "chargeFlag" when player has no exopack

This commit is contained in:
DBotThePony 2025-02-17 19:31:54 +07:00
parent 956531e08b
commit aa2e053c26
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -244,12 +244,14 @@ abstract class MatteryMenu(
) )
} }
if (mattery.hasExopack) {
chargeFlag = Delegate.Of( chargeFlag = Delegate.Of(
getter = { slotIndex in mattery.slotsChargeFlag }, getter = { slotIndex in mattery.slotsChargeFlag },
setter = booleanInput(true) { if (mattery.hasExopack) { if (it) mattery.slotsChargeFlag.add(slotIndex) else mattery.slotsChargeFlag.remove(slotIndex) } }::accept setter = booleanInput(true) { if (mattery.hasExopack) { if (it) mattery.slotsChargeFlag.add(slotIndex) else mattery.slotsChargeFlag.remove(slotIndex) } }::accept
) )
} }
} }
}
open inner class EquipmentSlot(container: Container, index: Int, val type: net.minecraft.world.entity.EquipmentSlot) : InventorySlot(container, index) { open inner class EquipmentSlot(container: Container, index: Int, val type: net.minecraft.world.entity.EquipmentSlot) : InventorySlot(container, index) {
constructor(type: net.minecraft.world.entity.EquipmentSlot) : this(inventory, 34 + type.ordinal, type) constructor(type: net.minecraft.world.entity.EquipmentSlot) : this(inventory, 34 + type.ordinal, type)