mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 05:44:27 +00:00
Move the directory structure around to a more conventional one and start out on the 1.7 update.
3797 errors. We have a long way to go.
This commit is contained in:
1 parent
3a0de87a09
commit
ab47724473
1245 files changed
+1764
-5953
No files matched your search
@@ -0,0 +1,71 @@
|
||||
package mekanism.client;
|
||||
|
||||
import mekanism.api.MekanismAPI;
|
||||
import mekanism.api.MekanismAPI.BoxBlacklistEvent;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.client.voice.VoiceClient;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.PacketHandler;
|
||||
import mekanism.common.PacketHandler.Transmission;
|
||||
import mekanism.common.network.PacketKey;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class MekanismClient extends Mekanism
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
/** The main SoundHandler instance that is used by all audio sources */
|
||||
public static SoundHandler audioHandler;
|
||||
|
||||
public static VoiceClient voiceClient;
|
||||
|
||||
//General Configuration
|
||||
public static boolean enableSounds = true;
|
||||
public static boolean fancyUniversalCableRender = true;
|
||||
public static boolean holidays = true;
|
||||
public static double baseSoundVolume = 1;
|
||||
|
||||
public static long ticksPassed = 0;
|
||||
|
||||
public static void updateKey(int key, int type)
|
||||
{
|
||||
boolean down = Minecraft.getMinecraft().currentScreen == null ? Keyboard.isKeyDown(key) : false;
|
||||
|
||||
if(down != keyMap.has(Minecraft.getMinecraft().thePlayer, type))
|
||||
{
|
||||
PacketHandler.sendPacket(Transmission.SERVER, new PacketKey().setParams(type, down));
|
||||
keyMap.update(Minecraft.getMinecraft().thePlayer, type, down);
|
||||
}
|
||||
}
|
||||
|
||||
public static void reset()
|
||||
{
|
||||
if(Mekanism.voiceServerEnabled)
|
||||
{
|
||||
if(MekanismClient.voiceClient != null)
|
||||
{
|
||||
MekanismClient.voiceClient.disconnect();
|
||||
MekanismClient.voiceClient = null;
|
||||
}
|
||||
}
|
||||
|
||||
ClientTickHandler.tickingSet.clear();
|
||||
Mekanism.proxy.unloadSoundHandler();
|
||||
|
||||
MekanismAPI.getBoxIgnore().clear();
|
||||
MinecraftForge.EVENT_BUS.post(new BoxBlacklistEvent());
|
||||
|
||||
Mekanism.jetpackOn.clear();
|
||||
Mekanism.gasmaskOn.clear();
|
||||
Mekanism.activeVibrators.clear();
|
||||
|
||||
Mekanism.proxy.loadConfiguration();
|
||||
|
||||
System.out.println("[Mekanism] Reloaded config.");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user