OSDN Git Service

とりあえずコミット
[chemicraft/chemicraft.git] / common / pcc / chemicraft / ore / BlockAtomsOre.java
1 package pcc.chemicraft.ore;
2
3 import java.util.List;
4 import java.util.Random;
5
6 import cpw.mods.fml.relauncher.Side;
7 import cpw.mods.fml.relauncher.SideOnly;
8
9 import pcc.chemicraft.ChemiCraft;
10 import net.minecraft.block.Block;
11 import net.minecraft.block.material.Material;
12 import net.minecraft.creativetab.CreativeTabs;
13 import net.minecraft.item.Item;
14 import net.minecraft.item.ItemStack;
15
16 public class BlockAtomsOre extends Block
17 {
18
19         public BlockAtomsOre(int id)
20         {
21                 super(id, Material.rock);
22                 this.setCreativeTab(ChemiCraft.instance.creativeTab);
23         }
24
25         @Override
26         public int getBlockTextureFromSideAndMetadata(int par1, int par2)
27         {
28                 return this.blockID * 16 + par2;
29         }
30
31         @Override
32         public int damageDropped(int par1)
33         {
34                 return par1;
35         }
36
37         public static int getBlockFromDye(int par0)
38         {
39                 return ~par0 & 15;
40         }
41
42         public static int getDyeFromBlock(int par0)
43         {
44                 return ~par0 & 15;
45         }
46
47         @Override
48         @SideOnly(Side.CLIENT)
49         public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List)
50         {
51                 for (int var4 = 0; var4 < 16; ++var4) {
52                         par3List.add(new ItemStack(par1, 1, var4));
53                 }
54         }
55
56         @Override
57         public String getTextureFile()
58         {
59                 return ChemiCraft.instance.BLOCK_ATOMS_ORE_TEXTURE;
60         }
61
62 }