Compare commits

...

2 Commits

2 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import net.minecraft.world.phys.shapes.CollisionContext
import net.minecraft.world.phys.shapes.VoxelShape
import net.neoforged.neoforge.fluids.FluidUtil
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
import ru.dbotthepony.mc.otm.block.addSimpleDescription
import ru.dbotthepony.mc.otm.block.entity.decorative.InfiniteWaterSourceBlockEntity
import ru.dbotthepony.mc.otm.block.getShapeForEachState
import ru.dbotthepony.mc.otm.core.get
@ -39,6 +40,10 @@ class InfiniteWaterSourceBlock : RotatableMatteryBlock(
return InfiniteWaterSourceBlockEntity(p_153215_, p_153216_)
}
init {
addSimpleDescription()
}
override fun useItemOn(
p_316304_: ItemStack,
p_316362_: BlockState,

View File

@ -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