-
Notifications
You must be signed in to change notification settings - Fork 1
mapnumber
The map generic scales an input to a different range. It can clamp the output within the specified range.
Added in release version 0.5.0
Must be "map".
Accepts a string. Valid values are:
- playerposx
- playerposy
- playerposz
- timeofday
- worldtime
- timesincesleep
"timeofday" is specified in ticks. "worldtime" and "timesincesleep" are specified in in-game days.
Accepts a number. When the input's value == inlow, output = outlow. Default is 0.
Accepts a number. When the input's value == inhigh, output = outhigh.
Accepts a number. When the input's value == inlow, output = outlow. Default is 0.
Accepts a number. When the input's value == inhigh, output = outhigh.
Accepts a string. When given "true", the output value will never go outside the bounds set by "outlow" and "outhigh", regardless of the input value.
The following example increases the probability of receiving a nausea effect as the player gets closer to bedrock:
{"type": "potioneffect", "effect": "nausea", "duration": 100, "chance": {"type": "map", "input": "playerposy", "inhigh": 256, "outlow": 5, "outhigh": 100}}