黄豆 饮料 冰棍 实现
This commit is contained in:
1 parent
38f2ff2b33
commit
f89b95fb99
23 files changed
+1773
-88
No files matched your search
+4
-2
@@ -111,21 +111,23 @@ class AnimalTimerService(BlueFoxServerSystem):
|
||||
启动计时:把 计时标识+开始时间戳+时长 写入方块实体数据。
|
||||
- 已处于本规则计时中的方块不会重复重置时间(保持原剩余时间)
|
||||
- 动物计时 autoStart 默认 True:放置/填充后自动开始(tick 也会自动补写)
|
||||
返回 True=找到规则并处理(含已计时中);False=不属于本计时功能
|
||||
"""
|
||||
recipe = self.animalTimers.get(blockName)
|
||||
if not recipe:
|
||||
return
|
||||
return False
|
||||
# 去重:如果该方块已经在本规则计时中,不重置(保持原剩余时间)
|
||||
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 检查与到点转换
|
||||
|
||||
Reference in new issue
Block a user