Package com.flansmod.common.network

Examples of com.flansmod.common.network.PacketFlak


   
    //Smoke
    if(smoking)
    {
      //Send flak packet to spawn particles
      FlansMod.getPacketHandler().sendToAllAround(new PacketFlak(posX, posY, posZ, 50, type.smokeParticleType), posX, posY, posZ, 30, dimension);
      //
      List list = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, boundingBox.expand(type.smokeRadius, type.smokeRadius, type.smokeRadius));
      for(Object obj : list)
      {
        EntityLivingBase entity = ((EntityLivingBase)obj);
View Full Code Here


      boolean used = false;
      //Handle healing
      if(type.healAmount > 0 && player.getHealth() < player.getMaxHealth())
      {
        player.heal(type.healAmount);
            FlansMod.getPacketHandler().sendToAllAround(new PacketFlak(player.posX, player.posY, player.posZ, 5, "heart"), new NetworkRegistry.TargetPoint(player.dimension, player.posX, player.posY, player.posZ, 50F));
            used = true;
      }
      //Handle potion effects
      for(PotionEffect effect : type.potionEffects)
      {
View Full Code Here

        }
      }
    }
    //Send flak packet
    if(type.flak > 0)
      FlansMod.getPacketHandler().sendToAllAround(new PacketFlak(posX, posY, posZ, type.flak, type.flakParticles), posX, posY, posZ, 200, dimension);
    // Drop item on hitting if bullet requires it
    if (type.dropItemOnHit != null)
    {
      String itemName = type.dropItemOnHit;
      int damage = 0;
View Full Code Here

              //If its finished, don't use it
              if(itemstack.getItemDamage() >= itemstack.getMaxDamage() && type.toolLife > 0)
                return itemstack;
             
              hitLiving.heal(type.healAmount);
              FlansMod.getPacketHandler().sendToAllAround(new PacketFlak(hitLiving.posX, hitLiving.posY, hitLiving.posZ, 5, "heart"), new NetworkRegistry.TargetPoint(hitLiving.dimension, hitLiving.posX, hitLiving.posY, hitLiving.posZ, 50F));
             
          //If not in creative and the tool should decay, damage it
          if(!entityplayer.capabilities.isCreativeMode && type.toolLife > 0)
            itemstack.setItemDamage(itemstack.getItemDamage() + 1);
          //If the tool is damagable and is destroyed upon being used up, then destroy it
View Full Code Here

TOP

Related Classes of com.flansmod.common.network.PacketFlak

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.