OSDN Git Service

GUIのSlot追加
[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.client.FMLClientHandler;
7 import cpw.mods.fml.common.network.IGuiHandler;
8
9 public class CommonProxy implements IGuiHandler {
10
11         public void registerTextures(){
12
13         }
14
15         public void registerRenderInformation() {
16         }
17
18
19         @Override
20         public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
21                 if (!world.blockExists(x, y, z))
22                         return null;
23
24                 TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
25                 if (tileEntity instanceof TileEntityChemicalCraftingTable) {
26                         return new ContainerChemicalCraftingTable(player, (TileEntityChemicalCraftingTable) tileEntity);
27                 }
28                 return null;
29         }
30
31
32         @Override
33         public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
34                 return null;
35         }
36
37         public World getClientWorld(){
38                 return null;
39         }
40
41 }