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