Don't add "chargeFlag" when player has no exopack
This commit is contained in:
parent
956531e08b
commit
aa2e053c26
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user