Beruflich Dokumente
Kultur Dokumente
Minecraft- Phase 1
Fall 2018
Introduction
Minecraft (PC edition, or as known in the community Java Edition) is an open source,
3D, open world, sandbox, game. This game does most of the rendering and computations on
your GPU which means that even if your computer isn’t the greatest, if it has more than 1GB of
RAM and a graphics Card, you’ll be able to run it easily.
Since the game is open source, its community of gamers and coders started adding their
own features to the game and posting these addons online for others to use. These addons are
known as mods and the act of creating them is known as modding. As the amount of independent
developers making new mods grew, more sophisticated applications and kits came were created
to facilitate their integration to the basic game. The most famous one is called Forge. There
exist another one called Buckit but it uses a different concept than modding. Forge has grown to
become the universal way to create and integrate mods to MineCraft. It provides a simple folder
structure plus some basic examples allowing you to almost set up your entire workspace that
with just 3 lines of command. It’s an extremely powerful tool that not only lets you create mods,
but also lets you extend existing for bigger and better connectivity among mods.
Forge has become such a big phenomenon that if you mix many different mods from different
creators, they all communicate flawlessly with each other, which was an unimaginable task 3-4
years ago. The hub for all MineCraft mods is a web application called Twitch, previously known
as Curse Launcher. Using Twitch you can create Minecraft instances including any combination
of mods you want, and most, if not all of the available mods can be found in Twitch. Anyone can
create a mod and upload it to Twitch for revision. If Twitch finds no malware, your mod will be
published for everyone to download and use.
The modding community has become so big that Mojang, the creators of Minecraft,
acknowledges them and goes as far as hiring top creators, to the point that a significant portion of
their current staff were modders before. As much as 1/6 of the most recent additions to the main
game have come from, or have being inspired by some popular mod, after giving their authors
proper recognition.
Windows:
C:\Program Files\Java or C:\Program Files (x86)\Java
Mac:
/Library/Java/JavaVirtualMachines
Ubuntu:
/usr/lib/jvm
If you see a folder containing 1.8 in its name inside the above folder, then you have a Java 1.8
version on your computer. If you don’t have one, download and install the latest Java 8 JDK:
Finally open your terminal (Ubuntu, Mac) or command prompt (Windows) and type:
Windows:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/<JDK>/Contents/Home
*Change <JDK> to the folder name that contains jdk1.8.0.
Ubuntu:
sudo update-alternatives --config java (Select java-8)
sudo update-alternatives --config javac (Select java-8)
DO NOT CLOSE THE TERMINAL or COMMAND PROMPT YET!
This project will be worked in teams of two. Your partner must be different than for previous
programming assignments. If you have difficulty finding a partner, please notify it to a TA, the
Professor, or ask via Piazza immediately. NO INDIVIDUAL PROJECTS WILL BE
ACCEPTED.
The objective of this assignment is to create your modding instance and download/import all the
necessary files to your computer, in preparation to make simple additions to the Minecraft game.
You should start by studying the forge developers documentation at:
https://mcforge.readthedocs.io/en/latest/gettingstarted/
also, you should study Minecraft game concepts at the following WIKI:
https://minecraft.gamepedia.com/Minecraft_Wiki,
Study these pages and the base code (once imported) to learn how to efficiently modify the
project to add new items and blocks. You must complete a minimal set of tasks reusing as much
of the code as possible, minimizing code redundancy. You’ll have to create new items and
blocks for the game from your original ideas, different from other teams.
In this project we will be using GitHub Classroom, meaning that the teams’ repositories will
come from there (Personal repositories for the projects will not be allowed). As for programming
assignment 1 and 2, one member of the team creates the team repo in GitHub classroom and the
second member joins it. Please decide on a partner before creating a team repository. The
GitHub repository and your project management must follow the best practices learned in the Git
& GitHub lab, such as using branches for every feature.
https://classroom.github.com/g/LzSzXPJm
• Set Up:
o First, one of the team members will create the team repo on GitHub Classroom, then
both would need to import this repo into each of their Eclipse projects. If Eclipse
throws an error do not worry for now.
o Right-click on the imported project and click on Show In -> System Explorer. A File
Explorer / Finder Window will open showing the location of the project. Double-click
into the folder. Leave this window open. You will use it three steps down.
o Go to Home -Forge Documentation, and begin at Step 1 by downloading the
recommended (MDK File type) package by clicking on the forge’s files site link.
o Complete Step 2. Extract the downloaded files into an empty folder.
o In Step 3, instead of moving files into an empty folder when the documentation says
“Move the files listed above to a new folder”, you should move these files into the
Eclipse project folder created when you imported the classroom repo. The Eclipse
project folder is the one you left opened in a window in the second bullet of this
section. Drag and drop the files indicated in Step 3 to the Eclipse project folder:
o build.gradle
o gradlew.bat
o gradlew
o the gradle folder
o In Step 4, when prompted to open a command prompt (or terminal in Mac.Ubuntu)
window at that new folder, instead go to the terminal that you left opened in the
previous section “Check Correct Java Version” and change directory to the project
o We strongly advise following the recommended project structure for your folders and
set up. It will not only facilitate phase 2 for you but will also facilitate grading. To set
up the java folder and the resource folders do the following in Eclipse:
o Right-click on the project folder and click on New > Folder and type src o n
the space provided.
▪ This may automatically set the new src folder as part of the build path.
To remove it from the build path right-click on the src folder and click
Build Path > Remove from Build Path.
o Right-click on the src folder and click on New > Folder and type main on the
space provided.
o Right-click on the main f older and click on New > Folder and type java on the
space provided.
o Right-click on the main f older and click on New > Folder and type resources
on the space provided.
o Right-click on the java folder and click on Build Path > Use as Source Folder.
o Right-click on the resources f older and click on Build Path > Use as Source
Folder.
o Add a package by right-clicking src/main/java and click into New > Package and
type the name of your mod. Create a dummy class (in the
‘src/main/java/YourModName’ folder) and dummy file (in the ‘src/main/resources’
o To run the game with the mods from Eclipse find the
minecraft-foo_Client.launch file in the project directory, right-click on it and
select Run As -> minecraft-foo_Client. This should launch your Minecraft game.
● Written Report
o Each team members must submit an online evaluation with the following questions:
● What were the steps taken to set up everything?
● What problems did you confront?
● How did you solve these problems?
● What was challenging about this phase?
● What did you learn?