Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/externalTests/plugins/testCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ function inject (bot) {
await teleport(new Vec3(0, bot.test.groundY, 0))
await bot.waitForChunksToLoad()
await resetBlocksToSuperflat()
// Reset weather and time
bot.chat('/weather clear')
bot.chat('/time set day')
// Reset health and food
bot.chat('/effect clear @a')
bot.chat('/effect clear @p')
bot.chat('/attribute @p minecraft:generic.max_health base set 20')
bot.chat('/effect give @p minecraft:saturation 1 20 true')
bot.chat('/gamerule doDaylightCycle true')
bot.chat('/gamerule doWeatherCycle true')
bot.chat('/difficulty peaceful')
// Ensure OP status for the bot
bot.chat(`/op ${bot.username}`)
await sleep(1000)
await clearInventory()
}
Expand Down
Loading