Adding system_info('world_min_spawning_light') (#1475)
This commit is contained in:
1 parent
914e129f6e
commit
811b330446
2 files changed
+3
-1
No files matched your search
@@ -753,7 +753,8 @@ system calls. In all circumstances, these are only provided as read-only.
|
||||
* `world_center` - Returns coordinates of the center of the world with respect of the world border
|
||||
* `world_size` - Returns radius of world border for current dimension.
|
||||
* `world_max_size` - Returns maximum possible radius of world border for current dimension.
|
||||
*
|
||||
* `world_min_spawning_light` - Returns minimum light level at which mobs can spawn for current dimension, taking into account datapacks
|
||||
|
||||
##### Relevant gameplay related properties
|
||||
* `game_difficulty` - current difficulty of the game: `'peaceful'`, `'easy'`, `'normal'`, or `'hard'`
|
||||
* `game_hardcore` - boolean whether the game is in hardcore mode
|
||||
|
||||
@@ -200,6 +200,7 @@ public class SystemInfo {
|
||||
});
|
||||
return MapValue.wrap(rules);
|
||||
});
|
||||
put("world_min_spawning_light", c-> NumericValue.of(c.s.getLevel().dimensionType().monsterSpawnBlockLightLimit()));
|
||||
|
||||
put("source_entity", c -> EntityValue.of(c.source().getEntity()));
|
||||
put("source_position", c -> ValueConversions.of(c.source().getPosition()));
|
||||
|
||||
Reference in new issue
Block a user