Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mightydanp.eot.core.client.gui;
- import net.minecraft.client.Minecraft;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.world.World;
- import com.mightydanp.eot.core.client.gui.container.ContainterEotInventory;
- import com.mightydanp.eot.core.client.gui.inventory.TileEntityEotInventory;
- import com.mightydanp.eot.core.client.gui.screen.GuiEotInventory;
- import com.mightydanp.eot.core.handler.eotGuiHandler;
- import com.mightydanp.eot.lib.GuiIds;
- import cpw.mods.fml.common.network.IGuiHandler;
- public class eotGuiCore extends eotGuiHandler{
- public static TileEntityEotInventory tileEntityEotInventory = new TileEntityEotInventory();
- @Override
- public void initialize() {
- registerGuiHandler();
- }
- @Override
- protected void registerGuiHandler() {
- super.registerGuiHandler();
- eotGuiHandler.registerClientGuiHandler(GuiIds.eotInventory, this);
- }
- @Override
- public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z){
- if (ID == GuiIds.eotInventory){
- return new ContainterEotInventory(player.inventory, tileEntityEotInventory);
- }
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- if (ID == GuiIds.eotInventory) {
- eotGuiCore.tileEntityEotInventory.init(Minecraft.getMinecraft().thePlayer);
- return new GuiEotInventory(player.inventory, tileEntityEotInventory);
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement