Search in sources :

Example 1 with BlockFiller

use of se.gory_moon.horsepower.blocks.BlockFiller in project HorsePower by GoryMoon.

the class TileEntityFiller method getFilledPos.

public BlockPos getFilledPos() {
    IBlockState state = getWorld().getBlockState(getPos());
    if (!(state.getBlock() instanceof BlockFiller))
        return getPos();
    EnumFacing facing = state.getValue(BlockDirectional.FACING);
    IBlockState state1 = getWorld().getBlockState(pos.offset(facing));
    if (!(state1.getBlock() instanceof BlockHPBase))
        return getPos();
    return pos.offset(facing);
}
Also used : IBlockState(net.minecraft.block.state.IBlockState) BlockHPBase(se.gory_moon.horsepower.blocks.BlockHPBase) BlockFiller(se.gory_moon.horsepower.blocks.BlockFiller) EnumFacing(net.minecraft.util.EnumFacing)

Aggregations

IBlockState (net.minecraft.block.state.IBlockState)1 EnumFacing (net.minecraft.util.EnumFacing)1 BlockFiller (se.gory_moon.horsepower.blocks.BlockFiller)1 BlockHPBase (se.gory_moon.horsepower.blocks.BlockHPBase)1