Added small dusts

This commit is contained in:
Gig 2015-04-16 23:27:25 +01:00
parent 39a8ffe739
commit 7cbd27150e
7 changed files with 147 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import techreborn.items.ItemDusts;
import techreborn.items.ItemDustsSmall;
import techreborn.items.ItemGems;
import techreborn.items.ItemIngots;
import techreborn.items.ItemParts;
@ -21,6 +22,7 @@ import techreborn.util.LogHelper;
public class ModItems {
public static Item dusts;
public static Item smallDusts;
public static Item ingots;
public static Item gems;
public static Item parts;
@ -34,6 +36,8 @@ public class ModItems {
public static void init() {
dusts = new ItemDusts();
GameRegistry.registerItem(dusts, "dust");
smallDusts = new ItemDustsSmall();
GameRegistry.registerItem(smallDusts, "smallDust");
ingots = new ItemIngots();
GameRegistry.registerItem(ingots, "ingot");
gems = new ItemGems();
@ -51,7 +55,7 @@ public class ModItems {
advancedDrill = new ItemAdvancedDrill();
GameRegistry.registerItem(advancedDrill, "advancedDrill");
gravityChest = new ItemGravityChest(ArmorMaterial.DIAMOND, 7, 1);
GameRegistry.registerItem(gravityChest, "gravityChest");
GameRegistry.registerItem(gravityChest, "gravitychestplate");
LogHelper.info("TechReborns Items Loaded");
@ -141,7 +145,6 @@ public class ModItems {
OreDictionary.registerOre("ingotManyullyn", new ItemStack(ingots, 1, 19));
OreDictionary.registerOre("ingotAluminumBrass", new ItemStack(ingots, 1, 20));
OreDictionary.registerOre("ingotAlumite", new ItemStack(ingots, 1, 21));
//Gems
OreDictionary.registerOre("gemRuby", new ItemStack(gems, 1, 0));
OreDictionary.registerOre("gemSapphire", new ItemStack(gems, 1, 1));

View file

@ -0,0 +1,77 @@
package techreborn.items;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import techreborn.client.TechRebornCreativeTab;
import java.util.List;
public class ItemDustsSmall extends ItemTR {
public static final String[] types = new String[]
{
"Almandine", "Aluminium", "Andradite", "Basalt", "Bauxite", "Brass", "Bronze",
"Calcite", "Charcoal", "Chrome", "Cinnabar", "Clay", "Coal", "Copper", "Diamond",
"Electrum", "Emerald", "EnderEye", "EnderPearl", "Endstone", "Gold", "GreenSapphire", "Grossular",
"Invar", "Iron", "Lazurite", "Lead", "Magnesium", "Marble", "Netherrack", "Nickel", "Obsidian",
"Olivine", "Platinum", "Pyrite", "Pyrope", "RedGarnet", "Ruby", "Saltpeter", "Sapphire",
"Silver", "Sodalite", "Steel", "Sulfur", "Tin", "Titanium", "Tungsten",
"Zinc",
};
private IIcon[] textures;
public ItemDustsSmall() {
setUnlocalizedName("techreborn.dustsmall");
setHasSubtypes(true);
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
// Registers Textures For All Dusts
public void registerIcons(IIconRegister iconRegister) {
textures = new IIcon[types.length];
for (int i = 0; i < types.length; ++i) {
textures[i] = iconRegister.registerIcon("techreborn:" + "smallDust/small" + types[i] + "Dust");
}
}
@Override
// Adds Texture what match's meta data
public IIcon getIconFromDamage(int meta) {
if (meta < 0 || meta >= textures.length) {
meta = 0;
}
return textures[meta];
}
@Override
// gets Unlocalized Name depending on meta data
public String getUnlocalizedName(ItemStack itemStack) {
int meta = itemStack.getItemDamage();
if (meta < 0 || meta >= types.length) {
meta = 0;
}
return super.getUnlocalizedName() + "." + types[meta];
}
// Adds Dusts SubItems To Creative Tab
public void getSubItems(Item item, CreativeTabs creativeTabs, List list) {
for (int meta = 0; meta < types.length; ++meta) {
list.add(new ItemStack(item, 1, meta));
}
}
@Override
public EnumRarity getRarity(ItemStack itemstack) {
return EnumRarity.epic;
}
}

View file

@ -104,6 +104,71 @@ item.techreborn.dust.Manyullyn.name=Manyullyn Dust
item.techreborn.dust.AlBrass.name=AluminiumBrass Dust
item.techreborn.dust.Alumite.name=Alumite Dust
#SmallDusts
item.techreborn.dustsmall.Almandine.name=Small Pile of Almandine Dust
item.techreborn.dustsmall.Aluminium.name=Small Pile of Aluminium Dust
item.techreborn.dustsmall.Andradite.name=Small Pile of Andradite Dust
item.techreborn.dustsmall.Ashes.name=Small Pile of Ashes
item.techreborn.dustsmall.Basalt.name=Small Pile of Basalt Dust
item.techreborn.dustsmall.Bauxite.name=Small Pile of Bauxite Dust
item.techreborn.dustsmall.Brass.name=Small Pile of Brass Dust
item.techreborn.dustsmall.Bronze.name=Small Pile of Bronze Dust
item.techreborn.dustsmall.Calcite.name=Small Pile of Calcite Dust
item.techreborn.dustsmall.Charcoal.name=Small Pile of Charcoal Dust
item.techreborn.dustsmall.Chrome.name=Small Pile of Chrome Dust
item.techreborn.dustsmall.Cinnabar.name=Small Pile of Cinnabar Dust
item.techreborn.dustsmall.Clay.name=Small Pile of Clay Dust
item.techreborn.dustsmall.Coal.name=Small Pile of Coal Dust
item.techreborn.dustsmall.Copper.name=Small Pile of Copper Dust
item.techreborn.dustsmall.DarkAshes.name=Small Pile of Dark Ashes
item.techreborn.dustsmall.Diamond.name=Small Pile of Diamond Dust
item.techreborn.dustsmall.Electrum.name=Small Pile of Electrum Dust
item.techreborn.dustsmall.Emerald.name=Small Pile of Emerald Dust
item.techreborn.dustsmall.EnderEye.name=Small Pile of Ender Eye Dust
item.techreborn.dustsmall.EnderPearl.name=Small Pile of Ender Pearl Dust
item.techreborn.dustsmall.Endstone.name=Small Pile of End Stone Dust
item.techreborn.dustsmall.Flint.name=Small Pile of Flint Dust
item.techreborn.dustsmall.Gold.name=Small Pile of Gold Dust
item.techreborn.dustsmall.GreenSapphire.name=Small Pile of Green Sapphire Dust
item.techreborn.dustsmall.Grossular.name=Small Pile of Grossular Dust
item.techreborn.dustsmall.Invar.name=Small Pile of Invar Dust
item.techreborn.dustsmall.Iron.name=Small Pile of Iron Dust
item.techreborn.dustsmall.Lazurite.name=Small Pile of Lazurite Dust
item.techreborn.dustsmall.Lead.name=Small Pile of Lead Dust
item.techreborn.dustsmall.Magnesium.name=Small Pile of Magnesium Dust
item.techreborn.dustsmall.Marble.name=Small Pile of Marble Dust
item.techreborn.dustsmall.Netherrack.name=Small Pile of Netherrack Dust
item.techreborn.dustsmall.Nickel.name=Small Pile of Nickel Dust
item.techreborn.dustsmall.Obsidian.name=Small Pile of Obsidian Dust
item.techreborn.dustsmall.Olivine.name=Small Pile of Olivine Dust
item.techreborn.dustsmall.Phosphor.name=Small Pile of Phosphor Dust
item.techreborn.dustsmall.Platinum.name=Small Pile of Platinum Dust
item.techreborn.dustsmall.Pyrite.name=Small Pile of Pyrite Dust
item.techreborn.dustsmall.Pyrope.name=Small Pile of Pyrope Dust
item.techreborn.dustsmall.RedGarnet.name=Small Pile of RedGarnet Dust
item.techreborn.dustsmall.Redrock.name=Small Pile of Redrock Dust
item.techreborn.dustsmall.Ruby.name=Small Pile of Ruby Dust
item.techreborn.dustsmall.Saltpeter.name=Small Pile of Saltpeter Dust
item.techreborn.dustsmall.Sapphire.name=Small Pile of Sapphire Dust
item.techreborn.dustsmall.Silver.name=Small Pile of Silver Dust
item.techreborn.dustsmall.Sodalite.name=Small Pile of Sodalite Dust
item.techreborn.dustsmall.Spessartine.name=Small Pile of Spessartine Dust
item.techreborn.dustsmall.Sphalerite.name=Small Pile of Sphalerite Dust
item.techreborn.dustsmall.Steel.name=Small Pile of Steel Dust
item.techreborn.dustsmall.Sulfur.name=Small Pile of Sulfur Dust
item.techreborn.dustsmall.Tin.name=Small Pile of Tin Dust
item.techreborn.dustsmall.Titanium.name=Small Pile of Titanium Dust
item.techreborn.dustsmall.Tungsten.name=Small Pile of Tungsten Dust
item.techreborn.dustsmall.Uranium.name=Small Pile of Uranium Dust
item.techreborn.dustsmall.Uvarovite.name=Small Pile of Uvarovite Dust
item.techreborn.dustsmall.YellowGarnet.name=Small Pile of YellowGarnet Dust
item.techreborn.dustsmall.Zinc.name=Small Pile of Zinc Dust
item.techreborn.dustsmall.Cobalt.name=Small Pile of Cobalt Dust
item.techreborn.dustsmall.Ardite.name=Small Pile of Ardite Dust
item.techreborn.dustsmall.Manyullyn.name=Small Pile of Manyullyn Dust
item.techreborn.dustsmall.AlBrass.name=Small Pile of AluminiumBrass Dust
item.techreborn.dustsmall.Alumite.name=Small Pile of Alumite Dust
#Gems
item.techreborn.gem.Ruby.name=Ruby

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B