1 / 7

Introduction to Minecraft Forge

Introduction to Minecraft Forge. CSCI 3130 Summer 2014. Installing Forge . Make sure JDK 7 (not 8) is installed Download and install Minecraft from https:// minecraft.net/download Download Minecraft Forge from http://files.minecraftforge.net /

reese
Download Presentation

Introduction to Minecraft Forge

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Minecraft Forge CSCI 3130 Summer 2014

  2. Installing Forge • Make sure JDK 7 (not 8) is installed • Download and install Minecraft from https://minecraft.net/download • Download Minecraft Forge from http://files.minecraftforge.net/ • Choose the (Src) option under “Recommended” • In the folder where Minecraft Forge is expanded, open the command line • Run gradlewsetupDecompWorkspace –refresh-dependencies • Run gradlew eclipse • Open Eclipse and select the eclipse folder as your workspace

  3. Using Eclipse with Forge • Source code for your mod is located in src/main/java • Minecraft’s (decompiled) source is located in ReferncedLibraries/forgeSrc • Run your mod be pressing the green arrow

  4. Creating a Mod • Forge will create an example mod for you. • Your main class must have the @Mod annotation • Your init, function must have the @Event Handler Annotation

  5. Creating a new Block • Create a new subclass of Block • Set its attributes • Register the block

  6. Setting the name of a block • In src/main/resources • Create a new package called assets.modid.lang • Create a new file for your language (en_US.lang) is default • Add tile.blockname.name=Whatever your name should be

  7. Going Further • All code from this tutorial is available at https://github.com/dyule/CSCI3130GildedAge • Many tutorials at http://www.minecraftforge.net/wiki/Tutorials/ • Warning: may be out of date • Use IDE and autocompletion to look for alterations to method names • Look at the source code of Minecraft to see how they do things • Sometimes variable names are obfuscated • Look at the source code of existing mods • Don’t just copy and paste though

More Related