Added machine parts, added some recipes. Fixes #92

This commit is contained in:
modmuss50 2015-08-05 15:35:06 +01:00
parent 79f14f8be6
commit 9e346e6061
5 changed files with 27 additions and 3 deletions

View file

@ -12,11 +12,23 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraftforge.common.util.ForgeDirection;
import techreborn.client.TechRebornCreativeTab;
import techreborn.init.ModBlocks;
import java.security.InvalidParameterException;
import java.util.List;
public class BlockMachineFrame extends Block {
public static ItemStack getFrameByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModBlocks.machineframe, count, i);
}
}
throw new InvalidParameterException("The part " + name + " could not be found.");
}
public static final String[] types = new String[]
{ "aluminum", "iron", "bronze", "brass", "steel", "titanium" };