From 963da10ac99a84e661b289de3664fd015af7d809 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 29 Aug 2017 00:38:45 +0100 Subject: [PATCH] Active Block Modifiers: Improve alien grass chapter, and fix introduction formatting --- en/chapters/abms.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/en/chapters/abms.md b/en/chapters/abms.md index 9453657..71c9f2a 100644 --- a/en/chapters/abms.md +++ b/en/chapters/abms.md @@ -6,18 +6,21 @@ root: ../../ ## Introduction -An active *A**ctive **B**lock **M**odifier (**ABM**) allows you to run code on +An active **A**ctive **B**lock **M**odifier (**ABM**) allows you to run code on certain nodes at specific intervals. + Please be warned, ABMs which are too frequent or act on a large number of nodes cause massive amounts of lag. Use them sparingly. -* Special Growing Grass -* Your Turn +* [Special Growing Grass](#example-growing-alien-grass) +* [Your Turn](#your-turn) -## Special Growing Grass +## Example: Growing Alien Grass -If you want to make a mod that adds a type of grass called alien grass -- it grows near water on grassy blocks - you first register the grass, then +Alien grass, for the purposes of this chapter, is a type of grass which +has a chance to appear near water. + +To create it, you first need to register the grass, then write an ABM. {% highlight lua %} @@ -50,7 +53,7 @@ Specifying a neighbor is optional. If you specify multiple neighbors, only one o needs to be present to meet the requirements. Specifying chance is also optional. If you don't specify the chance, the ABM will -always run when the other conditions are met. +always run when the other conditions are met. ## Your Turn