3. What is Minecraft?
Minecraft is a game where you can place and
break blocks. You can mine to find raw
materials and craft those into usable items.
– Tools, weapons, armor
– Mobs and monsters
– Redstone
4. What is a Mod?
●
Mods add/remove/change different parts of
the game
●
Mods range from making mobs slower to
adding a whole new dimension with 50 new
items, blocks, and mobs
●
Two types of mods:
– Client-side
– Server-side
5. Examples of Mods
●
Singleplayer Commands (SPC) – Adds new
commands such as /explode and /spawn
●
MCEdit – Makes editing terrain MUCH easier
●
Mo Creatures – Adds a whole lot of new mobs
6. What do you need to make a Mod?
- To create the mod template
To run the server
and the mods -
- To test the mods
To edit your code -
- To run Minecraft
7. Steps to make a Mod
Step 1: Download and Install Programs
Step 2: Create a Sample Plugin
Step 3: Download and Start the CraftBukkit Server
Step 4: Mod the Server using Bukkit API
10. Mods that I have made
●
MoneyPlugin – Adds money to the game. Also
has shops in which you can buy/sell items. An
example of a shop would be:
Template:
Buy/Sell
Quantity
Item ID #
Price
11. Mods that I have made (cont.)
●
RandomPlugin
– Gives you double the exp when you kill a mob
– Bows shoot ghast fireballs
12. A Code Sample
@EventHandler
public void doubleExp(EntityDeathEvent event) {
exp = event.getDroppedExp();
exp = exp*2;
event.setDroppedExp(exp);
}
Variable“exp” is set
to itself multiplied by 2
Dropped exp is set
to variable “exp”
Defines method
“doubleExp”
Method activates on
the death of a mob
Variable “exp” is
set to the amount
of exp dropped
13. A Code Sample (cont.)
@EventHandler
public void evilBows(EntityShootBowEvent event) throws
InterruptedException {
Player player;
player = (Player) event.getEntity();
player.sendMessage(ChatColor.GREEN + "**RIBBIT**");
event.getEntity().getWorld().spawn(event.getEntity().getEyeLocation(),
LargeFireball.class);
}
Defines method “evilBows” that activates when
you shoot an arrow
Sets variable “player”
to the player who
shot the arrow and
sends a message
to them saying,
“**RIBBIT**”
Spawns a ghast fireball at the location
of the player's head