Creating the Splash Program
One of the funny quirks of Minecraft is the random message that displays in the game client when the program is run. It appears as yellow text across a corner of the Minecraft logo, as shown in Figure 4.1.
FIGURE 4.1 The Minecraft client displaying a splash message.
The splash in Figure 4.1 is “Don’t feed avocados to parrots!” Mojang, the developer of Minecraft, uses the splash to crack jokes, make references to classic or obscure videogames, and say other unusual things. Sometimes it even dispenses good advice, as in this particular example. Avocados are poisonous to birds and harmful to many other animals.
The first Java program that you create will have its own simple splash message: “Blue warrior shot the food!”
To prepare for the first programming project in NetBeans, if you haven’t already done so, create a new project called Minecraft by following these steps:
- Select the menu command File, New Project. The New Project dialog opens.
- Select the project category Java and the project type Java Application; then click Next.
- Enter Minecraft as the project’s name. (If you created a project with this name previously, you see the error message Project folder already exists and is not empty.)
- Deselect the Create Main Class check box.
- Click Finish.
The Minecraft project is created in its own folder. You can use this project for the Java programs you write as you progress through this book—at least as far as Chapter 17, “Read and Write Files.” After that, you will be creating each Minecraft mod as its own project in NetBeans.