#(aviside) Making the "Flagged" switch usable in any non-player entity event

18 messages · Page 1 of 1 (latest)

grave thistle
#

I don't know if this wasn't included due to limitations. You can't add the flagged switch to an event if the entity isn't a player, making it hard to do some specific lines of events with mobs.

deft hareBOT
#

(aviside) Making the "Flagged" switch usable in any non-player entity event

deft hareBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

median hedgeBOT
#
Changed to Feature

Thread is now a Feature thread. This indicates a request for a new feature to the plugin, that both (A) does not already exist and (B) reasonably can be added. If you are unsure whether this applies, use </helpthread:1028674284870180883> to change back to a normal help thread.

coarse herald
grave thistle
#

Yeah, I can accomplish anything without this switch so far, I just thought this feature could simplify writing events for mobs and (possibly) improve performance.

Here's what got me to write the post:
I wanted to flag a zombie that targeted a player and then track the flagged zombie using "zombie flagged:<myflag> steps on block".
I know that's easily accomplishable by checking their flag. Idk how the flagged switch works on the backend, but I also thought it could improve performance if I'm only checking for the flagged entity. Especially if I have extra data I want to compare after the initial if statement

#

So Instead of periodically checking every zombie for a flag I could more frequently check the flagged entity without as many performance concerns. Again, I don't know how the flagged switch works on the backend and if it's already checking every player and not just the one that has the flag. Hopefully I didn't overcomplicate that lol

tranquil raven
#

I think what you're looking for here might be entity_flagged:<flag>. There are a fair number of entity matchers available.

#

!objecttype entitytag

gray veldtBOT
# tranquil raven !objecttype entitytag

An EntityTag represents a spawned entity, or a generic entity type.

Note that players and NPCs are valid EntityTags, but are generally represented by the more specific
PlayerTag and NPCTag objects.

Note that a spawned entity can be a living entity (a player, NPC, or mob) or a nonliving entity (a painting, item frame, etc).

This object type is flaggable.
Flags on this object type will be stored in the world chunk files as a part of the entity's NBT.

Prefix

e

Base Type

ElementTag

Implements

FlaggableObject, PropertyHolderObject

Format

The identity format for entities is a spawned entity's UUID, or an entity type.
For example, 'e@abc123' or 'e@zombie'.

tranquil raven
#

As far as performance goes I'll leave that for others, however I haven't seen anything weird with performance unless I'm doing something weird, like unintentionally loading all of the End world... But that wouldn't be Denizen related.

grave thistle
#

ahh I didn't know entity_flagged existed, thank you vm

coarse herald
#

^ ye that's what I was going for - since every queue has a linked player, global stuff like flagged: can be implemented, but entities are specific to different events, so should just use the event's built-in entity matchers, such as that one ^

median hedgeBOT
#
Changed to Help/Support

Thread is now a Help/Support thread. A helper will check your thread when available.

coarse herald
#

Feel free to ask if you need any more help, otherwise -

median hedgeBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@grave thistle