Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
- {
- // Spawn the BeamEntity into the block's position
- world.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
- BeamEntity beam = new BeamEntity(world);
- beam.setPosition(pos.getX(), pos.getY(), pos.getZ());
- world.spawnEntityInWorld(beam);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement