Contents
Class MovementAudioComponent
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.component.MovementAudioComponent
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Stores data relating to movement audio.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUsed to prevent movement sounds being heard by the player producing them as this will be handled by the client. -
Field Summary
FieldsFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclone()intReturns a new predicate for each call.voidsetLastInsideBlockTypeId(int lastInsideBlockTypeId) voidsetNextMoveInRepeat(float nextMoveInRepeat) booleantickMoveInRepeat(float dt) Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
NO_REPEAT
public static float NO_REPEAT
-
-
Constructor Details
-
MovementAudioComponent
public MovementAudioComponent()
-
-
Method Details
-
getComponentType
-
getShouldHearPredicate
@Nonnull public MovementAudioComponent.ShouldHearPredicate getShouldHearPredicate(@Nonnull Ref<EntityStore> ref) Returns a new predicate for each call. The component moves with its entity between worlds, so a storedRefwould keep the previous world's store, and the whole world, reachable. -
getLastInsideBlockTypeId
public int getLastInsideBlockTypeId() -
setLastInsideBlockTypeId
public void setLastInsideBlockTypeId(int lastInsideBlockTypeId) -
canMoveInRepeat
public boolean canMoveInRepeat() -
tickMoveInRepeat
public boolean tickMoveInRepeat(float dt) -
setNextMoveInRepeat
public void setNextMoveInRepeat(float nextMoveInRepeat) -
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-