Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- get()
- spawnProjectile(Ref, CommandBuffer, ProjectileConfig, Vector3d, Vector3d)
- spawnProjectile(Ref, CommandBuffer, ProjectileConfig, Vector3d, Vector3d, float, float)
- spawnProjectile(UUID, Long, Ref, CommandBuffer, ProjectileConfig, Vector3d, Vector3d, long)
- spawnProjectile(UUID, Long, Ref, CommandBuffer, ProjectileConfig, Vector3d, Vector3d, float, float)
- spawnProjectile(UUID, Long, Ref, CommandBuffer, ProjectileConfig, Vector3d, Vector3d, float, float, long)
- getProjectileComponentType()
- getStandardPhysicsProviderComponentType()
- getPredictedProjectileComponentType()
- getImpactModifiersComponentType()
- getPierceProjectileComponentType()
- getSpectralProjectileComponentType()
- getProjectileHitExclusionsComponentType()
- getProjectileLaunchContextComponentType()
- getGroundFollowProjectileComponentType()
- getDirectionalHitBoxComponentType()
Class ProjectileModule
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.core.modules.projectile.ProjectileModule
- All Implemented Interfaces:
CommandOwner
The Projectile Module implements the projectile system.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PluginManifestThe plugin manifest for theProjectileModuleplugin.Fields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProjectileModuleget()spawnProjectile(Ref<EntityStore> creatorRef, CommandBuffer<EntityStore> commandBuffer, ProjectileConfig config, org.joml.Vector3d position, org.joml.Vector3d direction) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.spawnProjectile(Ref<EntityStore> creatorRef, CommandBuffer<EntityStore> commandBuffer, ProjectileConfig config, org.joml.Vector3d position, org.joml.Vector3d direction, float scaleMultiplier, float speedMultiplier) Called to spawn an unpredicted projectile with a uniform scale multiplier on its model and hitbox (e.g. an AoE rune growing an ability projectile) and a multiplier on the config's LaunchForce (e.g. a speed rune hastening it).spawnProjectile(UUID predictionId, Long scaleSeed, Ref<EntityStore> creatorRef, CommandBuffer<EntityStore> commandBuffer, ProjectileConfig config, org.joml.Vector3d position, org.joml.Vector3d direction, float scaleMultiplier, float speedMultiplier) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.spawnProjectile(UUID predictionId, Long scaleSeed, Ref<EntityStore> creatorRef, CommandBuffer<EntityStore> commandBuffer, ProjectileConfig config, org.joml.Vector3d position, org.joml.Vector3d direction, float scaleMultiplier, float speedMultiplier, long despawnDelay) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.spawnProjectile(UUID predictionId, Long scaleSeed, Ref<EntityStore> creatorRef, CommandBuffer<EntityStore> commandBuffer, ProjectileConfig config, org.joml.Vector3d position, org.joml.Vector3d direction, long despawnDelay) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.Methods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Field Details
-
MANIFEST
The plugin manifest for theProjectileModuleplugin.
-
-
Constructor Details
-
ProjectileModule
Default Constructor for aProjectileModuleinstance.- Parameters:
init- The plugin initialization step for this plugin.
-
-
Method Details
-
get
- Returns:
- the static instance of the
ProjectileModuleplugin.
-
spawnProjectile
@Nonnull public Ref<EntityStore> spawnProjectile(Ref<EntityStore> creatorRef, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ProjectileConfig config, @Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.- Parameters:
creatorRef- The entity reference of the instigating entities entity.commandBuffer- TheCommandBuffer<EntityStore>for component access.config- TheProjectileConfigto use when spawning the projectile.position- The position to spawn the projectile at.direction- The direction to launch the projectile in.- Returns:
- the entity reference of the newly created projectile.
-
spawnProjectile
@Nonnull public Ref<EntityStore> spawnProjectile(Ref<EntityStore> creatorRef, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ProjectileConfig config, @Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, float scaleMultiplier, float speedMultiplier) Called to spawn an unpredicted projectile with a uniform scale multiplier on its model and hitbox (e.g. an AoE rune growing an ability projectile) and a multiplier on the config's LaunchForce (e.g. a speed rune hastening it). -
spawnProjectile
@Nonnull public Ref<EntityStore> spawnProjectile(@Nullable UUID predictionId, @Nullable Long scaleSeed, Ref<EntityStore> creatorRef, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ProjectileConfig config, @Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, long despawnDelay) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.- Parameters:
predictionId- The UUID used for client-side prediction, ornullfor no prediction.scaleSeed- A deterministic seed for the model scale, ornullfor a random scale.creatorRef- The entity reference of the instigating entities entity.commandBuffer- TheCommandBuffer<EntityStore>for component access.config- TheProjectileConfigto use when spawning the projectile.position- The position to spawn the projectile at.direction- The direction to launch the projectile in.- Returns:
- the entity reference of the newly created projectile.
-
spawnProjectile
@Nonnull public Ref<EntityStore> spawnProjectile(@Nullable UUID predictionId, @Nullable Long scaleSeed, Ref<EntityStore> creatorRef, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ProjectileConfig config, @Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, float scaleMultiplier, float speedMultiplier) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.- Parameters:
predictionId- The UUID used for client-side prediction, ornullfor no prediction.scaleSeed- A deterministic seed for the model scale, ornullfor a random scale.creatorRef- The entity reference of the instigating entities entity.commandBuffer- TheCommandBuffer<EntityStore>for component access.config- TheProjectileConfigto use when spawning the projectile.position- The position to spawn the projectile at.direction- The direction to launch the projectile in.scaleMultiplier- A uniform multiplier on the model scale and hitbox. Keep 1 for predicted projectiles: the predicting client spawns its twin unscaled.speedMultiplier- A multiplier on the config's LaunchForce. Keep 1 for predicted projectiles: the predicting client launches its twin at base speed.- Returns:
- the entity reference of the newly created projectile.
-
spawnProjectile
@Nonnull public Ref<EntityStore> spawnProjectile(@Nullable UUID predictionId, @Nullable Long scaleSeed, Ref<EntityStore> creatorRef, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ProjectileConfig config, @Nonnull org.joml.Vector3d position, @Nonnull org.joml.Vector3d direction, float scaleMultiplier, float speedMultiplier, long despawnDelay) Called to spawn a projectile entity, returning the entity reference of the newly spawned projectile.- Parameters:
predictionId- The UUID used for client-side prediction, ornullfor no prediction.scaleSeed- A deterministic seed for the model scale, ornullfor a random scale.creatorRef- The entity reference of the instigating entities entity.commandBuffer- TheCommandBuffer<EntityStore>for component access.config- TheProjectileConfigto use when spawning the projectile.position- The position to spawn the projectile at.direction- The direction to launch the projectile in.scaleMultiplier- A uniform multiplier on the model scale and hitbox. Keep 1 for predicted projectiles: the predicting client spawns its twin unscaled.speedMultiplier- A multiplier on the config's LaunchForce. Keep 1 for predicted projectiles: the predicting client launches its twin at base speed.despawnDelay- The duration in milliseconds before the projectile is despawned. 0 falls back to the default value.- Returns:
- the entity reference of the newly created projectile.
-
getProjectileComponentType
- Returns:
- the component type for the
Projectilecomponent.
-
getStandardPhysicsProviderComponentType
@Nonnull public ComponentType<EntityStore, StandardPhysicsProvider> getStandardPhysicsProviderComponentType()- Returns:
- the component type for the
StandardPhysicsProvidercomponent.
-
getPredictedProjectileComponentType
@Nonnull public ComponentType<EntityStore, PredictedProjectile> getPredictedProjectileComponentType()- Returns:
- the component type for the
PredictedProjectilecomponent.
-
getImpactModifiersComponentType
-
getPierceProjectileComponentType
-
getSpectralProjectileComponentType
-
getProjectileHitExclusionsComponentType
public ComponentType<EntityStore, ProjectileHitExclusions> getProjectileHitExclusionsComponentType() -
getProjectileLaunchContextComponentType
public ComponentType<EntityStore, ProjectileLaunchContext> getProjectileLaunchContextComponentType() -
getGroundFollowProjectileComponentType
-
getDirectionalHitBoxComponentType
-