Tag Archive for: Minecraft

Creating an Automatic Door for your Team in Minecraft Java Edition 1.16.5

Create a door that opens automatically for your entire team in Minecraft 1.16.5 Java Edition. Watch full video here.

Previous video for creating the automatic door: https://youtu.be/ofk5A6WCplE

Command inside Command Block to activate redstone:

/execute if entity @p[distance=..7,team=TeamName]

Team Commands:

/team add TeamName
/team join TeamName

Creating an Automatic Door in Minecraft 1.16.4 Java Edition

Create a door that opens automatically for you in Minecraft 1.16.4 Java Edition. Watch full video here.

To get Command Block: /give @p command_block

Command inside Command Block to activate redstone: /execute if entity @p[distance=..7,name=MinecraftUsername]

Note: Change MinecraftUserName to your username. Also, capitalization is important so enter the commands the same as you read here.

minecraft

What is a “mod”?

Simply put, it’s a modification of the underlying code that runs the Minecraft game on your PC.  It allows developers to create new items, blocks, characters, etc. inside the Minecraft environment.  It is also perfectly legal and encouraged by Mojang (the game developers) in their licensing agreement:  “If you’ve bought the Game, you may play around with it and modify it.”

My Environment

Windows 10 64 bit; Minecraft 1.16.8 Java Edition  (Note: the latest version available for Minecraft Forge is 1.16.4)

Click here if you’d rather watch a full video of the installation..

There are four steps which I’ll describe in sections below:

  1. Install and set up Java
  2. Install Eclipse
  3. Install and configure Minecraft Forge
  4. Configure Eclipse environment

*It is assumed that you already have Minecraft 1.16.8 Java Edition installed on your PC.

(For modding Windows 8.1 64 bit; Minecraft 1.8.8)

Install and set up Java

Java is the programming language that we’ll use to make modifications to Minecraft.

AdoptOpenJDK makes it really easy to install JAVA without worrying about your environment variables on your Windows machine. Click on the link and choose ‘Open JDK 8’ and leave ‘HotSpot’ as the selected JVM:

JDK Screenshot

Click the Latest Release button and the executable file will be downloaded to your local machine. Open and run this file with all of the default settings.

Install Eclipse

Eclipse serves as the Development Environment for your Java code.  It provides built-in features that make programming much easier. Download Eclipse

I chose the Eclipse Installer package and chose the Windows x86_64 version. (Note: the installer will also install an updated version of Java which will cause errors with our Forge build. We will show you how to change that later)

Once that file has downloaded double-click on the file to run the Installer. When the installer loads, choose “Eclipse IDE for Java Developers” and click Install.

Install and configure Minecraft Forge

“Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.”  It helps us create mods better and faster.  I spent a lot of time finding the correct files to download so my time spent is time saved for you.  Here’s the download link.  Find the ‘Download Recommended’ area on the right and click on the ‘Mdk’ button.


Be careful, the next screen will display a “Download” button in the middle of the screen.  It’s actually an ad and will download adware to your computer.
 Wait 5 seconds and a ‘Skip’ button will be displayed at the top right. Click on the ‘Skip’ button. This will download the mdk as a .zip file.

Right-click on the .zip file in Windows Explorer and ‘Extract All…’. Choose a folder where the files will be extracted. Mine is C:\MinecraftModding.  A window will popup showing you the contents of the extracted folder:

 

 

Configure Eclipse Environment

Last step and you should be ready to go.  By default, Eclipse should have installed a shortcut on your desktop. Double-click this icon or do a search for ‘Eclipse’ in the windows search bar to open Eclipse.

Eclipse will ask you to select a workspace.  Leave this as the default or choose your own Workspace. Make sure that you do not choose the same folder as the Forge extract above. Click Launch.

eclipse setup

Click on the ‘x’ next to Welcome to close the initial tab.

 

From the top menu click File->Import. Choose ‘Gradle->Existing Gradle Project’

Click Next twice and you will be asked to choose the ‘Project Root Directory’. Choose the folder where we extracted all of the Forge files above. Mine was C:\MinecraftModding.

Click Finish. This will take a few moments.

By default my Project Explorer didn’t show up in Eclipse. Click on the small icon on the left side of the screen to view the contents of the Project:

We need to run a Gradle task to setup our Forge project. If you don’t see a Gradle Tasks tab on your screen click on the small magnifying class in the upper right hand corner and type ‘Gradle Tasks’ in the search box.

You should see a list of Gradle Tasks for the project. Choose fg_runs and genEclipseRuns:

Double-click this task. An output window will appear with run times.

*Note: I ran into an issue with the downloadAssets tasks that kept giving an error. I resolved this by temporarily disabling Windows Firewall. It was preventing some of the files from downloading properly.

Once those tasks have completed, click File->Import->Run/Debug->Launch Configurations from the top menu in Eclipse.

Click Next.

Next to From Directory, choose the “Browse…” button and choose your MinecraftModding folder. Make sure your project is checked on the left column and you should see three launch configurations on the right: runClient.launch, runData.launch, and runServer.launch.

Make sure all are selected and click Finish.

Now we need to setup our Run Configurations. Click on the small black down arrow next to the Run button at the top of the Eclipse environment and choose “Run Configurations”:

In the left column, choose Java Application and runClient.

Click on the Environment tab on the right and make sure MC_VERSION is listed as 1.16.4:

 

Click Run at the bottom.

Note: if you’ve followed the steps above directly, you will receive this error:

Exception in thread “main” [09:02:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting/NashornScriptEngineFactory

This is related to the latest version of Java being installed with Eclipse. We need to change that.

The easiest way to change that is to click on search magnifying glass in the top of Eclipse and type ‘Preferences->Open the Preferences Dialog’

In the left column choose Java->Compiler and change the Compiler compliance level: to 1.8.

Choose Apply at the bottom of the Compiler section.

A prompt will ask you to Rebuild with the new settings. Click No.

We also need to change the Installed JREs. Click Installed JREs in the left column. You should see a long path listed. This is the JRE installed with Eclipse. We need to add the AdoptOpenJDK 8 that we installed at the very beginning.

Click on the Add… button. Click Next.

From this screen we need to set the JRE home: to the folder for AdoptOpenJDK install folder from above. Mine was C:\Program Files\AdoptOpenJDK\jdk-8.0.275.1-hotspot

Click Finish.

Make sure the correct JRE is selected and click Apply and Close at the bottom.

Click on the Run button at the top of Eclipse to run your project again.

 

Your project will now build and Minecraft should launch. You will see some information about Forge down in the left-hand corner.

You’ve done it! Your Windows 10 environment is now setup to create Minecraft Mods in Forge for 1.16.4.

Minecraft Command Block Tutorial

***Video updated for Minecraft Java Edition 1.16.4 ****

Ryan and a student, Caleb, create an automatic door with command blocks in Minecraft. Watch full video with attribution.

Commands used:

/give @p command_block
/testfor @p[r=3,name=MinecraftUserName]

Note: Change MinecraftUserName to your username. Also, capitalization is important so enter the commands the same as you read here.

Disabling Command Block Messages

The following command is not mentioned in the video because it was already active on our server, but it will stop the command blocks from filling up your chat with messages. Changing false to true is a great way to debug what your command block is doing.

/gamerule commandBlockOutput false

minecraft

Indianapolis in Minecraft, Xbox One

When my son first started playing Minecraft, I was aware of only one method of doing so:  a paid app on his Kindle Fire.  Turns out, there are many versions and platforms for Minecraft.  Our students typically understand these much better than their parents, and we’ll typically hear things like “you didn’t get me the right version” or “this isn’t the right Minecraft.”

Parents:  this post is for you.  I’m going to try and simplify the best that I can the many versions and iterations of Minecraft.  And I’m going to try and do so without my son’s help.

So Many Minecrafts!

First off, you will have to pay for Minecraft — no matter which version or platform.  There is no free version of Minecraft.  Some apps have free versions but Minecraft isn’t one of them.

For consoles (Playstation 3/4, Xbox 360, Xbox One, Nintendo Wii U) you can simply purchase Minecraft for that platform at the store.  There are some other adventure-type versions of Minecraft for these platforms (Minecraft Story Mode), but they don’t allow the blank canvas of creativity found in traditional Minecraft.  And, as your kids would probably say, “that’s not the right version”.

For Chromebooks you’re mostly out of luck.  There aren’t any straightforward ways of playing Minecraft on a Chromebook.

For Android, iOS, and Kindle Fire devices buy the app from the Play Store, Apple Store, or Amazon Store.  As of 6/20/17, the app costs $6.99.  This version is technically called Minecraft PE (Pocket Edition).  It does have limitations versus the other versions of Minecraft but is a great place to start for most kids.

minecraft

If you have a Mac, you can go to minecraft.net and download/buy by clicking the Download button.  You will have to create an account with Mojang to manage your download.  The current price on this version is $26.95.  The download and install is fairly simple.  Since Mojang (the developer of Minecraft) is located in Sweden, you might have issues with credit card purchases online.  Or, you can elect to buy one of the Minecraft gift cards at Wal-Mart, Target, etc.  You’ll notice that they cost $26.95 and have a code that you can easily redeem on the site after creating your account.

Windows (especially Windows 10) is the trickiest.  You definitely want the Java version of Minecraft for Windows.  This is the version that allows your kids to create modifications using the Java programming language.  The Windows 10 app (non-Java version) is not quite as robust as the Java version.  And, as we found out at our last Minecraft party, the Windows 10 app doesn’t work when connecting to our servers.

Getting Started

Our recommendation for those starting out is to buy the app for a tablet or console.  This is simply because the controls are much easier to manage for younger kids.  Once they’ve mastered that version, download the Java version for PC or Mac.  Also, buy a mouse to make this one easier to use.  This version gives the most flexibility and allows them to modify Minecraft via programming the most.  (It’s also the version that we use in all of our classes & parties)

Hope this helps.  Feel free to reach out to us on the Contact Page if you have any questions.  Believe me; as parents, we’ve been there as well 🙂

Indianapolis in Minecraft, Xbox One

People have created many amazing things in Minecraft, but this is the first we’ve seen Indianapolis in Minecraft. Created on Xbox One. Color me impressed.

The daytime video was created and posted 6 months ago, but Eric Morrow just recently released a night time video for our viewing pleasure.

Local Roots

Being located in Muncie, only 45 minutes away, this is the first I’ve seen someone recreating something that I have personally visited or traveled. I love seeing the creativity of Minecraft users. And to see the time he spent building our state capitol is amazing. More impressive to me is he built this on Xbox One which is a decidedly different experience than PC.

Indianapolis in Minecraft by Day

Indianapolis in Minecraft by Night

Minecraft Mods

This was all completed by using the tools and settings provided by Xbox One’s version of Minecraft. There are no mods used here, but the opportunities for mods in this setting are endless!

minecraft

An update to this article for Windows 10 and Minecraft 1.16.4 is here.

We’re excited to offer a course teaching young people how to create Minecraft mods in November.  This class introduces high schoolers to Java and how to use it to modify the popular game.

This post serves as a guide to help get started and is a little longer than our normal posts.  I couldn’t find a single source of content so this is also a compilation of several sites that I used for research.

What is a “mod”?

Simply put, it’s a modification of the underlying code that runs the Minecraft game on your PC.  It allows developers to create new items, blocks, characters, etc. inside the Minecraft environment.  It is also perfectly legal and encouraged by Mojang (the game developers) in their licensing agreement:  “If you’ve bought the Game, you may play around with it and modify it.”

My Environment

Windows 8.1 64 bit; Minecraft 1.8.8

There are four steps which I’ll describe in sections below:

  1. Install and set up Java
  2. Install Eclipse
  3. Install and configure Minecraft Forge
  4. Configure Eclipse environment

Install and set up Java

Java is the programming language that we’ll use to make modifications to Minecraft.  This section is probably the trickiest if you’ve not used Java before.

Download the Java Development Kit (JDK).  Note that you need the development kit and not the Runtime Environment (JRE).  This will give you what you need to not only run Java programs but to also be able to compile Java code on your machine.  You also need to make sure you select the correct version for your computer.

Click on the downloaded .exe file and your new code should be installed somewhere similar to: C:\Program Files\Java\jdk1.7.0_79

You’ll now need to setup your system’s environment variables.  On Windows (in your Metro interface, not desktop mode), click on the Search bar and type ‘Edit the System’ and the following will appear:

edit the system environment variables

Click on the ‘Edit the system environment variables’ link.  This window will pop up and you should click the ‘Environment Variables…’ button at the bottom.

system properties

There are two settings that you need to update/edit.

First, JAVA_HOME.  It’s Value should match the install folder that was created above when you clicked the java .exe.
edit the JAVA_HOME system variable

Second, Path.  It’s Value should have a lot of values already setup.  At the very end (after the semicolon) enter the above path followed by \bin;
edit the path system variable

Now your machine is setup to compile Java code.  (Fun, right?)

Install Eclipse

Eclipse serves as the Development Environment for your Java code.  It provides built-in features that make programming much easier.  Download Eclipse (select your appropriate environment on the upper right-hand area of the screen).

The downloaded file will be a .zip file.  Once downloaded, you should right-click on that file and select ‘Extract All…’.  This will open the .zip file and dump its contents into the folder that you choose.  Mine looks like this:

extract compressed files

Eclipse is now installed on your machine.

Install and configure Minecraft Forge

“Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.”  It helps us create mods better and faster.  I spent a lot of time finding the correct files to download so my time spent is time saved for you.  There are two methods for setting up Forge:  1)  For running mods that other people have created; and 2) being able to create and compile your own mods.  Here’s the download link.  Find the ‘Download Recommended’ area on the right and click on the ‘Src’ button.

minecraft forge download

Be careful, the next screen will display a “Download” button in the middle of the screen.  It’s actually an ad and will download adware to your computer.
 Wait 5 seconds and a ‘Skip’ button will be displayed at the top right.  Again, this will be downloaded as a .zip file.

Right-click on the .zip file and ‘Extract All…’ again.  My folder is C:\MinecraftModding\Forge.  Once this is finished extracting, right-click in the MinecraftModding folder and click New->Folder and call it ‘workspace’ (this is for our Eclipse setup later).

Click on the “Forge” folder and you should see the following:

Hold down shift, and right click, then select “Open command window here”.

Once the command window opens, type the following command exactly:

gradlew setupDecompWorkspace --refresh-dependencies

This will run through several commands and will take several minutes.  I found that if I was on an unstable internet connection the process would fail (and the error wasn’t much help).  Once I got to a stable connection it ran fine.

Next, run the following command to associate Forge with Eclipse:

gradlew eclipse

Configure Eclipse Environment

Last step and you should be ready to go.  Click on the eclipse.exe file in the folder that you extracted to earlier (mine was C:\eclipse-java-mars-R-win32-x86_64\eclipse).

Eclipse will ask you to select a workspace.  I chose the folder that we created earlier in the MinecraftModding folder entitled ‘workspace’.  You can select to make this Default so that you’re not asked again but I work on other Java projects so I didn’t want to always open to Minecraft mods 🙂

eclipse setup

In Eclipse we first have to create your mod project. To do so, we click on File > New > Project and select “Java Project” in the pop-up window which will appear. Give your project a name and click Finish. Now you have a blank Java project.

At this point we have a blank Java project for our code but our project has no awareness of the Minecraft Forge code.  Click File > Import and choose “Existing Projects into workspace”. In the dialog for the import click the “Browse” button and select your C:\MinecraftModding\Forge directory as the source to import from. Then click finish. Ensure that a project named “Forge” is in the list of projects and is checked. Press ‘Finish’.   The import linked the Forge workspace to your project’s workspace so you now have access to the Forge code.

Although Forge has been linked to the workspace it can’t be used yet. Forge must be added to your project’s buildpath so that the Java compiler compiles your mod and Forge together. Right-click on your Project in the Package Explorer on the left. Then click on Build Path > Configure. Go to the tab “Projects” and click “Add”. Select Forge as the project and click OK.

Finally you have to create Run Configurations. Select your project in the Package Explorer and click on the drop-down arrow next to the green “Run” button in the top tool bar. In the drop-down menu click on “Run Configurations”. Right-click on “Java Application” and click “New”. This creates a new Run Configuration of the type “Java Application”, so it will be a program that runs on your PC.

Name the Configuration ‘Launch Client’ with the following settings:

Main Class:
GradleStart
Program Arguments:
–username=<Username> –password=<Password>

The <Username> and <Password> are for your regular Minecraft game.  Click Apply.

Now you can click on the green run button in the top of Eclipse and Minecraft should eventually start.  Now Minecraft is running as a modified version and will load any code that we create.

Hopefully this was helpful.  If you have any issues please check out some of the references that I linked below. Setting the environment up properly was much more difficult than actually programming the mods.  Stay tuned for additional posts that demonstrate the coding portion of the mods (or sign up for our class we’ll be hosting in November for 14-18 year olds).


References

http://jabelarminecraft.blogspot.com/
https://minecraft.net/
http://www.wuppy29.com/minecraft/modding-tutorials/forge-modding-1-8/
http://bedrockminer.jimdo.com/modding-tutorials/set-up-minecraft-forge/set-up-advanced-setup/
http://www.minecraftforge.net/wiki/Installation/Source