RedFoxExpand
RedFoxExpand 是由 RedFox团队 开发的 Minecraft 26.2 / 1.8.9 / 1.7.10 客户端模组。它允许资源包作者通过 RedFoxExpand is a Minecraft 26.2 / 1.8.9 / 1.7.10 client-side Mod developed by the RedFox Team. It allows resource pack authors to modify container GUIs through
原生小写资源域、Schema v2/v3/v3.1 JSON 配置和现代渲染管线修改容器 GUI,而不必修改或重新编译模组。 the native lowercase resource namespace, Schema v2/v3/v3.1 JSON configurations, and the modern rendering pipeline — without modifying or recompiling the Mod.
- 当前版本:
0.2.2(Git Tag:v0.2.2) - Current Version:0.2.2(Git Tag:v0.2.2) - 运行端:仅客户端 - Environment: Client-side only
项目实例演示 Project Demo

功能状态 Feature Status
已实现 Implemented
-
通过 Fabric Resource Loader 读取
assets/kyeitk/redfoxexpand/index.json原生 manifest; - 通过 Fabric Resource Loader 从assets/kyeitk/redfoxexpand/index.json读取原生 manifest; -
严格校验 Schema v2、路径、JSON、PNG、动画与数量预算,按来源隔离错误; - 严格校验 Schema v2、路径、JSON、PNG、动画和资源数量预算,并按来源隔离错误;
-
支持
append、replace、disable、definition priority 和稳定资源包优先级; - 支持append、replace、disable、定义优先级和稳定的资源包优先级; -
支持 screen/menu 类、标题 key/text、menu type、GUI resource、Mod namespace 与
all/any/not匹配; - 支持 screen/menu 类、标题 key/text、menu type、GUI 资源、Mod namespace 以及all/any/not匹配器; -
支持 GUI 逻辑位置/尺寸、Slot 索引/范围/基础坐标/类选择、实际位移和渐变高亮; - 支持 GUI 逻辑位置/尺寸、Slot 索引/范围/基础坐标/类选择、实际偏移量和渐变高亮;
-
支持整图、区域 UV、三种显式资源类型、三种锚点和三种渲染层; - 支持整图渲染、区域 UV、三种显式资源类型、三种锚点和三种渲染层;
-
gui锚点、破限纹理和 Slot 会跟随配方书展开/收起及窗口重新布局同步移动; -gui锚点、溢出纹理和 Slot 会随着配方书的展开/收起及窗口重新布局同步移动; -
支持 PNG Alpha、显式文本、语义标题/玩家背包标签规则及时间动画; - 支持 PNG Alpha、显式文本、语义标题/玩家背包标签规则以及基于时间的动画;
-
Schema v3 与 v2 并存:不需要响应式能力的旧 v2 材质包无需迁移; - Schema v3 与 v2 共存:不需要响应式功能的旧版 v2 资源包无需迁移;
-
Schema v3 提供稳定 Sprite ID、严格表达式引擎和每 tick Runtime Context; - Schema v3 提供稳定的 Sprite ID、严格的表达式引擎以及每 tick 的 Runtime Context;
-
支持玩家、屏幕、GUI、鼠标与按键状态,以及 health/burning/screen 生命周期事件; - 支持玩家、屏幕、GUI、鼠标和键盘状态,以及 health/burning/screen 生命周期事件;
-
支持
visible、alpha、平移、缩放、旋转绑定和数值平滑; - 支持visible、alpha、平移、缩放、旋转绑定和数值平滑; -
支持属性动画、
linear/smoothstep插值、行为条件和安全动作; - 支持属性动画、linear/smoothstep插值、行为条件和安全动作; -
Schema v3.1 新增统一
elements、Group/Parent 场景树、局部坐标和父级变换/显隐/透明度继承; - Schema v3.1 引入了统一的elements数组、Group/Parent 场景树、局部坐标以及父级变换/可见性/透明度的继承机制; -
支持 GUI/Screen 九点 Anchor、元素 Pivot,以及
layer → z → scene order稳定绘制顺序;
- 支持九点 GUI/屏幕锚点、元素枢轴,以及基于 layer → z → 场景顺序 的稳定绘制顺序;
-
支持定义级常量、按声明顺序求值的派生值,以及绑定中的基础布局几何; - 支持定义级常量、按声明顺序求值的派生值,以及
self.*/parent.*绑定中的基础布局几何; -
属性动画支持显式的
replace/add/multiply合成,组动画可由整个子树继承; - 属性动画支持显式的replace/add/multiply合成,而组动画可由整个子树继承; -
Reactive Core 独立保持 Java 8 源码兼容,平台层仍使用 Minecraft 26.2 所需的 Java 25; - Reactive Core 保持与 Java 8 的源码兼容性,而平台层仍使用 Minecraft 26.2 所需的 Java 25;
-
F3+T 采用不可变世代原子切换,成功后统一释放上一代引用; - F3+T 使用基于不可变世代的原子切换,并在成功重载后释放上一世代的引用;
-
所有 GUI 绘制均使用
GuiGraphicsExtractor和RenderPipelines,不直接调用 OpenGL/LWJGL。 - 所有 GUI 渲染均使用GuiGraphicsExtractor和RenderPipelines,无需直接调用 OpenGL/LWJGL。
下一步 Next Steps
-
更清晰的结构化诊断与离线验证器; - Clearer structured diagnostics and an offline Validator;
-
面向资源包作者的检查器(Inspector)与属性管线视图; - An Inspector and property pipeline view designed for resource pack authors;
-
布局容器、裁剪/滚动与组件复用; - Layout Containers, Clip/Scroll, and Component reuse;
-
语义槽(Semantic Slot),以及文本/槽位的响应式目标; - Semantic Slots and reactive Text/Slot targets;
-
HUD API 与小部件(Widget); - HUD API and Widgets;
-
纹理状态、宽高颜色绑定与更多安全事件/动作; - Texture State, width/height/color Bindings, and more safe events/actions;
-
可读取并导出正式 Schema JSON 的可视化编辑器。 - A visual editor capable of reading and exporting the official Schema JSON.
项目方向 Project Direction
RedFoxExpand 的核心设计哲学是:
让资源包负责表现,让模组负责能力。
The core design philosophy of RedFoxExpand is: > Let resource packs handle presentation, and let the Mod handle capabilities.
资源包使用纹理、布局、动画、颜色、可见性、样式和主题来描述界面;
模组负责状态、渲染、事件、输入、兼容性、安全性和运行时逻辑。
目标不是简单支持更多的 PNG 图片,而是让资源包作者仅使用 PNG、JSON、动画、表达式和组件,就能制作动态背包、动态 HUD、RPG/PvP/科幻风格界面、角色面板、响应式 GUI 以及第三方模组的 UI。
Resource packs describe interfaces using Texture, Layout, Animation, Color, Visibility, Style, and Theme; the Mod handles State, Rendering, Events, Input, Compatibility, Security, and Runtime. The goal is not simply to support more PNGs, but to allow resource pack authors to create dynamic inventories, dynamic HUDs, RPG/PvP/sci-fi interfaces, character panels, reactive GUIs, and third-party Mod UIs using only PNG, JSON, Animation, Expression, and Components.
Resource Pack API ─┐
├─> Expression Engine -> UI Definition -> HUD / GUI / Components
Runtime Context ──┘ -> Layout Engine
-> Animation Engine
-> Render Pipeline -> Minecraft
本项目将从“资源包增强模组”继续发展为 Minecraft 资源包 UI 框架,并最终形成可复用的 Minecraft 资源包 UI 运行时。 The project will continue evolving from a “resource pack enhancement Mod” into a Minecraft Resource Pack UI Framework, and eventually into a reusable Minecraft Resource Pack UI Runtime.
Schema v3.1 已让复杂界面从平铺精灵图进入场景图(Scene Graph);下一阶段将优先改善诊断、检查器工具、布局与复用能力,再在同一核心基础上扩展语义槽、HUD 和小部件。
Schema v3.1 has already moved complex interfaces from flat Sprites into a Scene Graph; the next stage will
prioritize diagnostics, Inspector tooling, layout, and component reuse, followed by Semantic Slots, HUD, and Widgets built on the same core.
安装 Installation
-
安装 Minecraft 26.2、Fabric Loader
0.19.3和 Fabric API0.156.0+26.2; 1. Install Minecraft 26.2, Fabric Loader0.19.3, and Fabric API0.156.0+26.2; -
从 GitHub Releases 下载 2. Download from GitHub Releases;
-
将 JAR 文件放入 Minecraft 实例的
mods/目录; 3. Place the JAR into themods/directory of your Minecraft instance; -
启动游戏并启用符合 Schema v2、v3 或 v3.1 的 RedFoxExpand 资源包。 4. Launch the game and enable a RedFoxExpand resource pack compatible with Schema v2, v3, or v3.1.
该模组不要求服务端安装。建议在新增或修改配置后执行 F3+T。 The Mod does not need to be installed on the server. Running F3+T after adding or modifying configurations is recommended.
制作第一个 Kyeitk 资源包 Creating Your First Kyeitk Resource Pack
1. 建立目录结构 1. Create the Directory Structure
MyKyeitkPack/
├─ pack.mcmeta
└─ assets/
└─ kyeitk/
└─ redfoxexpand/
├─ index.json
├─ config/
│ └─ inventory.json
└─ textures/
└─ gui/
└─ inventory.png
Minecraft 26.2 的 pack.mcmeta 必须同时声明格式与范围:
Minecraft 26.2 requires pack.mcmeta to declare both the format and range:
{
"pack": {
"pack_format": 88,
"min_format": 88,
"max_format": 88,
"description": "My first RedFoxExpand GUI pack"
}
}
2. 放置 GUI 图片 2. Add the GUI Image
将带 Alpha 通道的 PNG 放到: Place the PNG with an Alpha channel at:
assets/kyeitk/redfoxexpand/textures/gui/inventory.png
26.2 只接受小写的原生命名空间(namespace)。 26.2 only accepts native lowercase namespaces.
3. 写入配置
3. Write the Configuration
assets/kyeitk/redfoxexpand/index.json:
{
"api_version": 2,
"configs": ["redfoxexpand/config/inventory.json"]
}
assets/kyeitk/redfoxexpand/config/inventory.json:
{
"api_version": 2,
"definitions": [{
"id": "example:inventory",
"operation": "replace",
"priority": 100,
"match": {
"exact_menu_class": "net.minecraft.world.inventory.InventoryMenu"
},
"sprites": [{
"texture": {
"type": "pack_resource",
"location": "textures/gui/inventory.png"
},
"anchor": "gui",
"x": 0,
"y": 0,
"width": 176,
"height": 166,
"layer": "background"
}]
}]
}
启用资源包并打开玩家背包即可查看。修改资源后按 F3+T,成功重载后新内容将原子性地一次性生效。 Enable the resource pack and open the player inventory to view it. After modifying resources, press F3+T; once the reload succeeds, the new generation becomes active atomically.
Schema v3 响应式界面
Schema v3 Reactive Interfaces
需要根据玩家或界面状态动态改变精灵图时,将清单(manifest)与配置中的 api_version 都设为 3,并为每个精灵图增加定义内唯一的 id。下面的配置会在玩家着火时显示火焰,并让图标平滑跟随鼠标横坐标:
当 Sprite 需要根据玩家或界面状态动态变化时,在 manifest 和 config 中将 api_version 设置为 3,并为每个
Sprtie 分配一个 Definition 唯一的 id。以下配置会在玩家燃烧时显示火焰,并平滑跟随鼠标的水平坐标:
{
"api_version": 3,
"definitions": [{
"id": "example:reactive_inventory",
"match": {"exact_menu_class":"net.minecraft.world.inventory.InventoryMenu"},
"sprites": [{
"id": "fire",
"texture": {"type":"pack_resource","location":"textures/gui/fire.png"},
"anchor": "gui", "x": 80, "y": 20, "width": 32, "height": 32
}],
"bindings": [
{"target":"fire","property":"visible","value":"player.is_burning"},
{"target":"fire","property":"translate_x","value":"mouse.gui_x - 80","smoothing_ms":120}
]
}]
}
v3 表达式在 reload 时预编译并严格校验,不支持脚本、反射、文件、网络或任意函数调用。完整 Runtime Context、表达式语法、属性、事件、动画、行为、预算及迁移说明见项目GitHub
v3 expressions are precompiled and strictly validated during reload. Scripts, reflection, file access, network access, and arbitrary function calls are not supported. See the project GitHub for the complete Runtime Context, expression syntax, properties, events, animations, behaviors, budgets, and migration details.
Schema v3.1 场景图
Schema v3.1 Scene Graph
Schema v3.1 面向由多个图层组成的角色、面板和动态界面。将 manifest 与 config 的 api_version 都设为数值 3.1,使用统一 elements 数组,并通过 Group 组织可共同移动、缩放、旋转、显隐或改变透明度的子树:
Schema v3.1 is designed for characters, panels, and dynamic interfaces composed of multiple layers. Set api_version to
the numeric value 3.1 in both the manifest and config, use a unified elements array, and use Groups to organize subtrees that can be moved, scaled, rotated, shown/hidden, or have their opacity changed together:
{
"api_version": 3.1,
"definitions": [{
"id": "example:character",
"match": {"menu_type":"minecraft:player"},
"constants": {"turn_limit": 4},
"values": {
"head_turn": "clamp((mouse.x - screen.width / 2) * 0.01, -turn_limit, turn_limit)"
},
"elements": [
{
"id":"character_root", "type":"group",
"anchor":"screen_bottom_center", "x":-80, "y":-160,
"width":160, "height":160,
"children":["body", "head_group"]
},
{
"id":"body", "type":"sprite",
"texture":{"type":"pack_resource","location":"textures/gui/body.png"},
"width":160, "height":160, "layer":"foreground"
},
{
"id":"head_group", "type":"group", "width":160, "height":160,
"children":["head"]
},
{
"id":"head", "type":"sprite",
"texture":{"type":"pack_resource","location":"textures/gui/head.png"},
"width":160, "height":160, "layer":"foreground"
}
],
"bindings": [{
"target":"head_group", "property":"rotation_z",
"value":"head_turn", "smoothing_ms":180
}]
}]
}
根 Element 可使用 GUI/Screen 九点 Anchor,子 Element 使用父级局部坐标;Pivot 决定旋转和缩放中心。Constants 消除重复数字,Derived Values 复用表达式,self.* / parent.* 为鼠标跟随等效果提供稳定基础几何。完整字段、默认值、场景继承、动画合成和 v3.0 迁移见项目GitHub
A root Element can use a nine-point GUI/Screen Anchor, while child Elements use parent-local coordinates; Pivot determines the center of rotation and scaling.
Constants eliminate repeated numbers, Derived Values reuse expressions, and self.* / parent.* provide stable base
geometry for effects such as mouse following. See the project GitHub for complete fields, defaults, scene inheritance, animation composition, and v3.0 migration details.
完整配置示例
Complete Configuration Example
下面的示例扩展玩家背包、移动槽位并添加前景文字: The following example expands the player inventory, moves Slots, and adds foreground text:
{
"api_version": 2,
"definitions": [{
"id": "example:expanded_inventory",
"operation": "replace",
"priority": 100,
"match": {"exact_menu_class": "net.minecraft.world.inventory.InventoryMenu"},
"geometry": {
"width_offset": 132,
"height_offset": 14,
"x_offset": 66,
"y_offset": 7
},
"slot_modifiers": [{
"slots": ["9-35"],
"x_offset": 2,
"highlight_color": "#80FFFFFF",
"highlight_color_2": "#20306080"
}],
"sprites": [{
"texture": {"type": "pack_resource", "location": "textures/gui/inventory.png"},
"anchor": "gui",
"x": -122,
"y": -5,
"width": 307.5,
"height": 180,
"layer": "underlay"
}],
"texts": [{
"text": "RedFoxExpand",
"x": 92,
"y": 6,
"color": "#FFFFFFFF",
"shadow": true,
"anchor": "gui",
"layer": "foreground"
}]
}]
}
常用字段: Common fields:
-
match:严格的单 operator matcher,也可用all、any、not组合; -match: a strict single-operator matcher, which can also be combined withall,any, andnot; -
geometry:x_offset、y_offset、width_offset、height_offset; -
texture.type:resource_location、gui_sprite或pack_resource; -texture.type:resource_location,gui_sprite, orpack_resource; -
anchor:gui、screen_center或screen; -anchor:gui,screen_center, orscreen; -
layer:underlay、background或foreground; -layer:underlay,background, orforeground; -
id/priority/operation:控制跨资源包定义合并。 -id/priority/operation: controls definition merging across resource packs.
字段、默认值、合并顺序及错误回退见项目GitHub。 See the project GitHub for fields, defaults, merge order, and error fallback behavior.
动画 GUI
Animated GUI
26.2 将动画直接写入 Sprite: In 26.2, animations are defined directly on Sprites:
{
"texture": {"type":"pack_resource","location":"textures/gui/default.png"},
"animation": {
"frame_duration_ms": 100,
"loop": true,
"condition": "always",
"missing_frame": "use_default",
"frames": [
{"texture":{"type":"pack_resource","location":"textures/gui/frame_0.png"}},
{"texture":{"type":"pack_resource","location":"textures/gui/frame_1.png"},"duration_ms":160}
]
},
"width": 176,
"height": 166,
"anchor": "gui",
"layer": "background"
}
当前支持逐帧时长、循环、always / never、默认图片和 use_default / skip / disable 缺帧策略。格式见项目GitHub。
Currently supports per-frame duration, looping, always / never, a default image, and the use_default / skip / disable missing-frame strategies.
See the project GitHub for the format.
第三方 Mod GUI
Third-Party Mod GUIs
第三方 GUI 不再使用专用 compatibility 目录,可直接通过数据驱动 matcher 匹配: Third-party GUIs no longer require a dedicated compatibility directory and can be matched directly using data-driven matchers:
{
"all": [
{"assignable_screen_class": "example.mod.client.ExampleContainerScreen"},
{"mod_namespace": "examplemod"}
]
}
完整类名不会回退为简单类名;确需简单类名时必须使用显式 *_simple_class operator。第三方 Screen 若完全重写标签提取或跳过原版背景流程,相应语义文本或 underlay 能力可能降级。
Full class names do not fall back to simple class names; when a simple class name is required, an explicit *_simple_class operator must be used. If a third-party Screen
completely rewrites label extraction or skips the vanilla background rendering flow, the corresponding semantic text or underlay capabilities may be degraded.
当前限制
Current Limitations
-
当前仅处理 Minecraft 客户端的容器 GUI,HUD 与 Widget 尚未实现; - Currently only handles container GUIs on the Minecraft client; HUD and Widgets are not yet implemented;
-
不扫描旧
assets/Kyeitk/,旧版配置必须迁移至原生小写 Schema v2; - Does not scan the legacyassets/Kyeitk/; legacy configurations must be migrated to the native lowercase Schema v2; -
imageWidth/imageHeight保持原版 final 值,扩展尺寸使用独立逻辑 geometry; -imageWidth/imageHeightretain their vanilla final values; expanded dimensions use independent logical geometry; -
Sprite 纹理帧动画条件仍只有
always和never;动态条件请使用 Schema v3; - Sprite texture frame animations still only supportalwaysandneverconditions; use Schema v3 for dynamic conditions; -
Schema v3.1 Scene Graph 当前只作用于 Sprite/Group;Text 和 Slot 尚不能进入场景树或作为响应式 target; - The Schema v3.1 Scene Graph currently applies only to Sprites/Groups; Text and Slots cannot yet enter the scene tree or act as reactive targets;
-
不支持 HUD、Widget、Semantic Slot、Layout Container、Component、Clip/Scroll 或 Inspector; - HUD, Widgets, Semantic Slots, Layout Containers, Components, Clip/Scroll, and Inspector are not supported;
-
尚无 Texture State、width/height/color Binding、自定义变量/事件、Timer、User Function、循环/递归或
every.mode=repeat; - Texture State, width/height/color Bindings, custom variables/events, Timer, User Function, loops/recursion, andevery.mode=repeatare not yet available; -
self.*/parent.*提供静态基础布局几何,不读取本帧 Binding/Animation 后的最终矩阵; -self.*/parent.*provide static base layout geometry and do not read the final matrix after the current frame's Binding/Animation evaluation; -
OpenGL/Vulkan、第三方 Screen 与不同 GUI 布局的表现可能因环境组合而异。 - Behavior involving OpenGL/Vulkan, third-party Screens, and different GUI layouts may vary depending on the combination of environments.
许可
License
当前仓库遵循 CC BY-NC-SA 4.0 协议;除非权利人另行授权,源代码默认保留所有权利。仓库不包含第三方材质包或受限制美术素材。
The current repository is licensed under CC BY-NC-SA 4.0; unless separately authorized by the rights holder, the source code remains all rights reserved by default. The repository does not contain
third-party resource packs or restricted art assets.
你是这个资源的作者?登录后可认领此资源。
相似资源
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
查看物品与配方
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧