Merge branch '1.20.1' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into 1.19.4
This commit is contained in:
commit
562e6c509f
@ -50,7 +50,7 @@ abstract class AbstractMatteryFluidHandler : IFluidHandler {
|
||||
val fluid = fluid
|
||||
|
||||
if (fluid.isEmpty || fluid.isFluidEqual(resource)) {
|
||||
val new = (fluid.amount + resource.amount).coerceAtMost(capacity)
|
||||
val new = (fluid.amount.toLong() + resource.amount.toLong()).coerceAtMost(capacity.toLong()).toInt()
|
||||
if (new <= fluid.amount) return 0
|
||||
|
||||
if (action.execute()) {
|
||||
@ -86,7 +86,7 @@ abstract class AbstractMatteryFluidHandler : IFluidHandler {
|
||||
if (fluid.isEmpty) {
|
||||
return FluidStack.EMPTY
|
||||
} else {
|
||||
val new = (fluid.amount - maxDrain).coerceAtLeast(0)
|
||||
val new = (fluid.amount.toLong() - maxDrain.toLong()).coerceAtLeast(0L).toInt()
|
||||
|
||||
if (action.execute()) {
|
||||
if (new == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user