汤锅计时音效,菜谱 UI 补登记(豆腐鲑鱼汤 = 菜谱 26),非空锅被左键打碎掉落对应空锅,饮料分组碰撞箱修改

This commit is contained in:
wenhe committed 2026-09-30 16:13:37 +08:00
1 parent ed49a10930
commit c0dd6d8dbe
21 files changed
+369 -168

No files matched your search

@@ -396,7 +396,26 @@ allCookRecipe = [
], # 分菜: 汤锅(加水) + 特殊食材 -> 计时 -> 出锅
},
# =============================================================
# 第21页 油锅·锅底=油锅(满油) —— 炸物
# 第21页 汤锅·锅底=豆腐汤 —— 豆腐鲑鱼汤(菜谱26)
# 锅底步骤: 汤锅(加水) + 豆腐x4 -> 豆腐汤
# 豆腐汤 + 鲑鱼 -> 豆腐鲑鱼汤_生 -> 加葱花碎x3 -> 计时 -> 熟 + 木碗 出锅
# =============================================================
{
'publicResult': 'rtdd:tufusoup', # 锅底 = 豆腐汤
'publicStep': [
{'itemName': 'rtdd:stewedsoupwater', 'count': 1}, # 汤锅(加水)
{'itemName': 'rtdd:beancurd', 'count': 4}, # 豆腐
{},
], # 锅底步骤: 汤锅(加水) + 豆腐x4 -> 豆腐汤
'splitStep': [
{'result': 'rtdd:bowlatufufish',
'items': [{'itemName': 'minecraft:salmon', 'count': 1},
{'itemName': 'rtdd:crushed_scallions', 'count': 3}, {}]},
# 豆腐鲑鱼汤: 豆腐汤 + 鲑鱼 -> 生 -> 加葱花碎x3 -> 计时 -> 木碗出锅
],
},
# =============================================================
# 第22页 油锅·锅底=油锅(满油) —— 炸物
# 锅底步骤: 油罐倒油 -> 油锅(满油)
# =============================================================
{
@@ -418,7 +437,7 @@ allCookRecipe = [
], # 分菜: 满油锅 + 裹粉半成品 -> 计时炸 -> 盘子出锅
},
# =============================================================
# 第22页 面食·面点(饺子/包子/馍/肉夹馍)
# 第23页 面食·面点(饺子/包子/馍/肉夹馍)
# =============================================================
{
'publicResult': 'rtdd:rawdough_0', # 锅底 = 生面团(起点)
@@ -438,7 +457,7 @@ allCookRecipe = [
], # 分菜: 以面团/面皮为原料的蒸/烙面点
},
# =============================================================
# 第23页 面食·煎饼卷/竹筒饭
# 第24页 面食·煎饼卷/竹筒饭
# =============================================================
{
'publicResult': 'rtdd:cooked_dought', # 锅底 = 煎饼
@@ -458,7 +477,7 @@ allCookRecipe = [
], # 分菜: 煎饼卷/竹筒饭成品
},
# =============================================================
# 第24页 面食·面包/烘焙
# 第25页 面食·面包/烘焙
# =============================================================
{
'publicResult': 'rtdd:bread_1', # 锅底 = 法棍
@@ -475,7 +494,7 @@ allCookRecipe = [
], # 分菜: 面胚 + 烤炉烘焙
},
# =============================================================
# 第25页 面食·甜点/蛋糕
# 第26页 面食·甜点/蛋糕
# =============================================================
{
'publicResult': 'rtdd:cake_0', # 锅底 = 奶油蛋糕
@@ -495,7 +514,7 @@ allCookRecipe = [
], # 分菜: 以蛋液半成品/蛋糕胚为基的甜点
},
# =============================================================
# 第26页 寿司·卷寿司(海苔基底)
# 第27页 寿司·卷寿司(海苔基底)
# =============================================================
{
'publicResult': 'rtdd:sushi_1', # 锅底 = 干海带(加饭团)
@@ -514,7 +533,7 @@ allCookRecipe = [
], # 分菜: 干海带(加饭团) + 鱼 -> 卷制 -> 切块
},
# =============================================================
# 第27页 寿司·手握寿司(饭团基底)
# 第28页 寿司·手握寿司(饭团基底)
# =============================================================
{
'publicResult': 'rtdd:nigirisushi', # 锅底 = 手握普通寿司
@@ -535,7 +554,7 @@ allCookRecipe = [
], # 分菜: 手握普通寿司 + 鱼 -> 手握寿司
},
# =============================================================
# 第28页 烧烤·烤串(烧烤架)
# 第29页 烧烤·烤串(烧烤架)
# =============================================================
{
'publicResult': 'rtdd:barbecuegrill_1', # 锅底 = 烧烤架(点燃)
@@ -554,7 +573,7 @@ allCookRecipe = [
], # 分菜: 生烤串放烧烤架 -> 右键2次 -> 熟(不计时)
},
# =============================================================
# 第29页 烧烤·上杆烤制(烤鸡/烤乳猪/烤鱼)
# 第30页 烧烤·上杆烤制(烤鸡/烤乳猪/烤鱼)
# =============================================================
{
'publicResult': 'rtdd:b_34', # 锅底 = 支杆
@@ -573,7 +592,7 @@ allCookRecipe = [
], # 分菜: 生食材上支杆 + 下方篝火 -> 计时烤熟
},
# =============================================================
# 第30页 饮料·榨汁机(果汁/豆浆)
# 第31页 饮料·榨汁机(果汁/豆浆)
# =============================================================
{
'publicResult': 'rtdd:juicer_0', # 锅底 = 榨汁机(空)
@@ -593,7 +612,7 @@ allCookRecipe = [
], # 分菜: 榨汁机 + 水果 -> 对应果汁, 玻璃杯取出
},
# =============================================================
# 第31页 饮料·冰棍盒
# 第32页 饮料·冰棍盒
# =============================================================
{
'publicResult': 'rtdd:icelollybox_2', # 锅底 = 冰棍盒(定型)
@@ -614,7 +633,7 @@ allCookRecipe = [
], # 分菜: 冰棍盒(定型) + 水果x2 -> 对应冰棍
},
# =============================================================
# 第32页 饮料·炒冰盒(冰沙)
# 第33页 饮料·炒冰盒(冰沙)
# =============================================================
{
'publicResult': 'rtdd:frytheicebox', # 锅底 = 炒冰盒(空)
@@ -83,6 +83,20 @@ class ChaoguoService(BlueFoxServerSystem):
# ---- 右键冷却表 ----
self.cooldown = {}
# ---- 所有"炒锅形态"方块(被左键打碎时一律掉 炒锅(空)) ----
# 覆盖: 规则里出现过的 方块/产物/计时源/计时产物(含随机产物), 排除 炒锅(空)本体
self.potBlocks = set()
for r in SWITCH_RULES:
self.potBlocks.add(r.get("block"))
self.potBlocks.add(r.get("target"))
for r in TIMER_RULES:
self.potBlocks.add(r.get("source"))
self.potBlocks.add(r.get("target"))
for t in (r.get("randomTargets") or ()):
self.potBlocks.add(t)
self.potBlocks.discard(None)
self.potBlocks.discard(WOK)
# ---- 注册到统一分发器 ----
FeatureDispatcher.register(self)
@@ -91,8 +105,8 @@ class ChaoguoService(BlueFoxServerSystem):
# ============================================================================
def getFeatureBlocks(self):
"""返回本功能管辖的所有右键方块名集合"""
return self.featureBlocks
"""返回本功能管辖的所有右键方块名集合(含锅形态, 供"打碎掉空锅"路由)"""
return self.featureBlocks | self.potBlocks
def getItemUseOnRules(self):
"""手持物品右键方块表面路由: 盖饭成品菜 + 米饭三形态(盖饭/蛋炒饭)"""
@@ -410,3 +424,48 @@ class ChaoguoService(BlueFoxServerSystem):
return False
self.cooldown[key] = now
return True
# ============================================================================
# 十、被左键打碎: 非空炒锅一律掉 炒锅(空)
# ============================================================================
def handleDestroy(self, args):
"""由 FeatureDispatcher 转发的"玩家左键破坏方块"入口。
炒锅系列(除 炒锅(空) 本体外)被打碎: 取消默认掉落(不掉"半成品锅"本体),
改为掉落 炒锅(空)。炒锅(空)本体不在 potBlocks 中, 保持默认掉自己。
返回 True=本功能处理了这次破坏; False=不归本功能管(交还默认掉落)。"""
# ServerPlayerTryDestroyBlockEvent 的方块名字段是 fullName(不是 blockName)
blockName = args.get("fullName") or args.get("blockName")
if blockName not in self.potBlocks:
return False
playerId = args.get("playerId")
x, y, z = args.get("x"), args.get("y"), args.get("z")
pos = (x, y, z)
dim = comp.CreateDimension(playerId).GetEntityDimensionId()
# 取消默认破坏+默认掉落(不让"半成品锅"本身掉出来)
args['cancel'] = True
args['spawnResources'] = False
# 记录朝向aux, 再清空方块为空气(aux必须为0)
aux = 0
try:
old = comp.CreateBlockInfo(LevelId).GetBlockNew(pos, dim)
aux = old.get("aux", 0)
except Exception:
aux = 0
try:
comp.CreateBlockInfo(LevelId).SetBlockNew(
pos, blockDict={"name": "minecraft:air", "aux": 0},
oldBlockHandling=0, dimensionId=dim)
except Exception:
pass
# 掉落 炒锅(空)(保留朝向)
try:
self.CreateEngineItemEntity(
{"itemName": WOK, "count": 1, "auxValue": aux},
dim, (x, y + 0.5, z))
except Exception:
pass
return True
@@ -36,7 +36,7 @@ from ....BlueFoxTools.ToolsConfig import LevelId
blockEntityDataComp = comp.CreateBlockEntityData(LevelId)
# ---- 只导入汤锅自己的数据库 ----
from ..TangguoData import SWITCH_RULES, ITEM_USE_ON_RULES, TIMER_RULES, BOWL, PLATE
from ..TangguoData import SWITCH_RULES, ITEM_USE_ON_RULES, TIMER_RULES, BOWL, PLATE, POT_EMPTY
# ---- 统一分发器 ----
from ...service.FeatureDispatcher import FeatureDispatcher
@@ -136,6 +136,20 @@ class TangguoService(BlueFoxServerSystem):
self.timerSources.add(src)
self.featureBlocks.add(src) # 登记右键路由, 空手右键才分发到这里
# ---- 所有"汤锅形态"方块(被左键打碎时一律掉 汤锅(空)) ----
# 覆盖: 规则里出现过的 方块/产物/计时源/计时产物(含随机产物), 排除 汤锅(空)本体
self.potBlocks = set()
for r in SWITCH_RULES:
self.potBlocks.add(r.get("block"))
self.potBlocks.add(r.get("target"))
for r in TIMER_RULES:
self.potBlocks.add(r.get("source"))
self.potBlocks.add(r.get("target"))
for t in (r.get("randomTargets") or ()):
self.potBlocks.add(t)
self.potBlocks.discard(None)
self.potBlocks.discard(POT_EMPTY)
# ---- 右键冷却表 ----
self.cooldown = {}
@@ -147,8 +161,8 @@ class TangguoService(BlueFoxServerSystem):
# ============================================================================
def getFeatureBlocks(self):
"""返回本功能管辖的所有右键方块名集合"""
return self.featureBlocks
"""返回本功能管辖的所有右键方块名集合(含锅形态, 供"打碎掉空锅"路由)"""
return self.featureBlocks | self.potBlocks
def getItemUseOnRules(self):
"""手持锅态汤方块(蘑菇汤/蔬菜汤/蛋花汤)右键 熟面条表面 走 itemUseOn 路径,
@@ -389,3 +403,48 @@ class TangguoService(BlueFoxServerSystem):
return False
self.cooldown[key] = now
return True
# ============================================================================
# 九、被左键打碎: 非空汤锅一律掉 汤锅(空)
# ============================================================================
def handleDestroy(self, args):
"""由 FeatureDispatcher 转发的"玩家左键破坏方块"入口。
汤锅系列(除 汤锅(空) 本体外)被打碎: 取消默认掉落(不掉"半成品锅"本体),
改为掉落 汤锅(空)。汤锅(空)本体不在 potBlocks 中, 保持默认掉自己。
返回 True=本功能处理了这次破坏; False=不归本功能管(交还默认掉落)。"""
# ServerPlayerTryDestroyBlockEvent 的方块名字段是 fullName(不是 blockName)
blockName = args.get("fullName") or args.get("blockName")
if blockName not in self.potBlocks:
return False
playerId = args.get("playerId")
x, y, z = args.get("x"), args.get("y"), args.get("z")
pos = (x, y, z)
dim = comp.CreateDimension(playerId).GetEntityDimensionId()
# 取消默认破坏+默认掉落(不让"半成品锅"本身掉出来)
args['cancel'] = True
args['spawnResources'] = False
# 记录朝向aux, 再清空方块为空气(aux必须为0)
aux = 0
try:
old = comp.CreateBlockInfo(LevelId).GetBlockNew(pos, dim)
aux = old.get("aux", 0)
except Exception:
aux = 0
try:
comp.CreateBlockInfo(LevelId).SetBlockNew(
pos, blockDict={"name": "minecraft:air", "aux": 0},
oldBlockHandling=0, dimensionId=dim)
except Exception:
pass
# 掉落 汤锅(空)(保留朝向)
try:
self.CreateEngineItemEntity(
{"itemName": POT_EMPTY, "count": 1, "auxValue": aux},
dim, (x, y + 0.5, z))
except Exception:
pass
return True
@@ -42,6 +42,9 @@ from ..TangguoData import TIMER_RULES
# ---- 统一分发器 ----
from ...service.FeatureDispatcher import FeatureDispatcher
# ---- 全服播放音效(计时到点: 咕嘟声 bubble.up) ----
from ....ModUtil.ServerUtil import PlaySoundToAllClient
class TangguoTimerService(BlueFoxServerSystem):
"""
@@ -170,6 +173,8 @@ class TangguoTimerService(BlueFoxServerSystem):
else:
target = rule["target"]
self.replaceBlock(pos, dim, target, None)
# 计时到点: 全服播放"咕嘟"声(bubble.up) —— 每一级转换都播
PlaySoundToAllClient((pos[0], pos[1], pos[2], dim), "bubble.up", 1.0)
self._clearTimerData(dim, pos)
except Exception:
pass
@@ -35,7 +35,7 @@ from ....BlueFoxTools.ToolsConfig import LevelId
blockEntityDataComp = comp.CreateBlockEntityData(LevelId)
# ---- 只导入油锅自己的数据库 ----
from ..YouguoData import SWITCH_RULES, OILPOT_1, TIMER_RULES
from ..YouguoData import SWITCH_RULES, OILPOT_0, OILPOT_1, TIMER_RULES
# ---- 统一分发器 ----
from ...service.FeatureDispatcher import FeatureDispatcher
@@ -124,6 +124,20 @@ class YouguoService(BlueFoxServerSystem):
# ---- 右键冷却表 ----
self.cooldown = {}
# ---- 所有"油锅形态"方块(被左键打碎时一律掉 油锅(空)) ----
# 覆盖: 规则里出现过的 方块/产物/计时源/计时产物(含随机产物), 排除 油锅(空)本体
self.potBlocks = set()
for r in SWITCH_RULES:
self.potBlocks.add(r.get("block"))
self.potBlocks.add(r.get("target"))
for r in TIMER_RULES:
self.potBlocks.add(r.get("source"))
self.potBlocks.add(r.get("target"))
for t in (r.get("randomTargets") or ()):
self.potBlocks.add(t)
self.potBlocks.discard(None)
self.potBlocks.discard(OILPOT_0)
# ---- 注册到统一分发器 ----
FeatureDispatcher.register(self)
@@ -132,8 +146,8 @@ class YouguoService(BlueFoxServerSystem):
# ============================================================================
def getFeatureBlocks(self):
"""返回本功能管辖的所有右键方块名集合"""
return self.featureBlocks
"""返回本功能管辖的所有右键方块名集合(含锅形态, 供"打碎掉空锅"路由)"""
return self.featureBlocks | self.potBlocks
def getItemUseOnRules(self):
"""手持物品右键方块表面不需要单独路由(放料/出锅都是右键方块本身), 返回空"""
@@ -350,3 +364,48 @@ class YouguoService(BlueFoxServerSystem):
return False
self.cooldown[key] = now
return True
# ============================================================================
# 十、被左键打碎: 非空油锅一律掉 油锅(空)
# ============================================================================
def handleDestroy(self, args):
"""由 FeatureDispatcher 转发的"玩家左键破坏方块"入口。
油锅系列(除 油锅(空) 本体外)被打碎: 取消默认掉落(不掉"半成品锅"本体),
改为掉落 油锅(空)。油锅(空)本体不在 potBlocks 中, 保持默认掉自己。
返回 True=本功能处理了这次破坏; False=不归本功能管(交还默认掉落)。"""
# ServerPlayerTryDestroyBlockEvent 的方块名字段是 fullName(不是 blockName)
blockName = args.get("fullName") or args.get("blockName")
if blockName not in self.potBlocks:
return False
playerId = args.get("playerId")
x, y, z = args.get("x"), args.get("y"), args.get("z")
pos = (x, y, z)
dim = comp.CreateDimension(playerId).GetEntityDimensionId()
# 取消默认破坏+默认掉落(不让"半成品锅"本身掉出来)
args['cancel'] = True
args['spawnResources'] = False
# 记录朝向aux, 再清空方块为空气(aux必须为0)
aux = 0
try:
old = comp.CreateBlockInfo(LevelId).GetBlockNew(pos, dim)
aux = old.get("aux", 0)
except Exception:
aux = 0
try:
comp.CreateBlockInfo(LevelId).SetBlockNew(
pos, blockDict={"name": "minecraft:air", "aux": 0},
oldBlockHandling=0, dimensionId=dim)
except Exception:
pass
# 掉落 油锅(空)(保留朝向)
try:
self.CreateEngineItemEntity(
{"itemName": OILPOT_0, "count": 1, "auxValue": aux},
dim, (x, y + 0.5, z))
except Exception:
pass
return True
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.4375,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.75,
0.125,
0.875
]
},
"clip": {
"min": [
0.4375,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.75,
0.125,
0.875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
},
"clip": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.25,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
},
"clip": {
"min": [
0.25,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
},
"clip": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
},
"clip": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
},
"clip": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
},
"clip": {
"min": [
0.3125,
0,
0,
0.4
0.375
],
"max": [
1,
0.6875,
0.5,
0.7
0.6875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.375,
0,
0,
0.4
0.375
],
"max": [
1,
0.4,
0.7
0.6875,
0.375,
0.6875
]
},
"clip": {
"min": [
0.375,
0,
0,
0.4
0.375
],
"max": [
1,
0.4,
0.7
0.6875,
0.375,
0.6875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.3125,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.625,
0.125,
0.875
]
},
"clip": {
"min": [
0.3125,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.625,
0.125,
0.875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.1875,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
},
"clip": {
"min": [
0.1875,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.4375,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.75,
0.125,
0.875
]
},
"clip": {
"min": [
0.4375,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.75,
0.125,
0.875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
},
"clip": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.125,
0,
0,
0.1
0.09375
],
"max": [
1,
0.625,
0.1,
0.75
0.8125
]
},
"clip": {
"min": [
0.125,
0,
0,
0.1
0.09375
],
"max": [
1,
0.625,
0.1,
0.75
0.8125
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
},
"clip": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.3125,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.625,
0.125,
0.875
]
},
"clip": {
"min": [
0.3125,
0,
0,
0.1
0.125
],
"max": [
1,
0.1,
0.9
0.625,
0.125,
0.875
]
}
},
@@ -10,26 +10,26 @@
"netease:aabb": {
"collision": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
},
"clip": {
"min": [
0.25,
0,
0,
0.35
0.34375
],
"max": [
1,
0.7,
0.65
0.8125,
0.6875,
0.65625
]
}
},