Zibele 18 Share Posted December 11, 2016 Hey guys could anyone show me an example of how to go about creating a filter & array for mining rocks,problem i am m having is when I am in the animation of mining and the rock i am mining gets mined by someone else i cant get it to switch automatically to the next available rock. This is the example of my current function that handles mining :/ public void Mine() { if (getLocalPlayer().isStandingStill() && !getLocalPlayer().isAnimating()) { Rock = getGameObjects().closest("Rocks"); if ((Rock.exists() && Rock != null && !getLocalPlayer().isMoving() && Rock.getModelColors() != null)) { if (Rock.interact("Mine")) { sleepUntil(() -> !getLocalPlayer().isAnimating(), Calculations.random(2500, 4500)); } MouseAnti(); } } } Link to comment Share on other sites More sharing options...
triblion 56 Share Posted December 11, 2016 If you are open to the idea of changing it around slightly, try changing to if your interacting with the rock that might be a better option Link to comment Share on other sites More sharing options...
Zibele 18 Author Share Posted December 12, 2016 Yeah but for that wont i need a filter and array for that to identify while im interacting, if the rock turns empty and then it can switch rocks instead of remaining in the animation of mining a empty rock? Link to comment Share on other sites More sharing options...
triblion 56 Share Posted December 12, 2016 Still do a null check obviously, use if your interacting with the entity instead though, animation is not a strong way to check if your interacting or not Link to comment Share on other sites More sharing options...
Cardozz 46 Share Posted December 12, 2016 Helped via PM Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.