Class ProjectileHitBoxMath

java.lang.Object
com.hypixel.hytale.server.core.modules.projectile.config.ProjectileHitBoxMath

public final class ProjectileHitBoxMath extends Object
Builds the projectile physics box from a model HitBox. The client ProjectileHitBoxMath is a port of this class, so keep both in step.
  • Method Details

    • scaleAroundCenter

      @Nonnull public static Box scaleAroundCenter(@Nonnull Box box, double scale, double minimumDimension)
      Scales a box around its center, then grows each dimension below the minimum to the minimum.
      Parameters:
      box - The model HitBox.
      scale - The uniform scale for every dimension.
      minimumDimension - The minimum width, height, and depth after the scale.
      Returns:
      A new box with the same center as box.