View difference between Paste ID: niyEF1S4 and tAppMQQF
SHOW: | | - or go back to the newest paste.
1
package net.minecraft.src;
2
3
import cpw.mods.fml.common.network.IGuiHandler;
4
5
public class TinyHandler implements IGuiHandler {
6
7
	@Override
8
	public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
9
		TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
10
		if (tileEntity instanceof TileEntityTiny) {
11
			return new ContainerTiny((TileEntityTiny) tileEntity, player.inventory);
12
		}
13
		
14
		return null;
15
	}
16
17
	@Override
18
	public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
19
		TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
20
		if (tileEntity instanceof TileEntityTiny) {
21
			return new GuiTiny(player.inventory, (TileEntityTiny) tileEntity);
22
		}
23
		
24
		return null;
25
	}
26
27
}