Sie sind auf Seite 1von 7

Minecraft Phase-1

University of Puerto Rico, Mayagüez Campus


Department of Computer Science and Engineering

CIIC 4010 / ICOM 4015 Advanced Programming

Programming Assignment 3.1

Minecraft- Phase 1

Fall 2018

Due Date: Wednesday, November 7, 2018 at 11:59PM

Game By: Mojang / Specs design by: Josian A. Velez Ramos


Minecraft Phase-1

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.

Note1: The Minecraft version to be used is the latest at the moment of


the release of these instructions (as of the moment it's 1.12.2)

Pro Tip: Play the game before working on it!

Game By: Mojang / Specs design by: Josian A. Velez Ramos


Minecraft Phase-1

Check Correct Java Version

Before setting up the project it is important to check the default java


version on the computer. All students must have java 1.8 installed.
Start by checking the following folders:

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:

Mac/Windows: ​Java SE Development Kit 8 - Downloads (jdk1.8.0_191 is the last available


version on the release of this document)

In Ubuntu, open a terminal and type:

sudo apt-get update


sudo apt-get install openjdk-8-jdk

Game By: Mojang / Specs design by: Josian A. Velez Ramos


Minecraft Phase-1

Finally open your terminal (Ubuntu, Mac) or command prompt (Windows) and type:

Windows:

SET JAVA_HOME=”C:\Program Files\Java\<JDK>”


SET PATH=”C:\Program Files\Java\<JDK>\bin”;%PATH%
*Change <JDK> to the folder name that contains jdk1.8.0.
Mac:

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!

Project Setup Instructions

(Read all instructions first, and then follow them carefully)

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​,

Game By: Mojang / Specs design by: Josian A. Velez Ramos


Minecraft Phase-1

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.

Here is the link to GitHub Classroom:

https://classroom.github.com/g/LzSzXPJm

Phase I Minimal Requirements

Your application must comply with the following ​minimal​ requirements:

• ​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

Game By: Mojang / Specs design by: Josian A. Velez Ramos


Minecraft Phase-1

folder (​cd ProjectFolderPath​). Your project path should be similar to


<HOME_DIR_PATH>/git/minecraft-<TeamName>​.
o Step 4: Run the g​ radlew setupDecompWorkspace command. To run the set-up
commands on Mac/Ubuntu you must type​ “./”​ before the command names.
o Step 5: Run the g​ radlew eclipse command in the same terminal window. Remember
to prepend the command with “./” in MacOS and Ubuntu.
o Instead of Step 6, go to Eclipse and verify that your Project Explorer panel looks
similar to the following:

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’

Game By: Mojang / Specs design by: Josian A. Velez Ramos


Minecraft Phase-1

folder) in order to be able to upload properly to GitHub. We recommend this step is


done with the pair programming approach to minimize git conflicts.
o Rename the Eclipse project to have the same name as the GitHub team repo. If your
team name is ​Foo​, the your repo name should be ​minecraft-foo​. Right-click on
the project and select Refactor -> Rename and type ​minecraft-foo as the new
project name.

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.

● Implement New Features

o ​There will be two additions to the game in this phase:


● One team member must implement a new original Item, and another one
has to implement a new original Block.
● Both the Item and the Block must be properly textured and should be
accessible/visible the the game is launched.
● The commits for the Block and the Item have to be done from the github
accounts of each team member to make sure that both team members
properly set up their environment.

● 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?

Game By: Mojang / Specs design by: Josian A. Velez Ramos

Das könnte Ihnen auch gefallen