OSDN Git Service

競合修正
[chemicraft/chemicraft.git] / common / chemicraft / block / BlockPyrolysisTable.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.debug.DebugTick;
10 import chemicraft.tileentity.TileEntityPyrolysisTable;
11
12 public class BlockPyrolysisTable extends BlockContainer {
13
14         public BlockPyrolysisTable(int par1, int par2, Material par3Material) {
15                 super(par1, par2, par3Material);
16                 this.setCreativeTab(ChemiCraft.creativeTab);
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.guiPyrolysisTableID, par1World, par2, par3, par4);
22                 return true;
23         }
24
25
26
27         @Override
28         public String getTextureFile(){
29                 return ChemiCraft.instance.BLOCK_CHEMICALCRAFTING_TABLE_TEXTURE;
30         }
31
32
33
34         @Override
35         public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
36                 TileEntity tileentity = par1World.getBlockTileEntity(par2, par3, par4);
37                 if (tileentity != null) {
38                         DebugTick.removeDebugData("PyrolysisTable" +
39                                         "(x:" + tileentity.xCoord +
40                                         " y:" + tileentity.yCoord +
41                                         " z:" + tileentity.zCoord + ")");
42                 }
43                 super.breakBlock(par1World, par2, par3, par4, par5, par6);
44         }
45
46
47
48         @Override
49         public int getBlockTextureFromSide(int par1)
50         {
51                 if(par1 == 0){
52                         return 17;
53                 }else if(par1 == 1){
54                         return 0;
55                 }else{
56                         return 16;
57                 }
58         }
59
60         @Override
61         public TileEntity createNewTileEntity(World var1) {
62                 return new TileEntityPyrolysisTable();
63         }
64
65 }