#(Raindropz) Check entity data

37 messages ยท Page 1 of 1 (latest)

haughty relic
#

Hey there, super new to Denizen (literally my second day using it ๐Ÿ˜…) is there a way to check the data of an entity, similar to the /data get entity command?

waxen jackalBOT
#

(Raindropz) Check entity data

waxen jackalBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

haughty relic
#

I want to check the entity that a player is looking at, and then run something based on that - think of something like the WAILA mod, but for entities with specific data

#

So if a player is looking at a zombie, show a title that says "ZOMBIE"

junior marten
#

is there a way to check the data of an entity
yes! tags

#

in this case, you're trying to see the entity type

#

sooo

#

!t entity_type

tranquil pendantBOT
junior marten
#

!t entitytag.entity_type

tranquil pendantBOT
junior marten
#

example, if you did <player.entity_type>, it would return "player"

#

i recommend you taking a look at all the available tags to see what's possible with them

#

!t all

tranquil pendantBOT
haughty relic
#

I tried /ex narrate <player.target> which gave me the entity I'm looking at, albeit with a bit more information attached lol

#

But besides the actual entity type, ideally I need the entity data too

rapid rampart
#

!t PlayerTag.target

tranquil pendantBOT
rapid rampart
#

That returns an EntityTag object, which you can then read information from using tags, e.g. <player.target.entity_type>

#

!g

tranquil pendantBOT
junior marten
rapid rampart
#

I heavily recommend going over the guide, it teaches all of the basic concepts

split jackal
#

!t entity.describe

tranquil pendantBOT
split jackal
#

!t entity.property_map

tranquil pendantBOT