Ice Age
Aquatic creatures have been trapped in ice for a long time. Watch as they thaw out and come back to life!
Try the code:
let rando: Position = null
let topCorner: Position = null
let bottomCorner: Position = null
let layers: number[] = []
player.onItemInteracted(TRIDENT, function () {
layers = [LAVA, GLASS, ICE]
bottomCorner = pos(10, 0, 10).toWorld()
topCorner = positions.add(
bottomCorner,
pos(10, 10, 10)
)
for (let index = 0; index <= layers.length - 1; index++) {
blocks.fill(
layers[index],
positions.add(
bottomCorner,
pos(index, index, index)
),
positions.add(
topCorner,
pos(0 - index, 0, 0 - index)
),
FillOperation.Replace
)
}
for (let i = 0; i < 20; i++) {
rando = randpos(
positions.add(
bottomCorner,
pos(2, 2, 2)
),
positions.add(
topCorner,
pos(-2, 0, -2)
)
)
blocks.place(WATER, rando)
mobs.spawn(TROPICAL_FISH, rando)
}
})