mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-09 00:35:33 +02:00
refactoring construction task files
This commit is contained in:
parent
127db0dfd1
commit
80f9c9f6c7
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
import * as world from '../library/world.js';
|
import * as world from '../library/world.js';
|
||||||
import * as mc from '../../utils/mcdata.js';
|
import * as mc from '../../utils/mcdata.js';
|
||||||
import convoManager from '../conversation.js';
|
import convoManager from '../conversation.js';
|
||||||
import { checkLevelBlueprint, checkBlueprint } from '../tasks.js';
|
import { checkLevelBlueprint, checkBlueprint } from '../construction_tasks.js';
|
||||||
|
|
||||||
const pad = (str) => {
|
const pad = (str) => {
|
||||||
return '\n' + str + '\n';
|
return '\n' + str + '\n';
|
||||||
|
|
|
@ -119,7 +119,7 @@ function proceduralGeneration(m = 20,
|
||||||
rooms = 8,
|
rooms = 8,
|
||||||
wrapping = "air",
|
wrapping = "air",
|
||||||
carpetStyle = 1,
|
carpetStyle = 1,
|
||||||
windowStyle = 1,
|
windowStyle = 2,
|
||||||
complexity = 4) {
|
complexity = 4) {
|
||||||
// Build 3D space
|
// Build 3D space
|
||||||
const matrix = Array.from({length: p}, () =>
|
const matrix = Array.from({length: p}, () =>
|
||||||
|
@ -771,10 +771,10 @@ function printMatrix(matrix) {
|
||||||
|
|
||||||
|
|
||||||
// main:
|
// main:
|
||||||
const resultMatrix = proceduralGeneration(20, 10, 20, 10, "air", 1, 1, 4);
|
const resultMatrix = proceduralGeneration(20, 10, 20, 10, "air", 2, 2, 4);
|
||||||
printMatrix(resultMatrix)
|
printMatrix(resultMatrix)
|
||||||
|
|
||||||
let blueprint = matrixToBlueprint(resultMatrix,[194, -60, -94])
|
let blueprint = matrixToBlueprint(resultMatrix,[122, -60, -178])
|
||||||
|
|
||||||
import mineflayer from "mineflayer";
|
import mineflayer from "mineflayer";
|
||||||
import {autoBuild} from "./test_blueprint_layout.js";
|
import {autoBuild} from "./test_blueprint_layout.js";
|
||||||
|
|
Loading…
Add table
Reference in a new issue