September 11, 201510 yr How do I check if there is an entity at a certain position? EDIT: I mean get a reference to an entity using a position oopsy Edited September 11, 201510 yr by Chicken Wing
September 11, 201510 yr How do I check if there is an entity at a certain position? #ENTITY HERE#getPosition().equals(the position);
September 11, 201510 yr Author #ENTITY HERE#getPosition().equals(the position); Is there a way to get a reference to an entity other than using objects.closest()?
September 11, 201510 yr 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,yEntityAPI is one of npcs, objects, grounditems
September 11, 201510 yr Author 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 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 September 11, 201510 yr by Chicken Wing
September 11, 201510 yr This is exactly what I was looking for, thank you 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)
September 11, 201510 yr Author 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) Oh I didn't realise it was the parent class (/facepalm), TY!
Create an account or sign in to comment