Package mekanism.common.network.PacketScubaTankData

Examples of mekanism.common.network.PacketScubaTankData.ScubaTankDataMessage


        Mekanism.gasmaskOn.remove(message.username);
      }

      if(!player.worldObj.isRemote)
      {
        Mekanism.packetHandler.sendToDimension(new ScubaTankDataMessage(ScubaTankPacket.UPDATE, message.username, message.value), player.worldObj.provider.dimensionId);
      }
    }
    else if(message.packetType == ScubaTankPacket.MODE)
    {
      ItemStack stack = player.getEquipmentInSlot(3);
View Full Code Here


          if(MekanismKeyHandler.modeSwitchKey.getIsKeyPressed())
          {
            if(!lastTickUpdate)
            {
              ((ItemScubaTank)scubaTank.getItem()).toggleFlowing(scubaTank);
              Mekanism.packetHandler.sendToServer(new ScubaTankDataMessage(ScubaTankPacket.MODE, null, false));
              SoundHandler.playSound("mekanism:etc.Hydraulic");
              lastTickUpdate = true;
            }
          }
          else {
            lastTickUpdate = false;
          }
        }
        else {
          lastTickUpdate = false;
        }
      }

      if(mc.thePlayer.getEquipmentInSlot(1) != null && mc.thePlayer.getEquipmentInSlot(1).getItem() instanceof ItemFreeRunners)
      {
        mc.thePlayer.stepHeight = 1.002F;
      }
      else {
        if(mc.thePlayer.stepHeight == 1.002F)
        {
          mc.thePlayer.stepHeight = 0.5F;
        }
      }

      if(Mekanism.jetpackOn.contains(mc.thePlayer.getCommandSenderName()) != isJetpackOn(mc.thePlayer))
      {
        if(isJetpackOn(mc.thePlayer))
        {
          Mekanism.jetpackOn.add(mc.thePlayer.getCommandSenderName());
        }
        else {
          Mekanism.jetpackOn.remove(mc.thePlayer.getCommandSenderName());
        }

        Mekanism.packetHandler.sendToServer(new JetpackDataMessage(JetpackPacket.UPDATE, mc.thePlayer.getCommandSenderName(), isJetpackOn(mc.thePlayer)));
      }

      if(Mekanism.gasmaskOn.contains(mc.thePlayer.getCommandSenderName()) != isGasMaskOn(mc.thePlayer))
      {
        if(isGasMaskOn(mc.thePlayer) && mc.currentScreen == null)
        {
          Mekanism.gasmaskOn.add(mc.thePlayer.getCommandSenderName());
        }
        else {
          Mekanism.gasmaskOn.remove(mc.thePlayer.getCommandSenderName());
        }

        Mekanism.packetHandler.sendToServer(new ScubaTankDataMessage(ScubaTankPacket.UPDATE, mc.thePlayer.getCommandSenderName(), isGasMaskOn(mc.thePlayer)));
      }

      if(MekanismClient.audioHandler != null)
      {
        for(String username : Mekanism.jetpackOn)
View Full Code Here

    if(!event.player.worldObj.isRemote)
    {
      Mekanism.packetHandler.sendTo(new ConfigSyncMessage(), (EntityPlayerMP)event.player);
      Mekanism.packetHandler.sendTo(new BoxBlacklistMessage(), (EntityPlayerMP)event.player);
      Mekanism.packetHandler.sendTo(new JetpackDataMessage(JetpackPacket.FULL, null, false), (EntityPlayerMP)event.player);
      Mekanism.packetHandler.sendTo(new ScubaTankDataMessage(ScubaTankPacket.FULL, null, false), (EntityPlayerMP)event.player);

      Mekanism.logger.info("Sent config to '" + event.player.getDisplayName() + ".'");
    }
  }
View Full Code Here

    Mekanism.jetpackOn.remove(event.player);

    if(!event.player.worldObj.isRemote)
    {
      Mekanism.packetHandler.sendTo(new JetpackDataMessage(JetpackPacket.FULL, null, false), (EntityPlayerMP)event.player);
      Mekanism.packetHandler.sendTo(new ScubaTankDataMessage(ScubaTankPacket.FULL, null, false), (EntityPlayerMP)event.player);
    }
  }
View Full Code Here

TOP

Related Classes of mekanism.common.network.PacketScubaTankData.ScubaTankDataMessage

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.