1 - 2 of 2
COPPER(3, 250, 12F, 3, 15); (mess around with the numbers if you want)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;
}
}
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";
}
}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;
}
}package net.minecraft.src;
public class ItemCopperIngot extends Item{
public ItemCopperIngot(int eye){
super(eye);
maxStackSize = 64;
}
}public static final Item CopperHelmet = new ItemArmor(407, EnumArmorMaterial.COPPER, ModLoader.addArmor("Copper"), 0).setItemName("CopperHelmet");1 - 2 of 2
© 2010 - 2026 Cyprezz LLC
www.planetminecraft.com
Planet Minecraft has a Progressive Web App!
get_app Install PMC APP
Already a member? Sign in
By continuing, you agree to Planet Minecraft's Terms of Use and Privacy Policy
