Open ShiinaGM opened 7 years ago
Take a look at this: (https://github.com/michaelzangl/minebot/wiki/Javascript-Examples#interact-with-the-world) But i do not know if this also works with leftclick
I already tested it with leftclick but it clicked just for one tick and didn't hold it to break any block.
Well then i have no idea i think you have to wait for a comment from @michaelzangl For me not even the dorightclickhandler works but i have no idea why... bot.txt
You can try
minescript.doStrategy(minescript.strategy("minebot", "tunnel", "1")) minescript.doStrategy(minescript.strategyWalkTowards(minescript.getPlayer().x + 1, minescript.getPlayer().z + 0));
The X+1 is for walking back the to start position you have to replace it with X+1 X-1 Y+1 or Y-1
The only Problem is that Either the Block is in Front of you or one block below. For other the directions i have no idea how this should work. Also if there are 2 Blocks in front of you it breaks both because of the tunneling command.
Depends on what you want to do and how flexible you want the bot to react.
If you know the target coordinates, the best thing is to construct a DestroyInRange
task. You need to write your own TaskStrategy
for this. They can be used in JS, but it's easier to do in Java since your IDE will help you a lot ;-).
Hey,
I only want to create a javascript for minebot with breaks the block I am looking at. Can somebody help me?