Files
rtdd/behavior_pack_v8jz0zSR/Script_NeteaseModousIY5aSF/ceshi/RecipeData.py
T
2026-07-21 12:07:40 +08:00

85 lines
3.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""
配方数据文件 - 所有"右键方块→消耗物品→替换方块"的配方都在这里
===============================================================
每加一道新菜,只需要在这里加一条配方,不用写任何Python代码。
配方字典字段说明([] = 可选,{} = 特殊类型):
{
"source": str, # 被右键的方块ID(必填)
"item": str|None, # 玩家手里必须拿的物品,None=空手也行
[below]: str, # 方块下面必须是什么
[needOil]: bool, # 物品必须有"油标签"
[target]: str|None, # 替换成什么方块,None=不替换
[consume]: int, # 消耗物品数量,0=不消耗(默认1)
[giveItem]: str, # 额外给玩家什么物品
[sound]: str, # 播放什么声音
[soundPitch]: float, # 声音频率(默认1.0)
[stirCount]: int, # 需要翻炒几次才变身
[stirCd]: float, # 翻炒冷却时间(秒)
[onDone]: str, # 完成动作:"finish"=标记熟了不替换
[doneMsg]: str, # 完成后的提示消息
[failMsg]: str, # 冷却中/失败时的提示
[dropIfDone]: list, # 熟了后拆掉掉落什么
[dropIfNot]: list, # 没熟拆掉掉落什么
}
"""
# ============================================================
# 炒菜示例:胡萝卜牛肉(完整一条链)
# ============================================================
# 流程:空锅 → 加油 → 放牛肉 → 翻炒 → 熟了 → 拆掉拿熟牛肉
RECIPES = [
# ===== 步骤1:空炒锅 + 有油的物品 → 带油煎锅 =====
{
"source": "rtdd:wok",
"item": None,
"below": "minecraft:campfire",
"needOil": True,
"target": "rtdd:cookinggarlic",
"consume": 0,
"sound": "random.fizz",
"soundPitch": 2.4,
},
# ===== 步骤2:带油煎锅 + 生牛肉 → 胡萝卜牛肉锅 =====
{
"source": "rtdd:cookinggarlic",
"item": "minecraft:beef",
"target": "rtdd:carrotandbeef",
"consume": 1,
"sound": "random.fizz",
"soundPitch": 0.8,
},
# ===== 步骤3:胡萝卜牛肉锅 + 木剑翻炒 → 第二阶段 =====
{
"source": "rtdd:carrotandbeef",
"item": "minecraft:wooden_sword",
"target": "rtdd:carrotandbeef_1",
"consume": 0,
"stirCount": 5,
"stirCd": 1.2,
"sound": "random.fizz",
"soundPitch": 2.1,
"failMsg": "这时候翻动会不好熟的!",
},
# ===== 步骤4:第二阶段 + 木剑翻炒 → 标记熟了 =====
{
"source": "rtdd:carrotandbeef_1",
"item": "minecraft:wooden_sword",
"target": None,
"consume": 0,
"stirCount": 3,
"stirCd": 0.8,
"sound": "random.fizz",
"soundPitch": 2.1,
"onDone": "finish",
"doneMsg": "出锅啦!拿盘子盛出来",
"failMsg": "这时候翻动会不好熟的!",
"dropIfDone": ["minecraft:cooked_beef", "rtdd:wok"],
"dropIfNot": ["minecraft:beef", "rtdd:wok"],
},
]