OSDN Git Service

とりあえずコミット
[chemicraft/chemicraft.git] / common / pcc / chemicraft / block / BlockChemicalCraftingTable.java
1 package pcc.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 pcc.chemicraft.ChemiCraft;
9 import pcc.chemicraft.tileentity.TileEntityChemicalCraftingTable;
10
11 public class BlockChemicalCraftingTable extends BlockContainer {
12
13         public BlockChemicalCraftingTable(int par1, int par2, Material par3Material) {
14                 super(par1, par2, par3Material);
15                 this.setCreativeTab(ChemiCraft.creativeTab);
16         }
17
18
19         @Override
20         public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
21                 par5EntityPlayer.openGui(ChemiCraft.instance, ChemiCraft.instance.guiChemicalCraftingTableID, par1World, par2, par3, par4);
22                 return true;
23         }
24
25
26
27         @Override
28         public String getTextureFile(){
29                 return ChemiCraft.instance.BLOCK_CHEMICAL_CRAFTING_TABLE_TEXTURE;
30         }
31
32
33
34         @Override
35         public int getBlockTextureFromSide(int par1)
36         {
37                 if(par1 == 0){
38                         return 17;
39                 }else if(par1 == 1){
40                         return this.blockIndexInTexture;
41                 }else{
42                         return 16;
43                 }
44         }
45
46
47
48         @Override
49         public TileEntity createNewTileEntity(World var1) {
50                 return new TileEntityChemicalCraftingTable();
51         }
52
53 }