Examples of GunType


Examples of com.flansmod.common.guns.GunType

   
    //Add box for right hand shield
    ItemStack playerRightHandStack = player.getCurrentEquippedItem();
    if(playerRightHandStack != null && playerRightHandStack.getItem() instanceof ItemGun)
    {
      GunType gunType = ((ItemGun)playerRightHandStack.getItem()).type;
      if(gunType.shield)
      {
        hitboxes.add(new PlayerHitbox(player, bodyAxes.findLocalAxesGlobally(rightArmAxes), new Vector3f(originXRight, 1.3F, originZRight), new Vector3f(gunType.shieldOrigin.y, -1.05F + gunType.shieldOrigin.x, -1F / 16F + gunType.shieldOrigin.z), new Vector3f(gunType.shieldDimensions.y, gunType.shieldDimensions.x, gunType.shieldDimensions.z), EnumHitboxType.RIGHTITEM))
      }
     
      //Add left hand shield box
      PlayerData data = PlayerHandler.getPlayerData(player);
      if(gunType.oneHanded && data.offHandGunSlot != 0)
      {
        ItemStack leftHandStack = null;
        //Client side other players
        if(player.worldObj.isRemote && !FlansMod.proxy.isThePlayer(player))
          leftHandStack = data.offHandGunStack;
        else leftHandStack = player.inventory.getStackInSlot(data.offHandGunSlot - 1);
       
        if(leftHandStack != null && leftHandStack.getItem() instanceof ItemGun)
        {
          GunType leftGunType = ((ItemGun)leftHandStack.getItem()).type;
          if(leftGunType.shield)
          {
            hitboxes.add(new PlayerHitbox(player, bodyAxes.findLocalAxesGlobally(leftArmAxes), new Vector3f(originXLeft, 1.3F, originZLeft), new Vector3f(leftGunType.shieldOrigin.y, -1.05F + leftGunType.shieldOrigin.x, -1F / 16F + leftGunType.shieldOrigin.z), new Vector3f(leftGunType.shieldDimensions.y, leftGunType.shieldDimensions.x, leftGunType.shieldDimensions.z), EnumHitboxType.LEFTITEM))
          }
        }
View Full Code Here

Examples of com.flansmod.common.guns.GunType

    case RIGHTITEM :
    {
      ItemStack currentStack = player.getCurrentEquippedItem();
      if(currentStack != null && currentStack.getItem() instanceof ItemGun)
      {
        GunType gunType = ((ItemGun)currentStack.getItem()).type;
        //TODO : Shield damage
        return penetratingPower - gunType.shieldDamageAbsorption;
      }
      else return penetratingPower;
    }
    case LEFTITEM :
    {
      PlayerData data = PlayerHandler.getPlayerData(player);
      if(data.offHandGunSlot != 0)
      {
        ItemStack leftHandStack = null;
        if(player.worldObj.isRemote && !FlansMod.proxy.isThePlayer(player))
          leftHandStack = data.offHandGunStack;
        else leftHandStack = player.inventory.getStackInSlot(data.offHandGunSlot - 1);
       
        if(leftHandStack != null && leftHandStack.getItem() instanceof ItemGun)
        {
          GunType leftGunType = ((ItemGun)leftHandStack.getItem()).type;
          //TODO : Shield damage
          return penetratingPower - leftGunType.shieldDamageAbsorption;
        }
      }
    }
View Full Code Here

Examples of com.flansmod.common.guns.GunType

      fontRendererObj.drawString("Gun Modification Table", 8, 6, 0x404040);
        
        ItemStack gunStack = inventorySlots.getSlot(0).getStack();
        if(gunStack != null && gunStack.getItem() instanceof ItemGun)
        {
          GunType gunType = ((ItemGun)gunStack.getItem()).type;
          if(gunType.model != null)
          {
            GL11.glPushMatrix();
            GL11.glColor3f(1F, 1F, 1F);
            GL11.glTranslatef(110, 54, 100);
View Full Code Here

Examples of com.flansmod.common.guns.GunType

          inventorySlots.getSlot(z).yDisplayPosition = -1000;
       
        ItemStack gunStack = inventorySlots.getSlot(0).getStack();
        if(gunStack != null && gunStack.getItem() instanceof ItemGun)
        {
          GunType gunType = ((ItemGun)gunStack.getItem()).type;
          if(gunType.allowBarrelAttachments)
          {
            drawTexturedModalRect(xOrigin + 51, yOrigin + 107, 176, 122, 22, 22);
            inventorySlots.getSlot(1).yDisplayPosition = 110;
          }
View Full Code Here

Examples of com.flansmod.common.guns.GunType

    hoveringOver = null;
   
    ItemStack gunStack = inventorySlots.getSlot(0).getStack();
        if(gunStack != null && gunStack.getItem() instanceof ItemGun)
        {
          GunType gunType = ((ItemGun)gunStack.getItem()).type;
          int numPaintjobs = gunType.paintjobs.size();
          int numRows = numPaintjobs / 2 + 1;
         
            for(int j = 0; j < numRows; j++)
            {
View Full Code Here

Examples of com.flansmod.common.guns.GunType

      }
     
      else if(heldItem instanceof ItemGun)
      {
        ItemGun gunItem = (ItemGun)heldItem;
        GunType gunType = gunItem.type;
       
        //Get the correct shoot delay
        int delay = left ? shootDelayLeft : shootDelayRight;
       
        //If we can shoot
View Full Code Here

Examples of com.flansmod.common.guns.GunType

        toolType.model.renderSaw(mecha, dT, (leftHand && mecha.leftMouseHeld) || (!leftHand && mecha.rightMouseHeld));
      }
    }
    else if(item instanceof ItemGun && ((ItemGun)item).type.model != null)
    {
      GunType gunType = ((ItemGun)item).type;
      ModelGun model = gunType.model;
     
      GL11.glRotatef(-90F, 0F, 0F, 1F);
      texturemanager.bindTexture(FlansModResourceHandler.getTexture(gunType));
      ClientProxy.gunRenderer.renderGun(stack, gunType, 1F / 16F, model, leftHand ? mecha.leftAnimations : mecha.rightAnimations, 0F);
View Full Code Here

Examples of com.flansmod.common.guns.GunType

      return;
   
    RenderBlocks renderBlocks = (RenderBlocks)data[0];
   
   
    GunType gunType = ((ItemGun)item.getItem()).type;
    if(gunType == null)
      return;
   
    ModelGun model = gunType.model;
    if(model == null)
      return;

    //Render main hand gun
    {
      GunAnimations animations = type == ItemRenderType.ENTITY ? new GunAnimations() : FlansModClient.getGunAnimations((EntityLivingBase)data[1], false);
      renderGun(type, item, gunType, animations, false, data);
    }
   
    //Render off-hand gun
    if(gunType.oneHanded && type == ItemRenderType.EQUIPPED_FIRST_PERSON)
    {
      EntityLivingBase entity = (EntityLivingBase)data[1];
      if(entity instanceof EntityPlayer)
      {
        EntityPlayer player = (EntityPlayer)entity;
        PlayerData playerData = PlayerHandler.getPlayerData(player, Side.CLIENT);
        if(playerData.offHandGunSlot != 0)
        {
          GunAnimations animations = FlansModClient.gunAnimationsLeft.get(data[1]);
          if(animations == null)
          {
            animations = new GunAnimations();
            FlansModClient.gunAnimationsLeft.put((EntityLivingBase)data[1], animations);
          }
          ItemStack offHandItem = player.inventory.getStackInSlot(playerData.offHandGunSlot - 1);
          if(offHandItem == null || !(offHandItem.getItem() instanceof ItemGun))
            return;
          GunType offHandGunType = ((ItemGun)offHandItem.getItem()).type;
          if(!offHandGunType.oneHanded)
            return;
         
          renderGun(type, offHandItem, offHandGunType, animations, true, data);
        }
View Full Code Here

Examples of com.flansmod.common.guns.GunType

    if(animations == null)
    {
      animations = new GunAnimations();
      FlansModClient.gunAnimationsLeft.put(player, animations);
    }
    GunType offHandGunType = ((ItemGun)offHandItemStack.getItem()).type;
    if(!offHandGunType.oneHanded)
      return;
   
    renderGun(ItemRenderType.EQUIPPED, offHandItemStack, offHandGunType, animations, true, player);
  }
View Full Code Here

Examples of com.flansmod.common.guns.GunType

    }
    //Now iterate again and look for ammo
    for(EntityItem entity : dropsToThrow)
    {
      EntityGunItem gunEntity = (EntityGunItem)entity;
      GunType gunType = ((ItemGun)gunEntity.getEntityItem().getItem()).type;
      for(EntityItem ammoEntity : event.drops)
      {
        ItemStack ammoItemstack = ammoEntity.getEntityItem();
        if(ammoItemstack != null && ammoItemstack.getItem() instanceof ItemShootable)
        {
          ShootableType bulletType = ((ItemShootable)ammoItemstack.getItem()).type;
          if(gunType.isAmmo(bulletType))
          {
            gunEntity.ammoStacks.add(ammoItemstack.copy());
            ammoItemstack.stackSize = 0;
         
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.