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.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.TileEntityToolAndWeaponCraftingTable;
13
14 public class BlockToolAndWeaponCraftingTable extends BlockContainer {
15
16         public Icon topIcon;
17         public Icon bottomIcon;
18         public Icon globalIcon;
19
20         public BlockToolAndWeaponCraftingTable(int par1, Material par2Material) {
21                 super(par1, par2Material);
22                 this.setCreativeTab(ChemiCraftCore.creativeTabChemiCraft);
23         }
24
25         @Override
26         public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9){
27                 par5EntityPlayer.openGui(ChemiCraftCore.instance, ChemiCraftCore.instance.guiToolAndWeaponCraftingTableID, par1World, par2, par3, par4);
28                 return true;
29         }
30
31
32
33         @Override
34         public void registerIcons(IconRegister par1IconRegister) {
35                 this.topIcon = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "BlockToolAndWeaponCraftingTableTop");
36                 this.bottomIcon = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "BlockToolAndWeaponCraftingTableBottom");
37                 this.globalIcon = par1IconRegister.registerIcon(ChemiCraft.TEXTURE + "BlockToolAndWeaponCraftingTable");
38         }
39
40
41
42         @Override
43         public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
44                 if(par1 == 0){
45                         return this.topIcon;
46                 }else if(par1 == 1){
47                         return this.bottomIcon;
48                 }else{
49                         return this.globalIcon;
50                 }
51         }
52
53         @Override
54         public TileEntity createNewTileEntity(World var1) {
55                 return new TileEntityToolAndWeaponCraftingTable();
56         }
57
58 }