9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-28 03:19:14 +00:00

fix hitbox

This commit is contained in:
XiaoMoMi
2025-04-02 16:37:23 +08:00
parent 21e663b187
commit 5ac33bfb5e
4 changed files with 9 additions and 17 deletions

View File

@@ -126,6 +126,7 @@ public class LoadedFurniture {
if (colliderSize != 0) {
Object world = FastNMS.INSTANCE.field$CraftWorld$ServerLevel(this.location.getWorld());
for (int i = 0; i < colliderSize; i++) {
// TODO better shulker hitbox
Collider collider = placement.colliders()[i];
Vector3f offset = conjugated.transform(new Vector3f(collider.position()));
Vector3d offset1 = collider.point1();

View File

@@ -44,7 +44,7 @@ public class ShulkerHitBox extends AbstractHitBox {
if (this.interactionEntity) {
// make it a litter bigger
InteractionEntityData.Height.addEntityDataIfNotDefaultValue(getPhysicalPeek(peek * 0.01F) * scale + 1.01f, cachedInteractionValues);
InteractionEntityData.Height.addEntityDataIfNotDefaultValue((getPhysicalPeek(peek * 0.01F) + 1) * scale + 0.01f, cachedInteractionValues);
InteractionEntityData.Width.addEntityDataIfNotDefaultValue(scale + 0.005f, cachedInteractionValues);
InteractionEntityData.Responsive.addEntityDataIfNotDefaultValue(interactive, cachedInteractionValues);
}