OSDN Git Service

5f3302c20b7a0094c7bb0ec08b286b3f9a90dd16
[chemicraft/chemicraft.git] / common / chemicraft / BlockChemicalCombinationTable.java
1 package chemicraft;
2
3 import net.minecraft.src.BlockContainer;
4 import net.minecraft.src.CreativeTabs;
5 import net.minecraft.src.EntityPlayer;
6 import net.minecraft.src.Material;
7 import net.minecraft.src.TileEntity;
8 import net.minecraft.src.World;
9
10 public class BlockChemicalCombinationTable extends BlockContainer {
11
12         public BlockChemicalCombinationTable(int par1, int par2, Material par3Material) {
13                 super(par1, par2, par3Material);
14                 this.setCreativeTab(ChemiCraft.instance.creativeTab);
15         }
16
17         @Override
18         public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
19                 par5EntityPlayer.openGui(ChemiCraft.instance, ChemiCraft.instance.guiChemicalCombinationTableID, par1World, par2, par3, par4);
20                 return true;
21         }
22
23
24
25         @Override
26         public String getTextureFile(){
27                 return ChemiCraft.instance.blockChemicalCraftingTableTexture;
28         }
29
30
31
32         @Override
33         public int getBlockTextureFromSide(int par1)
34         {
35                 if(par1 == 0){
36                         return 17;
37                 }else if(par1 == 1){
38                         return 0;
39                 }else{
40                         return 16;
41                 }
42         }
43
44
45         @Override
46         public TileEntity createNewTileEntity(World var1) {
47                 return new TileEntityChemicalCombinationTable();
48         }
49
50 }