[Machine translation]how to get the coordinates of all players
-
[Machine translation]how to get the coordinates of all players
-
[Machine translation]how to get the coordinates of all players
@aacx_hacker you can do a for loop with
mc.theWorld.playerEntities, something like this:for (EntityPlayer e : (List<EntityPlayer>) mc.theWorld.playerEntities) { // in this case use e.posX, e.posY, e.posZ to get the coordinates. }edit: since the category is scriptapi then here is the js version:
for (i=0;i<mc.theWorld.playerEntities.size();i++) { var e = mc.theWorld.playerEntities.get(i); // js automatically declare the type of variable at runtime so just use e.posX, e.posY, e.posZ like the one above. } -
@aacx_hacker you can do a for loop with
mc.theWorld.playerEntities, something like this:for (EntityPlayer e : (List<EntityPlayer>) mc.theWorld.playerEntities) { // in this case use e.posX, e.posY, e.posZ to get the coordinates. }edit: since the category is scriptapi then here is the js version:
for (i=0;i<mc.theWorld.playerEntities.size();i++) { var e = mc.theWorld.playerEntities.get(i); // js automatically declare the type of variable at runtime so just use e.posX, e.posY, e.posZ like the one above. }@wysi thats java code smh
-
@wysi thats java code smh
@britishbiscuit didnt notice that lol, edited
-
@aacx_hacker you can do a for loop with
mc.theWorld.playerEntities, something like this:for (EntityPlayer e : (List<EntityPlayer>) mc.theWorld.playerEntities) { // in this case use e.posX, e.posY, e.posZ to get the coordinates. }edit: since the category is scriptapi then here is the js version:
for (i=0;i<mc.theWorld.playerEntities.size();i++) { var e = mc.theWorld.playerEntities.get(i); // js automatically declare the type of variable at runtime so just use e.posX, e.posY, e.posZ like the one above. }@wysi said in [Machine translation]how to get the coordinates of all players:
@aacx_hacker you can do a for loop with
mc.theWorld.playerEntities, something like this:for (EntityPlayer e : (List<EntityPlayer>) mc.theWorld.playerEntities) { // in this case use e.posX, e.posY, e.posZ to get the coordinates. }edit: since the category is scriptapi then here is the js version:
for (i=0;i<mc.theWorld.playerEntities.size();i++) { var e = mc.theWorld.playerEntities.get(i); // js automatically declare the type of variable at runtime so just use e.posX, e.posY, e.posZ like the one above. }you can just do this:
for (e : mc.theWorld.playerEntities) { var x = e.posX; // same with y and z } -
@aacx_hacker you can do a for loop with
mc.theWorld.playerEntities, something like this:for (EntityPlayer e : (List<EntityPlayer>) mc.theWorld.playerEntities) { // in this case use e.posX, e.posY, e.posZ to get the coordinates. }edit: since the category is scriptapi then here is the js version:
for (i=0;i<mc.theWorld.playerEntities.size();i++) { var e = mc.theWorld.playerEntities.get(i); // js automatically declare the type of variable at runtime so just use e.posX, e.posY, e.posZ like the one above. }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login