优化靠垫
Vanilla 26.3 将靠垫作为实体添加。靠垫本身不会移动,但在客户端和服务器上,其开销与其他任何实体相同。
本模组将靠垫视为它实际的样子:一个静态对象。客户端将其烘焙到地形中,使其渲染方式如同方块;服务器则取消了逐刻追踪与运行逻辑的开销。游戏性保持不变:坐下、破坏、拾取、声音、粒子、掉落物及存档等所有行为均与原版一致。
同时支持来自 Cushion-Backport 和 Vanilla Backport 的靠垫。其优化效果与主版本相同。
老实说:靠垫本身已经是一个非常轻量的实体,尤其是服务端,因此只有在你放置了大量靠垫时,才能明显感受到差异。
工作原理
靠垫像其他方块一样进行渲染:直接烘焙进区块网格中,而绘制地形的成本远低于绘制实体。
在服务端,没有玩家坐着的靠垫会跳过实体追踪器和刻列表,转而通过一个轻量级的循环运行。一旦有人坐下(或你使用 /ride 命令骑乘),该靠垫便会恢复至完整的原版路径,以确保行为完全一致。
特性
- 更高的 FPS — 靠垫一旦烘焙即免费渲染;帧数提升幅度取决于屏幕上靠垫的数量。
- 降低内存压力 — 尤其在客户端方面。
- 更远视距 — 烘焙后的靠垫可在全距离下可见,如同方块一般,而非原版实体的较短渲染范围。
- 减轻服务器负担 — 在靠垫密集的世界中,大幅减少刻时间(减少了追踪器、移动重检和刻逻辑)。
- 零损失 — 每个靠垫交互都与原版完全一致。
- 资源包兼容 — 自动读取资源包中的靠垫贴图。

兼容性
如果遇到任何不兼容问题,请在 Discord 服务器创建 Issue 或直接联系我。谢谢!
- 原版安全 — 无协议或存档更改。客户端部分可在原版服务器上运行,服务端部分也可服务于原版客户端。
- Sodium — 支持:靠垫会像原版一样烘焙进 Sodium 的区块网格中。服务端优化无论是否安装 Sodium 均可工作。
- Optimised Block Entities (OBE) — 当安装 OBE 时,客户端部分会自动禁用。服务端优化仍有效。
- 当靠垫发光、着火或不可见时,会回退到原版渲染器;名称标签 / F3+B 碰撞箱始终按原版方式渲染。
权衡取舍
与原版存在一些细微的、刻意为之的差异——但均不影响游戏性(掉落物、骑乘、声音、伤害判定及存档完全相同):
- 客户端 — 由于靠垫被烘焙到地形中,状态变更(放置、破坏、传送、染色)会在下一个区块重建时显示,而非即时生效。贴图现在在远距离下会像方块一样进行 mipmapping。
- 服务端 — 对于移动玩家的生成/消失检测基于约 1 格 / 1 秒的网格进行,而非每个数据包都检查,因此在追踪边缘的靠垫可能会比原版晚最多一格行走的距离才出现。在未加载但未运行的区块中,支撑/流体检测会被延迟而非冻结。
链接
Optimized Cushions
Vanilla 26.3 added cushions as entities. A cushion never moves, but it still costs the same as any other entity on both client and server.
This mod treats a cushion as what it is: a static thing. The client bakes them into the terrain so they render like blocks; the server drops the per-tick tracking and ticking overhead.
Gameplay is unchanged: sitting, breaking, picking, sounds, particles, drops and saves all stay vanilla.
Cushions from Cushion-Backport and Vanilla Backport also supported. The optimizations are the same as on the main version.
To be honest: cushions are already a very light entity, especially server-side, so you’ll only notice a difference if you have a LOT of them.
How it works
A cushion renders like any other block: baked straight into the chunk mesh, and terrain is much cheaper to draw than entities.
On the server, cushions with nobody sitting on them skip the entity tracker and tick-list and run through one lightweight loop instead. As soon as someone sits down (or you /ride one), that cushion snaps back to the full vanilla path, so behavior stays exact.
Features
- More FPS — cushions are free to render once baked; the boost scales with how many are on screen.
- Less memory pressure — especially on the client.
- See them further — baked cushions are visible to full render distance, just like blocks, instead of the shorter vanilla entity range.
- Lighter servers — big tick-time savings on cushion-heavy worlds (tracker, movement re-checks, and ticking all trimmed).
- Nothing lost — every cushion interaction works exactly as in vanilla.
- Resource packs — cushion textures from your resource pack are picked up automatically.

Compatibility
If you encounter any incompatibility, please create an issue or send me a message on the Discord server. Thanks!
- Vanilla-safe — no protocol or save changes. The client half works on vanilla servers, and the server half serves vanilla clients.
- Sodium — supported: cushions are baked into Sodium chunk meshes just like on vanilla. The server optimizations work with or without it.
- Optimised Block Entities — client side is automatically disabled when OBE is installed. The server optimizations still work.
- Cushions fall back to the vanilla renderer while glowing, on fire, or invisible, and name tags / F3+B hitboxes always render the vanilla way.
Trade-offs
A few small, deliberate differences from vanilla — none affect gameplay (drops, riding, sounds, damage and saves are identical):
- Client — because cushions are baked into terrain, a change (place, break, teleport, dye) shows up on the next section rebuild rather than instantly. Textures now mipmap at distance like blocks.
- Server — spawn/despawn for a moving player is checked on a ~1-block / 1-second grid instead of every packet, so a cushion at the far tracking edge can appear up to one block of walking later than vanilla. Support/fluid checks in unloaded-but-not-ticking chunks are deferred rather than frozen.
Links
评论 0
登录后参与评分
还没有评论,来抢沙发吧