Randomize yourself, NOW
Everything in this section should be done in server scripts. priority: [>n]
means that the priority must be any number larger than n
.
Make sure to regenerate the world after changing the config. Areas are randomized per-seed.
//priority: [>100]
global.areaSize = 0 // Number, 64 by default
//priority: [>500]
global.noEffectWeight = 0 // Number, 100 by default
//priority: [>100]
global.noEffectBuffer = 0 // Number, 4 by default
//priority: [>500]
global.enableDefaultAreaTypes = false // Boolean, true by default
//priority: [>500]
/*
All fields are optional except weight and title
The distinction between `onLeave` and `onLeaveArea` is that `onLeave` only triggers when the player exits the area type, meaning that it will not trigger when the player is traveling between areas of the same type
This type is also defined as `areaType` using JSDoc, use that if you can
*/
global.areaTypes = {
id: {
weight: 0, // Number
title: "", // String
color: 0x222222, // Hex number
onLoad: event => {}, // Function (event - ChunkEvent$Load)
onTick: event => {}, // Function (event - TickEvent$PlayerTickEvent)
onEnter: event => {}, // Function (event - EntityEvent$EnteringSection OR EntityJoinLevelEvent OR PlayerEvent$PlayerRespawnEvent)
onLeave: event => {}, // Function (event - EntityEvent$EnteringSection OR LivingDeathEvent)
onLeaveArea: event => {}, // Function (event - EntityEvent$EnteringSection OR LivingDeathEvent)
onJump: event => {}, // Function (event - LivingEvent$LivingJumpEvent)
onHurt: event => {}, // Function (event - LivingHurtEvent)
onEntityCheck: event => {} // Function (event - MobSpawnEvent$FinalizeSpawn)
}
}