mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-12 16:27:29 +00:00
Merge branch 'development' into 1.8
Conflicts: src/main/java/mekanism/client/ClientTickHandler.java src/main/java/mekanism/common/CommonProxy.java src/main/java/mekanism/common/Mekanism.java
This commit is contained in:
commit
7ddb8e9727
8 files changed
+46
-9
No files matched your search
@@ -9,6 +9,7 @@ import java.util.Set;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.IClientTicker;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.client.sound.FlamethrowerSound;
|
||||
import mekanism.client.sound.GasMaskSound;
|
||||
import mekanism.client.sound.JetpackSound;
|
||||
@@ -472,9 +473,20 @@ public class ClientTickHandler
|
||||
{
|
||||
ItemScubaTank tank = (ItemScubaTank)mc.thePlayer.getEquipmentInSlot(3).getItem();
|
||||
|
||||
final int max = 300;
|
||||
|
||||
tank.useGas(mc.thePlayer.getEquipmentInSlot(3));
|
||||
mc.thePlayer.setAir(300);
|
||||
mc.thePlayer.clearActivePotions();
|
||||
GasStack received = tank.removeGas(mc.thePlayer.getEquipmentInSlot(3), max-mc.thePlayer.getAir());
|
||||
|
||||
if(received != null)
|
||||
{
|
||||
mc.thePlayer.setAir(mc.thePlayer.getAir()+received.amount);
|
||||
|
||||
if(mc.thePlayer.getAir() == max)
|
||||
{
|
||||
mc.thePlayer.clearActivePotions();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user