Really Fast Paintings
Really Fast Paintings 是一款适用于 Minecraft 26.2 的 Fabric 性能优化模组,它将原版的 Painting 实体替换为非 ticking(不执行刻更新)、基于方块装饰物的形式,同时保留了原版画作变体、放置行为、碰撞/射线检测交互、支持检查以及由数据包定义的画作尺寸。
每个转换后的画作在其锚点使用单个逻辑 PaintingBlockEntity,其余占地部分使用轻量级的非 ticking 部件方块。这消除了为每幅画作维持完整实体的需求,同时允许大型画作像正常的墙壁装饰一样运作。
? 主要特性
- 基于方块的画作:将精确的原版
Painting 实体转换为基于方块的装饰物,每幅画作对应一个逻辑方块实体。
- 无画作实体刻开销:转换后的画作不再作为 ticking 的原版实体存在。
- 紧凑的多部件占地结构:
- 一个锚点
PaintingBlockEntity 存储画作状态。
- 剩余占用的图块使用轻量级的
PaintingPartBlock 状态。
- 部件方块编码了
OFFSET_X、OFFSET_Y 和 FACING,允许通过直接算术运算而非查找表来重建锚点位置。
- 兼容原版几何体:
PaintingFootprint 镜像了原版画作的包围盒和悬挂支撑计算,包括多块碰撞/射线检测覆盖范围和支撑方块验证。
- 兼容数据包的变体:画作尺寸和资源动态从
Registries.PAINTING_VARIANT 解析,支持来自数据包定义的变体,无需硬编码的尺寸表。
- 保留变体的掉落物:被破坏的画作可以保留其确切的
minecraft:painting_variant 数据组件,并在再次放置时恢复相同的变体。
- 安全的迁移工具:现有的原版画作可以自动或手动转换,在卸载模组前也可以将基于方块的画作还原为原版实体。
? 客户端渲染与 LOD
Really Fast Paintings 使用自定义的 PaintingBlockRenderer,采用投影屏幕大小的 LOD(细节层次)选择和滞后机制,以减少画作在屏幕上变小时的几何体和光照处理工作。
| LOD |
表现形式 |
| FULL |
完整的分段前后/边缘几何体,具有逐方块光照。 |
| SIMPLIFIED |
简化的盒子状几何体,具有单个光照采样。 |
| FAR |
单个面向前方的四边形,具有一个光照采样。 |
| SKIP |
当画作的投影大小低于活动阈值时,不提交画作渲染。 |
默认的投影大小阈值大约为:
FULL: 64 px 及以上
SIMPLIFIED: 12–64 px
FAR: 1–12 px
SKIP: 低于 1 px
提升/降低 LO D 的滞后机制使用不同的阈值,以减少在靠近或远离画作时可见的 LOD 闪烁现象。
? 远景装饰集成
Really Fast Paintings 可选集成 Distant Decorations。
当安装了 Distant Decorations 时:
- Really Fast Paintings 注册其自己的轻量级服务器端装饰提供程序。
- 仅通过 DD 同步画作元数据:资产 ID、朝向、宽度和高度。
- 物理边界由实时画作实现所使用的相同
PaintingFootprint 几何体计算得出。
- 远程客户端渲染器使用原版画作图集,并提交单个面向前方的四边形。
- DD 渲染器采用
0.01 px 的投影大小剔除阈值,并可应用最高 16× 的纯视觉远端 LOD 缩放,以保持极远处画作的可光栅化性,而不改变其权威物理 AABB。
Distant Decorations 是可选的;即使没有它,Really Fast Paintings 也能正常运行。
⚙️ 配置
配置存储在:
config/fastpaintings.json
| 选项 |
默认值 |
描述 |
preserveVariantOnDrop |
true |
当转换后的画作被破坏并掉落时,保留确切的画作变体。 |
convertExistingPaintings |
true |
当原版画作从磁盘加载进入已加载区块时进行转换。 |
convertOnPlacement |
true |
使用画作物品时直接放置基于方块的画作。 |
convertCommandCreatedPaintings |
true |
转换新创建的原版画作实体,包括命令创建的画作。 |
skipSpecialEntityData |
true |
保留具有特殊实体数据的画作(如自定义名称、无敌状态或发光状态)作为原版实体。 |
debugInstrumentation |
false |
启用额外的渲染器仪器计数器,用于性能分析/调试。 |
?️ 命令
所有 Really Fast Paintings 命令都需要管理员级别的命令权限。
重要提示
/fastpaintings convert 操作作用于所有维度中当前加载的所有画作实体。
/fastpaintings stats 和 /fastpaintings restore 检查和操作仅限于活跃玩家周围(或无人在线时的出生点区块)当前加载的区块。它们不会扫描离线区域文件、未加载的区块或未访问的维度。要检查或还原整个世界中所有位置的画作,操作员或玩家必须在加载区块的情况下访问所有包含画作的区域。
/fastpaintings stats
- 扫描活跃玩家/出生点周围已加载的去重区块,并显示已加载的原版画作实体、方块画作锚点以及多部分辅助部件(包括任何孤立的辅助部件)的总数。
/fastpaintings convert
- 尝试将所有维度中当前已加载的原版画作实体转换为基于方块的画作(显式的操作员执行将覆盖先前的恢复抑制)。
/fastpaintings restore
- 将活跃玩家/出生点周围已加载区块中的基于方块的画作还原为原版
Painting 实体,以便进行迁移或安全卸载。
⚠️ 安全卸载流程
要从世界中干净地卸载 Really Fast Paintings 且不丢失已放置的画作:
- 在修改配置或运行还原命令之前,创建完整的世界备份。
- 在
config/fastpaintings.json 中持久禁用所有自动转换和放置选项:
"convertExistingPaintings": false,
"convertCommandCreatedPaintings": false,
"convertOnPlacement": false
保存文件并启动服务器/客户端。
- 访问放置过基于方块画作的所有区域和维度。只要玩家保持这些区块处于加载状态,请运行
/fastpaintings restore。转换后的画作将被替换为带有持久性抑制标签的原版 Painting 实体。
- 在所有访问过的区域运行
/fastpaintings stats,以验证已加载区块中是否剩余 0 个方块画作锚点 和 0 个多部分辅助部件。
- 正常关闭服务器/客户端,并从
mods/ 目录中安全移除 Really Fast Paintings 模组 JAR 文件。
? 架构
转换后的画作表示如下:
画作足迹 (Painting footprint)
├── 1 × PaintingBlockEntity 锚点
└── N × PaintingPartBlock 瓦片
锚点存储逻辑画作状态和变体。部分方块仅存储足够的方块状态信息,以便在常数时间内重建其锚点位置。
PaintingFootprint 是以下内容的共享几何权威来源:
- 画作的世界空间边界
- 占用的单元格
- 支撑/支持单元格
- 锚点/部分坐标转换
- 与原版兼容的支持验证
这使得渲染、交互、转换以及 Distant Decorations 元数据都与相同的物理足迹保持一致。
? 从源代码构建
git clone https://github.com/justbecauseph/fast-paintings.git
cd fast-paintings
./gradlew build
编译后的模组 JAR 文件位于:
build/libs/
该项目针对:
- Minecraft
26.2
- Fabric Loader
0.19.3
- Fabric API
0.158.0+26.2
- Java
25
? 许可证
Really Fast Paintings 根据 Mozilla Public License 2.0 (MPL-2.0) 许可。
Really Fast Paintings
Really Fast Paintings is a Fabric performance mod for Minecraft 26.2 that replaces vanilla Painting entities with non-ticking, block-backed decorations while preserving vanilla painting variants, placement behavior, collision/raycast interaction, support checks, and datapack-defined painting dimensions.
Each converted painting uses a single logical PaintingBlockEntity at its anchor and lightweight non-ticking part blocks for the rest of its footprint. This removes the need to keep a full entity alive for every painting while still allowing large paintings to behave like normal wall decorations.
? Key Features
- Block-Backed Paintings: Converts exact vanilla
Painting entities into block-backed decorations with one logical block entity per painting.
- No Painting Entity Tick Cost: Converted paintings no longer remain as ticking vanilla entities.
- Compact Multipart Footprints:
- One anchor
PaintingBlockEntity stores the painting state.
- Remaining occupied tiles use lightweight
PaintingPartBlock states.
- Part blocks encode
OFFSET_X, OFFSET_Y, and FACING, allowing the anchor position to be reconstructed with direct arithmetic rather than lookup maps.
- Vanilla-Compatible Geometry:
PaintingFootprint mirrors vanilla painting bounding-box and hanging-support calculations, including multi-block collision/raycast coverage and backing-block validation.
- Datapack-Compatible Variants: Painting dimensions and assets are resolved dynamically from
Registries.PAINTING_VARIANT, supporting variants from datapacks without hard-coded size tables.
- Variant-Preserving Drops: Broken paintings can retain their exact
minecraft:painting_variant data component and restore the same variant when placed again.
- Safe Migration Tools: Existing vanilla paintings can be converted automatically or manually, and block-backed paintings can be restored to vanilla entities before uninstalling the mod.
? Client Rendering & LOD
Really Fast Paintings uses a custom PaintingBlockRenderer with projected-screen-size LOD selection and hysteresis to reduce geometry and lighting work as paintings become smaller on screen.
| LOD |
Representation |
| FULL |
Full segmented front/back/edge geometry with per-block lighting. |
| SIMPLIFIED |
Simplified box-style geometry with a single light sample. |
| FAR |
Single front-facing quad with one light sample. |
| SKIP |
Painting is not submitted when its projected size is below the active threshold. |
The default projected-size thresholds are approximately:
FULL: 64 px and above
SIMPLIFIED: 12–64 px
FAR: 1–12 px
SKIP: below 1 px
Promotion/demotion hysteresis uses separate thresholds to reduce visible LOD flicker while moving toward or away from paintings.
? Distant Decorations Integration
Really Fast Paintings has optional integration with Distant Decorations.
When Distant Decorations is installed:
- Really Fast Paintings registers its own lightweight server-side decoration provider.
- Only painting metadata is synchronized through DD: asset ID, facing, width, and height.
- Physical bounds are calculated from the same
PaintingFootprint geometry used by the live painting implementation.
- The distant client renderer uses the vanilla painting atlas and submits a single front-facing quad.
- The DD renderer opts into a
0.01 px projected-size culling threshold and can apply up to 16× visual-only far-LOD scaling to keep extremely distant paintings rasterizable without changing their authoritative physical AABB.
Distant Decorations is optional; Really Fast Paintings runs normally without it.
⚙️ Configuration
Configuration is stored in:
config/fastpaintings.json
| Option |
Default |
Description |
preserveVariantOnDrop |
true |
Preserve the exact painting variant when a converted painting is broken and dropped. |
convertExistingPaintings |
true |
Convert vanilla paintings loaded from disk when they enter loaded chunks. |
convertOnPlacement |
true |
Place block-backed paintings directly when a painting item is used. |
convertCommandCreatedPaintings |
true |
Convert newly created vanilla painting entities, including command-created paintings. |
skipSpecialEntityData |
true |
Leave paintings with special entity data such as custom names, invulnerability, or glowing state as vanilla entities. |
debugInstrumentation |
false |
Enables additional renderer instrumentation counters for profiling/debugging. |
?️ Commands
All Really Fast Paintings commands require gamemaster-level command permission.
IMPORTANT
/fastpaintings convert operates on all currently loaded painting entities across all dimensions.
/fastpaintings stats and /fastpaintings restore inspect and operate only on currently loaded chunks around active players (or spawn chunks if no players are online). They do not scan offline region files, unloaded chunks, or unvisited dimensions. To inspect or restore paintings across an entire world, operators or players must visit all areas containing paintings while chunks are loaded.
/fastpaintings stats
- Scans deduplicated loaded chunks around active players/spawn and displays the total count of loaded vanilla painting entities, block painting anchors, and multipart helper parts (including any orphan helper parts).
/fastpaintings convert
- Attempts to convert currently loaded vanilla painting entities across all dimensions to block-backed paintings (explicit operator execution overrides prior restoration suppression).
/fastpaintings restore
- Restores block-backed paintings in loaded chunks around active players/spawn back to vanilla
Painting entities for migration or safe uninstallation.
⚠️ Safe Uninstallation Procedure
To uninstall Really Fast Paintings cleanly from a world without losing placed paintings:
- Create a complete world backup before making configuration changes or running restoration.
- In
config/fastpaintings.json, persistently disable all automatic conversion and placement options:
"convertExistingPaintings": false,
"convertCommandCreatedPaintings": false,
"convertOnPlacement": false
Save the file and start the server/client.
- Visit all areas and dimensions where block-backed paintings were placed. While players keep those chunks loaded, run
/fastpaintings restore. Converted paintings are replaced with vanilla Painting entities marked with persistent suppression tags.
- Run
/fastpaintings stats across all visited areas to verify that 0 block painting anchors and 0 multipart helper parts remain in loaded chunks.
- Shut down the server/client cleanly and safely remove the Really Fast Paintings mod JAR from the
mods/ directory.
? Architecture
A converted painting is represented as:
Painting footprint
├── 1 × PaintingBlockEntity anchor
└── N × PaintingPartBlock tiles
The anchor stores the logical painting state and variant. Part blocks store only enough block-state information to reconstruct their anchor position in constant time.
PaintingFootprint is the shared geometry authority for:
- painting world-space bounds
- occupied cells
- backing/support cells
- anchor/part coordinate conversion
- vanilla-compatible support validation
This keeps rendering, interaction, conversion, and Distant Decorations metadata aligned to the same physical footprint.
? Building from Source
git clone https://github.com/justbecauseph/fast-paintings.git
cd fast-paintings
./gradlew build
The compiled mod JAR will be located in:
build/libs/
The project targets:
- Minecraft
26.2
- Fabric Loader
0.19.3
- Fabric API
0.158.0+26.2
- Java
25
? License
Really Fast Paintings is licensed under the Mozilla Public License 2.0 (MPL-2.0).
评论 0
登录后参与评分
还没有评论,来抢沙发吧