abouhanafy87 5 Posted August 13, 2021 How can i use thread to make mining function and run beside my code
Hashtag 8937 Posted August 13, 2021 Are you sure you want to use a thread? It's generally not a good idea. What are you trying to achieve?
abouhanafy87 5 Author Posted August 13, 2021 23 minutes ago, Hashtag said: Are you sure you want to use a thread? It's generally not a good idea. What are you trying to achieve? I want to check other rocks and regist it in table through mining
abouhanafy87 5 Author Posted August 14, 2021 this is my mine func private void mine() { currentNode = GameObjects.closest(oreID ); if(currentNode !=null) { if (currentNode.getID() == oreID) { //if your'e free if (currentNode.interactForceLeft("Mine")) { sleepUntil(() -> !currentNode.exists(), Calculations.random(5000, 30000));// this make my code to freeze } } } } i want to make another function to catch other rocks and regist it's time how can i make it when my code is freeze in my mining function . i want to make catch function in another thread but i want some help . thanks for you
Recommended Posts
Archived
This topic is now archived and is closed to further replies.