Fix crash
This commit is contained in:
parent
781aef807c
commit
4ebf11ed5a
2 changed files with 22 additions and 14 deletions
|
@ -135,7 +135,7 @@ public class ClientProxy extends CommonProxy
|
||||||
Mekanism.configuration.load();
|
Mekanism.configuration.load();
|
||||||
MekanismClient.enableSounds = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableSounds", true).getBoolean(true);
|
MekanismClient.enableSounds = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnableSounds", true).getBoolean(true);
|
||||||
MekanismClient.fancyUniversalCableRender = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "FancyUniversalCableRender", true).getBoolean(true);
|
MekanismClient.fancyUniversalCableRender = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "FancyUniversalCableRender", true).getBoolean(true);
|
||||||
MekanismClient.baseSoundVolume = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "baseSoundVolume", 1).getDouble(1);
|
MekanismClient.baseSoundVolume = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SoundVolume", 1).getDouble(1);
|
||||||
Mekanism.configuration.save();
|
Mekanism.configuration.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,6 +324,7 @@ public class ClientProxy extends CommonProxy
|
||||||
return new GuiTeleporter(player.inventory, (TileEntityTeleporter)tileEntity);
|
return new GuiTeleporter(player.inventory, (TileEntityTeleporter)tileEntity);
|
||||||
case 14:
|
case 14:
|
||||||
ItemStack itemStack = player.getCurrentEquippedItem();
|
ItemStack itemStack = player.getCurrentEquippedItem();
|
||||||
|
|
||||||
if(itemStack != null && itemStack.getItem() instanceof ItemPortableTeleporter)
|
if(itemStack != null && itemStack.getItem() instanceof ItemPortableTeleporter)
|
||||||
{
|
{
|
||||||
return new GuiPortableTeleporter(player, itemStack);
|
return new GuiPortableTeleporter(player, itemStack);
|
||||||
|
@ -342,6 +343,7 @@ public class ClientProxy extends CommonProxy
|
||||||
return new GuiPasswordModify((TileEntityElectricChest)tileEntity);
|
return new GuiPasswordModify((TileEntityElectricChest)tileEntity);
|
||||||
case 21:
|
case 21:
|
||||||
EntityRobit robit = (EntityRobit)world.getEntityByID(x);
|
EntityRobit robit = (EntityRobit)world.getEntityByID(x);
|
||||||
|
|
||||||
if(robit != null)
|
if(robit != null)
|
||||||
{
|
{
|
||||||
return new GuiRobitMain(player.inventory, robit);
|
return new GuiRobitMain(player.inventory, robit);
|
||||||
|
@ -350,12 +352,14 @@ public class ClientProxy extends CommonProxy
|
||||||
return new GuiRobitCrafting(player.inventory, world, x);
|
return new GuiRobitCrafting(player.inventory, world, x);
|
||||||
case 23:
|
case 23:
|
||||||
EntityRobit robit1 = (EntityRobit)world.getEntityByID(x);
|
EntityRobit robit1 = (EntityRobit)world.getEntityByID(x);
|
||||||
|
|
||||||
if(robit1 != null)
|
if(robit1 != null)
|
||||||
{
|
{
|
||||||
return new GuiRobitInventory(player.inventory, robit1);
|
return new GuiRobitInventory(player.inventory, robit1);
|
||||||
}
|
}
|
||||||
case 24:
|
case 24:
|
||||||
EntityRobit robit2 = (EntityRobit)world.getEntityByID(x);
|
EntityRobit robit2 = (EntityRobit)world.getEntityByID(x);
|
||||||
|
|
||||||
if(robit2 != null)
|
if(robit2 != null)
|
||||||
{
|
{
|
||||||
return new GuiRobitSmelting(player.inventory, robit2);
|
return new GuiRobitSmelting(player.inventory, robit2);
|
||||||
|
|
|
@ -8,8 +8,6 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.lwjgl.input.Keyboard;
|
|
||||||
|
|
||||||
import mekanism.api.IClientTicker;
|
import mekanism.api.IClientTicker;
|
||||||
import mekanism.client.sound.GasMaskSound;
|
import mekanism.client.sound.GasMaskSound;
|
||||||
import mekanism.client.sound.JetpackSound;
|
import mekanism.client.sound.JetpackSound;
|
||||||
|
@ -19,17 +17,20 @@ import mekanism.common.PacketHandler;
|
||||||
import mekanism.common.PacketHandler.Transmission;
|
import mekanism.common.PacketHandler.Transmission;
|
||||||
import mekanism.common.item.ItemGasMask;
|
import mekanism.common.item.ItemGasMask;
|
||||||
import mekanism.common.item.ItemJetpack;
|
import mekanism.common.item.ItemJetpack;
|
||||||
import mekanism.common.item.ItemScubaTank;
|
|
||||||
import mekanism.common.item.ItemJetpack.JetpackMode;
|
import mekanism.common.item.ItemJetpack.JetpackMode;
|
||||||
|
import mekanism.common.item.ItemScubaTank;
|
||||||
import mekanism.common.network.PacketJetpackData;
|
import mekanism.common.network.PacketJetpackData;
|
||||||
import mekanism.common.network.PacketScubaTankData;
|
|
||||||
import mekanism.common.network.PacketJetpackData.PacketType;
|
import mekanism.common.network.PacketJetpackData.PacketType;
|
||||||
|
import mekanism.common.network.PacketScubaTankData;
|
||||||
import mekanism.common.util.MekanismUtils;
|
import mekanism.common.util.MekanismUtils;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StringUtils;
|
import net.minecraft.util.StringUtils;
|
||||||
|
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
import cpw.mods.fml.common.ITickHandler;
|
import cpw.mods.fml.common.ITickHandler;
|
||||||
import cpw.mods.fml.common.TickType;
|
import cpw.mods.fml.common.TickType;
|
||||||
|
@ -201,6 +202,8 @@ public class ClientTickHandler implements ITickHandler
|
||||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketScubaTankData().setParams(PacketType.UPDATE, mc.thePlayer, isGasMaskOn(mc.thePlayer)));
|
PacketHandler.sendPacket(Transmission.SERVER, new PacketScubaTankData().setParams(PacketType.UPDATE, mc.thePlayer, isGasMaskOn(mc.thePlayer)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(MekanismClient.audioHandler != null)
|
||||||
|
{
|
||||||
for(EntityPlayer entry : Mekanism.jetpackOn)
|
for(EntityPlayer entry : Mekanism.jetpackOn)
|
||||||
{
|
{
|
||||||
if(MekanismClient.audioHandler.getFrom(entry) == null)
|
if(MekanismClient.audioHandler.getFrom(entry) == null)
|
||||||
|
@ -216,6 +219,7 @@ public class ClientTickHandler implements ITickHandler
|
||||||
new GasMaskSound(MekanismClient.audioHandler.getIdentifier(), entry);
|
new GasMaskSound(MekanismClient.audioHandler.getIdentifier(), entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(mc.thePlayer.getCurrentItemOrArmor(3) != null && mc.thePlayer.getCurrentItemOrArmor(3).getItem() instanceof ItemJetpack)
|
if(mc.thePlayer.getCurrentItemOrArmor(3) != null && mc.thePlayer.getCurrentItemOrArmor(3).getItem() instanceof ItemJetpack)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue