黄豆 饮料 冰棍 实现

This commit is contained in:
wenhe committed 2026-09-04 11:59:53 +08:00
1 parent 38f2ff2b33
commit f89b95fb99
23 files changed
+1773 -88

No files matched your search

@@ -118,28 +118,30 @@ class BarbecueTimerService(BlueFoxServerSystem):
启动烤制计时:先检查下方篝火,通过后写 开始时间戳+时长 到方块实体数据。
- 启动前检查:下方不是篝火 → 拒绝并提示(烧烤必须右键激活,不会自动烤)
- 已在本规则计时中的方块不会重复重置时间(保持原剩余时间)
返回 True=找到规则并处理(含已计时中/篝火检查失败);False=不属于本计时功能
"""
recipe = self.barbecueTimers.get(blockName)
if not recipe:
return
return False
# 启动前检查下方篝火(烧烤必须下方是篝火才能开始烤制)
if not self.checkBelow(recipe, dim, pos):
if playerId:
comp.CreateMsg(playerId).NotifyOneMessage(playerId, "§c支杆下方需要放一个篝火(营火)才能烤制!")
return
return True
# 去重:如果该方块已经在本规则计时中,不重置(保持原剩余时间)
try:
data = blockEntityDataComp.GetBlockEntityData(dim, pos)
if data and data["rtdd_tid"] == blockName:
return
return True
except Exception:
pass
self._writeTimerData(dim, pos, recipe, playerId)
# 烤制开始提示
if playerId and recipe.get("startTip"):
comp.CreateMsg(playerId).NotifyOneMessage(playerId, recipe["startTip"])
return True
# ============================================================================
# 三、tick 检查与到点转换