9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-23 08:59:27 +00:00

Update InteractionHitBox.java

This commit is contained in:
XiaoMoMi
2025-04-21 17:12:19 +08:00
parent 9bcbc0fed5
commit 2f7f9edfaa

View File

@@ -62,7 +62,7 @@ public class InteractionHitBox extends AbstractHitBox {
if (canUseItemOn()) {
aabb.accept(entityId[0], AABB.fromInteraction(new Vec3d(x + offset.x, y + offset.y, z - offset.z), this.size.x, this.size.y));
}
if (blocksBuilding()) {
if (blocksBuilding() || this.canBeHitByProjectile()) {
AABB ceAABB = AABB.fromInteraction(new Vec3d(x + offset.x, y + offset.y, z - offset.z), this.size.x, this.size.y);
Object nmsAABB = FastNMS.INSTANCE.constructor$AABB(ceAABB.minX, ceAABB.minY, ceAABB.minZ, ceAABB.maxX, ceAABB.maxY, ceAABB.maxZ);
collider.accept(new BukkitCollider(