File Details
Custom Taming Framework 0.1.2-alpha.jar
- A
- May 27, 2026
- 147.15 KB
- 0
- 1.20.1
- Forge
File Name
custom_taming_framework-0.1.2-alpha.jar
Supported Versions
- 1.20.1
Curse Maven Snippet
v0.1.2-alpha
What this test version is for
v0.1.2-alpha transforms the CTF configuration system from static preset files into an interactive, GUI-driven experience. Where v0.1.1-alpha introduced the SNBT config directory and tabbed GUI, this version adds the ability to browse, search, and reconfigure every aspect of the mod through dedicated sub-screens — no file editing required.
The core architectural change is that CTF_Settings is now fully self-sufficient: it no longer depends on any mod-internal test items or hard-coded defaults. The config system can generate every living entity type as an independently toggleable pet candidate, categorise foods interactively, and persist custom item effects — all through network-synced GUIs.
What has been implemented since v0.1.1-alpha
Config Sub-screen Architecture
The general configuration screen became a hub with 3 navigation buttons in its left panel:
- 宠物列表 (PetList) — browse, search, and toggle CTF capability for every living entity type in the game
- 食物列表 (FoodList) — classify each food as normal, special, or disabled, with a search bar and per-row type toggles
- 驯兽核心 (TamingCore) — edit the Taming Core recipe pattern, display name, and consume-on-success flag
Each sub-screen opens via network request, receives its data from the server, and sends changes back over the network for immediate persistence to basic.snbt.
Pet List Management
- Every living entity type registered in the game is returned from the server and displayed in a scrollable, searchable list.
- Each entry shows the translated display name, registry ID, optional nickname, and an allowCTF checkbox.
- Tamable and rideable creatures default to allowCTF=true; all other entities default to allowCTF=false.
- OP players can toggle checkboxes and save; non-OP players see existing enabled entries in read-only mode.
- Disabling a species triggers server-side cleanup: CTF persistent data and equipment are removed from every loaded entity of that type.
Food Classification GUI
- A single scrollable list contains every food item known to the config, with per-row 3-state toggle buttons:
- 普通 (normal) — white, contributes evolution points based on food nutrition
- 特殊 (special) — gold, triggers custom rule effects configurable per player
- 禁用 (disabled) — grey, the item is silently ignored when fed to pets
- Search bar filters by registry ID.
- The "更多"食物"" button opens the SpecialFoodScreen for configuring non-food special items (items that trigger special-rule behavior but are not edible).
- Data is persisted as three independent lists:
normal_food_item_ids,special_food_item_ids,disabled_food_item_ids.
Taming Core Sub-screen
- Reuses the existing TamingCoreScreen (previously standalone) as a config sub-screen accessible from the general config hub.
- Fields: recipe string, display name, consume-on-success toggle.
Network Protocol (3 New Packets)
| Packet | Direction | idx | Description |
|---|---|---|---|
| C2SRequestConfigScreenPacket | C→S | 8 | Request config sub-screen data (0=PetList, 1=FoodList, 2=TamingCore, 3=SpecialFood) |
| S2CConfigScreenDataPacket | S→C | 9 | Server responds with full sub-screen CompoundTag data, parent SNBT, and OP status |
| C2SSaveConfigScreenPacket | C→S | 10 | Client saves modified sub-screen data back to the server |
Dynamic Config Field Additions
The CTF_Settings/basic.snbt schema gained three new lists:
general_entity_ids— entity types that default to allowCTF=false (all non-tameable, non-rideable creatures)disabled_food_item_ids— items the player has explicitly disabled as pet foodspecial_item_ids— non-food items that can trigger special-rule behavior
Server-side State Cleanup
When a species is disabled through the PetList GUI, the server:
- Resolves the entity type from its registry ID
- Iterates all loaded entities of that type in the current level
- Drops any equipped module items
- Removes CTF persistent data (PetProgress, PetEquipmentState)
- Restores the original entity display name
Config Reference Independence
CTF_Settings defaults no longer reference any mod-internal items. Previous versions included custom_taming_framework:special_food in the default special food list. v0.1.2-alpha generates purely vanilla defaults (golden_apple, enchanted_golden_apple, golden_carrot). The mod's test items (special_food, test_module) were removed entirely, making every config portable across installations.
Autocomplete Z-Ordering Fix
The autocomplete suggestion popup in TamingCoreScreen and SpecialFoodScreen now renders on top of grid items and text. The previous super.render() after popup caused deferred item models in the shared GuiGraphics buffer to draw on top at GPU flush time. Fixed by isolating the popup as an independent GPU draw pass: endBatch() before and after the popup, with a higher Z-level via pose().translate(0,0,500).
Removed v0.1.x Prototype Items
| Removed Item | Registration | Resource Files | Effects |
|---|---|---|---|
| special_food | CtfItems | lang, model, texture | CtfFoods.java emptied |
| test_module | CtfItems | lang, model, texture | Handler removed from CtfForgeEvents |
Build System
build.gradle.kts:version = "0.1.2-alpha"gradle.properties:mod_version=0.1.2-alpharunClientmods folder auto-cleared before launch to prevent mapping conflicts (NoSuchMethodError) between userdev classes and the reobf jar in the test version directory.
Current scope
This version completes the configuration system lifecycle: the mod can now be fully configured from within the game through GUI sub-screens, with instant network persistence. The config is no longer tied to any mod-internal items or hard-coded entity lists — every registered living entity and food item is available in-game for discovery and classification.
Still not covered: skill system mechanics, equipment evolution gameplay, S2C broadcast of config changes to all online players, and the drag-and-drop graphical programming interface planned for the formal release.
v0.1.2-alpha
这个测试版是做什么的
v0.1.2-alpha 将 CTF 配置系统从静态预设文件转变为交互式 GUI 驱动的体验。如果说 v0.1.1-alpha 引入了 SNBT 配置目录和标签页界面,那么这个版本则通过专用子界面实现了对模组每一项配置的可视化浏览、搜索和修改——无需手动编辑文件。
核心架构变化是 CTF_Settings 现在完全独立自给,不再依赖任何模组内置测试物品或硬编码默认值。配置系统可以枚举游戏中每个活体生物类型作为独立可切换的宠物候选,交互式地对食物进行分类,并通过网络同步的 GUI 持久化自定义物品效果。
自 v0.1.1-alpha 以来实现了什么
配置子界面架构
通用配置界面升级为导航中心,左侧面板包含三个导航按钮:
- 宠物列表— 浏览、搜索、切换游戏中每种活体生物的 CTF 启用状态
- 食物列表— 将每种食物分类为普通/特殊/禁用,带搜索栏和逐行类型切换按钮
- 驯兽核心— 编辑驯兽核心的配方图案、显示名及其消耗行为
每个子界面通过网络请求打开,从服务端接收完整数据,修改后通过网络包即时持久化到 basic.snbt。
宠物列表管理
- 服务端返回游戏中已注册的每种活体生物,以可滚动的可搜索列表呈现。
- 每行显示翻译名、注册 ID、可选昵称和 allowCTF 复选框。
- 可驯服和可骑乘生物默认 allowCTF=true;其他生物默认 allowCTF=false。
- OP 玩家可切换复选框并保存;非 OP 玩家只读查看已启用的条目。
- 禁用某个物种会触发服务端清理:从该类型的所有已加载实体中移除 CTF 持久数据和装备。
食物分类 GUI
- 游戏已知的所有食物以单列表呈现,每行显示 3 种状态的切换按钮:
- 普通 — 白色,基于食物营养值贡献进化点
- 特殊 — 金色,触发玩家可配置的自定义规则效果
- 禁用 — 灰色,喂宠物时该物品被静默忽略
- 搜索栏按注册 ID 过滤。
- "更多"食物""按钮打开 SpecialFoodScreen,配置非食物类的特殊物品。
- 数据持久化为三条独立列表:
normal_food_item_ids、special_food_item_ids、disabled_food_item_ids。
驯兽核心子界面
- 复用原有的 TamingCoreScreen,通过通用配置中心导航访问。
- 字段:配方图案、显示名、消耗行为开关。
网络协议(新增 3 个包)
| 包名 | 方向 | idx | 说明 |
|---|---|---|---|
| C2SRequestConfigScreenPacket | C→S | 8 | 请求配置子界面数据(0=宠物列表, 1=食物列表, 2=驯兽核心, 3=特殊物品) |
| S2CConfigScreenDataPacket | S→C | 9 | 服务端返回完整子界面 CompoundTag 数据、父级 SNBT 和 OP 状态 |
| C2SSaveConfigScreenPacket | C→S | 10 | 客户端保存修改后的子界面数据到服务端 |
动态配置字段扩展
CTF_Settings/basic.snbt 新增三种列表:
general_entity_ids— 默认 allowCTF=false 的生物类型(所有不可驯服不可骑乘的生物)disabled_food_item_ids— 玩家手动禁用的宠物食物special_item_ids— 可触发特殊规则行为的非食物类物品
服务端状态清理
通过宠物列表 GUI 禁用某个物种时,服务端执行以下操作:
- 从注册 ID 解析实体类型
- 遍历当前维度中该类型的所有已加载实体
- 丢弃已装备的测试模块物品
- 移除 CTF 持久数据(PetProgress、PetEquipmentState)
- 恢复实体原始显示名
配置引用独立性
CTF_Settings 默认值不再引用任何模组内置物品。旧版本在默认特殊食物列表中包含 custom_taming_framework:special_food。v0.1.2-alpha 只生成纯原版默认值(金苹果、附魔金苹果、金胡萝卜)。模组的测试物品(special_food、test_module)被完全移除,使每份配置在不同安装环境下均可移植。
自动补全弹出列表层级修复
TamingCoreScreen 和 SpecialFoodScreen 中的自动补全建议列表现在完全覆盖底层网格物品和文字。原因为共享 GuiGraphics 缓冲区的延迟绘制导致物品模型在弹窗之后刷新到 GPU。修复方式为将弹窗隔离为独立 GPU 绘制批次:弹窗前 endBatch() 刷新所有延迟绘制 → pose().translate(0,0,500) 抬高 Z 层级 → 弹窗渲染 → 弹窗后再次 endBatch()。
移除 v0.1.x 原型测试物品
| 移除项 | 注册 | 资源文件 | 影响 |
|---|---|---|---|
| special_food | CtfItems | lang、模型、纹理 | CtfFoods.java 清空 |
| test_module | CtfItems | lang、模型、纹理 | CtfForgeEvents 移除处理器 |
构建系统
build.gradle.kts:version = "0.1.2-alpha"gradle.properties:mod_version=0.1.2-alpha- runClient 启动前自动清空 mods 文件夹,防止 userdev 类与重混淆 jar 发生映射冲突(NoSuchMethodError)。
当前范围
这个版本完成了配置系统的完整生命周期:模组现在可以通过游戏内 GUI 子界面进行全方位配置,修改即时网络持久化。配置不再与任何模组内置物品或硬编码生物列表绑定——每种已注册的生物和食物都在游戏中可发现、可分类。
尚未覆盖:技能系统机制、装备进化玩法、向所有在线玩家广播配置变化(S2C),以及正式版规划中的拖拽式图形化编程界面。