Created
April 10, 2016 02:51
-
-
Save StillManic/de017bd3744ef2c2d6bb7603e57e7e23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public IBlockState onBlockPlaced(World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { | |
StructureLathe lathe = new StructureLathe(placer.getHorizontalFacing(), pos); | |
if (lathe.addComponentParts(world, null, lathe.getBoundingBox())) { | |
IBlockState retState = this.getDefaultState().withProperty(ContentBlocks.HORIZONTAL, placer.getHorizontalFacing()); | |
world.setBlockState(pos, retState, 3); | |
((TileEntityLathe) world.getTileEntity(pos)).structureLathe = lathe; | |
return retState; | |
} | |
return Blocks.air.getDefaultState(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment