Carpet

Carpet

2M Downloads

Expose more information about an entity's effects via `query(e, 'effect')`

James103 opened this issue ยท 0 comments

commented

Currently, query(e, 'effect') returns only the following tags from a given entry in ActiveEffects:

  • Amplifier
  • Duration
  • Id

I would like it to also return the rest of the tags from the same entry in ActiveEffects as well.
Preferably, the extra tags are append to what is already there to maintain backwards compatibility.

  • Ambient
  • ShowIcon
  • ShowParticles
  • HiddenEffect (and all its properties)

Example:
I have a custom health system in some of my Scarpet apps. For balancing reasons, I would like to nerf the effect of Regeneration if and only if it is not being provided by a Beacon.
Currently, I have to check the player's NBT every tick, which will significantly impact game performance (more so based on recipes unlocked and items in inventory/e-chest).
With this proposal implemented, I only have to check the Ambient parameter in the result of query(player, 'effect', 'regeneration') to determine whether to nerf it or not, which would likely be much faster.