Contents
Class DeployablesUtils
java.lang.Object
com.hypixel.hytale.builtin.deployables.DeployablesUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidplayAnimation(Store<EntityStore> store, int networkId, Ref<EntityStore> ref, DeployableConfig config, AnimationSlot animationSlot, String itemAnimationsId, String animationId) Called to play a specific animation on the provided deployable entitystatic voidplaySoundEventsAtEntity(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor, int localIndex, int worldIndex, org.joml.Vector3d pos) Called to play sound events at the given entity reference.static Ref<EntityStore> spawnDeployable(CommandBuffer<EntityStore> commandBuffer, Store<EntityStore> store, DeployableConfig config, Ref<EntityStore> deployerRef, org.joml.Vector3d position, Rotation3f rotation, String spawnFace) Called to spawn and return a deployable entity based on the provided deployable config.static voidstopAnimation(Store<EntityStore> store, int networkId, Ref<EntityStore> ref, AnimationSlot animationSlot) Called to play a specific animation on the provided deployable entity
-
Constructor Details
-
DeployablesUtils
public DeployablesUtils()
-
-
Method Details
-
spawnDeployable
@Nonnull public static Ref<EntityStore> spawnDeployable(@Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull Store<EntityStore> store, @Nonnull DeployableConfig config, @Nonnull Ref<EntityStore> deployerRef, @Nonnull org.joml.Vector3d position, @Nonnull Rotation3f rotation, @Nonnull String spawnFace) Called to spawn and return a deployable entity based on the provided deployable config.- Parameters:
commandBuffer- TheCommandBuffer<EntityStore>for component access.store- TheStore<EntityStore>for component access.config- TheDeployableConfiginstance to reference.deployerRef- The entity reference of the instigating entity.position- The position in which to spawn the deployable.rotation- The rotation to apply to the deployable.spawnFace- The provided spawn face for the deployable.- Returns:
- the entity reference of the newly created deployable entity.
-
playAnimation
public static void playAnimation(@Nonnull Store<EntityStore> store, int networkId, @Nonnull Ref<EntityStore> ref, @Nonnull DeployableConfig config, @Nonnull AnimationSlot animationSlot, @Nullable String itemAnimationsId, @Nonnull String animationId) Called to play a specific animation on the provided deployable entity- Parameters:
store- - Given affiliated entity store instancenetworkId- - Given network ID of the deployable entityref- - Given entity reference affiliated with the deployable entityconfig- - Given affiliatedDeployableConfiginstanceanimationSlot- - Given animation slot to play this animationitemAnimationsId- - Given ID of the active animationsanimationId- - Given ID of the animation to play
-
stopAnimation
public static void stopAnimation(@Nonnull Store<EntityStore> store, int networkId, @Nonnull Ref<EntityStore> ref, @Nonnull AnimationSlot animationSlot) Called to play a specific animation on the provided deployable entity- Parameters:
store- - Given affiliated entity store instancenetworkId- - Given network ID of the deployable entityref- - Given entity reference affiliated with the deployable entityanimationSlot- - Given animation slot to play this animation
-
playSoundEventsAtEntity
public static void playSoundEventsAtEntity(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor, int localIndex, int worldIndex, @Nonnull org.joml.Vector3d pos) Called to play sound events at the given entity reference. Playing both a local and world sound if applicable.- Parameters:
ref- The entity reference to play the sound at.componentAccessor- TheComponentAccessorfor component access.localIndex- The local sound event index.worldIndex- The world sound event index.pos- The position to play the sound at.
-