Package noppes.npcs.api.entity.data
Interface IHitboxData
-
public interface IHitboxDataProvides configuration data for an NPC's custom hitbox dimensions.When enabled, allows independent scaling of the NPC's collision box width and height beyond the default model-based sizing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetHeightScale()Returns the height scale factor for the hitbox.floatgetWidthScale()Returns the width scale factor for the hitbox.booleanisHitboxEnabled()Returns whether the custom hitbox is enabled.voidsetHeightScale(float heightScale)Sets the height scale factor for the hitbox.voidsetHitboxEnabled(boolean enabled)Sets whether the custom hitbox is enabled.voidsetWidthScale(float widthScale)Sets the width scale factor for the hitbox.
-
-
-
Method Detail
-
isHitboxEnabled
boolean isHitboxEnabled()
Returns whether the custom hitbox is enabled.- Returns:
- true if the custom hitbox is enabled, false otherwise.
-
setHitboxEnabled
void setHitboxEnabled(boolean enabled)
Sets whether the custom hitbox is enabled.- Parameters:
enabled- true to enable, false to disable.
-
getWidthScale
float getWidthScale()
Returns the width scale factor for the hitbox.- Returns:
- the width scale factor (1.0 = default).
-
setWidthScale
void setWidthScale(float widthScale)
Sets the width scale factor for the hitbox. Clamped to the server-configured maximum.- Parameters:
widthScale- the width scale factor.
-
getHeightScale
float getHeightScale()
Returns the height scale factor for the hitbox.- Returns:
- the height scale factor (1.0 = default).
-
setHeightScale
void setHeightScale(float heightScale)
Sets the height scale factor for the hitbox. Clamped to the server-configured maximum.- Parameters:
heightScale- the height scale factor.
-
-