Add a distance limit to the entity detector (#32)

The distance limit can be configured with the `moremesecons_entity_detector.max_radius` setting.

An additional change prevents a crash if an object returned by `get_objects_inside_radius` is neither a valid player nor a luaentity. We don't know why this happens but it sometimes does.
This commit is contained in:
fluxionary
2023-08-17 11:42:54 -07:00
committed by GitHub
parent 464699e78b
commit cbae2c7f88
2 changed files with 15 additions and 14 deletions

View File

@ -13,6 +13,10 @@ moremesecons_commandblock.authorized_commands (Authorized commands) string tell
# Any value less than or equal to 0 will be changed to 1 and a NaN value will be changed to the default value
moremesecons_commandblock.nearest_max_distance (Nearest player maximum distance) float 8
[Entity Detector]
moremesecons_entity_detector.max_radius (Maximum entity detector radius) float 16 0
[Signal Jammer]
# Jammer action range