diff --git a/resources/assets/dark/textures/items/miningIcon.png b/resources/assets/dark/textures/items/miningIcon.png new file mode 100644 index 000000000..98b711fde Binary files /dev/null and b/resources/assets/dark/textures/items/miningIcon.png differ diff --git a/src/dark/core/common/DarkMain.java b/src/dark/core/common/DarkMain.java index 6b3a5cc60..0d19a92ce 100644 --- a/src/dark/core/common/DarkMain.java +++ b/src/dark/core/common/DarkMain.java @@ -5,6 +5,7 @@ import java.io.File; import java.util.Arrays; import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; import net.minecraftforge.common.Configuration; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.world.WorldEvent; @@ -36,6 +37,8 @@ import dark.core.common.blocks.BlockOre.OreData; import dark.core.common.blocks.ItemBlockColored; import dark.core.common.blocks.ItemBlockOre; import dark.core.common.debug.BlockDebug; +import dark.core.common.items.EnumMaterial; +import dark.core.common.items.EnumOrePart; import dark.core.common.items.ItemBattery; import dark.core.common.items.ItemColoredDust; import dark.core.common.items.ItemCommonTool; @@ -142,7 +145,14 @@ public class DarkMain extends ModPrefab { super.postInit(event); proxy.postInit(); - + if (CoreRecipeLoader.itemParts instanceof ItemParts) + { + DMCreativeTab.tabMining.itemStack = new ItemStack(CoreRecipeLoader.itemParts.itemID, 1, ItemParts.Parts.MiningIcon.ordinal()); + } + if (CoreRecipeLoader.itemMetals instanceof ItemOreDirv) + { + DMCreativeTab.tabIndustrial.itemStack = EnumMaterial.getStack(EnumMaterial.IRON, EnumOrePart.GEARS, 1); + } } @Override diff --git a/src/dark/core/common/items/ItemParts.java b/src/dark/core/common/items/ItemParts.java index dd1ed56f1..b7383e641 100644 --- a/src/dark/core/common/items/ItemParts.java +++ b/src/dark/core/common/items/ItemParts.java @@ -12,8 +12,9 @@ import dark.core.common.DarkMain; import dark.core.prefab.ModPrefab; import dark.core.prefab.items.ItemBasic; -/** A metadata item containing parts of various machines in Liquid Mechanics Mod. - * +/** A meta data item containing parts of various crafting recipes. These parts do not do anything but + * allow new crafting recipes to be created. + * * @author DarkGuardsman */ public class ItemParts extends ItemBasic { @@ -67,9 +68,12 @@ public class ItemParts extends ItemBasic @Override public void getSubItems(int blockID, CreativeTabs tab, List itemStackList) { - for (int meta = 0; meta < Parts.values().length; meta++) + for (Parts part : Parts.values()) { - itemStackList.add(new ItemStack(this, 1, meta)); + if (part.show) + { + itemStackList.add(new ItemStack(this, 1, part.ordinal())); + } } } @@ -78,14 +82,22 @@ public class ItemParts extends ItemBasic Seal("LeatherSeal"), SlimeSeal("SlimeSeal"), Tank("UnfinishedTank"), - Valve("ValvePart"); + Valve("ValvePart"), + MiningIcon("miningIcon", false); public String name; public Icon icon; + boolean show = true; private Parts(String name) { this.name = name; } + + private Parts(String name, boolean show) + { + this(name); + this.show = show; + } } }