26. Make a World Change over Time

In This Chapter

Spawn 100 animals with one command

Indicate that a mod has handled a command

Let a player turn a mod on and off

Listen to events when an item has been spawned

Determine the type and quantity of the item

Cancel an event to change its normal behavior

Examine a block to determine its material

Plant a tree sapling

The world in a Minecraft game is incredibly huge. A player can walk in the same direction for 30 million blocks before reaching an edge.

But as big as it is, the world remains almost entirely the same without a player’s actions. If you left an area and didn’t come back to it for weeks while exploring elsewhere, when you returned, the hills, trees, and other objects would ...

Get Absolute Beginner’s Guide to Minecraft® Mods Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.