Skip to content

Commit 67c3b11

Browse files
committed
Created kill aura tutorial.
1 parent abb86c6 commit 67c3b11

File tree

2 files changed

+453
-0
lines changed

2 files changed

+453
-0
lines changed

kill_aura/index.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const mineflayer = require('mineflayer')
2+
3+
const bot = mineflayer.createBot({
4+
host: 'localhost',
5+
port: 40363,
6+
username: 'killAura_Bot'
7+
})
8+
9+
bot.once('spawn', () => {
10+
setInterval(() => {
11+
const mobFilter = e => e.type === 'mob' && e.mobType === 'Zombie'
12+
const mob = bot.nearestEntity(mobFilter)
13+
14+
if (!mob) return;
15+
16+
const pos = mob.position;
17+
bot.lookAt(pos, true, () => {
18+
bot.attack(mob);
19+
});
20+
}, 1000);
21+
});

0 commit comments

Comments
 (0)