归档说明:
尽管并非由数据包驱动,More Canvases v2 也能实现类似的效果,且维护起来要容易得多。No Kebab 中有一个更稳定的“占位符”功能替代方案。
Dataified Paintings
兼容原版、由数据包驱动的自定义画作。
与其他数据驱动的模组不同,本模组不实现自己的变体系统,而是完全复用原版的系统。此举旨在与 Invariable Paintings 兼容,但两者并非必须配合使用才能正常工作。
目前不支持多人游戏。
警告
该模组在长时间游玩过程中足够稳定,但涉及许多敏感的机制。在我确信已解决所有致命的边缘情况之前,我将其作为 Alpha(测试版) 发布。
大部分繁重的工作是在数据包重载时完成的。当你使用 /reload 命令、加入世界或创建新世界时都会发生重载。如果出现问题,很可能就发生在这些时刻。
加入世界应该相对安全,但在已加载的世界中手动重载则要敏感得多。
特性
包格式
新的变体定义在单独的 JSON 文件中,仅包含以方块为单位的 width(宽度)和 height(高度)属性。变体 ID 会自动从文件的基名和命名空间派生。
{
"width": 3,
"height": 2
}
变体文件位于 /data/<namespace>/paintings/。纹理以及标题/作者信息与原版画作的提供方式相同。别忘了将你的画作添加到“可放置”标签中,否则它们只能通过指令获得。
原则上,纹理和语言文件需要在资源包中单独提供。但你可以使用 Embedded Assets 将资源包合并到数据包中。
(官方模组页面尚未将其移植到兼容版本的 Minecraft,但我在此处有一个最新的分支 在 GitHub 上,等待合并。)
合并后的包结构大致如下:
./
├─ pack.mcmeta
├─ assets
│ └─ <namespace>
│ ├─ lang
│ │ └─ en_us.json
│ └─ textures
│ └─ painting
│ ├─ <title1>.png
│ └─ <title2>.png
└─ data
├─ minecraft
│ └─ tags
│ └─ painting_variant
│ └─ placeable.json
└─ <namespace>
└─ paintings
├─ <title1>.json
└─ <title2>.json
缺失的变体
在原版 Minecraft 中,带有未知变体 ID 的画作会回退到“Kebab”变体。
使用 Dataified Paintings 时,将创建一个占位符 1x1 变体,并且画作永远不会丢失其变体 ID。这允许你在开发数据包时犯错误,这样损坏的数据包不会导致你已有的画作发生转换。
这适用于已放置的画作以及画作物品。
然而请注意,增加现有变体的尺寸仍可能导致已经放置在墙上的画作掉落,如果它们不再适合该位置的话。
Note of archival:
Although not datapack-driven, More Canvases v2 achieves similar results, and is infinitely easier to maintain. The "placeholder" feature has a more stable equivalent in No Kebab
Dataified Paintings
Vanilla compliant, datapack-driven custom paintings.
Unlike other data-driven mods, this one does not implement its own variant system, but fully re-use the vanilla one. This was made with the intent to be compatible with Invariable Paintings, but neither is required to work with the other.
Multiplayer is not supported at the moment.
Word of caution
The mod is sufficiently stable for long play sessions, but touches a lot of delicate mechanics. I'm releasing it as an Alpha until I'm confident I have ironed out all the fatal edge cases.
Most of the heavy lifting is done during datapack reloads. They happen when using the /reload command, but also when joining a world, or creating a new one. If something ever goes wrong, it will probably be at one of these moments.
Joining worlds should be safe enough, but manually reloading in an already loaded world is a lot more sensitive.
Features
Pack format
New variants are defined in separate json files, which simply contains a width and height properties, measured in block. The variant id is automatically derived from the file's basename and namespace.
{
"width": 3,
"height": 2
}
Variant files are located in /data/<namespace>/paintings/. Textures and title/author are provided the same way as for the vanilla paintings. Don't forget to add your paintings to the "placeable" tag, otherwise they will only be obtainable through commands.
In principle, textures and language files would need to be provided separately in a resource pack. But you can use Embedded Assets to merge the resource pack into the datapack.
(The official mod page has yet to port it to a compatible version of minecraft, but I have an up-to-date fork here on github, waiting to be merged.)
The combined pack structure would look something like this:
./
├─ pack.mcmeta
├─ assets
│ └─ <namespace>
│ ├─ lang
│ │ └─ en_us.json
│ └─ textures
│ └─ painting
│ ├─ <title1>.png
│ └─ <title2>.png
└─ data
├─ minecraft
│ └─ tags
│ └─ painting_variant
│ └─ placeable.json
└─ <namespace>
└─ paintings
├─ <title1>.json
└─ <title2>.json
Missing Variants
In vanilla minecraft, a painting bearing an unknown variant id is reversed to the "Kebab" variant.
With Dataified Paintings, a placeholder 1x1 variant will be created, and the paintings will never loose its variant id. This gives you the leisure to make mistakes while developping datapacks, so a broken one will not result in your already existing paintings to transformed.
This applies to both placed paintings, and painting items.
Be mindful however that increasing an existing variant's size may still result in already placed paintings to be dropped from their wall, should they no longer fit.
评论 0
登录后参与评分
还没有评论,来抢沙发吧