Search in sources :

Example 1 with TileEntityHandGrindstone

use of se.gory_moon.horsepower.tileentity.TileEntityHandGrindstone in project HorsePower by GoryMoon.

the class BlockHandGrindstone method onBlockPlacedBy.

public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
    worldIn.setBlockState(pos, ((IExtendedBlockState) state).withProperty(FACING, placer.getHorizontalFacing().getOpposite()).withProperty(PART, HandGrindstoneModels.BASE), 2);
    TileEntityHandGrindstone tile = getTileEntity(worldIn, pos);
    if (tile == null)
        return;
    tile.setForward(placer.getAdjustedHorizontalFacing().getOpposite());
}
Also used : IExtendedBlockState(net.minecraftforge.common.property.IExtendedBlockState) TileEntityHandGrindstone(se.gory_moon.horsepower.tileentity.TileEntityHandGrindstone)

Aggregations

IExtendedBlockState (net.minecraftforge.common.property.IExtendedBlockState)1 TileEntityHandGrindstone (se.gory_moon.horsepower.tileentity.TileEntityHandGrindstone)1