底座判断 两数据库判断 修复 [可用版本]

This commit is contained in:
wenhe committed 2026-08-05 16:08:33 +08:00
1 parent 94dc6f6ef7
commit 737b3f09ea
2 files changed
+6 -7

No files matched your search

@@ -229,10 +229,6 @@ class CookingService(BlueFoxServerSystem):
# 没找到匹配的配方 → 不是做菜操作,不拦截,让游戏正常处理
return
# ---- 底座检查:锅下面必须有灶台/营火,否则不让操作 ----
if not self.checkBaseBlock(recipe, playerId, pos, dim):
return
# 找到配方后,取消默认行为(如喝药水、吃食物等),由本 Mod 全权接管
args['cancel'] = True
# 同时标记该玩家下一次物品使用事件也要取消,防止喝药水等默认行为
@@ -248,9 +244,15 @@ class CookingService(BlueFoxServerSystem):
self._loadBlockDataToMemory(key, playerId, pos, dim, recipe)
if recipeType == "switch" or recipeType == "timer":
# 工具方块切换(水槽、箭桶、挂肉钩、盘子架等)不做底座检查,直接执行
self.handleSwitch(recipe, playerId, pos, dim, itemDict, key, blockName)
return
# ---- 底座检查:仅做菜配方才需要,锅下面必须有灶台/营火 ----
# 工具切换类型在上面已提前返回,不会走到这里
if not self.checkBaseBlock(recipe, playerId, pos, dim):
return
# ---- 第五步:以下为做菜配方逻辑 ----
# 内存中已有数据(_loadBlockDataToMemory 已加载),直接用