跳到正文

SablePickFix

作者:yuyc9222

Stops HealthBars from querying a millions-of-blocks-wide entity box on Sable sub-levels.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

SablePickFix — HealthBars × Sable fix (NeoForge 1.21.1, client-side)

THE PROBLEM

Flying a Sable ship or standing on any Sable contraption can flood your log with:

    Aborting entity get for abnormally large AABB

On a sub-level, a block pick can hit the structure’s own storage coordinates. HealthBars
21.1.0 derives its interaction range from the distance of that block pick, so the range
becomes ~1e7, and the entity search box it builds for the crosshair query ends up spanning
tens of millions of blocks:

    AABB aABB = entity.getBoundingBox()
            .expandTowards(viewVector.scale(interactionRange))
            .inflate(1.0, 1.0, 1.0);
    ProjectileUtil.getEntityHitResult(entity, eyePosition, vec3, aABB, predicate, …);

That box goes straight into the vanilla entity query. Walking it costs roughly one chunk
column per block of width, so every crosshair tick burns millions of wasted lookups, and
Sable can only hard-reject it — which spams the log and breaks nameplate picking on
sub-levels.

THE FIX

SablePickFix mixes into fuzs.healthbars.client.handler.PickEntityHandler#pick and replaces
only argument 3 — the AABB passed to ProjectileUtil.getEntityHitResult — with its
intersection with a 64-block window centred on the camera’s eye position.

* HealthBars’ own distance check is untouched.
* Sable’s sub-level getters are untouched.
* Boxes that already fit are returned as-is, with zero allocation.
* Safety first: if a HealthBars update moves the injection point, the patch logs and does
  nothing instead of crashing your game.

Normal interaction range is 3–5 blocks, so a 64-block window is generous for any sane
configuration and picking results are unchanged.

REQUIREMENTS

* Minecraft 1.21.1
* NeoForge 21.1 or newer
* HealthBars 21.1.0 or newer (client)
* Sable (any version that shows the oversized-AABB error)

Client-side only — install it on the client. The server does not need it.

INSTALLATION

1. Install NeoForge 21.1+ for Minecraft 1.21.1.
2. Put SablePickFix-26.10.14.jar and HealthBars into your mods/ folder.
3. Launch the game.

LICENSE

MIT

常见问题

SablePickFix 支持哪些 Minecraft 版本?

SablePickFix 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

SablePickFix 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

yuyc9222 的其他作品

查看全部 →