一个适用于 1.16+ 的简单服务端 Fabric 模组,用于改善栅栏门与墙壁之间的交互。
通常情况下,连接到墙壁的栅栏门在视觉上会向下偏移三个像素以更好地贴合。然而,如果存在由三扇或更多栅栏门组成的连续一行,中间的那些栅栏门将不会进行调整。本模组采用了一种简单的方法:通过统计其他带有 in_wall 标签的栅栏门,将其视为墙壁,从而触发此栅栏门模型的变更检测。
| 之前 |
之后 |
 |
 |
作为副作用,如果你愿意,可以创建由 2 扇或更多栅栏门组成的独立行,这些栅栏门会有这种向下偏移的效果,即使它们未连接到任何墙壁。
本模组仅需安装于服务器端。如果安装在客户端,当放置相关配置下的栅栏门时,可以避免因客户端认为其处于错误状态而在服务器更新前出现短暂的卡顿。相反,如果仅安装在客户端,当客户端认为栅栏门应进入 in_wall 状态而服务器尚未纠正时,或者当相邻的栅栏门被打开或关闭时,会出现卡顿现象。这些仅是临时的视觉问题,客户端是否安装本模组不会影响任何功能。
A simple server-side Fabric mod for 1.16+ to improve the interaction between fence gates and walls.
Normally, fence gates that connect to walls have their model visually shifted down three pixels to fit better. However, if there's a line of three or more fence gates, it doesn't adjust the ones in the middle. This mod takes a simple approach by counting other fence gates which have the in_wall tag as walls for this fence gate model change detection.
| Before |
After |
 |
 |
As a side effect, it's possible to create standalone rows of 2+ fence gates which have this downward shift but aren't connected to any walls, if you wanted to do so.
This mod only needs to be installed on the server. If installed on the client, it will avoid a short stutter when placing fence gates in the relevant configuration as the client thinks it's in the wrong state before the server updates it. Conversely, if it's only installed on the client, there will be a stutter as the client thinks it should go in the in_wall state before the server corrects it, which will also happen when one of the neighboring fence gates is opened or closed. These are only temporary visual issues and the presence or absence of the mod on the client will not affect functionality in any way.
评论 0
登录后参与评分
还没有评论,来抢沙发吧