Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.tristanvo.mod;
- import cpw.mods.fml.common.network.IGuiHandler;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- public class GuiHandler implements IGuiHandler {
- @Override
- public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity entity = world.getTileEntity(x, y, z);
- if(ID == mod.guiIDMoriumWorkbench)
- {
- return ID == mod.guiIDMoriumWorkbench && world.getBlock(x, y, z) == mod.blockMoriumWorkbench ? new ContainerMoriumWorkbench(player.inventory, world, x, y, z) : null;
- }
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- TileEntity entity = world.getTileEntity(x, y, z);
- if(ID == mod.guiIDMoriumWorkbench)
- {
- return ID == mod.guiIDMoriumWorkbench && world.getBlock(x, y, z) == mod.blockMoriumWorkbench ? new GuiMoriumWorkbench(player.inventory, world, x, y, z) : null;
- }
- return null;
- }
- }
Add Comment
Please, Sign In to add comment