• 1

    posted a message on [1.4.7] Minecraft Modding With Forge - ScratchForFun - EnumToolMaterial!
    Hey guys! I am ScratchForFun, and I do modding with forge in minecraft!
    All mods i am creating is working for 1.4.7! and contains video tutorial!

    Uploading Modding Tutorials every single day!


    Hit up my channel at http://youtube.com/ScratchForFun!



    Today we create an 'EnumToolMaterial' for 1.4.7!

    Main mod class
    A EnumToolMaterial can be incredible handy. EnumToolMaterial is used for tools, it holds the information on how fast the tool mines, how hard it hits, and so on.

    To make our custom EnumToolMaterial we only need a little bit of code.
    This code is a nasty bit to understand at first for some people.

    To make a EnumToolMaterial Forge has created a class called EnumHelper, and EnumHelper got a method called 'addToolMaterial'.
    public static EnumToolMaterial coalToolMaterial = EnumHelper.addToolMaterial("COAL", 4, 2500, 20.0F, 5, 100);

    Now, this method needs 6 arguments.

    The firstone being a String. This String is the name of the EnumToolMaterial.


    The second is a int of the harvest level. This is the level of material this tool can harvest.
    Obsidian is a block only diamond can break. diamond is set to 3 at harvest level.

    If you have harvest level at 3 i can harvest all kinds of stuff, everything in normal minecraft.


    The third being the max uses this tool has.


    The forth is efficiencyOnProperMaterial, this is a float, and this tells the strength of this tool agains blocks that it is effective against.

    Like pickaxe on stone or shovel on dirt.
    Diamond at 8.0F here, and Gold at 12.0F


    The fifth is the damageVsEntity, this tells how hard this tool is on another entity/mob


    And the last is the enchantability. every enchantment has its max enchantability. if this argument is over that it will not be able to enchant that spesific enchantment. in other word, the higher, the better enchantments on this tool


    The ingame EnumToolMaterials for you to compare
    ("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); //Diamond
    ("GOLD", 0, 32, 12.0F, 0, 22);




    Hope this helped you!
    Be sure to subscribe and follow my main post!


    Everything I have done is at my youtube channel!



    Have any ideas? Please feel free to comment at any of my videos or in my main post! You can also email me at: [email protected]
    Posted in: Tutorials
  • 2

    posted a message on [1.4.7] Minecraft Modding With Forge - ScratchForFun
    Hey guys! I am ScratchForFun, and I do modding with forge in minecraft!
    All mods i am creating is working for 1.4.7! and contains video tutorial or text tutorial!

    Uploading Modding Tutorials every single day!


    Hit up my channel at http://youtube.com/ScratchForFun!




    Forge Tutorials:
    - Achievement + AchievementPage []
    - Settup []
    - Creative Tabs []
    - Blocks []
    - Texture []
    - Materials []
    - Items []
    - Crafting and Smelting Recipes []
    - Custom Furnace []
    - Custom TNT []

    - CraftingHandler [] [Text]

    - Custom Liquids [Text]
    - EnumToolMaterial [Text]



    Workin' On:

    - Armor
    - Basic Power System (#Ginjo)
    - Biomes Advanced
    - Biomes Simple
    - Bow Ammo / Arrows
    - Bows
    - Custom Crafting Table
    - Dimensions
    - Exporting mods
    - Enchantment
    - LandMines (Explosive version!)
    - Liquid Storage (Like Block #Brendan321)
    - Liquid Storage (Like Bucket #Brendan321)
    - Mobs
    - Multi-Block (Like wire #Ginjo)
    - Multi-Block Structures (#Brendan321)
    - Own Explosion
    - Plants (Like Sugarcane and Crops #TheKodyShaw)
    - Portals
    - Structues
    - Tools
    - Weapons/Guns/Grenades


    Have any ideas? Please feel free to comment at any of my videos or in this post! You can also email me at: [email protected]
    Posted in: Tutorials
  • To post a comment, please .