mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-12 16:27:29 +00:00
Fixed Gas Mask OP-ness, added config option to let creative mode override the Electric Chest, fixed Gas Generator crash
This commit is contained in:
1 parent
de1e264c68
commit
cfeb08a8ee
8 files changed
+44
-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.GasMaskSound;
|
||||
import mekanism.client.sound.JetpackSound;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
@@ -455,9 +456,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