Member
Level 1
New Miner
0

Forum Posts

1 - 2 of 2

    calibrix
    • 08/25/2012 4:02 am
    • Level 1 : New Miner
    you don't need a ',' after where you put '[/b]', just the ';'!
    Just copy and paste this into it instead:
    COPPER(3, 250, 12F, 3, 15); (mess around with the numbers if you want)
    So EnumToolMaterial.java should now look like this:
    package net.minecraft.src;

    public enum EnumToolMaterial
    {
    WOOD(0, 59, 2.0F, 0, 15),
    STONE(1, 131, 4.0F, 1, 5),
    IRON(2, 250, 6.0F, 2, 14),
    EMERALD(3, 1561, 8.0F, 3, 10),
    GOLD(0, 32, 12.0F, 0, 22),
    BLOODY(3, 250, 12F, 3, 15);

    /**
    * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
    */
    private final int harvestLevel;

    /**
    * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
    */
    private final int maxUses;

    /**
    * The strength of this tool material against blocks which it is effective against.
    */
    private final float efficiencyOnProperMaterial;

    /** Damage versus entities. */
    private final int damageVsEntity;

    /** Defines the natural enchantability factor of the material. */
    private final int enchantability;

    private EnumToolMaterial(int par3, int par4, float par5, int par6, int par7)
    {
    this.harvestLevel = par3;
    this.maxUses = par4;
    this.efficiencyOnProperMaterial = par5;
    this.damageVsEntity = par6;
    this.enchantability = par7;
    }

    /**
    * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)
    */
    public int getMaxUses()
    {
    return this.maxUses;
    }

    /**
    * The strength of this tool material against blocks which it is effective against.
    */
    public float getEfficiencyOnProperMaterial()
    {
    return this.efficiencyOnProperMaterial;
    }

    /**
    * Damage versus entities.
    */
    public int getDamageVsEntity()
    {
    return this.damageVsEntity;
    }

    /**
    * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)
    */
    public int getHarvestLevel()
    {
    return this.harvestLevel;
    }

    /**
    * Return the natural enchantability factor of the material.
    */
    public int getEnchantability()
    {
    return this.enchantability;
    }
    }


    You need to make 3 classes- "mod_Bloody", "BlockBloodyOre" and "ItemBloodyIngot"..and paste this into "mod_Bloody":
    package net.minecraft.src;

    import java.util.Map;
    import java.util.Random;

    public class mod_Bloody extends BaseMod{


    //creates all of the variables for our tools new ItemPickaxe("item id", MaterialType)
    public static final Item BloodySword = new ItemSword(406, EnumToolMaterial.BLOODY).setItemName("BloodySword");
    //declares the BloodyIngot variable
    public static final Item BloodyIngot = new ItemBloodyIngot(401).setItemName("BloodyIngot");
    //declares the BloodyOre variable
    public static final Block BloodyOre = new BlockBloodyOre(200, 0).setBlockName("BloodyOre").setHardness(3F).setResistance(2F).setLightValue(0F);

    public void load(){

    //sets the image path for the item
    BloodyIngot.iconIndex = ModLoader.addOverride("/gui/items.png", "/BloodyIngot.png");
    //sets the name for the item
    ModLoader.addName(BloodyIngot, "Bloody Ingot");
    //adds our smelting recipe
    ModLoader.addSmelting(BloodyOre.blockID, new ItemStack(BloodyIngot), 0.5F);

    ModLoader.registerBlock(BloodyOre);
    BloodyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png","/BloodyOre.png");
    ModLoader.addName(BloodyOre, "Bloody Ore");
    /** Tools **/

    //basic item declarations
    BloodySword.iconIndex = ModLoader.addOverride("/gui/items.png",
    "/BloodySword.png");
    ModLoader.addName(BloodySword, "Bloody Sword");
    ModLoader.addRecipe(new ItemStack(BloodySword, 1),
    new Object[] { " # ", " # ", " @ ", Character.valueOf('#'),
    BloodyIngot, Character.valueOf('@'), Item.stick });
    }

    //mod version
    public String getVersion(){
    return "Minecraft 1.3.2";
    }

    }


    In the class "BlockBloodyOre" paste this in:
    package net.minecraft.src;

    import java.util.Random;

    public class BlockBloodyOre extends Block{

    public BlockBloodyOre(int i, int j){

    super(i, j, Material.iron);

    }

    public int idDropped(int i, Random random, int j){
    return mod_Bloody.BloodyOre.blockID;
    }

    public int quantityDropped(Random random){
    return 1;
    }
    }


    And this in the final class "ItemCopperIngot":
    package net.minecraft.src;

    public class ItemCopperIngot extends Item{
    public ItemCopperIngot(int eye){
    super(eye);
    maxStackSize = 64;
    }
    }


    Also remember to make the 3 images and call them: "BloodyIngot.png", "BloodySword.png" and "BloodyOre.png"
    1
    calibrix
    • 08/25/2012 3:39 am
    • Level 1 : New Miner
    Hi, you may/may not have fixed this so just in case,
    You need to get the 2 files names 'material'_1 and 'material'_2 which is found in:
    .minecraft\bin\minecraft.jar\armour

    And rename them to whatever you made as your EnumArmourMaterial!

    For example; public static final Item CopperHelmet = new ItemArmor(407, EnumArmorMaterial.COPPER, ModLoader.addArmor("Copper"), 0).setItemName("CopperHelmet");
    Note where it says EnumArmorMaterial.COPPER, that means you would name the two files as Copper_1 and the other as Copper_2.

    Once you have done this you can either edit them or save both files into your mcp\temp\bin\minecraft\armor folder AND your mcp1.3.2\jars\bin\minecraft.jar\armour folder!

    Hope this helps, sorry if I over complicated it.. message me back if you still need help!
    1

1 - 2 of 2

Welcome