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);
|
return super.dispenseStack(source, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
world.setBlockToAir(blockpos);
|
|
||||||
|
|
||||||
if (--stack.stackSize == 0)
|
if (--stack.stackSize == 0)
|
||||||
{
|
{
|
||||||
stack.deserializeNBT(result.serializeNBT());
|
stack.deserializeNBT(result.serializeNBT());
|
||||||
|
|
|
@ -495,11 +495,17 @@ public class FluidUtil
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IBlockState state = worldIn.getBlockState(pos);
|
||||||
|
Block block = state.getBlock();
|
||||||
|
|
||||||
|
if (block instanceof IFluidBlock || block instanceof BlockLiquid)
|
||||||
|
{
|
||||||
IFluidHandler targetFluidHandler = FluidUtil.getFluidHandler(worldIn, pos, side);
|
IFluidHandler targetFluidHandler = FluidUtil.getFluidHandler(worldIn, pos, side);
|
||||||
if (targetFluidHandler != null)
|
if (targetFluidHandler != null)
|
||||||
{
|
{
|
||||||
return FluidUtil.tryFillContainer(emptyContainer, targetFluidHandler, Integer.MAX_VALUE, playerIn, true);
|
return FluidUtil.tryFillContainer(emptyContainer, targetFluidHandler, Integer.MAX_VALUE, playerIn, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue