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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.