• 0

    posted a message on StrongJoshua's Hunger Games Survival Let's Plays
    Added an episode!!!
    Posted in: Let's Plays
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from webik150

    Oh lol... After hour of searching trough the code, I found out that I used same ID for two items... Solved. :D


    Haha it happens :P I think forge even says it, in the terminal, when you run the game through eclipse that there are conflicting IDs, you just have to be lucky and manage to see it when it flies through :3
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from webik150

    Hey! It's nice to see you here again StrongJoshua. I've was making one mod with using your tutorials back in 1.3.2 (Or was it ever earlier?...) and now I think its time to start again. Your tutorials always helped me so thanks for them and please continue. Only bug I got is with the creative tab... Not sure why, but it doesn't show all of my items. I have
    this.setCreativeTab(Collectables.tabCollect)
    in every item class, but somewhy one of them doesn't show. I will try recompiling again, but any help would be appreciated.

    If the "re-recompile" does not end up working then please post your code here and I'll try to find the error :)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from Toffie_of_Truth

    Replace this
    import javax.swing.text.html.parser.Entity;

    with this
    import net.minecraft.entity.Entity;


    Thank you, Toffie. Had I not had to fix my internet I would have given him that same answer ^_^ I'll make sure to put that as a note to watch out for in the OP!
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from MillersMods

    Ohh the "/" was there I just accidentaly didn't copy it into my previous post. But I still have an error at the method header which says: remove annitation Override or create a "getArmorTexture()" in one of the superclasses (however my method header looks like: "public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer)" ) :/
    I don't understand the problem at all, because, there is a getArmorTexture(...) in the super type (Item) but it just can't override it.
    Do you have any ideas?


    Does it extend ItemArmor correctly? If it does and you still have a problem then post the code here, it should make it a lot easier to fix :)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from MillersMods

    Hello Josh!
    I'm using 1.5.2 Forge and Forge Modloader and my problem is that I can't override "public String getArmorTexture()" because there's no so such method in any of the super classes:(( The error it says is that it can't find the armor texture files in the vanilla armor folder, however I my return values are direct paths like "mods/millersmods/armor/mageset1_1.png"

    Could you give some suggestions please?:)

    You missed the part that was really important about that part :P I think I'll bold it so no one else will miss it. You need the first / before mods otherwise it can't find the textures.
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on StrongJoshua's Hunger Games Survival Let's Plays
    Quote from Niels074

    Best of luck with your series matey :) Hope it will catch on :D

    Thanks :) I plan to post many of these so I hope it does!
    Posted in: Let's Plays
  • 0

    posted a message on StrongJoshua's Hunger Games Survival Let's Plays
    Hey guys :) So here I'm going to be posting my hunger games survival videos for whoever wants to enjoy them. Note that these do not need to be viewed in order, they are just in the order I uploaded them in!

    Episode 1:
    Episode 2:
    Posted in: Let's Plays
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from Th3DrunkenMafia

    How about a video tutorial about GUI's: www.minecraftforge.net/wiki/Containers_and_GUIs

    I'm sure it will help allot of people out.

    That's a good idea! Once I learn it I'll make one, maybe even tomorrow ;)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    I'm taking video tutorial requests for existing tutorials if you want them :)
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    Quote from Bendonnelly1

    Holy ­ you're back Josh! You taught me ­ loads! Check out what Ive made since(click the link in the banner)

    Haha yep :) And I hope to stay at least throughout the summer.
    I've seen that mod and I have to say, it looks amazing! And to think, I helped its lead coder in his modding career :D
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [WIP] Snake Mod
    *Updated OP*

    I'm hoping to start and maybe finish work on the mob tomorrow :)
    Posted in: WIP Mods
  • 1

    posted a message on [FORGE][1.5.2] StrongJoshua's Intermediate-Advanced Tutorials (5/26/13) ***New Tut: Custom Creative Tab***
    StrongJoshua's Intermediate Tutorials


    Hey guys :) So I had a little tutorial topic back in the day that was sort of popular, but that was a long time ago. Now the APIs have changed, Minecraft has been updated tons, and I'm trying to get back into modding. So I've decided to start a new tutorial topic on some of the harder stuff (the basics have been covered multiple times) that I learn while working on my mod.

    Taking video tutorial requests on existing tutorials!

    I will do my best to keep these tutorials up to date for as long as I can

    When posting errors make sure to use code tags [ code][ /code] (without the spaces) and post the class code that the error pertains you while also either bolding or explicitly stating which line the error refers to, because sometimes the width of this forum is not great enough to correctly display the lines.

    Tutorial List
    Custom Armor
    Custom Creative Tab

    Custom Armor
    For this tutorial I assume you already have your base mod class set up.

    All existing vanilla textures can be found under YOURFORGEFOLDER\mcp\temp\bin\minecraft\armor and \textures

    Ok, so we're going to learn how to create custom armor. To start, make sure you have these texture directories set up: one under
    YOURFORGEFOLDER\mcp\src\minecraft\mods\YOURMOD\textures\items
    and the other also under textures but named "armor" (without the quotes). The inventory icons will go into the items folder while the on-character images go into armor.
    Now onto the coding. Let's start with your base mod class. First you need to create a material for these items. You create an armor material like this:
    public static EnumArmorMaterial tutArmor = EnumHelper.addArmorMaterial("TutArmor", 15, new int [] {2, 5, 4, 3}, 10);

    Let's break this down. "TUTArmor" is self-explanatory, it's the armor name, but I'm not even sure where it's used or why it's needed. 15 is the endurance of the armor, I'm not sure how it's counted, but you can reference the other materials in the EnumArmorMaterial class. For convenience I have included them here:
     CLOTH(5, new int[]{1, 3, 2, 1}, 15),//this is leather
    CHAIN(15, new int[]{2, 5, 4, 1}, 12),
    IRON(15, new int[]{2, 6, 5, 2}, 9),
    GOLD(7, new int[]{2, 5, 3, 1}, 25),
    DIAMOND(33, new int[]{3, 8, 6, 3}, 10);

    This also brings us to the integer array and the number 10. The array says how many shields are filled by each piece of armor (they are counted in half shields). The 10 is the enchantability, which is also quite self-explanatory, just reference the other materials. Now underneath that declare and initialize the armor items like this:
     public static Item tutHelm = new TutorialArmor(5000, tutArmor, 0, 0).setCreativeTab(CreativeTabs.tabCombat)
    .setUnlocalizedName("tutHelm");
    public static Item tutPlate = new TutorialArmor(5002, tutArmor, 0, 1).setCreativeTab(CreativeTabs.tabCombat)
    .setUnlocalizedName("tutPlate");
    public static Item tutLegs = new TutorialArmor(5003, tutArmor, 0, 2).setCreativeTab(CreativeTabs.tabCombat)
    .setUnlocalizedName("tutLegs");
    public static Item tutBoots = new TutorialArmor(5004, tutArmor, 0, 3).setCreativeTab(CreativeTabs.tabCombat)
    .setUnlocalizedName("tutBoots");

    If you have created an item already this shouldn't be too new. By the way, you will get an error because we haven't created the armor class yet, but we'll get to that. The first number in each initialization is the id, I'm assuming you already know how that works if you're this far into making a mod. The second parameter is the armor material, in here you put your armor material name. The second number is for the render prefix for the player. Some tutorials I followed had you add stuff to the proxy classes, but that didn't work for me nor do I think it was necessary, so I found an easier and better method to make the player render correctly. So, until I either figure why you might need to mess with the proxies for this or one of you do, leave this at 0. The third number is says what type of armor piece it is, 0 is the helmet, 1 the plate, etc. They are all shown in the code. The creative tab for these kind of items is the combat tab, but you can omit this part if you don't want/don't need people to access it easily in creative mode. For your own creative tab for your own mod I will make a tutorial later :) Setting the unlocalized name is probably for the textures, but since we override that later anyways I don't think it's too important, but you should probably leave it to be safe.
    Now, you should know how to add the in-game names and crafting recipes, but if you don't I'll post them here. These go in the load method (I used sticks for the crafting because it was not necessary to create a new item for these demonstration purposes, just replace sticks with your item):
     LanguageRegistry.addName(tutHelm, "Tutorial Helmet");
    LanguageRegistry.addName(tutPlate, "Tutorial Chest Plate");
    LanguageRegistry.addName(tutLegs, "Tutorial Leggings");
    LanguageRegistry.addName(tutBoots, "Tutorial Boots");
    GameRegistry.addRecipe(new ItemStack(tutHelm), "xxx", "x x",
    Character.valueOf('x'), Item.stick);
    GameRegistry.addRecipe(new ItemStack(tutPlate), "x x", "xxx", "xxx",
    Character.valueOf('x'), Item.stick);
    GameRegistry.addRecipe(new ItemStack(tutLegs), "xxx", "x x", "x x",
    Character.valueOf('x'), Item.stick);
    GameRegistry.addRecipe(new ItemStack(tutBoots), "x x", "x x",
    Character.valueOf('x'), Item.stick);

    Let's get onto the armor class. It has to extend ItemArmor and once you have finished inheriting the constructor add this method for the inventory icons:
     public void registerIcons(IconRegister iRegister)
    {
    if(this.armorType == 0)
    itemIcon = iRegister.registerIcon("SJTut:TutHelm");
    else if(this.armorType == 1)
    itemIcon = iRegister.registerIcon("SJTut:TutPlate");
    else if(this.armorType == 2)
    itemIcon = iRegister.registerIcon("SJTut:TutLegs");
    else if(this.armorType == 3)
    itemIcon = iRegister.registerIcon("SJTut:TutBoots");
    }

    This is a lot simpler than it may look. The if statement checks what type of armor piece it is, to display the correct icon. The four strings you see state the location of the textures. The part before the colon is the folder under "mods" that I told you to create in the beginning. The part after the colon is the file name of the icon (without the .png). Now onto the perhaps more confusing looking player model textures for the armor. You have to have the method getArmorTexture override the method of the same name in Item. The finished method would look like this (with your mod items and images in place of mine):
     @Override
    public String getArmorTexture(ItemStack armor, Entity entity, int slot, int layer)
    {
    if(slot == 0 || slot == 1 || slot == 3)
    return "/mods/SJTut/textures/armor/TutArmor_1.png";
    else if(slot == 2)
    return "/mods/SJTut/textures/armor/TutArmor_2.png";
    else
    return null;
    }

    Once again, you have an if statement to check the armor pieces. Note that the helmet, chest plate and boots are in first file, while the leggings are in the second one. Reference the existing armor images to create your own. Do not forget the first forward slash otherwise you'll have made the same mistake I made at first and be really confused as to why you were getting an error :P

    Now you should be set! I hope this tutorial helped you further your mod and better understand the code you are developing :)

    Custom Creative Tab

    This is a lot easier than you might think. All you have to do is add this code to your mod class, replacing "Tut" to whatever you want:
     public static CreativeTabs tabTut = new CreativeTabs("tabTut")
    {
    public ItemStack getIconItemStack()
    {
    return new ItemStack(Item.stick, 1, 0);
    }
    };

    The stick, but once again you can change that to whatever you want, is used to display the tab (like the combat tab has a sword). Now when you use
    .setCreativeTab()

    you can just plug in your tab name like this:
    .setCreativeTab(tabTut);

    However, when you try this code you'll get a weird name when hovering over the tab. To correct this add this code to where all your other name registrations are:
    LanguageRegistry.instance().addStringLocalization("itemGroup.tabTut", "en_US", "Tutorial Mod");

    After "itemGroup." comes whatever you put as the string for the name in the initializer of the tab. Then the last string is what you want to be displayed as the name.
    That should be it :) Hope it helps!


    Common Errors
    • Can't find the texture. Fix: Make sure you have the path perfectly correctly entered with a / preceding all of it.
    • Can't override a method. Fix: Either make sure you have correctly spelled the name and have all the same parameters as the super method and/or check to make sure you imported the correct classes from the Minecraft packages and nowhere else.
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [FIXED]Why won't techne install?[FIXED]
    I have this same problem and Techne is a modeler for minecraft.
    Posted in: Modification Development
  • To post a comment, please .