Diegesis
一个用于界面存在于方块本身的库。
使用方块时,摄像机将飞向该方块。玩家随后在该方块上操作真实的 3D 对象:移动物品、拉动拉杆、旋转旋钮、倾倒液体。附近的所有人都会看到这些过程发生。
Diegesis 本身不会为游戏添加任何内容。当某个模组要求安装它时才安装,例如 Hands-On Delight。

由 Diegesis 构建的 Hands-On Delight 的烹饪锅。
🎮 给玩家
将其放入需要它的模组的同级 mods 文件夹中。支持 Forge 上的 Minecraft 1.20.1,NeoForge 上的 1.21.1、1.21.11、26.1.2、26.2 或 26.3,以及 Fabric 上的任意这些版本(需搭配 Fabric API)。
🛠️ 给模组开发者
接口包含两件事。Java 中的站点(station)声明了它在哪些方块上打开、保持何种状态以及规则是什么。JSON 中的场景(scene)说明了绘制内容和可交互区域。模型直接来自 Blockbench,场景在游戏运行时按 F3+T 即可重载。
- 🎥 摄像机与场景:每个场景一套摄像机支架,节点支持嵌套、移动、旋转、缩放、淡入淡出和发光。
- 📦 方块上的物品:点击操作遵循原版菜单逻辑,包括 Shift 点击、拆分和在槽位间拖拽堆叠物品。背包可以是抽屉式,也可以展开在世界空间中。
- ✋ 手持物体:通过握持点固定,具有重量和倾斜效果,拥有自身形状的阴影,并在接触时触发事件。
- 💧 液体与倾倒:容器存储真实的体积和混合物,会晃动和泛起涟漪。服务器控制每次倾倒的节奏并进行校验。
- 🎛️ 现成控件:拉杆、摇杆开关、按钮、旋钮和滑块,每种仅需一行 JSON。
- ✨ 粒子、光照与声音:发射器、沸腾表面、发光节点照亮周围区域。
- 🪑 座位与多方块结构:一个站点可以跨越多个方块并容纳多名玩家,每人拥有独立的视角。
- 🌐 仅客户端或服务器端:客户端站点可在任何服务器上运行。服务器端站点会校验所有操作,防止物品复制,并在玩家之间共享同一状态。
📚 指南、食谱示例和场景文件的 JSON Schema 位于 GitHub。
有关 API 或你正在构建的站点的疑问,欢迎前往我们的 Discord 服务器 Pocky's Kitchen。
兼容性
✅ Embeddium 和
✅ Oculus:无论是否启用光影包,场景、液体和粒子均正常渲染
✅ Blur (Forge),
✅ ReBlured 和
✅ Blur+:站点保持清晰,其他屏幕保留模糊效果
✅ Create Aeronautics 在 1.21.1 上:其飞行飞船上的站点会在飞行过程中保持开启并与飞船一同移动和转向
Pocky 的其他模组

由 Pocky 制作。源代码托管于 GitHub,采用 MIT 许可证。
Diegesis
A library for interfaces that live on the block itself.
Using a block flies the camera to it. The player then works with real 3D objects on that block: moves items, pulls levers, turns knobs, pours liquids. Everyone standing nearby sees it happen.
Diegesis adds nothing to the game on its own. Install it when a mod asks for it, such as Hands-On Delight.

The cooking pot of Hands-On Delight, built with Diegesis.
🎮 For players
Put it in the mods folder next to the mod that needs it. Minecraft 1.20.1 on Forge, 1.21.1, 1.21.11, 26.1.2, 26.2 or 26.3 on NeoForge, and any of these versions on Fabric (with Fabric API).
🛠️ For modders
An interface is two things. A station in Java says which blocks it opens on, what state it keeps and what the rules are. A scene in JSON says what is drawn where and what can be touched. Models come straight from Blockbench, and scenes reload with F3+T while the game runs.
- 🎥 Camera and scenes: a camera rig per scene, nodes that nest, move, turn, scale, fade and glow.
- 📦 Items on the block: clicks work as in a vanilla menu, including shift-click, splitting and dragging a stack across slots. The inventory can be a drawer or laid out in the world.
- ✋ Carried objects: held by a grip point, with weight and lean, a shadow of their own shape and triggers on touch.
- 💧 Liquids and pouring: tanks hold real volumes and mixtures that rock and ripple. The server paces and checks every pour.
- 🎛️ Ready controls: lever, rocker switch, push button, knob and slider, one line of JSON each.
- ✨ Particles, light and sound: emitters, boiling surfaces, glowing nodes that light what is near.
- 🪑 Seats and multiblocks: a station can span several blocks and seat several players, each with their own view.
- 🌐 Client-only or server: client stations work on any server. Server stations check every action, so items cannot be duplicated, and share one state between players.
📚 Guides, a cookbook and a JSON schema for scene files are on GitHub.
Questions about the API or a station you are building can go to Pocky's Kitchen, our Discord server.
Compatibility
✅ Embeddium and
✅ Oculus: scenes, liquids and particles draw as usual, with or without a shader pack
✅ Blur (Forge),
✅ ReBlured and
✅ Blur+: stations stay sharp, other screens keep their blur
✅ Create Aeronautics on 1.21.1: stations on its flying ships open there and stay with the ship as it flies and turns
More mods by Pocky

Made by Pocky. Source on GitHub under the MIT license.
评论 0
登录后参与评分
还没有评论,来抢沙发吧