Hitbox Api 图标

Hitbox Api

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 neo-1.21.1-1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/hitbox-api
资源信息

Minecraft 版本: 1.21 1.21.1 1.21.2 1.21.3

平台: neoforge

标签: library

资源介绍

Hitbox API

Adding more common collider for Minecraft

  • Oriented Bounding Box (OBB)
  • Sphere
  • Capsule
  • Ray
  • Compound
    • Multiple collider can be combined into one.
    • Composite collider can be nested.

How to Use

In any place where collision detection is needed, create a collider object and use the methods in ColliderUtil to determine if a collider has occurred.

For entities (Entity), you can achieve collider box caching by attaching HitboxDataAttachments#COLLISION. The cached collider can be rendered by pressing F3 + B. Note that this Data does not have a persistence implementation.

Performance

Testing Method

  • JMH Benchmark

Testing Environment

  • CPU: AMD R5 5600G
  • Memory: 32GB
  • JDK: Microsoft OpenJDK 21.0

Testing Settings

  • Warm-up Rounds: 5
  • Test Rounds: 5

Testing Items

  • Collision detection of the same type of collider
Collider Score Error Unit
Axis-Aligned Bounding Box 3561837865.930 157982649.213 ops/s
Capsule 22350681.198 238993.658 ops/s
Rotated Capsule 16842309.523 103959.918 ops/s
Oriented Bounding Box 5528493.224 64548.996 ops/s
Rotated Oriented Bounding Box 4648963.750 111369.535 ops/s
Sphere 119556589.705 1711146.560 ops/s

Note: Higher scores indicate better performance. Rotated means the collider is rotated and the relevant vectors are recalculated.

add collider for entity

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Fancy Chunks

价格:0 墨喵币
下载量:0

查看详情
Turbo Ghasts

价格:0 墨喵币
下载量:0

查看详情
Sandleaf's 3D Rails!

价格:0 墨喵币
下载量:0

查看详情
PRO GUI

价格:0 墨喵币
下载量:0

查看详情