perf/creative-node-registry
main
Requested by Ethyn · project thread
Closes #17
TileCreativeNode.updateEntity
TileNode.locations
locationRegistered
BlockCreativeNode.getCollisionBoundingBoxFromPool
getStackTrace()
🤖 Generated with Claude Code
Closes TDLM/thaumicadditions#17 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No dependencies set.
The note is not visible to the blocked user.
Requested by Ethyn · project thread
Closes #17
TileCreativeNode.updateEntity每 tick 重新生成 id 并写 TC4 静态TileNode.locations(字符串拼接、4 个装箱整数、ArrayList、HashMap put)。现在只注册一次(locationRegistered),区块卸载/失效时移除条目,重新加载后会再注册。放置的节点越多,节省越多。BlockCreativeNode.getCollisionBoundingBoxFromPool每次都getStackTrace()全栈物化来判断是否在渲染;服务端永远不渲染,所以服务端直接返回同样的零盒子,客户端保持原判断。实体移动每次碰撞查询都会走这里。测试 2 个:1000 次 tick 后登记列表仍是同一对象;区块卸载后条目被移除、再次 tick 能重新登记。
🤖 Generated with Claude Code