Download presentation
Presentation is loading. Please wait.
Published byHugo O’Neal’ Modified over 8 years ago
1
INTRODUCTION TO MINECRAFT FORGE CSCI 3130 SUMMER 2014
2
INSTALLING FORGE 1. Make sure JDK 7 (not 8) is installed 2. Download and install Minecraft from https://minecraft.net/downloadhttps://minecraft.net/download 3. Download Minecraft Forge from http://files.minecraftforge.net/http://files.minecraftforge.net/ Choose the (Src) option under “Recommended” 4. In the folder where Minecraft Forge is expanded, open the command line Run gradlew setupDecompWorkspace –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 https://github.com/dyule/CSCI3130GildedAge Many tutorials at http://www.minecraftforge.net/wiki/Tutorials/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
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.