You defeated all of the bosses. You have an enormous house. You've run out of things to do in Minecraft. At this point, you have three options. Start a new world, get mods, or quit Minecraft. This how-to isn't about how to create a new world or how to quit Minecraft. You already know how to do those.
This is about how to get Minecraft mods using the popular modloader The Minecraft Forge. Log in Social login does not work in incognito and private browsers. Please log in with your username or email to continue. No account yet? Create an account.
Edit this Article. We use cookies to make wikiHow great. By using our site, you agree to our cookie policy. Cookie Settings. Learn why people trust wikiHow. Download Article Explore this Article methods. Tips and Warnings. Related Articles. Author Info Last Updated: September 12, Method 1. Find the version of Minecraft you want to mod.
Do you want mods for a recent version or an old version? On this page click the download link for the OS you are on Mac or Windows.
Once you have the installer downloaded, open it up in your downloads folder and run the installer. Fully install the application and accepting any agreements along the way. Launch Eclipse. This directory needs to be outside of your project folder. You can also just use the default location Eclipse gives you. Go to the File menu of Eclipse near the top of the window. Click it, then click Import in the menu that appears. Select Launch Configurations and click Next.
In the next menu, checkmark the box next to ForgePractice or your folder name if you named it differently. It should show the runClient and runServer configurations selected. Click Finish.
Just one more edit before we can run Minecraft. Click the arrow next to the green Run button. Click on Run Configurations. You can also find this from the Run menu at the top of Eclipse. Then click Run. Your Minecraft should now launch from Eclipse. We are now ready to start Creating a Mod and learning Java! Once Eclipse is loaded up and opened, we are ready to start typing in java code.
On the left side of the window, open the project folder by clicking the arrow next to the name. Your project folder will likely be named with the same name you gave to the folder in Documents. This file contains our starting code.
It contains our mod ID and name. Make sure these are inside quotation marks because they are String variables. Open mcmod. Make sure these are inside quotation marks again as they are Strings that will be read by the code.
The next step is to create variables for our ToolMaterial and sword. Place these lines beneath the private static Logger logger line in ExampleMod. Variables are helpful in code because they act as boxes with names that store information inside of them we can use easily.
What we are doing here is we are creating to variables myToolMaterial and mySword. Once we have the variables created, we need to import the code files that define what a ToolMaterial and an Item do. We can do this by mousing over the red error lines underneath ToolMaterial and Item. In the dropdown list that appears, import the code shown. Now because we are making a customized sword in Minecraft, we need to define what the material is for the sword tool is we will be using.
This is where we define our custom tool material variable we created. Go into the preInit function shown and inside below the logger line, write out the myToolMaterial line shown. What that line does is it fills in our myToolMaterial variable with information on what the material does for tools we apply it on.
We will be applying this tool material to our sword. Change out the name to a String variable that is the material name. The harvest level indicates which minerals it can get resources from. If we applied this material to a pickaxe, this is where we would define if it can get diamonds from Diamond Ore.
The damage is how much damage it will do when you hit an entity with it. The enchantability is related to how easy it is to enchant. After this material line add in a definition for what our sword is.
This line defines the sword as a new class called CustomSword. We need to create this new class and we do that by mousing over the red error line and clicking. A new window will open up, keep these values at the default settings and just click Finish.
This will create a new Java code file CustomSword and automatically open it up for it. This is a Class which is code that defines what the CustomSword is and how it behaves. This lets us swing it and damage creatures as well as pick it up and drop it and any small interaction a sword will have in the code. Now what we need to do is add a constructor for our class. This defines how the sword is made.
Think of it as how blueprints are used when creating buildings. We are defining specific rules for how our sword will be created. Once the constructor is added in, change it to remove the Material reference in the parentheses and then fill in our ExampleMod.
The CreativeTab can be changed to the tab you want the sword to appear in. We need to create a new java class that we will use to register our sword into Minecraft. Go to the Package Explorer on the left side of Eclipse and right click on the com. This time we want to name it CommonProxy and then select Finish.
Now we want to go above the public class CommonProxy line and write the mod. This will let the class be run during the loading of Minecraft so it can register our sword into the game.
We need to import the code for mod just like how we imported Item and ToolMaterial earlier. Once that is imported, we need to create a new function that will run specific code to register the sword Item in Minecraft. Make sure to include the ExampleMod. Now we need to import the code that is missing from this Class. Just like before, we are importing code that already exists to help us with our register code. In order to test out our code, make sure you are clicked inside a code window and then go up to the green play button and press it only once.
Make sure you press the button that is just the green button and not the ones with little icons in the corner. After some time, you should see a window start opening Forge Minecraft. Once you have finished waiting, select Single Player at the main menu.
Next, select Create New World to start setting up a Creative mode game. Then change the game mode to Creative and change the name, then select Create New World. This will open the new world and take a bit of time to open the Minecraft world. Go to the Combat tab or whatever tab you picked when we set the Creative Tab in our code. Scroll to the bottom of the tab and make sure you have your sword. We will be updating the look and the name but if you put it in your inventory, you will have a sword that will function as we coded it to!
Exit out of the Minecraft window and open CommonProxy. Those playing on the Bedrock edition on consoles or through Windows can grab add-ons directly through the marketplace. There are add-ons that come free with a Realms Plus subscription , with all other packs costing real-world money via Minecraft Coins , which can be bought in the store directly. Keep in mind that some add-ons, like texture packs, can be applied directly to your existing Worlds or Realms, but some that change the nature of the game a lot will require you to make a new Realm or World.
World packs, like Aquatic Life, will require making a new World for that add-on. Java Edition users of Minecraft will need Java installed. A full list of Minecraaft Forge versions can be found here. Double-click the.
0コメント