How do I get the Player Entity that the client is playing as?

Started by Mecho on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I get the Player Entity that the client is playing as?

Title

I'm making an entity that is only visible to one player, by setting the texture to blank on the client side when they are not the target.

And while in testing it is most certainly possible to hide the entity by using a logic custom nbt tag, I've run into a dead end when trying to find the player entity that the client is playing as, as I need it to match the client's player to the player the entity is targeting.

Any help would be appreciated :)