KKnippenberg 0 Share Posted January 3, 2019 Hi I need some help with my project. I'm working on a gem miner but I'm very inexperienced. How can I tell the bot to not mine empty rocks Link to comment Share on other sites More sharing options...
KKnippenberg 0 Author Share Posted January 3, 2019 this is my code. The issue is whenever I finish mining the gem it keeps trying to mine the same rock because it can't recognize their is no ore in it. I need a solution to how to have it know that the rock is empty. Gems.java Link to comment Share on other sites More sharing options...
sr24 25 Share Posted January 3, 2019 Could you please paste the source of your code at https://paste.ofcode.org/ and then post the link here. Alternatively, you could use pastebin.com to do the same thing. This would make it easier for more people to easily glance at your code. Another option is to paste it here utilizing the <> brackets on the toolbar. Just my two cents Link to comment Share on other sites More sharing options...
KKnippenberg 0 Author Share Posted January 3, 2019 https://paste.ofcode.org/JKw4jUFcJ6qH33jL3iTKSw this is my code as requested Link to comment Share on other sites More sharing options...
ozeki6 32 Share Posted January 3, 2019 1 hour ago, KKnippenberg said: https://paste.ofcode.org/JKw4jUFcJ6qH33jL3iTKSw this is my code as requested You need to check for id not for name. Both depleted and non-depleted rocks have the same name. However, they are different objects and you can use id's to sort them out. Link to comment Share on other sites More sharing options...
KKnippenberg 0 Author Share Posted January 3, 2019 2 hours ago, ozeki6 said: You need to check for id not for name. Both depleted and non-depleted rocks have the same name. However, they are different objects and you can use id's to sort them out. How Do I check for id. What is the script code for that. I understand the idea though Link to comment Share on other sites More sharing options...
ozeki6 32 Share Posted January 4, 2019 57 minutes ago, KKnippenberg said: How Do I check for id. What is the script code for that. I understand the idea though getId() instead of getName(). You'll have to learn some basics since I'm not gonna spoon feed you. Check some tutorials, please. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.