mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -04:00
Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts: # src/main/scala/li/cil/oc/util/FluidUtils.scala
This commit is contained in:
commit
3b6e16f7ef
@ -453,7 +453,6 @@ class Player(val agent: internal.Agent) extends FakePlayer(agent.world.asInstanc
|
||||
|
||||
val te = world.getTileEntity(pos)
|
||||
val canHarvest = block.canHarvestBlock(world, pos, this)
|
||||
block.onBlockHarvested(world, pos, state, this)
|
||||
if (block.removedByPlayer(state, world, pos, this, block.canHarvestBlock(world, pos, this))) {
|
||||
block.onBlockDestroyedByPlayer(world, pos, state)
|
||||
if (canHarvest) {
|
||||
|
@ -57,6 +57,9 @@ object FluidUtils {
|
||||
*/
|
||||
def transferBetweenFluidHandlers(source: IFluidHandler, sink: IFluidHandler, limit: Int = Fluid.BUCKET_VOLUME): Int = {
|
||||
val drained = source.drain(limit, false)
|
||||
if (drained == null) {
|
||||
return 0
|
||||
}
|
||||
val filled = sink.fill(drained, false)
|
||||
sink.fill(source.drain(filled, true), true)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user