Jump to content

Entity help


Recommended Posts

Posted (edited)

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
Posted

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)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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