Jump to content

[1.11] [Client] How to get Entities client side and get some things about them


Recommended Posts

Posted

I'm trying to get some entities around the player and then list some information about them,

Googling around I found this:

List<EntityMob> e = player.worldObj.getEntitiesWithinAABB(EntityMob.class, AxisAlignedBB.getBoundingBox(player.posX - 5, player.posY - 5, player.posZ - 5, player.posX + 5, player.posY + 5, player.posZ + 5));

Though, I'm not sure if it works right on a client side mod.

Other than that I need to get their names and the line below their names:

Spoiler

2017-03-20_06_47_01.thumb.png.e76fb9dd386e4dc587793be9e78f774d.png

This line is a vanilla scoreboard line that you create through any objective and "/scoreboard objectives setdisplay OBJECTIVE belowName" if it helps in any way.

 

Thanks to everyone that helps!

Doing stuff n' things

Posted

You access scoreboard information through the scoreboard.  It's got some private values, but reflection fixes that.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
2 hours ago, Draco18s said:

You access scoreboard information through the scoreboard.  It's got some private values, but reflection fixes that.

The problem is, is that I dont know what score it is, how would I use scoreboard properly and how do I check it per entity around player..

I need to check for Entities around the player also and I dont know how to update the line that I posted or if there is a better way..

 

What I mean is that I dont know how to list the mobs properly also and I need spesificly the line below the entity's name..

Doing stuff n' things

Posted
1 minute ago, diesieben07 said:

Yes, it does.

 

As for scoreboard: World::getScoreboard.

Then how would I spesificly get the one with setdisplay belowName of an entity?

Doing stuff n' things

Posted
3 minutes ago, diesieben07 said:

Please at least try to do some investigation yourself, ok? Look at the Scoreboard class and see what it can do for you.

I'm not on my IDE pc sadly.. I'm trying to get some information for when I come back to it..

Doing stuff n' things

Posted
1 minute ago, diesieben07 said:

So you are trying to make volunteers on the internet do your work for you. Great.

I'm not asking anyone to give me just a code that works, I'm trying to understand what I didnt understand when I was home on the IDE pc... I tried some things and I looked into the Scoreboard class first thing as I knew where that line exists in vanilla.. But I couldnt find anything on how to do it...

I'm sorry if it makes you feel like I'm trying to get you to write me a mod but I came to modder support because I couldnt solve it by myself...

Doing stuff n' things

Posted
2 minutes ago, diesieben07 said:

I suggest you first read the Scoreboard Article on the Minecraft Wiki to get to know what exactly those display tags are. Then it should be easy to find their location in the code.

I'm sorry but I'm really trying to understand.. I have worked a ton with command blocks and I know how the Display Slots work and how its global and all of that.. I cant understand how I get for a spesific entity for that matter what it has in that slot..

Doing stuff n' things

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.