Skip to content

Commit 2c4df24

Browse files
committed
Add loot chests to various structures
1 parent 71bb2b6 commit 2c4df24

File tree

12 files changed

+143
-50
lines changed

12 files changed

+143
-50
lines changed

structures/aether/buildings/abandoned/abandoned_house_1/abandoned_house_1.tesf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ num decayChance = 12;
2020
num cobwebChance = 4;
2121
num airChance = 8;
2222

23-
bool chest = false;
23+
bool chest = true;
2424

2525
for(num x = -radius; x < radius; x = x + 1) {
2626
for (num y = -radius; y < radius; y = y +1) {
@@ -44,6 +44,10 @@ for(num x = -radius; x < radius; x = x + 1) {
4444
} else block(x, y, z, "minecraft:air", true);
4545
}
4646
}
47+
48+
if (getBlock(x,y,z) == "minecraft:chest") {
49+
block(x,y,z,"minecraft:chest{LootTable:'chests/village/village_temple'}", true);
50+
}
4751
}
4852
}
4953
}

structures/aether/buildings/abandoned/abandoned_house_2/abandoned_house_2.tesf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ num decayChance = 12;
2020
num cobwebChance = 4;
2121
num airChance = 8;
2222

23-
bool chest = false;
23+
bool chest = true;
2424

2525
for(num x = -radius; x < radius; x = x + 1) {
2626
for (num y = -radius; y < radius; y = y +1) {
@@ -44,6 +44,10 @@ for(num x = -radius; x < radius; x = x + 1) {
4444
} else block(x, y, z, "minecraft:air", true);
4545
}
4646
}
47+
48+
if (getBlock(x,y,z) == "minecraft:chest") {
49+
block(x,y,z,"minecraft:chest{LootTable:'chests/village/village_plains_house'}", true);
50+
}
4751
}
4852
}
4953
}

structures/aether/buildings/abandoned/abandoned_house_3/abandoned_house_3.tesf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ num decayChance = 12;
2020
num cobwebChance = 4;
2121
num airChance = 8;
2222

23-
bool chest = false;
23+
bool chest = true;
2424

2525
for(num x = -radius; x < radius; x = x + 1) {
2626
for (num y = -radius; y < radius; y = y +1) {
@@ -44,6 +44,10 @@ for(num x = -radius; x < radius; x = x + 1) {
4444
} else block(x, y, z, "minecraft:air", true);
4545
}
4646
}
47+
48+
if (getBlock(x,y,z) == "minecraft:chest") {
49+
block(x,y,z,"minecraft:chest{LootTable:'chests/village/village_plains_house'}", true);
50+
}
4751
}
4852
}
4953
}

structures/aether/misc/mob-rooms/mob_room.tesf

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
num searchRadius = 3;
2-
bool chest = false;
2+
bool chest = true;
33

44
num mobRoll = randomInt(3);
55
str mobState = "type=minecraft:zombie";
@@ -60,7 +60,8 @@ if (getBlock(xOffset + 1, yOffset, zOffset) != "minecraft:air" &&
6060
if (spawnable == true) {
6161
structure(xOffset + 7, yOffset, zOffset, "mob_room_east_sc", "NONE");
6262
state(xOffset + 7, yOffset + 3, zOffset, mobState);
63-
if (chest == false) {
63+
64+
if (chest == false) {
6465
for (num cx = -3; cx < 3; cx = cx + 1) {
6566
for (num cz = -3; cz < 3; cz = cz + 1) {
6667
if (getBlock(xOffset + cx + 7, yOffset + 1, zOffset + cz) == "minecraft:chest") {
@@ -70,6 +71,14 @@ if (getBlock(xOffset + 1, yOffset, zOffset) != "minecraft:air" &&
7071
}
7172
}
7273

74+
for (num cx = -3; cx < 3; cx = cx + 1) {
75+
for (num cz = -3; cz < 3; cz = cz + 1) {
76+
if (getBlock(xOffset + cx + 7, yOffset + 1, zOffset + cz) == "minecraft:chest") {
77+
block(xOffset + cx + 7, yOffset + 1, zOffset + cz, "minecraft:chest{LootTable:'chests/simple_dungeon'}", true);
78+
}
79+
}
80+
}
81+
7382
fail;
7483
}
7584

@@ -93,6 +102,7 @@ if (getBlock(xOffset - 1, yOffset, zOffset) != "minecraft:air" &&
93102
if (spawnable == true) {
94103
structure(xOffset - 7, yOffset, zOffset, "mob_room_west_sc", "NONE");
95104
state(xOffset - 7, yOffset + 3, zOffset, mobState);
105+
96106
if (chest == false) {
97107
for (num cx = -3; cx < 3; cx = cx + 1) {
98108
for (num cz = -3; cz < 3; cz = cz + 1) {
@@ -103,6 +113,15 @@ if (getBlock(xOffset - 1, yOffset, zOffset) != "minecraft:air" &&
103113
}
104114
}
105115

116+
for (num cx = -3; cx < 3; cx = cx + 1) {
117+
for (num cz = -3; cz < 3; cz = cz + 1) {
118+
if (getBlock(xOffset + cx - 7, yOffset + 1, zOffset + cz) == "minecraft:chest") {
119+
block(xOffset + cx - 7, yOffset + 1, zOffset + cz, "minecraft:chest{LootTable:'chests/simple_dungeon'}", true);
120+
}
121+
}
122+
}
123+
124+
106125
fail;
107126
}
108127

@@ -126,6 +145,7 @@ if (getBlock(xOffset, yOffset, zOffset + 1) != "minecraft:air" &&
126145
if (spawnable == true) {
127146
structure(xOffset, yOffset, zOffset + 7, "mob_room_south_sc", "NONE");
128147
state(xOffset, yOffset + 3, zOffset + 7, mobState);
148+
129149
if (chest == false) {
130150
for (num cx = -3; cx < 3; cx = cx + 1) {
131151
for (num cz = -3; cz < 3; cz = cz + 1) {
@@ -136,6 +156,15 @@ if (getBlock(xOffset, yOffset, zOffset + 1) != "minecraft:air" &&
136156
}
137157
}
138158

159+
for (num cx = -3; cx < 3; cx = cx + 1) {
160+
for (num cz = -3; cz < 3; cz = cz + 1) {
161+
if (getBlock(xOffset + cx, yOffset + 1, zOffset + cz + 7) == "minecraft:chest") {
162+
block(xOffset + cx, yOffset + 1, zOffset + cz + 7, "minecraft:chest{LootTable:'chests/simple_dungeon'}", true);
163+
}
164+
}
165+
}
166+
167+
139168
fail;
140169
}
141170

@@ -161,6 +190,7 @@ if (getBlock(xOffset, yOffset, zOffset - 1) != "minecraft:air" &&
161190
if (spawnable == true) {
162191
structure(xOffset, yOffset, zOffset - 7, "mob_room_north_sc", "NONE");
163192
state(xOffset, yOffset + 3, zOffset - 7, mobState);
193+
164194
if (chest == false) {
165195
for (num cx = -3; cx < 3; cx = cx + 1) {
166196
for (num cz = -3; cz < 3; cz = cz + 1) {
@@ -171,10 +201,15 @@ if (getBlock(xOffset, yOffset, zOffset - 1) != "minecraft:air" &&
171201
}
172202
}
173203

174-
fail;
175-
}
176-
}
177-
178-
204+
for (num cx = -3; cx < 3; cx = cx + 1) {
205+
for (num cz = -3; cz < 3; cz = cz + 1) {
206+
if (getBlock(xOffset + cx, yOffset + 1, zOffset + cz - 7) == "minecraft:chest") {
207+
block(xOffset + cx, yOffset + 1, zOffset + cz - 7, "minecraft:chest{LootTable:'chests/simple_dungeon'}", true);
208+
}
209+
}
210+
}
179211

180212

213+
fail;
214+
}
215+
}

structures/end/buildings/purpur/crashed-end-ship/crashed_end_ship.tesf

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,22 @@ for (num s = 0; s < shulkerAmount; s = s + 1) {
5454
}
5555

5656
num radius = 16;
57-
bool chest = false;
57+
bool chest = true;
5858

5959
for(num x = -radius; x < radius; x = x + 1) {
60-
for(num y = -radius; y < radius; y = y + 1) {
61-
for(num z = -radius; z < radius; z = z + 1) {
62-
if (chest == false) {
63-
if (getBlock(x,yTranslate+y,z) == "minecraft:chest" ||
64-
getBlock(x,yTranslate+y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
65-
}
60+
for(num y = -radius; y < radius; y = y + 1) {
61+
for(num z = -radius; z < radius; z = z + 1) {
62+
if (chest == false) {
63+
if (getBlock(x,yTranslate+y,z) == "minecraft:chest" ||
64+
getBlock(x,yTranslate+y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
6665
}
67-
}
66+
67+
if (getBlock(x,y,z) == "minecraft:chest") {
68+
block(x,y,z,"minecraft:chest{LootTable:'chests/end_city_treasure'}", true);
69+
}
70+
if (getBlock(x,y,z) == "minecraft:trapped_chest") {
71+
block(x,y,z,"minecraft:trapped_chest{LootTable:'chests/end_city_treasure'}", true);
72+
}
73+
}
74+
}
6875
}

structures/end/buildings/purpur/end-house/end_house.tesf

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,29 @@ if (random == 3) structure(0,0,0,"end_house_sc_west","NONE");
1212

1313
num radius = 10;
1414
bool tnt = true;
15-
bool chest = false;
15+
bool chest = true;
1616

1717
if (randomInt(2) == 0) tnt = false;
1818

1919
for(num x = -radius; x < radius; x = x + 1) {
20-
for(num y = -radius; y < radius; y = y + 1) {
21-
for(num z = -radius; z < radius; z = z + 1) {
22-
if (tnt == false) {
23-
if (getBlock(x,y,z) == "minecraft:tnt") block(x,y,z,"minecraft:air", true);
24-
}
25-
if (chest == false) {
26-
if (getBlock(x,y,z) == "minecraft:chest" ||
27-
getBlock(x,y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
28-
}
20+
for(num y = -radius; y < radius; y = y + 1) {
21+
for(num z = -radius; z < radius; z = z + 1) {
22+
if (tnt == false) {
23+
if (getBlock(x,y,z) == "minecraft:tnt") block(x,y,z,"minecraft:air", true);
2924
}
30-
}
25+
26+
if (chest == false) {
27+
if (getBlock(x,y,z) == "minecraft:chest" ||
28+
getBlock(x,y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
29+
}
30+
31+
if (getBlock(x,y,z) == "minecraft:chest") {
32+
block(x,y,z,"minecraft:chest{LootTable:'chests/end_city_treasure'}", true);
33+
}
34+
if (getBlock(x,y,z) == "minecraft:trapped_chest") {
35+
block(x,y,z,"minecraft:trapped_chest{LootTable:'chests/end_city_treasure'}", true);
36+
}
37+
}
38+
}
3139
}
3240

structures/end/buildings/purpur/end-ship/end_ship.tesf

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ for (num s = 0; s < shulkerAmount; s = s + 1) {
2323
}
2424

2525
num radius = 16;
26-
bool chest = false;
26+
bool chest = true;
2727

2828
for(num x = -radius; x < radius; x = x + 1) {
29-
for(num y = -radius; y < radius; y = y + 1) {
30-
for(num z = -radius; z < radius; z = z + 1) {
31-
if (chest == false) {
32-
if (getBlock(x,y,z) == "minecraft:chest" ||
33-
getBlock(x,y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
34-
}
29+
for(num y = -radius; y < radius; y = y + 1) {
30+
for(num z = -radius; z < radius; z = z + 1) {
31+
if (chest == false) {
32+
if (getBlock(x,y,z) == "minecraft:chest" ||
33+
getBlock(x,y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
3534
}
36-
}
35+
36+
if (getBlock(x,y,z) == "minecraft:chest") {
37+
block(x,y,z,"minecraft:chest{LootTable:'chests/end_city_treasure'}", true);
38+
}
39+
}
40+
}
3741
}

structures/end/buildings/purpur/end-tower/end_tower.tesf

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,27 @@ if (random == 3) structure(0,0,0,"end_tower_sc_west","NONE");
1212

1313
num radius = 16;
1414
bool tnt = true;
15-
bool chest = false;
15+
bool chest = true;
1616

1717
if (randomInt(2) == 0) tnt = false;
1818

1919
for(num x = -radius; x < radius; x = x + 1) {
20-
for(num y = -radius; y < radius; y = y + 1) {
21-
for(num z = -radius; z < radius; z = z + 1) {
22-
if (tnt == false) {
23-
if (getBlock(x,y,z) == "minecraft:tnt") block(x,y,z,"minecraft:air", true);
24-
}
25-
if (chest == false) {
26-
if (getBlock(x,y,z) == "minecraft:chest" ||
27-
getBlock(x,y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
28-
}
20+
for(num y = -radius; y < radius; y = y + 1) {
21+
for(num z = -radius; z < radius; z = z + 1) {
22+
if (tnt == false) {
23+
if (getBlock(x,y,z) == "minecraft:tnt") block(x,y,z,"minecraft:air", true);
2924
}
30-
}
25+
if (chest == false) {
26+
if (getBlock(x,y,z) == "minecraft:chest" ||
27+
getBlock(x,y,z) == "minecraft:trapped_chest") block(x,y,z,"minecraft:air", true);
28+
}
29+
30+
if (getBlock(x,y,z) == "minecraft:chest") {
31+
block(x,y,z,"minecraft:chest{LootTable:'chests/end_city_treasure'}", true);
32+
}
33+
if (getBlock(x,y,z) == "minecraft:trapped_chest") {
34+
block(x,y,z,"minecraft:trapped_chest{LootTable:'chests/end_city_treasure'}", true);
35+
}
36+
}
37+
}
3138
}

structures/end/buildings/purpur/shulker-nest/shulker_nest.tesf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ for (num s = 0; s < shulkerAmount; s = s + 1) {
4747
if (randomInt(2) == 0) zDir = -1;
4848

4949
structure(xDir*rx, 10, zDir*rz, "spawn_shulker", "NONE");
50-
}
50+
}
51+
52+
structure(1-randomInt(3), 5, 1-randomInt(3), "shulker_ruin_chest", "NONE");
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
for (num i = 0; i < 10; i = i + 1) {
2+
if (getBlock(0, -i - 1, 0) != "minecraft:air" &&
3+
getBlock(0, -i - 1, 0) != "minecraft:end_stone_bricks" &&
4+
getBlock(0, -i - 1, 0) != "minecraft:deepslate_bricks") {
5+
block(0, -i, 0,"minecraft:chest{LootTable:'chests/end_city_treasure'}");
6+
fail;
7+
}
8+
}

0 commit comments

Comments
 (0)