wait, no
This commit is contained in:
parent
18ac57a632
commit
3d4c5855c4
@ -45,10 +45,7 @@ class FluidTankBlockEntity(blockPos: BlockPos, blockState: BlockState) : Mattery
|
|||||||
return stack.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM).map { it.tanks > 0 }.orElse(false)
|
return stack.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM).map { it.tanks > 0 }.orElse(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
return stack.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM).map {
|
return stack.getCapability(ForgeCapabilities.FLUID_HANDLER_ITEM).map { it.fill(fluid[0], IFluidHandler.FluidAction.SIMULATE) > 0 }.orElse(false)
|
||||||
it.fill(fluid[0], IFluidHandler.FluidAction.SIMULATE) > 0 ||
|
|
||||||
it.drain(fluid[0], IFluidHandler.FluidAction.SIMULATE).isNotEmpty
|
|
||||||
}.orElse(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun canExtract(slot: Int, amount: Int, stack: ItemStack): Boolean {
|
override fun canExtract(slot: Int, amount: Int, stack: ItemStack): Boolean {
|
||||||
@ -56,7 +53,13 @@ class FluidTankBlockEntity(blockPos: BlockPos, blockState: BlockState) : Mattery
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
output = output.handler(HandlerFilter.OnlyOut)
|
output = output.handler(HandlerFilter.OnlyOut),
|
||||||
|
frontDefault = ItemHandlerMode.INPUT_OUTPUT,
|
||||||
|
backDefault = ItemHandlerMode.INPUT_OUTPUT,
|
||||||
|
leftDefault = ItemHandlerMode.INPUT_OUTPUT,
|
||||||
|
rightDefault = ItemHandlerMode.INPUT_OUTPUT,
|
||||||
|
topDefault = ItemHandlerMode.INPUT_OUTPUT,
|
||||||
|
bottomDefault = ItemHandlerMode.INPUT_OUTPUT,
|
||||||
)
|
)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
Loading…
Reference in New Issue
Block a user