Bouncing Pigs

Pigs bouncing in the air

Each time you bounce, the game spawns a new pig!

Try the code:

player.onChat("slime", function () {
    blocks.fill(
    SLIME_BLOCK,
    pos(-20, 0, -20),
    pos(20, 0, 20),
    FillOperation.Replace
    )
})
player.onTravelled(TravelMethod.Bounce, function () {
    mobs.spawn(PIG, randpos(
    pos(-10, 20, -10),
    pos(10, 20, 10)
    ))
})