OSDN Git Service

いろいろした
[chemicraft/chemicraft.git] / common / pcc / chemicraft / core / block / BlockToolAndWeaponCraftingTable.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.TileEntityToolAndWeaponCraftingTable;
11
12 public class BlockToolAndWeaponCraftingTable extends BlockContainer {
13
14         public BlockToolAndWeaponCraftingTable(int par1, int par2, Material par3Material) {
15                 super(par1, par2, par3Material);
16                 this.setCreativeTab(ChemiCraftCore.creativeTabChemiCraft);
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(ChemiCraftCore.instance, ChemiCraftCore.instance.guiToolAndWeaponCraftingTableID, par1World, par2, par3, par4);
22                 return true;
23         }
24
25
26
27         @Override
28         public String getTextureFile(){
29                 return ChemiCraft.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         @Override
47         public TileEntity createNewTileEntity(World var1) {
48                 return new TileEntityToolAndWeaponCraftingTable();
49         }
50
51 }