Hour 14. Generating Plants

In Hour 11, “Making Your Blocks Unique,” you created a plant. However, unless you somehow get seeds to the player, the plant can’t be used. It is quite common for plants to be generated in the world, such as cacti, grass, and flowers in vanilla Minecraft. To do this, you need a WorldGen class, as used in Hour 13, “Generating Ores,” to spawn the ores in the world. The difference is that this time you must make it yourself. ...

Get Sams Teach Yourself Mod Development for Minecraft in 24 Hours, 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.