Fix wrong matter recycler receive values
This commit is contained in:
parent
1087e755ff
commit
a3ed886900
@ -24,6 +24,7 @@ import ru.dbotthepony.mc.otm.config.MachinesConfig
|
||||
import ru.dbotthepony.mc.otm.container.MatteryContainer
|
||||
import ru.dbotthepony.mc.otm.container.HandlerFilter
|
||||
import ru.dbotthepony.mc.otm.core.math.Decimal
|
||||
import ru.dbotthepony.mc.otm.core.nextDecimal
|
||||
import ru.dbotthepony.mc.otm.core.otmRandom
|
||||
import ru.dbotthepony.mc.otm.graph.matter.MatterGraph
|
||||
import ru.dbotthepony.mc.otm.item.matter.MatterDustItem
|
||||
@ -137,7 +138,7 @@ class MatterRecyclerBlockEntity(blockPos: BlockPos, blockState: BlockState)
|
||||
else if (matter.receiveMatter(toReceive, true) != toReceive)
|
||||
return status.noMatter()
|
||||
|
||||
matter.receiveMatter(toReceive * 0.4 + level!!.otmRandom.nextDouble() * 0.6, false)
|
||||
matter.receiveMatter(toReceive * level!!.otmRandom.nextDecimal(BASE_RECEIVE, Decimal.ONE), false)
|
||||
job.totalMatter -= toReceive
|
||||
}
|
||||
|
||||
@ -151,4 +152,8 @@ class MatterRecyclerBlockEntity(blockPos: BlockPos, blockState: BlockState)
|
||||
matter.extractMatter(received, false)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val BASE_RECEIVE = Decimal("0.4")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user