use of net.minecraftforge.fluids.BlockFluidFinite in project Railcraft by Railcraft.
the class ItemFluidContainer method tryPlaceContainedLiquid.
private boolean tryPlaceContainedLiquid(World world, BlockPos pos) {
Fluid fl = fluid.get();
if (fl == null)
return false;
Block fluidBlock = fl.getBlock();
if (fluidBlock == null)
return false;
Material material = WorldPlugin.getBlockMaterial(world, pos);
if (!world.isAirBlock(pos) && material.isSolid())
return false;
if (!world.isRemote && !material.isSolid() && !material.isLiquid())
world.destroyBlock(pos, true);
world.setBlockState(pos, fluidBlock.getDefaultState().withProperty(BlockFluidBase.LEVEL, fluidBlock instanceof BlockFluidFinite ? 15 : 0));
return true;
}
Aggregations