Fix stupid minecraft
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { BlockType, MinecraftBlockTypes, Vector3, world } from "@minecraft/server";
|
||||
import { BlockType, Vector3, world } from "@minecraft/server";
|
||||
import Level from "../Commandeer/level/level";
|
||||
import { leverOn } from "../Commandeer/level/levelTypes";
|
||||
import { teleportAgent, isAgentAt } from "../Commandeer/utils/agentUtils";
|
||||
@@ -7,6 +7,7 @@ import { vector3 } from "../Commandeer/utils/vectorUtils";
|
||||
import { levelIntroConditions } from "../levelConditions/levelIntro";
|
||||
import { CURRENT_LEVEL, mindKeeper } from "../main";
|
||||
import Pupeteer from "../Commandeer/pupeteer";
|
||||
import { MinecraftBlockTypes } from "../vanilla-data/mojang-block";
|
||||
|
||||
// const levelIntroCommandBlockPos: Vector3 = vector3(58, 66, 276);
|
||||
// const levelIntroStartPosition: Vector3 = vector3(28, 70, 269);
|
||||
@@ -25,15 +26,15 @@ const blockPositions: Vector3[] = [
|
||||
vector3(2464, 12, 108),
|
||||
];
|
||||
|
||||
let currentBlockSequence: BlockType[] = [];
|
||||
let currentBlockSequence: string[] = [];
|
||||
let currentBlockSeuqenceIndex: number[] = [];
|
||||
|
||||
const blockCycle: BlockType[] = [
|
||||
MinecraftBlockTypes.redstoneBlock,
|
||||
MinecraftBlockTypes.goldBlock,
|
||||
MinecraftBlockTypes.diamondBlock,
|
||||
MinecraftBlockTypes.emeraldBlock,
|
||||
MinecraftBlockTypes.lapisBlock,
|
||||
const blockCycle: string[] = [
|
||||
MinecraftBlockTypes.RedstoneBlock,
|
||||
MinecraftBlockTypes.GoldBlock,
|
||||
MinecraftBlockTypes.DiamondBlock,
|
||||
MinecraftBlockTypes.EmeraldBlock,
|
||||
MinecraftBlockTypes.LapisBlock,
|
||||
];
|
||||
|
||||
let buttonPressed: boolean[] = buttonPositions.map(() => false);
|
||||
@@ -48,7 +49,7 @@ const levelIntro: Level = new Level(
|
||||
let block = world.getDimension("overworld").getBlock(pos);
|
||||
let index = blockPositions.indexOf(pos);
|
||||
let blockType = block!.type;
|
||||
currentBlockSequence[index] = blockType;
|
||||
currentBlockSequence[index] = blockType.id;
|
||||
});
|
||||
},
|
||||
() => {
|
||||
@@ -90,7 +91,7 @@ const levelIntro: Level = new Level(
|
||||
let isComplete = true;
|
||||
levelIntroConditions.conditions.forEach((condition) => {
|
||||
let blockInworld = world.getDimension("overworld").getBlock(condition.position);
|
||||
if (blockInworld?.type !== condition.block) {
|
||||
if (blockInworld?.type.id !== condition.block) {
|
||||
isComplete = false;
|
||||
counter++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user