玩家专属显示实体
一个 Minecraft 数据包库,允许你创建仅对特定玩家可见的显示实体。
如有问题,请在 Discord 上联系 @silicatYT。
下载:Modrinth
问题追踪:GitHub
重要提示(请阅读)
由于 Minecraft 代码中的一个 bug,我目前无法将 PPD 移植到 1.21.5。非常感谢你在该 bug 报告下点赞支持!
使用方法
本说明也可在 ppd:how_to 函数中找到。
- 召唤一个显示实体
- 设置其分数:
ppd.Pos.<x/y/z>:它应该出现的位置(放大 10,000 倍)
ppd.ID:它应对哪个玩家可见的玩家 ID
(该 ID 会自动分配给玩家)
注意: 建议为实体打上标签,以便在卸载 PPD(这会删除所有分数)后仍能找到它。
工作原理
PPD 会将你的显示实体传送至你的头部位置,并相应地设置其 translation(平移)变换,从而使模型仍出现在预期位置。同时,它会最优地设置 view_range NBT,以确保其他玩家无法看到它们,同时也避免在你快速移动时出现闪烁。
须知
- 高延迟、服务器性能不佳或“实体距离”图形设置可能会影响显示的可见性。用户可以通过运行
/trigger ppd.ViewRangeMultiplier set ... 来抵消这种影响。设置的值越高,其他玩家看到你显示实体的范围就越大。
- 显示实体仅在其被召唤的维度中显示。
- 当玩家离线时,显示实体依然存在,但不可见。
- 显示实体不会在距离目标位置超过 160 格的地方显示。
注意事项
- 如果其他玩家站在离你非常近的位置,他们可能能够看到你的显示实体。
- 显示实体会接收来自你头部位置的光照,因此如果你不手动设置光照 NBT,外观有时可能会显得不对劲。
- PPD 使用 translation(平移)字段来实现按玩家可见的功能。这意味着所有平移必须与标记的目标位置 Pos 相结合。不支持插值变换!
- 显示实体的
Rotation(旋转)不得更改。请改用 left_rotation(左旋转)和 right_rotation(右旋转)变换。
- 显示实体在 F5 视角下不可见。
- PPD 在每个轴向上超过 100,000 格后将无法正常工作。
- 如果玩家被传送至遥远的区块,且在显示实体传送到玩家之前该区块已卸载,实体可能会卡在那里,导致该玩家不再看到这些显示实体。
- 除
fixed(固定)类型外,不支持其他类型的广告牌。
致谢
来自 CMDred:
许可证
根据 MIT 许可证,只要注明原始作品的出处,你有权重新分发、修改和使用 PPD。
Per-Player Displays
A Minecraft Data Pack library that lets you create display entities that are only visible to one player.
For inquiries, please contact @silicatYT on Discord.
Download: Modrinth
Issue tracker: GitHub
PSA (PLEASE READ)
Due to a bug in Minecraft's code, I am currently unable to port PPD to 1.21.5. Any upvotes on the bugreport are greatly appreciated!
How to use
This description can also be found in the ppd:how_to function.
- Summon a display entity
- Set its scores:
ppd.Pos.<x/y/z>: Where it should appear (Scaled by 10,000x)
ppd.ID: The ID of the player it should be visible for
(The ID is automatically given to the player)
Important: It is advised that you tag the entity, so that it can be found after uninstalling PPD (Which deletes all scores).
How it works
PPD teleports your display entities into your head and sets their translation transformation accordingly so their models still appear at the desired location. It also sets their view_range NBT optimally to ensure that nobody else can see them, while also avoiding flickering if you move fast.
Good to know
- High ping, bad server performance or the
Entity Distance graphics setting can impact the visibility of displays. This can be counteracted by the user by running /trigger ppd.ViewRangeMultiplier set .... The higher it is set, the bigger the range for other players to see your display entities.
- Display entities will only be displayed in the dimension they're summoned in.
- Display entities will stay while the player is offline, but won't be visible.
- Display entities will not display farther than 160 blocks away from the destination position.
Caveats
- If another player stands very close to you, they may be able to see your display entities.
- The display entities receive the light from your head position, so it may look off at times if you don't manually set the light NBT.
- PPD uses the translation field to achieve the per-player visibility. This means that all translations need to be combined with the marker's destination Pos. Interpolated transformations are not possible!
- The display entity's
Rotation must not be changed. Use the left_rotation and right_rotation transformations instead.
- The display entities are not visible in F5.
- PPD doesn't work more than 100,000 blocks out in each axis.
- If the player is teleported to a far away chunk and it unloads before the display entities can teleport to the player, the entity can get stuck there, so the displays no longer show up for that player.
- Billboards other than
fixed are not supported.
Credit
From CMDred:
License
As per the MIT License, you are allowed to redistribute, modify and use PPD as long as you provide credit for the original work.
评论 0
登录后参与评分
还没有评论,来抢沙发吧