Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk Density Nametag Switch / Nametag Disable Command #476

Open
UltimaOath opened this issue Jan 22, 2024 · 0 comments
Open

Chunk Density Nametag Switch / Nametag Disable Command #476

UltimaOath opened this issue Jan 22, 2024 · 0 comments
Labels
priority: normal Normal priority status: confirmed Confirmed by a maintainer status: unassigned target version Needs a future version assigned to it type: improvement Add or adjust a feature

Comments

@UltimaOath
Copy link
Collaborator

UltimaOath commented Jan 22, 2024

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.

@lokka30 lokka30 added type: improvement Add or adjust a feature priority: normal Normal priority status: confirmed Confirmed by a maintainer status: unassigned target version Needs a future version assigned to it labels Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: normal Normal priority status: confirmed Confirmed by a maintainer status: unassigned target version Needs a future version assigned to it type: improvement Add or adjust a feature
Projects
None yet
Development

No branches or pull requests

2 participants