
Dinnerbone Cushions
在靠垫上使用写着 Dinnerbone 的名牌,它就会像生物一样倒置过来。
原版游戏中已经可以给靠垫改名,但玩笑到此为止——名字没有任何效果。这个模组完善了这一彩蛋:名为 Dinnerbone 的靠垫会翻转、悬挂在天花板上,并且你仍然可以坐在上面,保持倒置状态。
使用方法
- 在工作台中将名牌重命名为
Dinnerbone。
- 右键点击已放置的靠垫。
就这么简单。Grumm 也同样有效,而且与原版生物不同,大小写不敏感——dinnerbone 也可以。
在放置之前于工作台(铁砧)中重命名靠垫物品本身也有效,这是原版允许给靠垫改名的方式。
实际变更内容
它会悬挂在天花板上。 倒置的靠垫会向上移动至其所在方块空间的顶部并翻转。这是一个真实的位移,而非仅仅重新渲染:碰撞箱随之改变,因此你可以破坏它并在看到的位置重新放置。
支撑它的方块也会翻转。 普通靠垫需要下方有方块支撑。而倒置的靠垫则悬挂在上方的方块上——移除该方块后它会掉落。它最初被放置的那个方块不再起作用,因此你可以将其挖掉,让靠垫继续悬挂。
你可以倒坐着它。 坐在倒置的靠垫上会使你也随之倒置,臀部贴着靠垫,头部悬垂于下方。在第一人称和第三人称视角下,摄像机位置均保持正常。
名牌对靠垫生效。 在原版中,名牌仅适用于活体实体,而靠垫不是实体——用名牌右键点击靠垫只会让你坐下。此模组优先处理名牌逻辑,从而实现对靠垫的改名。创造模式下不会消耗名牌。
依赖要求
|
|
| Minecraft |
26.3 snapshot 5 |
| Loader |
Fabric |
| Dependencies |
Fabric API |
| Java |
25 或更高版本 |
服务器端部署
请安装在服务端和客户端。服务端负责管理改名、碰撞箱及乘坐逻辑;客户端负责渲染倒置效果。如果仅在服务端安装,靠垫虽能改名但无人能看到其翻转;如果仅在客户端安装,则名牌完全无法作用于靠垫。
工作原理
所有功能均通过 Mixin 实现,未添加任何新的方块、物品或实体:
CushionRendererMixin 将靠垫提升一个方块高度并翻转,复用了原版用于倒置生物的变换矩阵。
CushionMixin 调整碰撞箱以匹配视觉效果,并反转支撑检测逻辑,使靠垫能够悬挂于上方。
CushionNameTagMixin 在靠垫让你坐下之前拦截名牌使用事件。
EntityCushionMixin 在名称变更时重建碰撞箱,并将乘客放置在靠垫下方。
EntityRendererMixin 和 AvatarRendererMixin 翻转乘客模型,使其贴合靠垫渲染,同时保持摄像机位于开放空间中。
垂直方向的调优数值均定义在 DinnerboneCushions.java 中。

Dinnerbone Cushions
Put a name tag reading Dinnerbone on a cushion and it turns upside down, exactly like a mob would.
Cushions can already be renamed in vanilla, but the joke stops there — the name does nothing. This mod finishes it: a
cushion called Dinnerbone flips over, hangs from the ceiling, and can still be sat on, upside down and all.
How to use it
- Rename a name tag to
Dinnerbone in an anvil.
- Right click a placed cushion with it.
That's it. Grumm works too, and unlike vanilla's mobs, capitalisation does not matter — dinnerbone is fine.
Renaming the cushion item in an anvil before placing it works as well, which is how vanilla already let you name a
cushion.
What actually changes
It hangs from the ceiling. A flipped cushion moves up to the top of its block space and turns over. It is a real
move, not just a repaint: the hitbox follows, so you break it and click it where you see it.
What holds it up flips too. A normal cushion needs a block underneath. A flipped one hangs from the block above
instead — take that block away and it drops. The block it was originally placed on no longer matters, so you can dig it
out and leave the cushion hanging.
You can sit on it upside down. Sitting on a flipped cushion turns you over with it, seat against the cushion and
head hanging below. The camera stays where it belongs in both first and third person.
Name tags work on cushions at all. In vanilla a name tag only applies to living entities, and a cushion is not one —
right clicking it with a name tag just sits you down. This mod handles the name tag first, so it renames the cushion
instead. Creative mode does not consume the tag.
Requirements
|
|
| Minecraft |
26.3 snapshot 5 |
| Loader |
Fabric |
| Dependencies |
Fabric API |
| Java |
25 or newer |
On a server
Install it on both sides. The server owns the renaming, the hitbox and where you sit; the client owns the flipped
rendering. With it on the server only, cushions rename but nobody sees them turn over. With it on the client only, name
tags do not apply to cushions at all.
How it works
Everything is done with mixins, no new blocks, items or entities:
CushionRendererMixin lifts the cushion a block and flips it, reusing the transform vanilla applies to upside down
mobs.
CushionMixin moves the hitbox to match and reverses the support check so the cushion hangs from above.
CushionNameTagMixin intercepts the name tag before the cushion seats you.
EntityCushionMixin rebuilds the hitbox when the name changes and places riders under the cushion.
EntityRendererMixin and AvatarRendererMixin flip the rider and draw it against the cushion while leaving the
camera in open air.
The vertical tuning values all live in DinnerboneCushions.java.
评论 0
登录后参与评分
还没有评论,来抢沙发吧