-
Notifications
You must be signed in to change notification settings - Fork 1
[Version 4.0] Time Existed Modifier
Insane96 edited this page Jan 24, 2023
·
1 revision
The Time Existed Modifier object is used in Range and Modifiable Value, and lets you change the value of those two objects based off the time played by nearby players (128 blocks).
-
time_existed_modifier
: (Object) the object that contains the modifier's parameters.-
bonus_percentage
: bonus percentage given to the value everyseconds
-
seconds
: Every how many seconds will the value increase bybonus_percentage
-
max_bonus_percentage
: The maximum valuebonus_percentage
can reach -
mode
: How thebonus_percentage
is calculated when there are multiple players near the mob spawned. If omitted, defaults to "average"- "average": Makes an average of time played of the nearby players
- "sum": Sums the time played of the nearby players
- "nearest": Takes into account only the time played of the nearest player
-
affects_max_only
: currently used in the Range object, a true or false value (defaulting to false) which makes the modifier affect only the max value
-
Note that the bonus_percentage
is not flat for other percentages, so e.g. a chance of 15% with a bonus percentage of 100% will make the chance 30% not 115%.
In this example the chance for the creeper to get speed on spawn increases by 20% every hour. So after 4.5 hours of play the chance will be 15% * (0.2 * 4.5 + 1) = 15% * 1.9 = 28.5%
{
"mob_id": "minecraft:creeper",
"potion_effects": [
{
"id": "minecraft:speed",
"chance": {
"value": 0.15,
"time_existed_modifier": {
"bonus_percentage": 0.20,
"seconds": 3600
}
}
}
]
}