Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tutorial.generic;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.world.World;
- import cpw.mods.fml.common.network.IGuiHandler;
- public class GuiHandler implements IGuiHandler {
- // returns an instance of the Container you made earlier
- @Override
- public Object getServerGuiElement(int ID, EntityPlayer player, World world,
- int x, int y, int z) {
- if (ID == 0) {
- TileEntityEnderFurnace tileEntityEnderFurnace = (TileEntityEnderFurnace) world
- .getTileEntity(x, y, z);
- return new ContainerEnderFurnace(player.inventory,
- tileEntityEnderFurnace);
- }
- return null;
- }
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world,
- int x, int y, int z) {
- if (ID == 0) {
- TileEntityEnderFurnace tileEntityTestContainer = (TileEntityEnderFurnace) world
- .getTileEntity(x, y, z);
- return new GuiEnderFurnace(player.inventory,
- tileEntityTestContainer);
- }
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment