mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-23 21:39:46 +00:00
1.0.1.2 - added a simple way to switch between the normal and baubles inventory. Thanks to Vazkii for the idea and permission to port it to base Baubles. - removed the Miners Ring crafting recipe... it is a bit op. I will leave the item in so it is attainable in creative and so it can still serve as an example bauble for devs. 1.0.1.1 - added backwards compatibility for legacy (pre 1.7.10) savefiles 1.0.1.0 - update for MC 1.7.10 - no requires Forge 10.13.0.1177 - removed support for legacy save format and moved saving/loading to new forge events
45 lines
1.1 KiB
Java
45 lines
1.1 KiB
Java
|
|
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;
|
|
}
|
|
|
|
|
|
}
|