use of net.minecraft.block.BlockLiquid in project Gaia-Dimension by Andromander.
the class GDFluidBlock method mixFluids.
public void mixFluids(World world, BlockPos pos) {
for (EnumFacing side : EnumFacing.VALUES) {
if (side != EnumFacing.DOWN) {
IBlockState offset = world.getBlockState(pos.offset(side));
if (offset.getMaterial().isLiquid()) {
if ((offset.getMaterial() == Material.LAVA) && (offset.getBlock() != GDBlocks.superhot_magma_block) && (offset.getBlock() instanceof BlockFluidBase || offset.getBlock() instanceof BlockLiquid)) {
world.setBlockState(pos, GDBlocks.gaia_cobblestone.getDefaultState());
this.playSound(world, pos);
break;
}
}
}
}
}
use of net.minecraft.block.BlockLiquid in project Gaia-Dimension by Andromander.
the class GDSuperhotMagma method mixFluids.
@Override
public void mixFluids(World world, BlockPos pos) {
for (EnumFacing side : EnumFacing.VALUES) {
if (side != EnumFacing.DOWN) {
IBlockState offset = world.getBlockState(pos.offset(side));
if (offset.getMaterial().isLiquid()) {
if (offset.getBlock() instanceof GDFluidBlock) {
if (offset.getBlock() == GDBlocks.mineral_water_block) {
world.setBlockState(pos, GDBlocks.gaia_stone.getDefaultState());
this.playSound(world, pos);
break;
}
if (offset.getBlock() == GDBlocks.sweet_muck_block) {
world.setBlockState(pos, GDBlocks.primal_mass.getDefaultState());
this.playSound(world, pos);
break;
}
} else if (offset.getBlock() instanceof BlockFluidBase || offset.getBlock() instanceof BlockLiquid) {
if (offset.getMaterial() == Material.WATER) {
world.setBlockState(pos, GDBlocks.gaia_cobblestone.getDefaultState());
this.playSound(world, pos);
break;
}
}
}
}
}
}
Aggregations