From 67bc3dae39ccdfa4e3db7a8e871be561be86c0f4 Mon Sep 17 00:00:00 2001 From: Rin Date: Tue, 13 Jan 2026 02:08:45 +0800 Subject: [PATCH] fix(minecraft): there's no oxygen in minecraft wtf --- services/minecraft/src/cognitive/conscious/context-view.ts | 2 +- services/minecraft/src/cognitive/reflex/context.ts | 6 ++---- .../minecraft/src/cognitive/reflex/reflex-manager.test.ts | 1 - services/minecraft/src/cognitive/reflex/runtime.ts | 1 - 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/services/minecraft/src/cognitive/conscious/context-view.ts b/services/minecraft/src/cognitive/conscious/context-view.ts index 7d963e5f..87e153e0 100644 --- a/services/minecraft/src/cognitive/conscious/context-view.ts +++ b/services/minecraft/src/cognitive/conscious/context-view.ts @@ -6,7 +6,7 @@ export interface ConsciousContextView { } export function buildConsciousContextView(ctx: ReflexContextState): ConsciousContextView { - const selfSummary = `Position ${String(ctx.self.location)} Health ${ctx.self.health}/20 Food ${ctx.self.food}/20 Oxygen ${ctx.self.oxygen}/20 Holding ${ctx.self.holding ?? 'nothing'}` + const selfSummary = `Position ${String(ctx.self.location)} Health ${ctx.self.health}/20 Food ${ctx.self.food}/20 Holding ${ctx.self.holding ?? 'nothing'}` const players = ctx.environment.nearbyPlayers.map(p => p.name).join(',') const entities = ctx.environment.nearbyEntities.map(e => e.name).join(',') diff --git a/services/minecraft/src/cognitive/reflex/context.ts b/services/minecraft/src/cognitive/reflex/context.ts index 32fa30e8..e36178ad 100644 --- a/services/minecraft/src/cognitive/reflex/context.ts +++ b/services/minecraft/src/cognitive/reflex/context.ts @@ -1,11 +1,10 @@ import type { Vec3 } from 'vec3' export interface ReflexSelfState { - location: Vec3 | null + location: Vec3 holding: string | null health: number food: number - oxygen: number } export interface ReflexEnvironmentState { @@ -53,11 +52,10 @@ export class ReflexContext { this.state = { now: Date.now(), self: { - location: null, + location: { x: 0, y: 0, z: 0 } as Vec3, holding: null, health: 20, food: 20, - oxygen: 20, }, environment: { time: 'day', diff --git a/services/minecraft/src/cognitive/reflex/reflex-manager.test.ts b/services/minecraft/src/cognitive/reflex/reflex-manager.test.ts index a5871f92..318e2008 100644 --- a/services/minecraft/src/cognitive/reflex/reflex-manager.test.ts +++ b/services/minecraft/src/cognitive/reflex/reflex-manager.test.ts @@ -22,7 +22,6 @@ function makeBot() { }, health: 20, food: 20, - oxygenLevel: 20, heldItem: null, time: { isDay: true }, isRaining: false, diff --git a/services/minecraft/src/cognitive/reflex/runtime.ts b/services/minecraft/src/cognitive/reflex/runtime.ts index 9f6b3ce1..444f02df 100644 --- a/services/minecraft/src/cognitive/reflex/runtime.ts +++ b/services/minecraft/src/cognitive/reflex/runtime.ts @@ -53,7 +53,6 @@ export class ReflexRuntime { location: entity.position, health: bot.bot.health ?? 0, food: bot.bot.food ?? 0, - oxygen: bot.bot.oxygenLevel ?? 0, holding: bot.bot.heldItem?.name ?? null, })