Advertisement
Guest User

Untitled

a guest
Nov 8th, 2014
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public class ModSchwert extends ItemSword {
  2.  
  3. public ModSchwert(ToolMaterial mat) {
  4. super(mat);
  5. }
  6.  
  7. public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer EntityPlayer) {
  8.  
  9. Vec3 look = EntityPlayer.getLookVec();
  10. MovingObjectPosition Coord = EntityPlayer.rayTrace(300, 1);
  11. if(Coord != null && Coord.typeOfHit == EnumMovingObjectType.TILE){
  12.  
  13. EntityLightningBolt Lightning = new EntityLightningBolt(world, 1, 1, 1);
  14. Lightning.setPosition(Coord.blockX, Coord.blockY, Coord.blockZ);
  15. world.spawnEntityInWorld(Lightning);
  16. }
  17.  
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement