simple check for durability in item reconstructor
This commit is contained in:
parent
533cb16dbf
commit
e747143512
@ -223,7 +223,7 @@ class MatterReconstructorBlockEntity(blockPos: BlockPos, blockState: BlockState)
|
||||
val matterPerTick = matterPerTick * (1.0 + upgrades.speedBonus)
|
||||
val energyConsumption = MachinesConfig.MatterReconstructor.VALUES.energyConsumption * (1.0 + upgrades.speedBonus) * (upgrades.energyConsumed + Decimal.ONE)
|
||||
|
||||
if (!item.isEmpty && matterPerTick.isPositive && thisProgressPerTick > 0.0 && item.isRepairable && item.isDamaged) {
|
||||
if (!item.isEmpty && matterPerTick.isPositive && thisProgressPerTick > 0.0 && item.isRepairable && item.isDamaged && item.maxDamage > 0) {
|
||||
var progressPerTick = (repairProgress + thisProgressPerTick).coerceAtMost(item.damageValue.toDouble()) - repairProgress
|
||||
if (progressPerTick <= 0.0) return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user