
MC3G - Minecraft Collectible Card Game
一款简单且可扩展的《Minecraft》集换式卡牌模组。
打开卡包,收集随机卡牌,并使用它们触发效果。可以把它想象成幸运方块(Lucky Blocks),但你在决定使用之前可以阅读卡牌的效果说明。MC3G 中的所有卡牌和效果均由数据驱动,因此新内容可以完全通过数据包添加,无需编写 Java 代码。
警告:该模组目前自身并未添加太多内容。它旨在具备扩展性,请考虑 创建您自己的卡牌数据包。
功能
- 程序化生成的卡牌 — 名称、描述和效果在开包时从加权池中组装而成。
- 使用前先阅读 — 每张卡牌的效果都附带说明,没有意外惊喜。
- 完全数据驱动 — 卡牌效果全部由 JSON 定义。在不触碰任何一行代码的情况下,即可添加新卡牌并重新平衡掉落率。
- 可扩展的效果系统 — 模组开发者可以在 Java 中注册全新的效果类型(
CardEffect 实现类),随后这些类型会立即作为构建模块供数据包作者使用。
- 可切换的默认内容 — 可选卡牌池随模组一同提供,但可以像其他数据包一样启用或禁用。
要求
|
版本 |
| Minecraft |
1.26.2 |
| NeoForge |
26.2.0.8-beta 或更高版本 |
安装方法
- 为 Minecraft 26.2 安装 NeoForge。
- 从发布页面下载最新的 jar 文件。
- 将 jar 文件放入您的
mods 文件夹中。
- 启动游戏。
工作原理
MC3G 围绕三个层级构建:卡牌包生成卡牌,而卡牌携带一个在卡牌被使用时运行的卡牌效果。
卡牌包
卡牌包是一种物品,当被打开时,它会从效果定义的加权池中抽取,从而生成一张或多张卡牌。击杀任意生物时存在一个可配置的掉落几率,默认为 1%。
卡牌
生成的卡牌是一个普通的 ItemStack,其数据组件中包含一个效果列表。它的名称和描述是根据为其抽取的效果定义程序化组装而成的。使用卡牌会运行其卡牌效果,然后消耗掉这张卡牌。
卡牌效果
在底层,每个效果都是一个小型的、自包含的 Java 类,实现了通用的 CardEffect 接口,例如召唤闪电、给予物品或将世界时钟跳至特定时间等。使该系统具备数据驱动特性的关键在于,每种效果类型都注册了一个 JSON 键(例如 collectiblecards:lightning_strike),因此数据包作者只需按名称引用效果类型并在 JSON 中提供其参数即可。
创建您自己的卡牌
新卡牌通过卡牌效果定义添加,这是描述一种效果的加权“风味”的 JSON 文件,包括其名称生成词库和工具提示描述。请参阅 default_cards 数据包 和 带注释的示例 json 作为参考:
default_cards/data/collectiblecards/collectiblecards/card_effect_definition/storm.json
{
"weight": 5.0,
"rarity": 4,
"effects": [
{"type": "collectiblecards:set_time", "time": 18000},
{"type": "collectiblecards:set_weather", "weather": "thunder"},
{"type": "collectiblecards:lightning_strike", "count": 30, "range": 15, "delay": 5}],
"name_decorator": {
"adjectives": [
"Wrathful",
"Imminent",
"Threatening"
],
"nouns": [
"Storm",
"Deluge",
"Downpour"
],
"specials": [
"Thunder",
"Lightning"
]
},
"description": "Caution: High risk of flooding and shock."
}
内置效果类型
请参阅 带注释的示例 json,其中包含卡牌效果定义的带注释示例以及所有可用的内置效果。

MC3G - Minecraft Collectible Card Game
A simple, extensible trading card mod for Minecraft.
Open card packs, collect randomized cards, and use them to trigger effects. Think Lucky Blocks, but you can read what a card does before you commit to using it. Every card and effect in MC3G is data-driven, so new content can be added entirely through datapacks, no Java required.
WARNING: This mod does not yet add much content on its own. It is built to be extensible, consider creating your own card data pack.
Features
- Procedurally generated cards — names, descriptions, and effects are assembled at pack-opening time from weighted pools.
- Read before you use it — every card's effect comes with a description, no surprises.
- Fully data-driven — card effects are all defined in JSON. Add new cards and rebalance drop rates without touching a single line of code.
- Extensible effect system — modders can register brand-new effect types in Java (
CardEffect implementations), which then become immediately available to datapack authors as building blocks.
- Toggleable default content — optional card pools ship inside the mod but can be enabled/disabled like any other datapack.
Requirements
|
Version |
| Minecraft |
1.26.2 |
| NeoForge |
26.2.0.8-beta or later |
Installation
- Install NeoForge for Minecraft 26.2.
- Download the latest jar from the releases page.
- Drop the jar into your
mods folder.
- Launch the game.
How It Works
MC3G is built around three layers: Card Packs produce Cards, and Cards carry a Card Effect that runs when the card is used.
Card Packs
A card pack is an item that, when opened, generates one or more cards by rolling from a weighted pool of effect definitions. There is a configurable drop chance when killing any mob, that is 1% by default.
Cards
A generated card is a normal ItemStack carrying a list of effects as a data component. Its name and description are assembled procedurally from the effect definitions rolled for it. Using a card runs it's card effect, then consumes the card.
Card Effects
Under the hood, every effect is a small, self-contained Java class implementing a common CardEffect interface, things like striking lightning, granting items, or skipping the world clock to a given time. What makes the system data-driven is that each effect type is registered against a JSON key (e.g. collectiblecards:lightning_strike), so a datapack author can just reference the effect type by name and supply its parameters in JSON.
Creating Your Own Cards
New cards are added through Card Effect Definitions, JSON files that describe one weighted "flavor" of an effect, including its name-generation word banks and tooltip description. See the default_cards datapack and the annoted example json for reference:
default_cards/data/collectiblecards/collectiblecards/card_effect_definition/storm.json
{
"weight": 5.0,
"rarity": 4,
"effects": [
{"type": "collectiblecards:set_time", "time": 18000},
{"type": "collectiblecards:set_weather", "weather": "thunder"},
{"type": "collectiblecards:lightning_strike", "count": 30, "range": 15, "delay": 5}],
"name_decorator": {
"adjectives": [
"Wrathful",
"Imminent",
"Threatening"
],
"nouns": [
"Storm",
"Deluge",
"Downpour"
],
"specials": [
"Thunder",
"Lightning"
]
},
"description": "Caution: High risk of flooding and shock."
}
Built-in Effect Types
See annoted example json for annotated example of a card effect definition, and all available built-in effects.
评论 0
登录后参与评分
还没有评论,来抢沙发吧