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(
    blocks.block(Block.SlimeBlock),
    positions.create(-20, 0, -20),
    positions.create(20, 0, 20),
    FillOperation.Replace
    )
})
player.onTravelled(TravelMethod.Bounce, function () {
    mobs.spawn(mobs.animal(AnimalMob.Pig), positions.random(
    positions.create(-10, 20, -10),
    positions.create(10, 20, 10)
    ))
})