Added a way to get the fmp cables in survival, will make this better later

This commit is contained in:
modmuss50 2015-06-23 13:23:56 +01:00
parent 482c07d991
commit 84fc33edab
5 changed files with 35 additions and 18 deletions

View file

@ -1,15 +1,22 @@
package techreborn.init;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import techreborn.partSystem.IPartProvider;
import techreborn.partSystem.ModPartRegistry;
import techreborn.partSystem.parts.CablePart;
import java.util.HashMap;
public class ModParts {
public static HashMap<Integer, ItemStack> stackCable = new HashMap<Integer, ItemStack>();
public static void init()
{
for (int i = 0; i < 13; i++) {
ModPartRegistry.registerPart(new CablePart(i));
CablePart part = new CablePart(i);
ModPartRegistry.registerPart(part);
}
ModPartRegistry.addProvider(
"techreborn.partSystem.QLib.QModPartFactory", "qmunitylib");
@ -21,5 +28,11 @@ public class ModParts {
ModPartRegistry.masterProvider = provider;
}
}
for (int i = 0; i < 13; i++) {
Item stack = ModPartRegistry.itemParts.get("Cable." + i);
if(stack != null){
stackCable.put(i, new ItemStack(stack));
}
}
}
}

View file

@ -1,5 +1,6 @@
package techreborn.init;
import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.item.IC2Items;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -7,23 +8,19 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import techreborn.api.BlastFurnaceRecipe;
import techreborn.api.TechRebornAPI;
import techreborn.api.recipe.RecipeHandler;
import techreborn.api.recipe.machines.AlloySmelterRecipe;
import techreborn.api.recipe.machines.AssemblingMachineRecipe;
import techreborn.api.recipe.machines.CentrifugeRecipe;
import techreborn.api.recipe.machines.ChemicalReactorRecipe;
import techreborn.api.recipe.machines.GrinderRecipe;
import techreborn.api.recipe.machines.ImplosionCompressorRecipe;
import techreborn.api.recipe.machines.IndustrialSawmillRecipe;
import techreborn.api.recipe.machines.LatheRecipe;
import techreborn.api.recipe.machines.PlateCuttingMachineRecipe;
import techreborn.config.ConfigTechReborn;
import techreborn.items.*;
import techreborn.items.ItemDusts;
import techreborn.items.ItemIngots;
import techreborn.items.ItemParts;
import techreborn.items.ItemPlates;
import techreborn.items.ItemRods;
import techreborn.util.CraftingHelper;
import techreborn.util.LogHelper;
import cpw.mods.fml.common.registry.GameRegistry;
public class ModRecipes {
public static ConfigTechReborn config;