- 551 views, 2 today
8
Bdogs' Tutorial on Modding Minecraft
1.8+ Tutorial
1.9(and higher) block and item registry has changed a tad from 1.8
1.8+ Tutorial
1.9(and higher) block and item registry has changed a tad from 1.8
This is not a tutorial for java beginners, only for people wanting to understand the Forge API. I will assume you already have Eclipse and JDK installed. In this tutorial I will put things in quotes, please do not include quotes when you are creating file names! I will be adding more to this tutorial, and if there is something I need to fix please comment below and don't forget to drop a diamond and subscribe! P.S if you need help with any problems please comment or message me your problem, I or the other people will help!
BEWARE! I like using quotes and parenthesis a lot!
Let's start with a simple question, what is a mod?
-Mods in minecraft are additions to the game made by players
Part 1: Setting up workspace
Part 1: Setting up workspace
Step 1: Controlpanel -> System and Security -> System -> Advanced system settings -> Environmental Variables
Step 2: You are supposed to search for a System variable called "Path" select this variable and press edit
Step 3: This next step you need to add a variable to the "Path" variable containing the pathway to JDK. To locate where your JDK was downloaded at open up File Explorer go to your Local Drive(C:), Program Files(NOT THE x86), Java, then click your JDK folder locate bin and copy the pathway. Head back to where your variables are for the environment variable "Path" press new and paste this path. Now that you are done you can press ok and close this window.
Step 4: Download forge at http://files.minecraftforge.net/ (Download the MDK file of forge)
Step 5: Create a folder for your mod, I recommend creating a folder for your minecraft mods, and make sub folders for each mod you make(Example, inside a folder called "Minecraft" located somewhere like your desktop contains a folder called "MyMod") After making the folder, extract the MDK forge files from the zip folder you downloaded into the "MyMod" folder
*IMPORTANT. In step 6 you will be creating batch files(2 to be exact) If you dont know how, create a new text document, open it up and press save as. Name the file something that ends in ".bat". Before saving go to file types and select all files. NOW you can save
Step 6: In this next part you will create 2 batch files in the "MyMod" folder. First batch file should be named "setup_ workspace.bat" and contains gradlew setupDecompWorkSpace. The next batch file should be named "setup_eclipse.bat" and contains gradlew eclipse.
setup_workspace.bat
gradlew setupDecompWorkSpace
setup_eclipse.bat
gradlew eclipse
Step 7: Run the setup_eclipse.bat and after the commandPrompt closes run the setup_workspace.bat
Step 8: After the commandPrompt closes after running setup workspace.bat you are now able to run eclipse. When opening Eclipse it should ask for you to select a workspace. Select browse and set your workspace to the Eclipse folder inside your "MyMod" folder. Now after pressing the ok button your workspace should now be setup
Step 9: Pat yourself on the back!
Part 2: Basic Main Class
Coming soon, just contains some information!
Now that you have your workspace setup you should see a project called "MDKExample". Inside this project there should be an example mod package, you can delete that package(or leave it, but I recommend just deleting it) and create a new package. An example name for the package is com.<username>.<modname> (REPLACE THINGS IN <> with your username and the modname DO NOT include the <>'s and DO NOT just write the package name as "com.<username>.<modname>"!)
Let's start out with the first line after your package. What is the @Mod you might be asking. Well the @Mod is the thing that determines what is the main class, and also it makes minecraft recognize your mod as a mod. inside the parenthesis contains 3 variables, name, modid, and version. set each one equal to whatever you want.
Now that you have your workspace setup you should see a project called "MDKExample". Inside this project there should be an example mod package, you can delete that package(or leave it, but I recommend just deleting it) and create a new package. An example name for the package is com.<username>.<modname> (REPLACE THINGS IN <> with your username and the modname DO NOT include the <>'s and DO NOT just write the package name as "com.<username>.<modname>"!)
What a basic mod class looks like
package com.burpingdog1.TutorialMod;
@Mod(name = "TutorialMod", modid = "tm", version = "1.0")
public class TutorialMod
{
@EventHandler
public void preInit(FMLPreInitializationEvent event){}
@EventHandler
public void init(FMLInitializationEvent event){}
@EventHandler
public void postInit(FMLPostInitializationEvent event){}
}
@Mod(name = "TutorialMod", modid = "tm", version = "1.0")
public class TutorialMod
{
@EventHandler
public void preInit(FMLPreInitializationEvent event){}
@EventHandler
public void init(FMLInitializationEvent event){}
@EventHandler
public void postInit(FMLPostInitializationEvent event){}
}
Let's start out with the first line after your package. What is the @Mod you might be asking. Well the @Mod is the thing that determines what is the main class, and also it makes minecraft recognize your mod as a mod. inside the parenthesis contains 3 variables, name, modid, and version. set each one equal to whatever you want.
Proxy Classes
Spoiler - click to reveal
Hidden content here!
Adding Blocks
Spoiler - click to reveal
Hidden content here!
Adding Items
Spoiler - click to reveal
Hidden content here!
Exporting your mod
Coming soon to stores near you, no seriously coming soon!
Welp, you soon realize this is a useless spoiler!
FAQ:
Frequently asked questions
Nothing so far
Don't forget to leave a diamond and subscribe for more!
Tags |
6 Update Logs
Update #6 : by Bdogs15 07/20/2016 11:27:17 amJul 20th, 2016
changes to text
LOAD MORE LOGS
tools/tracking
3679400
6
modding-minecraft-3679400
Create an account or sign in to comment.