-
Notifications
You must be signed in to change notification settings - Fork 50
Description
The general idea is that nametags could be enabled and disabled for players based on the density of mobs within the same or surrounding chunks. This could help to resolve the issue of player farms having dense nametag fields. These density checks would occur with the async update repeating task.
The separate idea being a command which players can use when looking at a mob to disable (or enable if allowed) a mobs nametag; potentially including surrounding mobs.
Idea 1: Chunk Density Nametag Switch
apply-settings:
nametag-disable-on-chunk-density: 8 # If 0, disabled (if not set, disabled regardless if subsequent settings are used)
chunk-density-exclusion: false # If not set, use false as default
chunk-density-cooldown: 30s # If not set, use 30s as default
chunk-density-adjacent-chunks: 1 # Adjacent chunks to triggering chunk affected by trigger
chunk-density-spawner-exclusion: true # If not set, use false as default
chunk-density-spawner-exclusion-adjacent-chunks: 1 # Adjacent chunks to spawners affected by exclusion
nametag-disable-on-chunk-density:
- Refers to the number of mobs in a single chunk which would trigger the disabling of those mobs within that chunks' nametags for nearby players ( X >= Y ). If this value is 0
, or not specified, then the entire subsequent system is disabled.
chunk-density-exclusion:
- If set to true
, any mob containing this setting will not be counted when calculating the chunk density. If set to false
, or not specified (default), then the mob will not be excluded.
chunk-density-cooldown:
- Refers to the amount of time the disabled nametag will be disabled for a mob even if it leaves the zone of the affected chunks. If a mob ventures into a new chunk when the chunk density is calculated, and that mob would be affected by the disabling of nametags for mobs within that new chunk, then their timer is simply reset to the current chunk-density-cooldown
value. If that chunk would not trigger the disabling of nametags, then the timer would simply continue counting down until either ending and returning the nametag to the original visibility settings or are reset by another chunk density calculation.
chunk-density-adjacent-chunks:
- When the chunk density is triggered, the chunks which are X chunks away from the origin will be affected by the same settings and triggering effects. (In a similar method which chunk kill max is applied with adjacent chunks).
chunk-density-spawner-exclusion:
- If set to true
, any chunk which contains a spawner cube will be excluded from the nametag density triggering events. If set to false
, or not specified (default), then spawner cube chunks will not be excluded.
chunk-density-spawner-exclusion-adjacent-chunks:
- If the chunk-density-spawner-exclusion
setting is true
, then it's exclusion zone will extend for X chunks away from the original chunk. (In a similar method which chunk kill max is applied with adjacent chunks).
Idea 2: Nametag Command Switch
/lm rules nametag [disable/enable] [x]
When looking at a levelled mob, running the command /lm rules nametag disable
will disable the nametag of that mob for that player. The reverse, running the command /lm rules nametag enable
will enable the nametag of a mob for the player (assuming that mob would have otherwise had a nametag visible for the player via the rules).
Adding a numerical value after enable
or disable
of the command will extend the disabled nametag for mobs within X blocks of the player. EX /lm rules nametag disable 5
.
This might require a new setting:
apply-settings:
nametag-disable-exclusion: false # If not set, use false as default
nametag-disable-exclusion:
- If set to true
, any mob containing this setting will not be affected by the above command to disable nametags. If set to false
, or not specified (default), then the mob will not be excluded.