Class FirstPersonModifier
java.lang.Object
dev.kosmx.playerAnim.api.layered.AnimationContainer<IAnimation>
dev.kosmx.playerAnim.api.layered.modifier.AbstractModifier
dev.kosmx.playerAnim.api.layered.modifier.FirstPersonModifier
- All Implemented Interfaces:
IAnimation
The
FirstPersonModifier class is responsible for modifying
the first-person view configuration in a system. It allows enabling or disabling
specific arms and/or items in the first-person view using predefined configurations.
This class extends AbstractModifier and overrides the methods
getFirstPersonConfiguration and getFirstPersonMode to return the current
configuration and mode defined by the FirstPersonConfigEnum and FirstPersonMode, respectively.
The default configuration is ENABLE_BOTH_ARMS, which enables
both arms and items in the first-person view. The default mode is DISABLED.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration representing predefined first-person view configurations. -
Field Summary
Fields inherited from class dev.kosmx.playerAnim.api.layered.modifier.AbstractModifier
hostFields inherited from class dev.kosmx.playerAnim.api.layered.AnimationContainer
anim -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull FirstPersonConfigurationgetFirstPersonConfiguration(float tickDelta) Retrieves the current first-person configuration.@NotNull FirstPersonModegetFirstPersonMode(float tickDelta) Retrieves the current first-person mode.Methods inherited from class dev.kosmx.playerAnim.api.layered.modifier.AbstractModifier
canRemoveMethods inherited from class dev.kosmx.playerAnim.api.layered.AnimationContainer
get3DTransform, getAnim, isActive, setAnim, setupAnim, tick
-
Constructor Details
-
FirstPersonModifier
public FirstPersonModifier()
-
-
Method Details
-
getFirstPersonConfiguration
Retrieves the current first-person configuration.This method returns the configuration defined by the
currentFirstPersonConfigfield, which specifies which arms and items are visible in the first-person view.- Specified by:
getFirstPersonConfigurationin interfaceIAnimation- Overrides:
getFirstPersonConfigurationin classAnimationContainer<IAnimation>- Parameters:
tickDelta-- Returns:
- The active
FirstPersonConfigurationbased oncurrentFirstPersonConfig.
-
getFirstPersonMode
Retrieves the current first-person mode.This method returns the mode defined by the
currentFirstPersonModefield, which specifies whether the first-person view is enabled, disabled, or in another mode.- Specified by:
getFirstPersonModein interfaceIAnimation- Overrides:
getFirstPersonModein classAnimationContainer<IAnimation>- Parameters:
tickDelta-- Returns:
- The active
FirstPersonModebased oncurrentFirstPersonMode.
-