-
Notifications
You must be signed in to change notification settings - Fork 755
/
GravelOre.java
76 lines (64 loc) · 1.88 KB
/
GravelOre.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package tconstruct.blocks;
import java.util.List;
import java.util.Random;
import tconstruct.library.TConstructRegistry;
import net.minecraft.block.BlockSand;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
public class GravelOre extends BlockSand
{
public String[] textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt" };
public Icon[] icons;
public GravelOre(int id)
{
super(id, Material.craftedSnow);
this.setCreativeTab(TConstructRegistry.blockTab);
this.setStepSound(soundGravelFootstep);
}
public void registerIcons (IconRegister iconRegister)
{
this.icons = new Icon[textureNames.length];
for (int i = 0; i < this.icons.length; ++i)
{
this.icons[i] = iconRegister.registerIcon("tinker:ore_" + textureNames[i] + "_gravel");
}
}
@Override
public Icon getIcon (int side, int meta)
{
return icons[meta];
}
public float getBlockHardness (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 5)
return 10f;
else
return 3f;
}
@Override
public int damageDropped (int meta)
{
/*if (meta == 1)
return 0;*/
return meta;
}
public int idDropped (int par1, Random par2Random, int par3)
{
/*if (par1 == 1)
return Item.goldNugget.itemID;*/
return this.blockID;
}
@Override
public void getSubBlocks (int id, CreativeTabs tab, List list)
{
for (int iter = 0; iter < 6; iter++)
{
list.add(new ItemStack(id, 1, iter));
}
}
}