Started by
Mecho
on
Topic category: Help with Minecraft modding (Java Edition)
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 :)
Hey, not sure if this is exactly what you needed, or if you still even need it anymore, but I have found how to get the player entity associated with the client. (I wish there was just a procedure block for checking if the player entity is, but oh well.)
I just did this test, so I can't be 100% sure it works, but I'm very confident it does. I figured out that your game client always loads your player entity first. So when your client-sided instance of "On player tick update" goes through all players that are on the server, yours will be first. Now, because your player always gets executed first, we can abuse this with the following procedure: