OSDN Git Service

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