Package baubles.client

Source Code of baubles.client.ClientProxy

package baubles.client;

import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import baubles.client.gui.GuiEvents;
import baubles.client.gui.GuiPlayerExpanded;
import baubles.common.Baubles;
import baubles.common.CommonProxy;
import baubles.common.event.KeyHandler;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.FMLCommonHandler;

public class ClientProxy extends CommonProxy {
 
  @Override
  public void registerHandlers() {}
 
  @Override
  public void registerKeyBindings() {
    keyHandler = new KeyHandler();
    FMLCommonHandler.instance().bus().register(keyHandler);
    MinecraftForge.EVENT_BUS.register(new GuiEvents());
  }
 
  @Override
  public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    if (world instanceof WorldClient) {
      switch (ID) {
        case Baubles.GUI: return new GuiPlayerExpanded(player);
      }
    }
    return null;
  }
       
  @Override
  public World getClientWorld() {
    return FMLClientHandler.instance().getClient().theWorld;
  }
 
   
}
TOP

Related Classes of baubles.client.ClientProxy

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.