OSDN Git Service

f19bfefd85b626b16870a2c38b41129756cd6ca1
[chemicraft/chemicraft.git] / common / chemicraft / CommonProxy.java
1 package chemicraft;
2
3 import net.minecraft.src.EntityPlayer;
4 import net.minecraft.src.TileEntity;
5 import net.minecraft.src.World;
6 import cpw.mods.fml.common.network.IGuiHandler;
7
8 public class CommonProxy implements IGuiHandler
9 {
10
11         public void registerRenderInformation()
12         {
13
14         }
15
16         @Override
17         public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
18         {
19                 if(!world.blockExists(x, y, z)) return null;
20
21                 TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
22
23                 if(tileEntity instanceof TileEntityScienceCraftingTable){
24                         return new ContainerScienceCraftingTable(player.inventory, (TileEntityScienceCraftingTable)tileEntity);
25                 }
26                 return null;
27
28         }
29
30         @Override
31         public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
32         {
33                 return null;
34         }
35
36         public World getClientWorld()
37         {
38                 return null;
39         }
40 }