Jump to content

Entity help


Chicken Wing

Recommended Posts

EntityAPI.get(x,y) returns a list of entities on pos x,y,z with z = myPlayer.getZ()

!EntityAPI.get(x,y).isEmpty()   --> there is something at position x,y

EntityAPI is one of npcs, objects, grounditems

 

This is exactly what I was looking for, thank you QwPha8E.png

 

EDIT: EntityAPI is an abstract class? So I have to make those methods myself? I think I've found a solution to my problem so its ok now anyway.

 

Edited by Chicken Wing
Link to comment
Share on other sites

This is exactly what I was looking for, thank you QwPha8E.png

 

EDIT: EntityAPI is an abstract class? So I have to make those methods myself? I think I've found a solution to my problem so its ok now anyway.

Yes it is an abstract class, subclassed by concrete classes Objects, NPCS and GroundItems. So you could do objects.get(x,y) or npcs.get(x,y) or groundItems.get(x,y)

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...