Skip to content

[Version 4.0] Position Modifier

Insane96 edited this page Jan 24, 2023 · 1 revision

The Position Modifier object is used in Range and Modifiable Value, and lets you change the value of those two objects based off the position of the entity when spawned.

Position Modifier

  • pos_modifier: (Object) the object that contains the modifier's parameters.
    • distance_from_spawn_bonus: Each 'distance_from_spawn_step' blocks from spawn will increase the value to modify by 'distance_from_spawn_bonus'%. The formula is bonus * (distance_from_spawn / step). E.g. with step = 100 and bonus = 0.02 when a mob spawns 150 blocks from spawn will have the value modified as 0.02 * (150 / 100) = 0.02 * 1.5 = +3%.
      If the next is present this is mandatory
    • distance_from_spawn_step: Check 'distance_from_spawn_bonus'. If the previous is present this is mandatory
    • depth_bonus: Each 'depth_step' blocks below 'depth_starting_level' will increase the value to modify by 'depth_bonus'%. The formula is bonus * (MAX(starting_level - spawning_y, 0) / step). E.g. with step = 1, bonus = 0.01 and starting_level = 64 when a mob spawns at y = 24 you'll have 0.01 * (MIN(64 - 24, 0) / 1) = 0.01 * 40 = +40%.
      If the next is present this is mandatory
    • depth_step: Check 'depth_bonus'. If the previous is present this is mandatory
    • depth_starting_level: Check 'depth_bonus'. Defaults to 64

Example

Check properties pages for examples.

Clone this wiki locally