diff --git a/common/mekanism/common/Mekanism.java b/common/mekanism/common/Mekanism.java index e0195fdef..08f89feea 100644 --- a/common/mekanism/common/Mekanism.java +++ b/common/mekanism/common/Mekanism.java @@ -58,6 +58,7 @@ import mekanism.common.item.ItemBlockMachine; import mekanism.common.item.ItemBlockOre; import mekanism.common.item.ItemClump; import mekanism.common.item.ItemConfigurator; +import mekanism.common.item.ItemCrystal; import mekanism.common.item.ItemDictionary; import mekanism.common.item.ItemDirtyDust; import mekanism.common.item.ItemDust; @@ -246,7 +247,6 @@ public class Mekanism public static ItemGasMask GasMask; public static Item Dictionary; public static Item Balloon; - public static Item Shard; public static Item ElectrolyticCore; public static Item CompressedRedstone; public static Item Sawdust; @@ -270,6 +270,8 @@ public class Mekanism public static Item Ingot; public static Item Clump; public static Item DirtyDust; + public static Item Shard; + public static Item Crystal; //General Configuration public static boolean osmiumGenerationEnabled = true; @@ -754,6 +756,7 @@ public class Mekanism Sawdust = new ItemMekanism(configuration.getItem("Sawdust", 11230).getInt()).setUnlocalizedName("Sawdust"); Salt = new ItemMekanism(configuration.getItem("Salt", 11231).getInt()).setUnlocalizedName("Salt"); BrineBucket = new ItemMekanism(configuration.getItem("BrineBucket", 11232).getInt()).setMaxStackSize(1).setUnlocalizedName("BrineBucket"); + Crystal = new ItemCrystal(configuration.getItem("Crystal", 11233).getInt()); configuration.save(); @@ -793,6 +796,7 @@ public class Mekanism GameRegistry.registerItem(Sawdust, "Sawdust"); GameRegistry.registerItem(Salt, "Salt"); GameRegistry.registerItem(BrineBucket, "BrineBucket"); + GameRegistry.registerItem(Crystal, "Crystal"); } /** @@ -898,6 +902,15 @@ public class Mekanism OreDictionary.registerOre("shardObsidian", new ItemStack(Shard, 1, 6)); OreDictionary.registerOre("shardLead", new ItemStack(Shard, 1, 7)); + OreDictionary.registerOre("crystalIron", new ItemStack(Crystal, 1, 0)); + OreDictionary.registerOre("crystalGold", new ItemStack(Crystal, 1, 1)); + OreDictionary.registerOre("crystalOsmium", new ItemStack(Crystal, 1, 2)); + OreDictionary.registerOre("crystalCopper", new ItemStack(Crystal, 1, 3)); + OreDictionary.registerOre("crystalTin", new ItemStack(Crystal, 1, 4)); + OreDictionary.registerOre("crystalSilver", new ItemStack(Crystal, 1, 5)); + OreDictionary.registerOre("crystalObsidian", new ItemStack(Crystal, 1, 6)); + OreDictionary.registerOre("crystalLead", new ItemStack(Crystal, 1, 7)); + OreDictionary.registerOre("oreOsmium", new ItemStack(OreBlock, 1, 0)); OreDictionary.registerOre("oreCopper", new ItemStack(OreBlock, 1, 1)); OreDictionary.registerOre("oreTin", new ItemStack(OreBlock, 1, 2)); diff --git a/common/mekanism/common/item/ItemCrystal.java b/common/mekanism/common/item/ItemCrystal.java new file mode 100644 index 000000000..98eca40e2 --- /dev/null +++ b/common/mekanism/common/item/ItemCrystal.java @@ -0,0 +1,55 @@ +package mekanism.common.item; + +import java.util.List; + +import mekanism.common.Mekanism; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Icon; + +public class ItemCrystal extends ItemMekanism +{ + public Icon[] icons = new Icon[256]; + + public static String[] en_USNames = {"Iron", "Gold", "Osmium", + "Copper", "Tin", "Silver", + "Obsidian", "Lead"}; + + public ItemCrystal(int id) + { + super(id); + setHasSubtypes(true); + setCreativeTab(Mekanism.tabMekanism); + } + + @Override + public void registerIcons(IconRegister register) + { + for(int i = 0; i <= 7; i++) + { + icons[i] = register.registerIcon("mekanism:" + en_USNames[i] + "Crystal"); + } + } + + @Override + public Icon getIconFromDamage(int meta) + { + return icons[meta]; + } + + @Override + public void getSubItems(int id, CreativeTabs tabs, List itemList) + { + for(int counter = 0; counter <= 7; ++counter) + { + itemList.add(new ItemStack(this, 1, counter)); + } + } + + @Override + public String getUnlocalizedName(ItemStack item) + { + return "item." + en_USNames[item.getItemDamage()].toLowerCase() + "Crystal"; + } +} diff --git a/resources/assets/mekanism/lang/en_US.lang b/resources/assets/mekanism/lang/en_US.lang index a5986c49c..df2f3c8c4 100644 --- a/resources/assets/mekanism/lang/en_US.lang +++ b/resources/assets/mekanism/lang/en_US.lang @@ -147,6 +147,16 @@ item.silverShard.name=Silver Shard item.obsidianShard.name=Obsidian Shard item.leadShard.name=Lead Shard +//Crystals +item.ironCrystal.name=Iron Crystal +item.goldCrystal.name=Gold Crystal +item.osmiumCrystal.name=Osmium Crystal +item.copperCrystal.name=Copper Crystal +item.tinCrystal.name=Tin Crystal +item.silverCrystal.name=Silver Crystal +item.obsidianCrystal.name=Obsidian Crystal +item.leadCrystal.name=Lead Crystal + //Dirty Dust item.dirtyIronDust.name=Dirty Iron Dust item.dirtyGoldDust.name=Dirty Gold Dust diff --git a/resources/assets/mekanism/textures/items/CopperCrystal.png b/resources/assets/mekanism/textures/items/CopperCrystal.png index ab65f9a09..e67b3c7bc 100644 Binary files a/resources/assets/mekanism/textures/items/CopperCrystal.png and b/resources/assets/mekanism/textures/items/CopperCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/GoldCrystal.png b/resources/assets/mekanism/textures/items/GoldCrystal.png index 736d7d797..3e5e2a1ee 100644 Binary files a/resources/assets/mekanism/textures/items/GoldCrystal.png and b/resources/assets/mekanism/textures/items/GoldCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/IronCrystal.png b/resources/assets/mekanism/textures/items/IronCrystal.png index 1f2a4f8ba..b5c54634b 100644 Binary files a/resources/assets/mekanism/textures/items/IronCrystal.png and b/resources/assets/mekanism/textures/items/IronCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/LeadCrystal.png b/resources/assets/mekanism/textures/items/LeadCrystal.png index 2a34aae9d..07491ca90 100644 Binary files a/resources/assets/mekanism/textures/items/LeadCrystal.png and b/resources/assets/mekanism/textures/items/LeadCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/ObsidianCrystal.png b/resources/assets/mekanism/textures/items/ObsidianCrystal.png index 07d5ee831..a196e9e06 100644 Binary files a/resources/assets/mekanism/textures/items/ObsidianCrystal.png and b/resources/assets/mekanism/textures/items/ObsidianCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/OsmiumCrystal.png b/resources/assets/mekanism/textures/items/OsmiumCrystal.png index 4bee5487c..9d9262264 100644 Binary files a/resources/assets/mekanism/textures/items/OsmiumCrystal.png and b/resources/assets/mekanism/textures/items/OsmiumCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/SilverCrystal.png b/resources/assets/mekanism/textures/items/SilverCrystal.png index 672776b89..993aa0ab5 100644 Binary files a/resources/assets/mekanism/textures/items/SilverCrystal.png and b/resources/assets/mekanism/textures/items/SilverCrystal.png differ diff --git a/resources/assets/mekanism/textures/items/TinCrystal.png b/resources/assets/mekanism/textures/items/TinCrystal.png index a060f6895..80cc2bc51 100644 Binary files a/resources/assets/mekanism/textures/items/TinCrystal.png and b/resources/assets/mekanism/textures/items/TinCrystal.png differ