use of net.minecraft.block.BlockDynamicLiquid in project ImmersiveEngineering by BluSunrize.
the class TileEntityThermoelectricGen method getFluid.
Fluid getFluid(BlockPos pos) {
IBlockState state = worldObj.getBlockState(pos);
Block b = state.getBlock();
Fluid f = FluidRegistry.lookupFluidForBlock(b);
if (f == null && b instanceof BlockDynamicLiquid && b.getMetaFromState(state) == 0)
if (state.getMaterial().equals(Material.WATER))
f = FluidRegistry.WATER;
else if (state.getMaterial().equals(Material.LAVA))
f = FluidRegistry.LAVA;
if (b instanceof IFluidBlock && !((IFluidBlock) b).canDrain(worldObj, pos))
return null;
if (b instanceof BlockStaticLiquid && b.getMetaFromState(state) != 0)
return null;
if (f == null)
return null;
return f;
}
use of net.minecraft.block.BlockDynamicLiquid in project SecurityCraft by Geforce132.
the class BlockFakeWaterBase method updateLiquid.
private void updateLiquid(World worldIn, BlockPos p_176370_2_, IBlockState p_176370_3_) {
BlockDynamicLiquid blockdynamicliquid = getFlowingBlock(this.blockMaterial);
worldIn.setBlockState(p_176370_2_, blockdynamicliquid.getDefaultState().withProperty(LEVEL, p_176370_3_.getValue(LEVEL)), 2);
worldIn.scheduleUpdate(p_176370_2_, blockdynamicliquid, this.tickRate(worldIn));
}
use of net.minecraft.block.BlockDynamicLiquid in project SecurityCraft by Geforce132.
the class BlockFakeLavaBase method updateLiquid.
private void updateLiquid(World worldIn, BlockPos p_176370_2_, IBlockState p_176370_3_) {
BlockDynamicLiquid blockdynamicliquid = getFlowingBlock(this.blockMaterial);
worldIn.setBlockState(p_176370_2_, blockdynamicliquid.getDefaultState().withProperty(LEVEL, p_176370_3_.getValue(LEVEL)), 2);
worldIn.scheduleUpdate(p_176370_2_, blockdynamicliquid, this.tickRate(worldIn));
}
Aggregations