-
Notifications
You must be signed in to change notification settings - Fork 755
/
MetalOre.java
36 lines (31 loc) · 883 Bytes
/
MetalOre.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package tconstruct.blocks;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class MetalOre extends TConstructBlock
{
public MetalOre(Material material, float hardness, String[] tex)
{
super(material, hardness, tex);
}
public float getBlockHardness (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta <= 2)
return 10f;
else
return 3f;
// return this.blockHardness;
}
@Override
public void getSubBlocks (Item b, CreativeTabs tab, List list)
{
for (int iter = 1; iter < 6; iter++)
{
list.add(new ItemStack(b, 1, iter));
}
}
}