Jump to content

Recommended Posts

Posted

I need my mod, which is client-side only, to retrieve and process posX, posY and posZ of every player on the server. I found some list I think is appropriate

Minecraft.getMinecraft().theWorld.playerEntities;

After some tests I figured out that there are indeed some players but not all. The list is missing the players which are far away from me or something like this. I don't really understand what criteria a player has to meet to be in that list. Is it some kind of security feature not to give such an information to a client?

Posted

Undoubtedly sounds like a cheat mod.

Actually, I want to make a command that is able to list all players which are inside a sphere centered at the player with radius R, where R is an argument of my command (e.g. /near 500).

Maybe I just need to bound R variable. Anyway I would like to know what players are included in the list.

Posted (edited)
13 minutes ago, diesieben07 said:

For players this is 512 blocks.

Thanks, that's what I need to know. And yet one thing, where in the source code can I find that fact?

Edited by ZhabaKlava
Missed word
Posted

Yes, when you're registering entities one of the things you specify is the entity tracker, which includes the range.

 

But as diesieben07 pointed out, you can't get the rest of the players unless the server sends it (which requires a server-side mod) so your original original idea is only possible if the radius that you're interested in is less than the tracking distance for the client. If that is true, then you're good to go.

  • Thanks 1

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.