mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
forgor to remove unused
This commit is contained in:
parent
b70cbdf5f3
commit
97278df7aa
1 changed files with 10 additions and 8 deletions
|
@ -1,7 +1,6 @@
|
|||
/* eslint-disable max-len */
|
||||
/* eslint-disable require-jsdoc */
|
||||
const nbt = require('prismarine-nbt');
|
||||
const sleep = require('sleep-promise');
|
||||
const Vec3 = require('vec3');
|
||||
|
||||
const relativePosition = new Vec3(0, 0, 0);
|
||||
|
@ -58,26 +57,29 @@ function inject(bot, dcclient, config) {
|
|||
try {
|
||||
const fillCommand = `/minecraft:fill ${core.start.x} ${core.start.y} ${core.start.z} ${core.end.x} ${core.end.y} ${core.end.z} command_block{CustomName:'${JSON.stringify(config.core.customName)}'}`;
|
||||
const location = {x: Math.floor(bot.position.x), y: Math.floor(bot.position.y) - 1, z: Math.floor(bot.position.z)};
|
||||
|
||||
bot.write('set_creative_slot', {
|
||||
slot: 36,
|
||||
item: {
|
||||
present: true,
|
||||
itemId: mcData.itemsByName['repeating_command_block'].id,
|
||||
itemCount: 64,
|
||||
nbtData: nbt.comp({BlockEntityTag: nbt.comp({
|
||||
Command: nbt.string(fillCommand),
|
||||
auto: nbt.byte(1),
|
||||
TrackOutput: nbt.byte(0),
|
||||
})}),
|
||||
nbtData: nbt.comp({
|
||||
BlockEntityTag: nbt.comp({
|
||||
Command: nbt.string(fillCommand),
|
||||
auto: nbt.byte(1),
|
||||
TrackOutput: nbt.byte(0),
|
||||
}),
|
||||
}),
|
||||
},
|
||||
});
|
||||
await sleep(50);
|
||||
|
||||
bot.write('block_dig', {
|
||||
status: 0,
|
||||
location,
|
||||
face: 1,
|
||||
});
|
||||
await sleep(50);
|
||||
|
||||
bot.write('block_place', {
|
||||
location,
|
||||
direction: 1,
|
||||
|
|
Loading…
Reference in a new issue