This commit is contained in:
parent
704b683e27
commit
f20d728ed7
2 changed files with 9 additions and 5 deletions
|
@ -72,8 +72,6 @@ public class DispenseFluidContainer extends BehaviorDefaultDispenseItem
|
|||
return super.dispenseStack(source, stack);
|
||||
}
|
||||
|
||||
world.setBlockToAir(blockpos);
|
||||
|
||||
if (--stack.stackSize == 0)
|
||||
{
|
||||
stack.deserializeNBT(result.serializeNBT());
|
||||
|
|
|
@ -495,10 +495,16 @@ public class FluidUtil
|
|||
return null;
|
||||
}
|
||||
|
||||
IFluidHandler targetFluidHandler = FluidUtil.getFluidHandler(worldIn, pos, side);
|
||||
if (targetFluidHandler != null)
|
||||
IBlockState state = worldIn.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
|
||||
if (block instanceof IFluidBlock || block instanceof BlockLiquid)
|
||||
{
|
||||
return FluidUtil.tryFillContainer(emptyContainer, targetFluidHandler, Integer.MAX_VALUE, playerIn, true);
|
||||
IFluidHandler targetFluidHandler = FluidUtil.getFluidHandler(worldIn, pos, side);
|
||||
if (targetFluidHandler != null)
|
||||
{
|
||||
return FluidUtil.tryFillContainer(emptyContainer, targetFluidHandler, Integer.MAX_VALUE, playerIn, true);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue