Sounds work! Also got tick handlers set up, still have to do a few things

This commit is contained in:
Aidan C. Brady committed 2014-06-03 20:57:59 +02:00
1 parent 815944c49a
commit f0d3848f8a
8 files changed
+61 -46

No files matched your search

@@ -4,6 +4,10 @@ import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.Type;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -18,6 +22,24 @@ public class MekanismKeyHandler extends MekKeyHandler
public MekanismKeyHandler()
{
super(new KeyBinding[] {modeSwitchKey, voiceKey}, new boolean[] {false, false});
FMLCommonHandler.instance().bus().register(this);
}
@SubscribeEvent
public void onTick(ClientTickEvent event)
{
if(event.side == Side.CLIENT)
{
if(event.phase == Phase.START)
{
keyTick(event.type, false);
}
else if(event.phase == Phase.END)
{
keyTick(event.type, true);
}
}
}
@Override