2014-06-27 19:43:09 -04:00
|
|
|
package WayofTime.alchemicalWizardry.common.block;
|
|
|
|
|
2014-10-13 22:33:20 +02:00
|
|
|
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
2014-06-27 19:43:09 -04:00
|
|
|
import net.minecraft.block.material.Material;
|
2015-07-29 14:35:00 -04:00
|
|
|
import net.minecraft.util.BlockPos;
|
2014-06-27 19:43:09 -04:00
|
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
import net.minecraftforge.fluids.BlockFluidClassic;
|
|
|
|
|
2015-07-29 11:30:24 -04:00
|
|
|
public class BlockLifeEssence extends BlockFluidClassic
|
2014-06-27 19:43:09 -04:00
|
|
|
{
|
2015-07-29 11:30:24 -04:00
|
|
|
public BlockLifeEssence()
|
2014-06-27 19:43:09 -04:00
|
|
|
{
|
|
|
|
super(AlchemicalWizardry.lifeEssenceFluid, Material.water);
|
|
|
|
AlchemicalWizardry.lifeEssenceFluid.setBlock(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-07-29 14:35:00 -04:00
|
|
|
public boolean canDisplace(IBlockAccess world, BlockPos blockPos)
|
2014-06-27 19:43:09 -04:00
|
|
|
{
|
2015-07-29 14:35:00 -04:00
|
|
|
return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.canDisplace(world, blockPos);
|
2014-06-27 19:43:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-07-29 14:35:00 -04:00
|
|
|
public boolean displaceIfPossible(World world, BlockPos blockPos)
|
2014-06-27 19:43:09 -04:00
|
|
|
{
|
2015-07-29 14:35:00 -04:00
|
|
|
return !world.getBlockState(blockPos).getBlock().getMaterial().isLiquid() && super.displaceIfPossible(world, blockPos);
|
2014-06-27 19:43:09 -04:00
|
|
|
}
|
|
|
|
}
|