Skip to content

Commit 3fecf54

Browse files
committed
NBTify bee spawning
1 parent 15d0ec1 commit 3fecf54

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

structures/misc/bee_nest.tesf

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ num dir = randomInt(4);
22
num x = 0;
33
num z = 0;
44
str face = "west";
5+
num bees = 2 + randomInt(2);
56

67
if (dir == 0) {
78
face = "west";
@@ -21,8 +22,14 @@ if (dir == 0) {
2122
z = 1;
2223
}
2324

24-
block(x, 0, z, "minecraft:bee_nest[facing=" + face + "]");
25-
entity(-2, 0, 0, "minecraft:bee");
26-
entity(-2, 0, 0, "minecraft:bee");
27-
entity(-2, 0, 0, "minecraft:bee");
25+
str bee_data = "{bees:[";
26+
for (num i = 0; i < bees; i = i + 1) {
27+
str bee = "{entity_data:{id:\"minecraft:bee\"},min_ticks_in_hive:" + (i * 150) + ",ticks_in_hive:0}";
28+
bee_data = bee_data + bee;
29+
if (i < bees - 1) {
30+
bee_data = bee_data + ",";
31+
}
32+
}
33+
bee_data = bee_data + "]}";
2834

35+
block(x, 0, z, "minecraft:bee_nest[facing=" + face + "]" + bee_data);

0 commit comments

Comments
 (0)