Advertisement
Guest User

Untitled

a guest
Nov 30th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. @Override
  2. public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
  3. {
  4. // Spawn the BeamEntity into the block's position
  5. world.setBlockState(pos, state.withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
  6. BeamEntity beam = new BeamEntity(world);
  7. beam.setPosition(pos.getX(), pos.getY(), pos.getZ());
  8. world.spawnEntityInWorld(beam);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement