OSDN Git Service

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