Updated Introduction to Editor Scripting.md (markdown)
commited
commit
49ec54d51d3d57cbdc1a8728abd1e8cb1aeb956c
... | ... | @@ -106,9 +106,13 @@ let justATree = { |
106 | 106 | leaves: ["Foliage", [3, 3, 3], [-1, 4, -1]] |
107 | 107 | }, |
108 | 108 | build: () => { |
109 | // the "this" keyword refers to the object it is inside to, |
|
110 | // in this case the "justATree" but since its not yet defined as that we use "this" |
|
111 | setBlock(this.x, this.y, this.z, 0); |
|
109 | for (let c in this.components) { |
|
110 | while ((sx * sy * sz) < 0) { |
|
111 | // the "this" keyword refers to the object it is inside to, |
|
112 | // in this case the "justATree" but since its not yet defined as that we use "this" |
|
113 | setBlock(this.x + x, this.y + y, this.z + z, 0); |
|
114 | } |
|
115 | } |
|
112 | 116 | } |
113 | 117 | } |
114 | 118 | ``` |