OSDN Git Service

96bb8bb278553beff214530f43606a28f36ce2a4
[chemicraft/chemicraft.git] / common / pcc / chemicraft / base / ore / BlockAtomOres.java
1 package pcc.chemicraft.base.ore;
2
3 import java.util.List;
4
5 import net.minecraft.block.Block;
6 import net.minecraft.block.material.Material;
7 import net.minecraft.creativetab.CreativeTabs;
8 import net.minecraft.item.ItemStack;
9 import net.minecraft.util.Icon;
10 import pcc.chemicraft.base.ChemiCraftBase;
11 import pcc.chemicraft.core.ChemiCraftCore;
12 import cpw.mods.fml.relauncher.Side;
13 import cpw.mods.fml.relauncher.SideOnly;
14
15 /**
16  * 鉱石のクラスです
17  * @author mozipi,ponkotate
18  */
19 public class BlockAtomOres extends Block {
20
21         public BlockAtomOres(int id) {
22                 super(id, Material.rock);
23                 this.setCreativeTab(ChemiCraftBase.instance.creativeTabAtomsOre);
24         }
25
26         /* 一時保留。詳しい事が決まらないと、変更が難しいため。 --WIP--
27         @Override
28         public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
29                 return (this.blockID - ChemiCraftBase.instance.atomOresID[0]) * 16 + par2;
30         }
31         */
32
33         @Override
34         public int damageDropped(int par1) {
35                 return par1;
36         }
37
38         public static int getBlockFromDye(int par0) {
39                 return ~par0 & 15;
40         }
41
42         public static int getDyeFromBlock(int par0) {
43                 return ~par0 & 15;
44         }
45
46         @Override
47         @SideOnly(Side.CLIENT)
48         public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) {
49                 for (int var4 = 0; var4 < 16; ++var4) {
50                         par3List.add(new ItemStack(par1, 1, var4));
51                 }
52         }
53
54 }