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.client.renderer.texture.IconRegister;
6 import net.minecraft.entity.player.EntityPlayer;
7 import net.minecraft.tileentity.TileEntity;
8 import net.minecraft.util.Icon;
9 import net.minecraft.world.World;
10 import pcc.chemicraft.ChemiCraft;
11 import pcc.chemicraft.core.ChemiCraftCore;
12 import pcc.chemicraft.core.tileentity.TileEntityChemicalCraftingTable;
13
14 public class BlockChemicalCraftingTable extends BlockContainer {
15
16         public Icon topIcon;
17         public Icon bottomIcon;
18         public Icon globalIcon;
19
20         public BlockChemicalCraftingTable(int par1, Material par2Material) {
21                 super(par1, par2Material);
22                 this.setCreativeTab(ChemiCraftCore.creativeTabChemiCraft);
23         }
24
25
26         @Override
27         public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
28                 par5EntityPlayer.openGui(ChemiCraftCore.instance, ChemiCraftCore.instance.guiChemicalCraftingTableID, par1World, par2, par3, par4);
29                 return true;
30         }
31
32
33
34         @Override
35         public void registerIcons(IconRegister par1IconRegister) {
36                 this.topIcon = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "BlockChemicalCraftingTableTop");
37                 this.bottomIcon = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "BlockChemicalCraftingTableBottom");
38                 this.globalIcon = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "BlockChemicalCraftingTable");
39         }
40
41
42
43         @Override
44         public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
45                 if(par1 == 0){
46                         return this.topIcon;
47                 }else if(par1 == 1){
48                         return this.bottomIcon;
49                 }else{
50                         return this.globalIcon;
51                 }
52         }
53
54
55
56         @Override
57         public TileEntity createNewTileEntity(World var1) {
58                 return new TileEntityChemicalCraftingTable();
59         }
60
61 }