-
Notifications
You must be signed in to change notification settings - Fork 0
/
comment.txt
90 lines (70 loc) · 3.35 KB
/
comment.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//await bot.crafting.CraftCascadeItem(bot.mcData.itemsByName.stick.id, null, 1)
//bot.qta(bot.crafting.CraftCItem(bot.mcData.itemsByName.chest.id, null, 16, bot.findBlock({ matching: bot.mcData.blocksByName.crafting_table.id })))
//bot.qta(bot.utility.DigBlock(new Vec3(-381, 67, -888)))
//bot.qta(bot.utility.PlaceBlock(new Vec3(-381, 67, -888), "furnace"))
// await bot.craft(recipes[0], 4);
// await bot.craft(recipes[1], 1);
return;
// bot.on("physicsTick", () => {
// const elyItem = bot.inventory.items().find(e => e.name.includes('elytra'))
// if (elyItem != null)
// bot.equip(elyItem, "torso");
// if (bot.entity.equipment.find(e => e != null && e.name.includes('elytra')) != null) {
// bot.setControlState("jump", true);
// bot.setControlState("jump", false);
// bot.setControlState("jump", true);
// bot.setControlState("jump", false);
// bot.setControlState("sprint", true);
// bot.setControlState("sprint", false);
// bot.elytraPlus.controlHeight(true);
// }
// })
// bot.music.DetectNoteblocks();
// const song = bot.music.LoadSong("midi.sh");
// //song.notes = song.notes.map(e => { return { note: e.note == -1 ? -1 : e.note + 2, duration: e.duration } })
// const NoteMap = song.notes.map(e => e.note).filter((e, i, a) => a.indexOf(e) == i);
// console.log(NoteMap);
// bot.taskManager.Add("T", bot.music.TuneNoteBlocks(NoteMap));
// bot.taskManager.Add("T", bot.music.Play(song), 1000);
// let HearingSong = false;
// let time = 0;
// let recording = []
// bot.on("noteHeard", (bloc, instrument, pitch) => {
// if (!HearingSong) {
// HearingSong = true;
// time = Date.now();
// }
// recording.push({ note: pitch, duration: Math.round((Date.now() - time) / 10) / 100 });
// time = Date.now();
// })
// bot.on("chat", (username, message) => {
// if (username == bot.username) return;
// if (message.includes("Tell me")) {
// console.log(recording.map((e, i, a) => `${bot.music.NoteBlockData.GetNoteFromNoteIndex(e.note)} ${a[i + 1] ? a[i + 1].duration : 0}`).join("\r\n"))
// HearingSong = false;
// }
// })
return;
//#region OLD
bot.on("physicsTick", () => {
// const tasks = bot.taskManager.GetWholeQueue();
// if (tasks.length > 0)
// console.log(tasks.map(e => e.name).join(", "))
})
//bot.taskManager.Add("Dig", Task_DigArea(new Vec3(88, 71, -15), new Vec3(83, 70, -22)));
const grass = bot.findBlocks({
matching: bot.mcData.blocksByName["tallgrass"].id, count: 128, maxDistance: 128
})//.sort((a, b) => bot.entity.position.distanceSquared(a) - bot.entity.position.distanceSquared(b))
console.log(grass)
// for (let g = 0; g < grass.length; g++) {
// bot.taskManager.Add("Grass", bot.utility.DigBlock(grass[g]));
// }
bot.taskManager.Add("Toss", bot.utility.ThrowItemsAt(bot.players["StoneTrench"].entity.position))
// function Loop() {
// const target = bot.players["StoneTrench"].entity.position;
// if (grass.length > 0) {
// bot.taskManager.Add("Loop", Loop)
// }
// }
// bot.taskManager.Add("Loop", Loop)
//#endregion