All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
Dismiss
  • 0

    posted a message on Savage Realms - [1.7.x] [The BEST Server] [24/7 Lag-Free] [Towny] [Custom Bosses w/ over 250 abilities] [PvP World] [RPG/Dungeon
    Your IGN: Squeezie007

    Age: 13

    Have you voted for Savage Realms at all 3 sites mentioned below? Yep!

    No questions or comments ^-^
    Posted in: PC Servers
  • 0

    posted a message on Kill someone with the above users item!
    I eat the bunny, because I'm hungry.

    The next user gets a pie.
    Posted in: Forum Games
  • 0

    posted a message on A Few Annoying Issues
    Quote from beastman3226

    You have MCP setup right? If so then get the path to eclipse in your MCP folder. That path is your workspace.


    I did that, yet it keeps saying 'Client' is missing files and stuff...
    Posted in: Modification Development
  • 0

    posted a message on A Few Annoying Issues
    Hm, okay. I've heard of Eclipse. Which one do I download?

    Edit: I've got Eclipse and the workplace is selected, but I keep getting "Project 'Client' is missing required library: 'jars/bin/jinput.jar'" errors.

    Why, does everything seem to have a habit of screwing up...?
    Posted in: Modification Development
  • 0

    posted a message on A Few Annoying Issues
    I'm sick of this... I just can't get anything right. Can someone PLEASE tell me how to fix all of the issues in this log? I've tried everything you guys have replied, but I make more errors than I fix.

    Log



    All my updated java files

    ItemToolEmerald.java
    package net.minecraft.src;
    
    public class ItemToolEmerald extends Item
    {
    /** Array of blocks the tool has extra effect against. */
    private Block[] blocksEffectiveAgainst;
    protected float efficiencyOnProperMaterial = 4.0F;
    
    /** Damage versus entities. */
    private int damageVsEntity;
    
    /** The material this tool is made from. */
    protected EnumToolEmerald toolMaterial;
    
    protected ItemToolEmerald(int par1, int par2, EnumToolEmerald par3EnumToolEmerald, Block[] par4ArrayOfBlock)
    {
    super(par1);
    this.toolMaterial = par3EnumToolEmerald;
    this.blocksEffectiveAgainst = par4ArrayOfBlock;
    this.maxStackSize = 1;
    this.setMaxDamage(par3EnumToolEmerald.getMaxUses());
    this.efficiencyOnProperMaterial = par3EnumToolEmerald.getEfficiencyOnProperMaterial();
    this.damageVsEntity = par2 + par3EnumToolEmerald.getDamageVsEntity();
    this.setCreativeTab(CreativeTabs.tabTools);
    }
    
    /**
    * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
    * sword
    */
    public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
    {
    Block[] var3 = this.blocksEffectiveAgainst;
    int var4 = var3.length;
    
    for (int var5 = 0; var5 < var4; ++var5)
    {
    Block var6 = var3[var5];
    
    if (var6 == par2Block)
    {
    return this.efficiencyOnProperMaterial;
    }
    }
    
    return 1.0F;
    }
    
    /**
    * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
    * the damage on the stack.
    */
    public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
    {
    par1ItemStack.damageItem(2, par3EntityLiving);
    return true;
    }
    
    public boolean func_77660_a(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
    {
    if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
    {
    par1ItemStack.damageItem(1, par7EntityLiving);
    }
    
    return true;
    }
    
    /**
    * Returns the damage against a given entity.
    */
    public int getDamageVsEntity(Entity par1Entity)
    {
    return this.damageVsEntity;
    }
    
    /**
    * Returns True is the item is renderer in full 3D when hold.
    */
    public boolean isFull3D()
    {
    return true;
    }
    
    /**
    * Return the enchantability factor of the item, most of the time is based on material.
    */
    public int getItemEnchantability()
    {
    return this.toolMaterial.getEnchantability();
    }
    
    public String func_77861_e()
    {
    return this.toolMaterial.toString();
    }
    }


    Items

    ItemSwordEmerald.java

    package net.minecraft.src;
    
    public class ItemSwordEmerald extends Item
    {
    
    private int weaponDamage;
    private final EnumToolEmerald field_40439_b;
    
    public ItemSwordEmerald(int i, EnumToolEmerald enumtoolemerald)
    {
    super(i);
    field_40439_b = enumtoolemerald;
    maxStackSize = 1;
    setMaxDamage(enumtoolemerald.getMaxUses());
    weaponDamage = 4 + enumtoolemerald.getDamageVsEntity();
    setCreativeTab(CreativeTabs.tabCombat);
    }
    
    public float getStrVsBlock(ItemStack itemstack, Block block)
    {
    return block.blockID != Block.web.blockID ? 1.5F : 15F;
    }
    
    public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
    {
    itemstack.damageItem(1, entityliving1);
    return true;
    }
    
    public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
    {
    itemstack.damageItem(2, entityliving);
    return true;
    }
    
    public int getDamageVsEntity(Entity entity)
    {
    return weaponDamage;
    }
    
    public boolean isFull3D()
    {
    return true;
    }
    
    public EnumAction getItemUseAction(ItemStack itemstack)
    {
    return EnumAction.block;
    }
    
    public int getMaxItemUseDuration(ItemStack itemstack)
    {
    return 0x11940;
    }
    
    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
    {
    entityplayer.setItemInUse(itemstack, getMaxItemUseDuration(itemstack));
    return itemstack;
    }
    
    public boolean canHarvestBlock(Block block)
    {
    return block.blockID == Block.web.blockID;
    }
    
    public int getItemEnchantability()
    {
    return field_40439_b.getEnchantability();
    }
    }

    ItemShovelEmerald.java
    package net.minecraft.src;
    
    public class ItemShovelEmerald extends ItemToolEmerald
    {
    
    public ItemShovelEmerald(int i, EnumToolEmerald enumtoolemerald)
    {
    super(i, 1, enumtoolemerald, blocksEffectiveAgainst);
    }
    
    public boolean canHarvestBlock(Block block)
    {
    if(block == Block.snow)
    {
    return true;
    }
    return block == Block.blockSnow;
    }
    
    private static Block blocksEffectiveAgainst[];
    
    static
    {
    blocksEffectiveAgainst = (new Block[] {
    Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField
    });
    }
    }
    ItemPickaxeEmerald.java
    package net.minecraft.src;
    
    public class ItemPickaxeEmerald extends ItemToolEmerald
    {
    
    /** an array of the blocks this pickaxe is effective against */
    private static Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered};
    
    protected ItemPickaxeEmerald(int par1, EnumToolEmerald par2EnumToolEmerald)
    {
    super(par1, 2, par2EnumToolEmerald, blocksEffectiveAgainst);
    }
    
    /**
    * Returns if the item (tool) can harvest results from the block type.
    */
    public boolean canHarvestBlock(Block par1Block)
    {
    return par1Block == Block.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : (par1Block != Block.blockDiamond && par1Block != Block.oreDiamond ? (par1Block == Block.oreEmerald ? this.toolMaterial.getHarvestLevel() >= 2 : (par1Block != Block.blockGold && par1Block != Block.oreGold ? (par1Block != Block.blockSteel && par1Block != Block.oreIron ? (par1Block != Block.blockLapis && par1Block != Block.oreLapis ? (par1Block != Block.oreRedstone && par1Block != Block.oreRedstoneGlowing ? (par1Block.blockMaterial == Material.rock ? true : par1Block.blockMaterial == Material.iron) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2)) : this.toolMaterial.getHarvestLevel() >= 2);
    }
    
    /**
    * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
    * sword
    */
    public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
    {
    return par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock) ? this.efficiencyOnProperMaterial : super.getStrVsBlock(par1ItemStack, par2Block);
    }
    }
    ItemHoeEmerald (Read this one thoroughly please, it's where I'm getting a lot of errors)
    package net.minecraft.src;
    
    public class ItemHoeEmerald extends ItemToolEmerald
    {
    protected EnumToolMaterial theToolMaterial;
    
    public ItemHoeEmerald(int par1, EnumToolEmerald par2EnumToolEmerald)
    {
    super(par1);
    this.theToolMaterial = par2EnumToolMaterial;
    this.maxStackSize = 1;
    this.setMaxDamage(par2EnumToolMaterial.getMaxUses());
    this.setCreativeTab(CreativeTabs.tabTools);
    }
    
    /**
    * Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
    * True if something happen and false if it don't. This is for ITEMS, not BLOCKS
    */
    public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
    {
    if (!par2EntityPlayer.func_82247_a(par4, par5, par6, par7, par1ItemStack))
    {
    return false;
    }
    else
    {
    int var11 = par3World.getBlockId(par4, par5, par6);
    int var12 = par3World.getBlockId(par4, par5 + 1, par6);
    
    if ((par7 == 0 || var12 != 0 || var11 != Block.grass.blockID) && var11 != Block.dirt.blockID)
    {
    return false;
    }
    else
    {
    Block var13 = Block.tilledField;
    par3World.playSoundEffect((double)((float)par4 + 0.5F), (double)((float)par5 + 0.5F), (double)((float)par6 + 0.5F), var13.stepSound.getStepSound(), (var13.stepSound.getVolume() + 1.0F) / 2.0F, var13.stepSound.getPitch() * 0.8F);
    
    if (par3World.isRemote)
    {
    return true;
    }
    else
    {
    par3World.setBlockWithNotify(par4, par5, par6, var13.blockID);
    par1ItemStack.damageItem(1, par2EntityPlayer);
    return true;
    }
    }
    }
    }
    
    public boolean isFull3D()
    {
    return true;
    }
    }
    ItemAxeEmerald.java
    package net.minecraft.src;
    
    public class ItemAxeEmerald extends ItemToolEmerald
    {
    
    protected ItemAxeEmerald(int i, EnumToolEmerald enumtoolemerald)
    {
    super(i, 3, enumtoolemerald, blocksEffectiveAgainst);
    }
    
    private static Block blocksEffectiveAgainst[];
    
    static
    {
    blocksEffectiveAgainst = (new Block[] {
    Block.planks, Block.bookShelf, Block.wood, Block.chest
    });
    }
    }
    EnumToolEmerald.java
    package net.minecraft.src;
    
    public enum EnumToolEmerald
    {
    WOOD(0, 59, 2.0F, 0, 15),
    STONE(1, 131, 4F, 1, 5),
    IRON(2, 250, 6F, 2, 14),
    EMERALD(3, 1561, 8.0F, 3, 10),
    GOLD(0, 32, 12F, 0, 22),
    EMERALDPLUS(3, 1864, 9.0F, 4, 12);
    
    
    private final int harvestLevel;
    private final int maxUses;
    private final float efficiencyOnProperMaterial;
    private final int damageVsEntity;
    private final int enchantability;
    private static final EnumToolEmerald allToolMaterials[]; /* synthetic field */
    
    
    private EnumToolEmerald(int par3, int par4, float par5, int par6, int par7)
    {
    harvestLevel = par3;
    maxUses = par4;
    efficiencyOnProperMaterial = par5;
    damageVsEntity = par6;
    enchantability = par7;
    }
    
    public int getMaxUses()
    {
    return maxUses;
    }
    
    public float getEfficiencyOnProperMaterial()
    {
    return efficiencyOnProperMaterial;
    }
    
    public int getDamageVsEntity()
    {
    return damageVsEntity;
    }
    
    public int getHarvestLevel()
    {
    return harvestLevel;
    }
    
    public int getEnchantability()
    {
    return enchantability;
    }
    
    static
    {
    allToolMaterials = (new EnumToolEmerald[] {
    WOOD, STONE, IRON, EMERALD, GOLD, EMERALDPLUS
    });
    }
    }
    EmeraldItemArmor.java
    package net.minecraft.src;
    
    public class EmeraldItemArmor extends ItemArmor
    {
    
    private static final int maxDamageArray[] = {
    11, 16, 15, 13
    };
    public final int armorType;
    public final int damageReduceAmount;
    public final int renderIndex;
    private final EmeraldArmorMaterial material;
    
    public EmeraldItemArmor(int i, EmeraldArmorMaterial enumarmormaterial, int j, int k)
    {
    super(i, EnumArmorMaterial.DIAMOND, j, k);
    material = enumarmormaterial;
    armorType = k;
    renderIndex = j;
    damageReduceAmount = enumarmormaterial.getDamageReductionAmount(k);
    setMaxDamage(enumarmormaterial.func_40576_a(k));
    maxStackSize = 1;
    setCreativeTab(CreativeTabs.tabCombat);
    }
    
    public int getItemEnchantability()
    {
    return material.getEnchantability();
    }
    
    static int[] getMaxDamageArray()
    {
    return maxDamageArray;
    }
    
    }
    EmeraldArmorMaterial.java
    package net.minecraft.src;
    
    import java.util.Random;
    
    public enum EmeraldArmorMaterial
    {
    EMERALDPLUS("EMERALD", 25, 29, new int[] {2, 7, 5, 3}, 10);
    private int maxDamageFactor;
    private int damageReductionAmountArray[];
    private int enchantability;
    
    
    private EmeraldArmorMaterial(String s, int i, int j, int ai[], int k)
    {
    maxDamageFactor = j;
    damageReductionAmountArray = ai;
    enchantability = k;
    }
    
    public int func_40576_a(int i)
    {
    return ItemArmor.getMaxDamageArray()[i] * maxDamageFactor;
    }
    public int getDamageReductionAmount(int i)
    {
    return damageReductionAmountArray[i];
    }
    
    public int getEnchantability(int k)
    {
    return enchantability;
    }
    
    
    }

    The files I'm having the most trouble with are - ItemHoeEmerald.java, EmeraldItemArmor.java, EmeraldArmorMaterial.java

    If you know a solution to any issues, please post. I'm about to break something. I don't care if you take the whole source code and fix it then send it back. Please help before my keyboard gets it.
    Posted in: Modification Development
  • 0

    posted a message on A Few Annoying Issues
    I made:
    ItemHoeEmerald.java extend ItemToolEmerald

    package net.minecraft.src;
    
    public class ItemHoeEmerald extends ItemTool {
    //class body
    }


    But, where do I put "getEnchantibility(int k)"? Which java file? I put it in EnumToolEmerald... is that right?

    You can easily tell I'm a very novice modder. I just followed a tutorial. I didn't exactly comprehend much of what I was doing. :(

    Here's my log for the most recent compile

    src\minecraft\net\minecraft\src\EmeraldItemArmor.java:23: error: cannot find symbol

    setTabToDisplayOn(CreativeTabs.tabCombat);

    ^

    symbol: method setTabToDisplayOn(CreativeTabs)

    location: class EmeraldItemArmor

    src\minecraft\net\minecraft\src\ItemToolEmerald.java:24: error: cannot find symbol

    this.setTabToDisplayOn(CreativeTabs.tabTools);

    ^

    symbol: method setTabToDisplayOn(CreativeTabs)

    src\minecraft\net\minecraft\src\ItemToolEmerald.java:90: error: method getEnchantability in enum EnumToolEmerald cannot be applied to given types;

    return this.toolMaterial.getEnchantability();

    ^

    required: int

    found: no arguments

    reason: actual and formal argument lists differ in length

    src\minecraft\net\minecraft\src\ItemHoeEmerald.java:10: error: constructor ItemToolEmerald in class ItemToolEmerald cannot be applied to given types;

    super(par1);

    ^

    required: int,int,EnumToolEmerald,Block[]

    found: int

    reason: actual and formal argument lists differ in length

    src\minecraft\net\minecraft\src\ItemHoeEmerald.java:13: error: cannot find symbol

    setTabToDisplayOn(CreativeTabs.tabTools);

    ^

    symbol: method setTabToDisplayOn(CreativeTabs)

    location: class ItemHoeEmerald

    src\minecraft\net\minecraft\src\ItemHoeEmerald.java:18: error: cannot find symbol

    if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6))

    ^

    symbol: method canPlayerEdit(int,int,int)

    location: variable par2EntityPlayer of type EntityPlayer

    src\minecraft\net\minecraft\src\ItemSwordEmerald.java:17: error: cannot find symbol

    setTabToDisplayOn(CreativeTabs.tabCombat);

    ^

    symbol: method setTabToDisplayOn(CreativeTabs)

    location: class ItemSwordEmerald

    src\minecraft\net\minecraft\src\ItemSwordEmerald.java:70: error: method getEnchantability in enum EnumToolEmerald cannot be applied to given types;

    return field_40439_b.getEnchantability();

    ^

    required: int

    found: no arguments

    reason: actual and formal argument lists differ in length

    Note: Some input files use unchecked or unsafe operations.

    Note: Recompile with -Xlint:unchecked for details.

    8 errors

    Thanks for helping, too!
    Posted in: Modification Development
  • 0

    posted a message on A Few Annoying Issues
    Bump 3:
    Posted in: Modification Development
  • 0

    posted a message on [1.3.2] Emeralds Plus
    Alright. I'm really sorry about the huge delay. I've been trying to make it 1.4.2 compatible, but I'm running into more problems as I try to fix them. I'm trying my best to fix these problems, but it's such a pain to do. If anyone does have an idea of how to help, please don't hesitate to comment.
    Posted in: Minecraft Mods
  • 0

    posted a message on A Few Annoying Issues
    Okay, so I've got a really simple mod that adds a toolset and armor. But, I've got multiple annoying problems that I have no idea how to fix:
    • The hoe does not work whatsoever
    • Nothing can be enchanted except armor, which is always Protection 1
    • Several errors when trying to recompile
    I am desperate now. I've looked everywhere on the internet, but I simply don't know what to do.
    Here are all my java files.

    mod_Emeralds_Plus.java
    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_Emeralds_Plus extends BaseMod
    {
    
    //Declare Emerald Pickaxe
    public static final Item m_EmeraldPickaxe = new ItemPickaxeEmerald(7265, EnumToolEmerald.EMERALD)
    .setItemName("m_EmeraldPickaxe");
    
    //Declare Emerald Shovel
    public static final Item m_EmeraldShovel = new ItemShovelEmerald(7266, EnumToolEmerald.EMERALD)
    .setItemName("m_EmeraldShovel");
    
    //Declare Emerald Axe
    public static final Item m_EmeraldAxe = new ItemAxeEmerald(7267, EnumToolEmerald.EMERALD)
    .setItemName("m_EmeraldAxe");
    
    //Declare Emerald Hoe
    public static final Item m_EmeraldHoe = new ItemHoeEmerald(7268, EnumToolEmerald.EMERALD)
    .setItemName("m_EmeraldHoe");
    
    //Declare Emerald Sword
    public static final Item m_EmeraldSword = new ItemSwordEmerald(7269, EnumToolEmerald.EMERALD)
    .setItemName("m_EmeraldSword");
    
    //Declare Emerald Helmet
    public static final Item m_EmeraldHelmet = (new EmeraldItemArmor(2000, EmeraldArmorMaterial.EMERALD, ModLoader.addArmor("emerald"), 0))
    .setIconIndex(ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/earmor/e-hat.png")).setItemName("m_EmeraldHelmet");
    //Declare Emerald Chestplate
    public static final Item m_EmeraldChestplate = (new EmeraldItemArmor(2001, EmeraldArmorMaterial.EMERALD, ModLoader.addArmor("emerald"), 1))
    .setIconIndex(ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/earmor/e-shirt.png")).setItemName("m_EmeraldChestplate");
    //Declare Emerald Leggings
    public static final Item m_EmeraldLegs = (new EmeraldItemArmor(2002, EmeraldArmorMaterial.EMERALD, ModLoader.addArmor("emerald"), 2))
    .setIconIndex(ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/earmor/e-pants.png")).setItemName("m_EmeraldLegs");
    //Declare Emerald Boots
    public static final Item m_EmeraldBoots = (new EmeraldItemArmor(2003, EmeraldArmorMaterial.EMERALD, ModLoader.addArmor("emerald"), 3))
    .setIconIndex(ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/earmor/e-boots.png")).setItemName("m_EmeraldBoots");
    public String getVersion()
    {
    return "Emeralds_Plus 1.4.2";
    }
    public void load() { }
    
    public mod_Emeralds_Plus()
    {
    
    //Add Tooltips
    //Blocks
    //Items
    //Armor Sets
    ModLoader.addName(m_EmeraldHelmet, "Emerald Helmet");
    ModLoader.addName(m_EmeraldChestplate, "Emerald Chestplate");
    ModLoader.addName(m_EmeraldLegs, "Emerald Leggings");
    ModLoader.addName(m_EmeraldBoots, "Emerald Boots");
    //ToolSets
    ModLoader.addName(m_EmeraldPickaxe, "Emerald Pickaxe"); //Emerald Pickaxe
    ModLoader.addName(m_EmeraldShovel, "Emerald Shovel"); //Emerald Shovel
    ModLoader.addName(m_EmeraldAxe, "Emerald Axe"); //Emerald Axe
    ModLoader.addName(m_EmeraldHoe, "Emerald Hoe"); //Emerald Hoe
    ModLoader.addName(m_EmeraldSword, "Emerald Sword"); //Emerald Sword
    
    
    //Textures
    //Blocks
    //Items
    //ToolSets
    m_EmeraldPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/etool/e-pick.png");
    m_EmeraldShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/etool/e-shovel.png");
    m_EmeraldAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/etool/e-axe.png");
    m_EmeraldHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/etool/e-hoe.png");
    m_EmeraldSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/Emeralds_Plus/etool/e-sword.png");
    
    
    //Recipes
    //Emerald Pickaxe Recipe
    ModLoader.addRecipe(new ItemStack(m_EmeraldPickaxe, 1), new Object []{ "yyy" , " z " , " z " ,
    Character.valueOf('y'), Item.emerald
    , Character.valueOf('z'), Item.stick });
    //Emerald Shovel Recipe
    ModLoader.addRecipe(new ItemStack(m_EmeraldShovel, 1), new Object []{ " y " , " z " , " z " ,
    Character.valueOf('y'), Item.emerald
    , Character.valueOf('z'), Item.stick });
    //Emerald Axe Recipe
    ModLoader.addRecipe(new ItemStack(m_EmeraldAxe, 1), new Object []{ "yy " , "yz " , " z " ,
    Character.valueOf('y'), Item.emerald
    , Character.valueOf('z'), Item.stick });
    //Emerald Hoe Recipe
    ModLoader.addRecipe(new ItemStack(m_EmeraldHoe, 1), new Object []{ "yy " , " z " , " z " ,
    Character.valueOf('y'), Item.emerald
    , Character.valueOf('z'), Item.stick });
    //Emerald Sword Recipe
    ModLoader.addRecipe(new ItemStack(m_EmeraldSword, 1), new Object []{ " y " , " y " , " z " ,
    Character.valueOf('y'), Item.emerald
    , Character.valueOf('z'), Item.stick });
    //EmeraldL Helmet Recipe
    ModLoader.addRecipe(new ItemStack (m_EmeraldHelmet, 1), (new Object[] {"yyy", "y y",
    Character.valueOf('y'), Item.emerald}));
    //EmeraldL Chestplate Recipe
    ModLoader.addRecipe(new ItemStack (m_EmeraldChestplate, 1), (new Object[] {"y y", "yyy","yyy",
    Character.valueOf('y'), Item.emerald}));
    //EmeraldL Legs Recipe
    ModLoader.addRecipe(new ItemStack (m_EmeraldLegs, 1), (new Object[] {"yyy", "y y","y y",
    Character.valueOf('y'), Item.emerald}));
    //EmeraldL Boots Recipe
    ModLoader.addRecipe(new ItemStack (m_EmeraldBoots, 1), (new Object[] {"p p", "p p",
    Character.valueOf('p'), Item.emerald}));
    
    //Furnace Recipes
    }
    
    public void GenerateSurface(World worldMod, Random rand, int i, int j)
    {
    }
    }


    Items
    ItemToolEmerald.java
    package net.minecraft.src;
    
    public class ItemToolEmerald extends Item
    {
    /** Array of blocks the tool has extra effect against. */
    private Block[] blocksEffectiveAgainst;
    protected float efficiencyOnProperMaterial = 4.0F;
    
    /** Damage versus entities. */
    private int damageVsEntity;
    
    /** The material this tool is made from. */
    protected EnumToolEmerald toolMaterial;
    
    protected ItemToolEmerald(int par1, int par2, EnumToolEmerald par3EnumToolEmerald, Block[] par4ArrayOfBlock)
    {
    super(par1);
    this.toolMaterial = par3EnumToolEmerald;
    this.blocksEffectiveAgainst = par4ArrayOfBlock;
    this.maxStackSize = 1;
    this.setMaxDamage(par3EnumToolEmerald.getMaxUses());
    this.efficiencyOnProperMaterial = par3EnumToolEmerald.getEfficiencyOnProperMaterial();
    this.damageVsEntity = par2 + par3EnumToolEmerald.getDamageVsEntity();
    this.setTabToDisplayOn(CreativeTabs.tabTools);
    }
    
    /**
    * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
    * sword
    */
    public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
    {
    Block[] var3 = this.blocksEffectiveAgainst;
    int var4 = var3.length;
    
    for (int var5 = 0; var5 < var4; ++var5)
    {
    Block var6 = var3[var5];
    
    if (var6 == par2Block)
    {
    return this.efficiencyOnProperMaterial;
    }
    }
    
    return 1.0F;
    }
    
    /**
    * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
    * the damage on the stack.
    */
    public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
    {
    par1ItemStack.damageItem(2, par3EntityLiving);
    return true;
    }
    
    public boolean func_77660_a(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
    {
    if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
    {
    par1ItemStack.damageItem(1, par7EntityLiving);
    }
    
    return true;
    }
    
    /**
    * Returns the damage against a given entity.
    */
    public int getDamageVsEntity(Entity par1Entity)
    {
    return this.damageVsEntity;
    }
    
    /**
    * Returns True is the item is renderer in full 3D when hold.
    */
    public boolean isFull3D()
    {
    return true;
    }
    
    /**
    * Return the enchantability factor of the item, most of the time is based on material.
    */
    public int getItemEnchantability()
    {
    return this.toolMaterial.getEnchantability();
    }
    
    public String func_77861_e()
    {
    return this.toolMaterial.toString();
    }
    }


    ItemSwordEmerald.java

    package net.minecraft.src;
    
    public class ItemSwordEmerald extends Item
    {
    
    private int weaponDamage;
    private final EnumToolEmerald field_40439_b;
    
    public ItemSwordEmerald(int i, EnumToolEmerald enumtoolemerald)
    {
    super(i);
    field_40439_b = enumtoolemerald;
    maxStackSize = 1;
    setMaxDamage(enumtoolemerald.getMaxUses());
    weaponDamage = 4 + enumtoolemerald.getDamageVsEntity();
    setTabToDisplayOn(CreativeTabs.tabCombat);
    }
    
    public float getStrVsBlock(ItemStack itemstack, Block block)
    {
    return block.blockID != Block.web.blockID ? 1.5F : 15F;
    }
    
    public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
    {
    itemstack.damageItem(1, entityliving1);
    return true;
    }
    
    public boolean onBlockDestroyed(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
    {
    itemstack.damageItem(2, entityliving);
    return true;
    }
    
    public int getDamageVsEntity(Entity entity)
    {
    return weaponDamage;
    }
    
    public boolean isFull3D()
    {
    return true;
    }
    
    public EnumAction getItemUseAction(ItemStack itemstack)
    {
    return EnumAction.block;
    }
    
    public int getMaxItemUseDuration(ItemStack itemstack)
    {
    return 0x11940;
    }
    
    public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
    {
    entityplayer.setItemInUse(itemstack, getMaxItemUseDuration(itemstack));
    return itemstack;
    }
    
    public boolean canHarvestBlock(Block block)
    {
    return block.blockID == Block.web.blockID;
    }
    
    public int getItemEnchantability()
    {
    return field_40439_b.getEnchantability();
    }
    }


    ItemShovelEmerald.java

    package net.minecraft.src;
    
    public class ItemShovelEmerald extends ItemToolEmerald
    {
    
    public ItemShovelEmerald(int i, EnumToolEmerald enumtoolemerald)
    {
    super(i, 1, enumtoolemerald, blocksEffectiveAgainst);
    }
    
    public boolean canHarvestBlock(Block block)
    {
    if(block == Block.snow)
    {
    return true;
    }
    return block == Block.blockSnow;
    }
    
    private static Block blocksEffectiveAgainst[];
    
    static
    {
    blocksEffectiveAgainst = (new Block[] {
    Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField
    });
    }
    }


    ItemPickaxeEmerald.java

    package net.minecraft.src;
    
    public class ItemPickaxeEmerald extends ItemToolEmerald
    {
    
    /** an array of the blocks this pickaxe is effective against */
    private static Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockSteel, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered};
    
    protected ItemPickaxeEmerald(int par1, EnumToolEmerald par2EnumToolEmerald)
    {
    super(par1, 2, par2EnumToolEmerald, blocksEffectiveAgainst);
    }
    
    /**
    * Returns if the item (tool) can harvest results from the block type.
    */
    public boolean canHarvestBlock(Block par1Block)
    {
    return par1Block == Block.obsidian ? this.toolMaterial.getHarvestLevel() == 3 : (par1Block != Block.blockDiamond && par1Block != Block.oreDiamond ? (par1Block == Block.oreEmerald ? this.toolMaterial.getHarvestLevel() >= 2 : (par1Block != Block.blockGold && par1Block != Block.oreGold ? (par1Block != Block.blockSteel && par1Block != Block.oreIron ? (par1Block != Block.blockLapis && par1Block != Block.oreLapis ? (par1Block != Block.oreRedstone && par1Block != Block.oreRedstoneGlowing ? (par1Block.blockMaterial == Material.rock ? true : par1Block.blockMaterial == Material.iron) : this.toolMaterial.getHarvestLevel() >= 2) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 1) : this.toolMaterial.getHarvestLevel() >= 2)) : this.toolMaterial.getHarvestLevel() >= 2);
    }
    
    /**
    * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
    * sword
    */
    public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
    {
    return par2Block != null && (par2Block.blockMaterial == Material.iron || par2Block.blockMaterial == Material.rock) ? this.efficiencyOnProperMaterial : super.getStrVsBlock(par1ItemStack, par2Block);
    }
    }


    ItemHoeEmerald.java

    package net.minecraft.src;
    
    
    public class ItemHoeEmerald extends Item
    {
    
    public ItemHoeEmerald(int par1, EnumToolEmerald par2EnumToolEmerald)
    {
    super(par1);
    maxStackSize = 1;
    setMaxDamage(par2EnumToolEmerald.getMaxUses());
    setTabToDisplayOn(CreativeTabs.tabTools);
    }
    
    public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7)
    {
    if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6))
    {
    return false;
    }
    
    int i = par3World.getBlockId(par4, par5, par6);
    int j = par3World.getBlockId(par4, par5 + 1, par6);
    
    if (par7 != 0 && j == 0 && i == Block.grass.blockID || i == Block.dirt.blockID)
    {
    Block block = Block.tilledField;
    par3World.playSoundEffect((float)par4 + 0.5F, (float)par5 + 0.5F, (float)par6 + 0.5F, block.stepSound.getStepSound(), (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
    
    if (par3World.isRemote)
    {
    return true;
    }
    else
    {
    par3World.setBlockWithNotify(par4, par5, par6, block.blockID);
    par1ItemStack.damageItem(1, par2EntityPlayer);
    return true;
    }
    }
    else
    {
    return false;
    }
    }
    
    public boolean isFull3D()
    {
    return true;
    }
    }


    ItemAxeEmerald.java

    package net.minecraft.src;
    
    public class ItemAxeEmerald extends ItemToolEmerald
    {
    
    protected ItemAxeEmerald(int i, EnumToolEmerald enumtoolemerald)
    {
    super(i, 3, enumtoolemerald, blocksEffectiveAgainst);
    }
    
    private static Block blocksEffectiveAgainst[];
    
    static
    {
    blocksEffectiveAgainst = (new Block[] {
    Block.planks, Block.bookShelf, Block.wood, Block.chest
    });
    }
    }


    EnumToolEmerald.java

    package net.minecraft.src;
    
    public enum EnumToolEmerald
    {
    WOOD(0, 59, 2.0F, 0, 15),
    STONE(1, 131, 4F, 1, 5),
    IRON(2, 250, 6F, 2, 14),
    EMERALD(3, 1561, 8.0F, 3, 10),
    GOLD(0, 32, 12F, 0, 22);
    
    
    private final int harvestLevel;
    private final int maxUses;
    private final float efficiencyOnProperMaterial;
    private final int damageVsEntity;
    private final int enchantability;
    private static final EnumToolEmerald allToolMaterials[]; /* synthetic field */
    
    
    private EnumToolEmerald(int par3, int par4, float par5, int par6, int par7)
    {
    harvestLevel = par3;
    maxUses = par4;
    efficiencyOnProperMaterial = par5;
    damageVsEntity = par6;
    enchantability = par7;
    }
    
    public int getMaxUses()
    {
    return maxUses;
    }
    
    public float getEfficiencyOnProperMaterial()
    {
    return efficiencyOnProperMaterial;
    }
    
    public int getDamageVsEntity()
    {
    return damageVsEntity;
    }
    
    public int getHarvestLevel()
    {
    return harvestLevel;
    }
    
    public int getEnchantability()
    {
    return enchantability;
    }
    
    static
    {
    allToolMaterials = (new EnumToolEmerald[] {
    WOOD, STONE, IRON, EMERALD, GOLD
    });
    }
    }


    EmeraldItemArmor.java

    package net.minecraft.src;
    
    public class EmeraldItemArmor extends ItemArmor
    {
    
    private static final int maxDamageArray[] = {
    11, 16, 15, 13
    };
    public final int armorType;
    public final int damageReduceAmount;
    public final int renderIndex;
    private final EmeraldArmorMaterial material;
    
    public EmeraldItemArmor(int i, EmeraldArmorMaterial enumarmormaterial, int j, int k)
    {
    super(i, EnumArmorMaterial.DIAMOND, j, k);
    material = enumarmormaterial;
    armorType = k;
    renderIndex = j;
    damageReduceAmount = enumarmormaterial.getDamageReductionAmount(k);
    setMaxDamage(enumarmormaterial.func_40576_a(k));
    maxStackSize = 1;
    setTabToDisplayOn(CreativeTabs.tabCombat);
    }
    
    public int getItemEnchantability()
    {
    return material.getEnchantability();
    }
    
    static int[] getMaxDamageArray()
    {
    return maxDamageArray;
    }
    
    }


    EmeraldArmorMaterial.java
    package net.minecraft.src;
    
    import java.util.Random;
    
    public enum EmeraldArmorMaterial
    {
    EMERALD("EMERALD", 25, 29, new int[] {2, 7, 5, 3}, 10);
    private int maxDamageFactor;
    private int damageReductionAmountArray[];
    private int enchantability;
    
    
    private EmeraldArmorMaterial(String s, int i, int j, int ai[], int k)
    {
    maxDamageFactor = j;
    damageReductionAmountArray = ai;
    enchantability = k;
    }
    
    public int func_40576_a(int i)
    {
    return ItemArmor.getMaxDamageArray()[i] * maxDamageFactor;
    }
    public int getDamageReductionAmount(int i)
    {
    return damageReductionAmountArray[i];
    }
    
    public int getEnchantability()
    {
    return enchantability;
    }
    
    
    }

    If you have any idea how to help in any of these problems, please don't hesitate to comment.
    Posted in: Modification Development
  • 0

    posted a message on Minecraft Mod Review - CRAFT DIAMONDS - I LOVE DIAMONDS !
    Mod Reviews don't go in the Modding section of the forums. There's a subforum that's dedicated to them here.
    Posted in: Reviews
  • 0

    posted a message on The Epic Structures Mod
    This is really cool! But, do you think you could change the bedrock mazes? Bedrock is quite unsightly. Perhaps a type of grey-obsidian would look pretty good. Maybe...


    PS: Mountains are awesome :D
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.2] Pixel Blocks v1.0
    Looks cool! I can make tons of new stuff with this. Except, the blocks have the grass texture, and sorta look a bit weird. Do you think it'd be possible to change the texture to a wool-type one? Or even a brand new texture... :o Otherwise, very cool!
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.2] Emeralds Plus
    Quote from GalactaKnight

    Please, PLEASE fix the 2 bugs that you mentioned on the original post... I'm using this mod now, and it's awesome but I want to use an Emerald Hoe and enchant my armor properly!

    Yeah, the bugs are really annoying. I'm having a bit of trouble with the Emerald Hoe, but I'm working enchanting.
    Quote from Pop3464

    Cool! The only problem I can see is that it seems to overpowered, all you need to do is steal some wheat from a wheat farm, Trade with the villagers, and bam! Greatest tool set. :P

    That's if you spawn near a village ;)
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.2] Emeralds Plus
    Quote from GODDZILLA24

    Increase the mining rate with the tools!

    Hmm, I suppose I could make them a touch faster. I might change them in the enchanting update ;D
    But, I don't want to overpower them too much.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.2] Emeralds Plus
    Quote from DragonHunter31

    I think I will check out your mod, it looks great!

    Thanks :D
    Posted in: Minecraft Mods
  • To post a comment, please or register a new account.