forgor to remove unused

This commit is contained in:
ChomeNS 2022-11-19 19:09:21 +07:00
parent b70cbdf5f3
commit 97278df7aa

View file

@ -1,7 +1,6 @@
/* eslint-disable max-len */ /* eslint-disable max-len */
/* eslint-disable require-jsdoc */ /* eslint-disable require-jsdoc */
const nbt = require('prismarine-nbt'); const nbt = require('prismarine-nbt');
const sleep = require('sleep-promise');
const Vec3 = require('vec3'); const Vec3 = require('vec3');
const relativePosition = new Vec3(0, 0, 0); const relativePosition = new Vec3(0, 0, 0);
@ -58,26 +57,29 @@ function inject(bot, dcclient, config) {
try { 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 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)}; 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', { bot.write('set_creative_slot', {
slot: 36, slot: 36,
item: { item: {
present: true, present: true,
itemId: mcData.itemsByName['repeating_command_block'].id, itemId: mcData.itemsByName['repeating_command_block'].id,
itemCount: 64, itemCount: 64,
nbtData: nbt.comp({BlockEntityTag: nbt.comp({ nbtData: nbt.comp({
BlockEntityTag: nbt.comp({
Command: nbt.string(fillCommand), Command: nbt.string(fillCommand),
auto: nbt.byte(1), auto: nbt.byte(1),
TrackOutput: nbt.byte(0), TrackOutput: nbt.byte(0),
})}), }),
}),
}, },
}); });
await sleep(50);
bot.write('block_dig', { bot.write('block_dig', {
status: 0, status: 0,
location, location,
face: 1, face: 1,
}); });
await sleep(50);
bot.write('block_place', { bot.write('block_place', {
location, location,
direction: 1, direction: 1,