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)