Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.tristanvo.mod.gui;
- import com.tristanvo.mod.blocks.moriumWorkbench;
- import cpw.mods.fml.common.network.IGuiHandler;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.world.World;
- public class GuiHandler<ModTileEntity> implements IGuiHandler {
- public static final int tile_entity_gui = 0;
- @Override
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
- {
- if(ID == tile_entity_gui)
- return new ContainerModTileEntity(player.inventory, (moriumWorkbench) world.getTileEntity(new BlockPos(x, y, z)));
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
- {
- if(ID == tile_entity_gui)
- return new GuiCrafting(new ContainerModTileEntity(player.inventory, (moriumWorkbench) world.getTileEntity(new Blockpos(x, y, z))));
- return null;
- }
- }
Add Comment
Please, Sign In to add comment