Package mekanism.common.item

Examples of mekanism.common.item.ItemJetpack


    WalkieTalkie = new ItemWalkieTalkie().setUnlocalizedName("WalkieTalkie");
    SeismicReader = (ItemSeismicReader)new ItemSeismicReader().setUnlocalizedName("SeismicReader");
    AtomicDisassembler = (ItemAtomicDisassembler)new ItemAtomicDisassembler().setUnlocalizedName("AtomicDisassembler");
    GasMask = (ItemGasMask)new ItemGasMask().setUnlocalizedName("GasMask");
    ScubaTank = (ItemScubaTank)new ItemScubaTank().setUnlocalizedName("ScubaTank");
    Jetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("Jetpack");
    ArmoredJetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("ArmoredJetpack");
    FreeRunners = new ItemFreeRunners().setUnlocalizedName("FreeRunners");
    BrineBucket = new ItemMekanism().setMaxStackSize(1).setContainerItem(Items.bucket).setUnlocalizedName("BrineBucket");
    Sawdust = new ItemMekanism().setUnlocalizedName("Sawdust");
    Salt = new ItemMekanism().setUnlocalizedName("Salt");
    Ingot = new ItemIngot();
View Full Code Here


        MekanismClient.updateKey(mc.gameSettings.keyBindSneak, KeySync.DESCEND);
      }

      if(isJetpackOn(mc.thePlayer))
      {
        ItemJetpack jetpack = (ItemJetpack)mc.thePlayer.getEquipmentInSlot(3).getItem();

        if(jetpack.getMode(mc.thePlayer.getEquipmentInSlot(3)) == JetpackMode.NORMAL)
        {
          mc.thePlayer.motionY = Math.min(mc.thePlayer.motionY + 0.15D, 0.5D);
          mc.thePlayer.fallDistance = 0.0F;
        }
        else if(jetpack.getMode(mc.thePlayer.getEquipmentInSlot(3)) == JetpackMode.HOVER)
        {
          if((!mc.gameSettings.keyBindJump.getIsKeyPressed() && !mc.gameSettings.keyBindSneak.getIsKeyPressed()) || (mc.gameSettings.keyBindJump.getIsKeyPressed() && mc.gameSettings.keyBindSneak.getIsKeyPressed()) || mc.currentScreen != null)
          {
            if(mc.thePlayer.motionY > 0)
            {
              mc.thePlayer.motionY = Math.max(mc.thePlayer.motionY - 0.15D, 0);
            }
            else if(mc.thePlayer.motionY < 0)
            {
              mc.thePlayer.motionY = Math.min(mc.thePlayer.motionY + 0.15D, 0);
            }
          }
          else {
            if(mc.gameSettings.keyBindJump.getIsKeyPressed() && mc.currentScreen == null)
            {
              mc.thePlayer.motionY = Math.min(mc.thePlayer.motionY + 0.15D, 0.2D);
            }
            else if(mc.gameSettings.keyBindSneak.getIsKeyPressed() && mc.currentScreen == null)
            {
              mc.thePlayer.motionY = Math.max(mc.thePlayer.motionY - 0.15D, -0.2D);
            }
          }

          mc.thePlayer.fallDistance = 0.0F;
        }

        jetpack.useGas(mc.thePlayer.getEquipmentInSlot(3));
      }

      if(isGasMaskOn(mc.thePlayer))
      {
        ItemScubaTank tank = (ItemScubaTank)mc.thePlayer.getEquipmentInSlot(3).getItem();
View Full Code Here

    if(stack != null)
    {
      if(stack.getItem() instanceof ItemJetpack)
      {
        ItemJetpack jetpack = (ItemJetpack)stack.getItem();

        if(jetpack.getGas(stack) != null)
        {
          if((mc.gameSettings.keyBindJump.getIsKeyPressed() && jetpack.getMode(stack) == JetpackMode.NORMAL) && mc.currentScreen == null)
          {
            return true;
          }
          else if(jetpack.getMode(stack) == JetpackMode.HOVER)
          {
            return true;
          }
        }
      }
View Full Code Here

      }
    }

    if(isJetpackOn(player))
    {
      ItemJetpack jetpack = (ItemJetpack)player.getEquipmentInSlot(3).getItem();

      if(jetpack.getMode(player.getEquipmentInSlot(3)) == JetpackMode.NORMAL)
      {
        player.motionY = Math.min(player.motionY + 0.15D, 0.5D);
      }
      else if(jetpack.getMode(player.getEquipmentInSlot(3)) == JetpackMode.HOVER)
      {
        if((!Mekanism.keyMap.has(player, KeySync.ASCEND) && !Mekanism.keyMap.has(player, KeySync.DESCEND)) || (Mekanism.keyMap.has(player, KeySync.ASCEND) && Mekanism.keyMap.has(player, KeySync.DESCEND)))
        {
          if(player.motionY > 0)
          {
            player.motionY = Math.max(player.motionY - 0.15D, 0);
          }
          else if(player.motionY < 0)
          {
            player.motionY = Math.min(player.motionY + 0.15D, 0);
          }
        }
        else {
          if(Mekanism.keyMap.has(player, KeySync.ASCEND))
          {
            player.motionY = Math.min(player.motionY + 0.15D, 0.2D);
          }
          else if(Mekanism.keyMap.has(player, KeySync.DESCEND))
          {
            player.motionY = Math.max(player.motionY - 0.15D, -0.2D);
          }
        }
      }

      player.fallDistance = 0.0F;

      if(player instanceof EntityPlayerMP)
      {
        MekanismUtils.setPrivateValue(((EntityPlayerMP)player).playerNetServerHandler, 0, NetHandlerPlayServer.class, ObfuscatedNames.NetHandlerPlayServer_floatingTickCount);
      }

      jetpack.useGas(player.getEquipmentInSlot(3));
    }

    if(isGasMaskOn(player))
    {
      ItemScubaTank tank = (ItemScubaTank)player.getEquipmentInSlot(3).getItem();
View Full Code Here

    if(stack != null && !player.capabilities.isCreativeMode)
    {
      if(stack.getItem() instanceof ItemJetpack)
      {
        ItemJetpack jetpack = (ItemJetpack)stack.getItem();

        if(jetpack.getGas(stack) != null)
        {
          if((Mekanism.keyMap.has(player, KeySync.ASCEND) && jetpack.getMode(stack) == JetpackMode.NORMAL))
          {
            return true;
          }
          else if(jetpack.getMode(stack) == JetpackMode.HOVER)
          {
            return true;
          }
        }
      }
View Full Code Here

          int x = scaledresolution.getScaledWidth();
          int y = scaledresolution.getScaledHeight();
 
          if(stack.getItem() instanceof ItemJetpack)
          {
            ItemJetpack jetpack = (ItemJetpack)stack.getItem();
 
            font.drawStringWithShadow("Mode: " + jetpack.getMode(stack).getName(), 1, y - 20, 0x404040);
            font.drawStringWithShadow("Hydrogen: " + jetpack.getStored(stack), 1, y - 11, 0x404040);
          }
          else if(stack.getItem() instanceof ItemScubaTank)
          {
            ItemScubaTank scubaTank = (ItemScubaTank)stack.getItem();
            String state = (scubaTank.getFlowing(stack) ? EnumColor.DARK_GREEN + "On" : EnumColor.DARK_RED + "Off");
View Full Code Here

TOP

Related Classes of mekanism.common.item.ItemJetpack

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.