Package noppes.npcs.api.entity.data
Interface IModelData
-
public interface IModelData
Provides configuration data for a model including wearable settings, hidden parts, rotation, and scale.This interface allows controlling the appearance of an entity's model such as headwear, bodywear, arm and leg configurations, and the ability to hide parts. It also manages model rotation and scaling settings as well as the association with an entity type.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte
bodyWear()
Gets the current bodywear configuration.void
bodyWear(byte config)
Sets the bodywear configuration.boolean
enableRotation()
Checks whether rotation is enabled for the model.void
enableRotation(boolean enableRotation)
Enables or disables rotation for the model.java.lang.String
getEntity()
Gets the entity class name associated with this model data.IModelRotate
getRotation()
Returns the model rotation configuration.IModelScale
getScale()
Returns the model scaling configuration.byte
headWear()
Gets the current headwear configuration.void
headWear(byte config)
Sets the headwear configuration.int
hidden(int part)
Returns the hide configuration for the specified part.void
hidePart(int part, byte hide)
Hide Body Parts part: [0: Head, 1: Body, 2: Arms, 3: Legs] hide: [0: None, 1: Both, 2: Right, 3: Left], only values 0 and 1 used for head & body.byte
leftArmWear()
Gets the current left arm wear configuration.void
leftArmWear(byte config)
Sets the left arm wear configuration.byte
leftLegWear()
Gets the current left leg wear configuration.void
leftLegWear(byte config)
Sets the left leg wear configuration.byte
rightArmWear()
Gets the current right arm wear configuration.void
rightArmWear(byte config)
Sets the right arm wear configuration.byte
rightLegWear()
Gets the current right leg wear configuration.void
rightLegWear(byte config)
Sets the right leg wear configuration.void
setEntity(java.lang.String string)
Associates this model data with an entity using its class name.
-
-
-
Method Detail
-
headWear
void headWear(byte config)
Sets the headwear configuration. Valid values: 0 (hidden), 1 (2D), 2 (3D).- Parameters:
config
- the headwear configuration.
-
headWear
byte headWear()
Gets the current headwear configuration.- Returns:
- the headwear configuration.
-
bodyWear
void bodyWear(byte config)
Sets the bodywear configuration. Valid values: 0 (hidden), 1 (2D), 2 (3D).- Parameters:
config
- the bodywear configuration.
-
bodyWear
byte bodyWear()
Gets the current bodywear configuration.- Returns:
- the bodywear configuration.
-
rightArmWear
void rightArmWear(byte config)
Sets the right arm wear configuration. Valid values: 0 (hidden), 1 (2D), 2 (3D).- Parameters:
config
- the right arm configuration.
-
rightArmWear
byte rightArmWear()
Gets the current right arm wear configuration.- Returns:
- the right arm configuration.
-
leftArmWear
void leftArmWear(byte config)
Sets the left arm wear configuration. Valid values: 0 (hidden), 1 (2D), 2 (3D).- Parameters:
config
- the left arm configuration.
-
leftArmWear
byte leftArmWear()
Gets the current left arm wear configuration.- Returns:
- the left arm configuration.
-
rightLegWear
void rightLegWear(byte config)
Sets the right leg wear configuration. Valid values: 0 (hidden), 1 (2D), 2 (3D).- Parameters:
config
- the right leg configuration.
-
rightLegWear
byte rightLegWear()
Gets the current right leg wear configuration.- Returns:
- the right leg configuration.
-
leftLegWear
void leftLegWear(byte config)
Sets the left leg wear configuration. Valid values: 0 (hidden), 1 (2D), 2 (3D).- Parameters:
config
- the left leg configuration.
-
leftLegWear
byte leftLegWear()
Gets the current left leg wear configuration.- Returns:
- the left leg configuration.
-
hidePart
void hidePart(int part, byte hide)
Hide Body Parts part: [0: Head, 1: Body, 2: Arms, 3: Legs] hide: [0: None, 1: Both, 2: Right, 3: Left], only values 0 and 1 used for head & body.- Parameters:
part
- the part index.hide
- the hide configuration.
-
hidden
int hidden(int part)
Returns the hide configuration for the specified part.- Parameters:
part
- the part index.- Returns:
- the current hide configuration.
-
enableRotation
void enableRotation(boolean enableRotation)
Enables or disables rotation for the model.- Parameters:
enableRotation
- true to enable rotation; false to disable.
-
enableRotation
boolean enableRotation()
Checks whether rotation is enabled for the model.- Returns:
- true if rotation is enabled; false otherwise.
-
getRotation
IModelRotate getRotation()
Returns the model rotation configuration.- Returns:
- the rotation settings.
-
getScale
IModelScale getScale()
Returns the model scaling configuration.- Returns:
- the scale settings.
-
setEntity
void setEntity(java.lang.String string)
Associates this model data with an entity using its class name.- Parameters:
string
- the fully qualified class name of the entity.
-
getEntity
java.lang.String getEntity()
Gets the entity class name associated with this model data.- Returns:
- the entity class name, or null if not set.
-
-