/* */ package com.bernard.torch.gui; /* */ /* */ import com.bernard.torch.blocks.tileentities.TorchRechargerTileEntity; /* */ import cpw.mods.fml.common.network.IGuiHandler; /* */ import java.io.PrintStream; /* */ import net.minecraft.entity.player.EntityPlayer; /* */ import net.minecraft.tileentity.TileEntity; /* */ import net.minecraft.world.World; /* */ /* */ public class TorchGuiHandler implements IGuiHandler /* */ { /* */ public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) /* */ { /* 14 */ if (ID == 0) { /* 15 */ TileEntity te = world.getTileEntity(x, y, z); /* 16 */ if ((te instanceof TorchRechargerTileEntity)) { /* 17 */ System.out.println("S:" + te.toString()); /* 18 */ return new TorchRechargerContainer((TorchRechargerTileEntity)te, player.inventory); /* */ } /* */ } /* */ /* 22 */ return null; /* */ } /* */ /* */ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) /* */ { /* 27 */ if (ID == 0) { /* 28 */ TileEntity te = world.getTileEntity(x, y, z); /* 29 */ if ((te instanceof TorchRechargerTileEntity)) { /* 30 */ System.out.println("C:" + te.toString()); /* 31 */ return new TorchRechargerGuiContainer((TorchRechargerTileEntity)te, player.inventory); /* */ } /* */ } /* */ /* 35 */ return null; /* */ } /* */ }