Anti Pie
Anti Pie 是一个服务端插件,用于阻止某些隐藏的方块实体被发送给玩家。这能防止它们在调试饼图中显示出来,从而增加通过饼图定位隐藏基地的难度。
工作原理
- 在数据包发送给客户端之前,从区块数据包中移除选定的方块实体。
- 定期检查隐藏位置,并在它们变为可见时立即发送真实的方块和方块实体数据。
- 使用体素射线检测,并将完整的实心方块计为遮挡物。透明方块和部分方块不会遮挡目标。
性能
大多数数据包仅执行几次简单的类型检查。可见性检查受 visibilityChecksPerPass(默认为 32)限制:玩家移动时每秒四次,静止时每秒一次。当区块首次加载时,每个玩家每刻的可见性检查也限制为 64 次。
每次可见性检查首先测试方块的中心。如有需要,它会检查暴露的面。大多数方块只需要一次射线检测,而最坏情况是 31 次射线检测。隐藏位置以打包长整型存储,以保持内存占用较低。
客户端不运行任何额外代码。初始区块数据包大小相同或更小,因为移除了隐藏的方块实体数据。当隐藏的方块变为可见时,服务器会发送一个替换区块数据包来更新受影响的区块。这会短暂地略微增加带宽使用并导致客户端重建区块,但由于客户端需要处理的方块实体减少,正常游戏通常会更流畅。
配置
Anti Pie 会在其首次启动时在服务器的 config 文件夹中创建一个 anti-pie.json5 文件。
你可以从该文件中:
- 选择哪些方块实体应该被隐藏。
- 更改玩家在多近距离内时,隐藏的方块实体将始终显示。
- 调整可见性检查的频率以及服务器每次执行的工作量,以平衡性能和响应速度。
配置文件使用 JSON5 格式以支持注释,便于阅读和自定义。
许可证
CC0-1.0。代码为原创,但数据包过滤的想法灵感来源于 orbyfied/AntiPieRay。
Anti Pie
Anti Pie is a server-side plugin that stops certain hidden block entities from being sent to players. This keeps them from showing up on the debug pie chart, making it harder to use the pie chart to find hidden bases.
How it works
- Removes selected block entities from chunk packets before they are sent to the client.
- Regularly checks hidden positions and sends the real block and block entity data as soon as they become visible.
- Uses a voxel raycast and counts full solid blocks as blockers. Transparent blocks and partial blocks do not hide a target.
Performance
Most packets only do a few simple type checks. Visibility checks are limited by visibilityChecksPerPass (32 by default): four times per second while a player is moving and once per second while standing still. When chunks first load, visibility checks are also limited to 64 per player each tick.
Each visibility check first tests the center of the block. If needed, it checks the exposed faces. Most blocks only need one raycast, while the worst case is 31 raycasts. Hidden positions are stored as packed longs to keep memory usage low.
The client does not run any extra code. Initial chunk packets are the same size or smaller because hidden block entity data is removed. When a hidden block becomes visible, the server sends one replacement chunk packet for the affected chunk. This can briefly use a little more bandwidth and cause the client to rebuild the chunk, but normal gameplay is usually lighter because the client has fewer block entities to process.
Configuration
Anti Pie creates an anti-pie.json5 file in your server's config folder the first time it starts.
From this file you can:
- Choose which block entities should be hidden.
- Change how close players must be before hidden block entities are always shown.
- Adjust how often visibility checks run and how much work the server does each pass to balance performance and responsiveness.
The config uses the JSON5 format for comments to make it easier to read and customize.
License
CC0-1.0. The code is original, but the packet-filtering idea was inspired by orbyfied/AntiPieRay.
下载 Anti Pie
下载 Anti Pie
下载 Anti Pie
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Anti Pie
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Anti Pie
下载 Anti Pie
下载 Anti Pie
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Anti Pie
26.3 支持
添加了强效硫作为结构方块实体
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧