spoonMate 0 Posted January 7, 2019 I am trying to make a blast furnace script for myself and having problems with interact misclicking on the belt, it will find the object but the click point it finds is often not actually within the clickbox. Is there a way to make it click closer to the center of the object? My current object detection and interaction code is as follows: GameObject Belt = getGameObjects().closest(gameObject -> gameObject != null && gameObject.getName().equals("Conveyor belt")); sleepUntil(() -> Belt.interact(), 9000); I have tried forcing right click with put-in-ore as the option, but it still mis-clicks.
Nuclear Nezz 2107 Posted January 7, 2019 I would suggest drawing the bounding box of the belt you're finding, it's possible it's finding a different belt.
spoonMate 0 Author Posted January 7, 2019 Yeah I think that may be it, the extension of the belt is not interactable. Trying to look into the bounding box now. Just started trying to learn the API.
ozeki6 32 Posted January 8, 2019 1 hour ago, spoonMate said: Yeah I think that may be it, the extension of the belt is not interactable. Trying to look into the bounding box now. Just started trying to learn the API. Just get the exact object that you need. Use the object's id or use getTopObjectOnTile(Tile tile) method if needed. If it still missclicks then get the bounding box and get the center.
spoonMate 0 Author Posted January 8, 2019 7 hours ago, ozeki6 said: Just get the exact object that you need. Use the object's id or use getTopObjectOnTile(Tile tile) method if needed. If it still missclicks then get the bounding box and get the center. Thanks to both of you, ended up using the hasAction method but needed the getTopObjectOnTile method for the dispenser. In the end got it working
Recommended Posts
Archived
This topic is now archived and is closed to further replies.