Jump to content

Stacked grounditems


Recommended Posts

Posted (edited)
if (GraphicUtilities.isVisibleOnMainScreen(new RectangleDestination(getBot(), groundItem.getModel().getBoundingBox(groundItem.getGridX(), groundItem.getGridY(), groundItem.getZ())).getBoundingBox())) {
						
}

Any ideas why it throws NPE for stacked items(example; if coins are covered with bigger item like kiteshield etc ...) ?

Edited by Ayylmao420
Posted (edited)

Ugh, why do you keep making visibility threads. Just do:

groundItem.interact("Take");

It figures out if the item is visible or not, rotates the camera, walks to the object, etc. 

It is for my custom interaction method, that is why.

if (GraphicUtilities.isVisibleOnMainScreen(GraphicUtilities.getModelArea(getBot(), groundItem.getGridX(), groundItem.getGridY(), groundItem.getZ(), groundItem.getModel()))) {
}

Seems to work now.

Edited by Ayylmao420
Posted

It is for my custom interaction method, that is why.

if (GraphicUtilities.isVisibleOnMainScreen(GraphicUtilities.getModelArea(getBot(), groundItem.getGridX(), groundItem.getGridY(), groundItem.getZ(), groundItem.getModel()))) {
}

Seems to work now.

 

Probably failed because the RectangleDestination cannot return a valid bounding box if it isn't on screen

 

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...