1. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    This is kind of like a guide, that will get you from 'Pfft me code?' to Mod maker :)

    I've come to realize though it's impossible to explain all of it in one thread, it'd be too scary and huge, and my hand would hurt from writing it.

    Therefore, here goes setting up eclipse tutorial and a few youtubers that will help you get in the right direction.


    -+- Setting up your Eclipse Workspace -+-
    1- Get a java coding platform, I personally recommend eclipse and I'm supposing you got eclipse on the rest of the steps.
    You can get eclipse here , choose either Windows or Mac and 16bit or 32bit depending on your situation and download it.


    2- Visit this and download the src (source) zip for the correct minecraft version

    3- Extract the forge src zip into a folder

    4-
    For windows, click the file install.cmd to start the installation process
    For mac, search on spotlight for a program called 'terminal', run it, and do the following:
    > Write 'cd ' with a space after cd!, then drag the forge source folder in the terminal window
    > Run that command.
    > Write 'sh ' with a space after sh!, then drag the install.sh file in the terminal window
    > Run that command.


    5- Wait for the installation process to finish, don't close the terminal window until you see "Minecraft Forge Setup finished" , then you can close it, it may take about 30 minutes for it to finish.

    6- Run the eclipse application/program , and it'll ask you to set a workspace, set the directory to /YOURFORGEFOLDER/mcp/eclipse or something similar, but must connect to the eclipse folder as a workspace.

    7- Eclipse is now open, a few errors may show up, just ignore them. If you see a Java project on your left sidebar called 'Minecraft' it means everything is working till now.


    Too hard? Fancy video tut by Shaqaruden

    -+- Starting to Code -+-
    Creating a package and Classes, and the first code lines
    .class files is where your code is stored.
    packages are basically folders, grouping your classes.
    1- Open up the 'Minecraft' Java Project, then open the src package, inside source you want to create 1 package for your mod (you can make various packages for 1 mod but let's keep it simple for now), right click src package and Create > package , name your package something like 'yourmodname' , for now I'll mention the package as 'guide'
    2- Right Click your just created package, guide and Crate > package, I recommend calling this class Main, due it's to your liking, could be Core or whatever you want it to be. I'll reffer it as Main.
    3- The first lines of code will auto generate, as if:
    [will be imupted soon]

    Now, you want to declare that you're coding a mod, and IMPORT code from another classes to use in your main mod class. The result would be:
    [will be inputed soon]

    This thread is no longer being written due to the author's absence.
     
    #1
    Last edited: Dec 15, 2014
    • Like Like x 46
    • Useful Useful x 10
    • Hype Train Hype Train x 3
    • Agree Agree x 2
  2. TracyAdams

    TracyAdams Active Member

    Messages:
    200
    Good luck kind sir. You will need it. You may want to do some hand exercises to finish typing this thread... :)
     
    #2
    • Like Like x 3
    • Funny Funny x 1
  3. Perry

    Perry Well-Known Member

    Messages:
    912
    I have no idea how to code but kool!
     
    #3
    • Like Like x 2
  4. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    But but... Im teaching you in this thread :(
     
    #4
    • Like Like x 3
    • Funny Funny x 3
  5. Hutchmaster99

    Hutchmaster99 Well-Known Member

    Messages:
    1,577
    I think the whole "Declaring the mod" thing is useless. I've modded back in like 1.5 and I never had to do this :p
     
    #5
    • Like Like x 1
  6. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    Code:
    @Mod(modid = main.modID, name = "Your Mod Name", version = "1.0")
    this here is required for the mod to work, at least now. idk if it was different in 1.5
     
    #6
    • Like Like x 1
  7. Hutchmaster99

    Hutchmaster99 Well-Known Member

    Messages:
    1,577
    Also, if you are beginning USE MODLOADER (by risugami)! Modloader is easy, and will get you started. Once you have done modloader for a while, then you should start on Forge.

    BTW, wiremc, you don't have to import all that stuff. It's pretty much dead code :p
     
    #7
  8. Hutchmaster99

    Hutchmaster99 Well-Known Member

    Messages:
    1,577
    Maybe it's because it was from Forge? It's probably to stop conflicts with mods.
     
    #8
  9. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    Thank you, as I said im not finished on the thread, that 'dead code' is going to be used later on. I though I could tell them to import it all now.

    Modloader is crap in my opinion and a lot of people use forge so I'd rather do a guide in forge
     
    #9
  10. Hutchmaster99

    Hutchmaster99 Well-Known Member

    Messages:
    1,577
    Maybe I shall make a tutorial on how to make plugins? =3
     
    #10
  11. Hutchmaster99

    Hutchmaster99 Well-Known Member

    Messages:
    1,577
    It's crap because it's for beginners. Forge is too advanced for beginners, especially if you are new to Java!
     
    #11
    • Like Like x 1
  12. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    i dont think theres a forum dedicated for plugins i guess try off topic if u want to
     
    #12
  13. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    I was new to java and forge and I got it all in a matter of a few days, now I can code easily the complicated stuff, now please stop bumping this thread
     
    #13
    • Like Like x 2
  14. Jacob Budden

    Jacob Budden Well-Known Member

    Jcob
    MVP
    Messages:
    972
    Dedicated guide wire, well done :)
     
    #14
  15. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    not even close to done :p

    if you look at imports you can see all I'll cover, creative tabs, biomes, tools... maybe even dimensions
     
    #15
  16. Hutchmaster99

    Hutchmaster99 Well-Known Member

    Messages:
    1,577
    Okay then. This will be my last "bump" (Even though I'm not bumping it, I'm actually putting up a conversation).
    Modloader is a light, and easy way to code. It's a good way to ease people into coding, which is best if you're totally new to it.
    Besides, modloader has all that is necessary for your mod. Forge is for huge mods, which new coders will probably not be able to achieve.
    Also, it's nice that you just jumped into Java and started doing complicated stuff, but not everyone can do that. It's best to teach the easiest way, that way even the slowest of learns can learn, and the more advanced can skip through.
    Thank you, I'm going to leave now. Good luck with the tutorials :)
     
    #16
  17. CodCollectorsKid

    CodCollectorsKid Active Member

    Messages:
    771
    I was just about to get into this so thanks for the post gonna be very helpful!
     
    #17
  18. wiremc

    wiremc Well-Known Member

    Messages:
    2,210
    glad I can help, I'd recommend bookmarking this because I'm going to cover the basic stuff, but a lot of basic stuff and it'll take a while to cover all of it
     
    #18
    • Like Like x 1
  19. HjakaHD

    HjakaHD Well-Known Member

    Messages:
    1,001
    You get a [​IMG] sticker for all your hard work!
     
    #19
  20. Valky

    Valky Well-Known Member

    Valkyrion_
    MVP+
    Messages:
    571
    The cmd installation says that I need to get Java JDK, where can I get that?
     
    #20

Share This Page