Suvarii commited on
Commit
84bc177
·
verified ·
1 Parent(s): c14ad2c

Update bot.js

Browse files
Files changed (1) hide show
  1. bot.js +13 -1
bot.js CHANGED
@@ -519,6 +519,18 @@ async function createBot() {
519
  }, delayMs);
520
  }
521
 
 
 
 
 
 
 
 
 
 
 
 
 
522
  async function scanAndFeed() {
523
  if (!bot || !botIsReady) return;
524
 
@@ -604,7 +616,7 @@ async function createBot() {
604
  logger.info(`[Tıklama Sistemi] Menü tespiti başarısız. Deneme #${clickCount} gönderiliyor... (id:${best.entity.id})`);
605
 
606
  try {
607
- bot.activateEntity(best.entity);
608
  } catch (err) {}
609
  };
610
 
 
519
  }, delayMs);
520
  }
521
 
522
+ function activateEntityAtNoLook(entity, position) {
523
+ bot._client.write('use_entity', {
524
+ target: entity.id,
525
+ mouse: 2, // interact at
526
+ sneaking: false,
527
+ hand: 0,
528
+ x: position.x - entity.position.x,
529
+ y: position.y - entity.position.y,
530
+ z: position.z - entity.position.z
531
+ });
532
+ }
533
+
534
  async function scanAndFeed() {
535
  if (!bot || !botIsReady) return;
536
 
 
616
  logger.info(`[Tıklama Sistemi] Menü tespiti başarısız. Deneme #${clickCount} gönderiliyor... (id:${best.entity.id})`);
617
 
618
  try {
619
+ activateEntityAtNoLook(best.entity, best.entity.position);
620
  } catch (err) {}
621
  };
622