-
Notifications
You must be signed in to change notification settings - Fork 35
/
chad_instanttree.js
46 lines (39 loc) · 1.13 KB
/
chad_instanttree.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//This is a ModPE script that will instantly grow a tree when the ground is tapped with an oak sapling.
function useItem(x,y,z,itemId,blockId,side)
{
{
if(itemId==6)
{
//Creates the trunk of the tree
setTile(x,y,z,17);
setTile(x,y+1,z,17);
setTile(x,y+2,z,17);
setTile(x,y+3,z,17);
setTile(x,y+4,z,17);
setTile(x,y+5,z,17);
//Creates the leaves of the tree
setTile(x,y+6,z,18);
setTile(x,y+7,z,18);
setTile(x+1,y+6,z,18);
setTile(x-1,y+6,z,18);
setTile(x,y+6,z+1,18);
setTile(x,y+6,z-1,18);
setTile(x+1,y+5,z,18);
setTile(x-1,y+5,z,18);
setTile(x,y+5,z+1,18);
setTile(x,y+5,z-1,18);
setTile(x+1,y+4,z,18);
setTile(x-1,y+4,z,18);
setTile(x,y+4,z+1,18);
setTile(x,y+4,z-1,18);
setTile(x+1,y+5,z+1,18);
setTile(x-1,y+5,z-1,18);
setTile(x-1,y+5,z+1,18);
setTile(x+1,y+5,z-1,18);
setTile(x+2,y+5,z,18);
setTile(x-2,y+5,z,18);
setTile(x,y+5,z+2,18);
setTile(x,y+5,z-2,18);
}
}
}