DeployableTurretConfig

public class DeployableTurretConfig extends DeployableConfig

Class DeployableTurretConfig. Provides deployableturretconfig functionality for the Hytale server.

java.lang.Object > DeployableConfig > DeployableTurretConfig

Field Summary

trackableRadius

protected float trackableRadius

Field trackableRadius.

detectionRadius

protected float detectionRadius

Field detectionRadius.

rotationSpeed

protected float rotationSpeed

Field rotationSpeed.

projectileDamage

protected float projectileDamage

Field projectileDamage.

preferOwnerTarget

protected boolean preferOwnerTarget

Field preferOwnerTarget.

ammo

protected int ammo

Field ammo.

projectileConfig

protected ProjectileConfig projectileConfig

Field projectileConfig.

deployDelay

protected float deployDelay

Field deployDelay.

shotInterval

protected float shotInterval

Field shotInterval.

burstCount

protected int burstCount

Field burstCount.

burstCooldown

protected float burstCooldown

Field burstCooldown.

canShootOwner

protected boolean canShootOwner

Field canShootOwner.

projectileKnockback

protected Knockback projectileKnockback

Field projectileKnockback.

targetOffset

protected Vector3d targetOffset

Field targetOffset.

doLineOfSightTest

protected boolean doLineOfSightTest

Field doLineOfSightTest.

projectileHitWorldSoundEventId

protected String projectileHitWorldSoundEventId

Field projectileHitWorldSoundEventId.

projectileHitLocalSoundEventId

protected String projectileHitLocalSoundEventId

Field projectileHitLocalSoundEventId.

projectileHitLocalSoundEventIndex

protected int projectileHitLocalSoundEventIndex

Field projectileHitLocalSoundEventIndex.

projectileHitWorldSoundEventIndex

protected int projectileHitWorldSoundEventIndex

Field projectileHitWorldSoundEventIndex.

respectTeams

protected boolean respectTeams

Field respectTeams.

index

final int index

Field index.

entityRef

final Ref entityRef

Field entityRef.

now

final Instant now

Field now.

readyTime

final Instant readyTime

Field readyTime.

world

final World world

Field world.

shooterComponent

final DeployableProjectileShooterComponent shooterComponent

Field shooterComponent.

spawnPos

final Vector3d spawnPos

Field spawnPos.

despawn

final DespawnComponent despawn

Field despawn.

timeManager

final WorldTimeResource timeManager

Field timeManager.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

headRotationComponent

final HeadRotation headRotationComponent

Field headRotationComponent.

pos

final Vector3d pos

Field pos.

targetTransformComponent

final TransformComponent targetTransformComponent

Field targetTransformComponent.

targetPos

final Vector3d targetPos

Field targetPos.

direction

final Vector3d direction

Field direction.

targetEntityRefs

final List> targetEntityRefs

Field targetEntityRefs.

targetTransformComponent2

final TransformComponent targetTransformComponent2

Field targetTransformComponent2.

targetPosition

final Vector3d targetPosition

Field targetPosition.

direction2

final Vector3d direction2

Field direction2.

targetTransformComponent3

final TransformComponent targetTransformComponent3

Field targetTransformComponent3.

relativeTargetOffset

final Vector3d relativeTargetOffset

Field relativeTargetOffset.

shotsFired

final int shotsFired

Field shotsFired.

timeSinceLastAttack

final float timeSinceLastAttack

Field timeSinceLastAttack.

fwdDirection

final Vector3d fwdDirection

Field fwdDirection.

rootPos

final Vector3d rootPos

Field rootPos.

uuid

final UUID uuid

Field uuid.

deployableComponent

final DeployableComponent deployableComponent

Field deployableComponent.

spawnOffset

final com.hypixel.hytale.protocol.Vector3f spawnOffset

Field spawnOffset.

testFromPos

final Vector3d testFromPos

Field testFromPos.

distance

final double distance

Field distance.

whiteColor

final Vector3f whiteColor

Field whiteColor.

increment

final Vector3d increment

Field increment.

blockPosition

final Vector3i blockPosition

Field blockPosition.

blockType

final BlockType blockType

Field blockType.

material

final BlockMaterial material

Field material.

entityDistance

final double entityDistance

Field entityDistance.

blockDistance

final double blockDistance

Field blockDistance.

projectiles

final List> projectiles

Field projectiles.

projectilesForRemoval

final List> projectilesForRemoval

Field projectilesForRemoval.

projTransformComponent

final TransformComponent projTransformComponent

Field projTransformComponent.

projPos

final Vector3d projPos

Field projPos.

hit

final AtomicReference hit

Field hit.

dProjComponent

final DeployableProjectileComponent dProjComponent

Field dProjComponent.

prevPos

final Vector3d prevPos

Field prevPos.

clone

final Vector3d clone

Field clone.

scanPos

final Vector3d scanPos

Field scanPos.

vector3d

final Vector3d vector3d

Field vector3d.

vector3d2

final Vector3d vector3d2

Field vector3d2.

physics

final StandardPhysicsProvider physics

Field physics.

damageEntry

final Damage damageEntry

Field damageEntry.

projectileTransformComponent

final TransformComponent projectileTransformComponent

Field projectileTransformComponent.

projectilePosition

final Vector3d projectilePosition

Field projectilePosition.

projectileRotationYaw

final float projectileRotationYaw

Field projectileRotationYaw.

knockbackComponent

final KnockbackComponent knockbackComponent

Field knockbackComponent.

Method Detail

DeployableTurretConfig

public public DeployableTurretConfig ()

Method DeployableTurretConfig.

processConfig

protected void processConfig ()

Method processConfig.

tick

public void tick (@Nonnull final DeployableComponent deployableComponent, final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tick.

Parameters:
@Nonnull final DeployableComponent deployableComponent
final float dt
final int index
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

tickInitState

private void tickInitState (@Nonnull final Ref entityRef, @Nonnull final DeployableComponent component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tickInitState.

Parameters:
@Nonnull final Ref entityRef
@Nonnull final DeployableComponent component
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

tickStartDeployState

private void tickStartDeployState (@Nonnull final Ref ref, @Nonnull final DeployableComponent component, @Nonnull final Store store)

Method tickStartDeployState.

Parameters:
@Nonnull final Ref ref
@Nonnull final DeployableComponent component
@Nonnull final Store store

tickAwaitDeployState

private void tickAwaitDeployState (@Nonnull final Ref ref, @Nonnull final DeployableComponent component, @Nonnull final Store store)

Method tickAwaitDeployState.

Parameters:
@Nonnull final Ref ref
@Nonnull final DeployableComponent component
@Nonnull final Store store

tickAttackState

private void tickAttackState (@Nonnull final Ref ref, @Nonnull final DeployableComponent component, final float dt, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tickAttackState.

Parameters:
@Nonnull final Ref ref
@Nonnull final DeployableComponent component
final float dt
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

if

public else if (shotsFired >= this.burstCount && timeSinceLastAttack >= this.burstCooldown)

Method if.

Parameters:
shotsFired >= this.burstCount && timeSinceLastAttack >= this.burstCooldown

calculatedTargetPosition

private Vector3d calculatedTargetPosition (@Nonnull final Vector3d original)

Method calculatedTargetPosition.

Parameters:
@Nonnull final Vector3d original

isValidTarget

private boolean isValidTarget (@Nonnull final Ref ref, @Nonnull final Store store, @Nonnull final Ref targetRef)

Method isValidTarget.

Parameters:
@Nonnull final Ref ref
@Nonnull final Store store
@Nonnull final Ref targetRef

testLineOfSight

private boolean testLineOfSight (@Nonnull final Vector3d attackerPos, @Nonnull final Vector3d targetPos, @Nonnull final Vector3d direction, @Nonnull final CommandBuffer commandBuffer)

Method testLineOfSight.

Parameters:
@Nonnull final Vector3d attackerPos
@Nonnull final Vector3d targetPos
@Nonnull final Vector3d direction
@Nonnull final CommandBuffer commandBuffer

updateProjectiles

private void updateProjectiles (@Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer, @Nonnull final DeployableProjectileShooterComponent shooterComponent)

Method updateProjectiles.

Parameters:
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer
@Nonnull final DeployableProjectileShooterComponent shooterComponent

updateProjectile

private void updateProjectile (@Nonnull final Ref projectileRef, @Nonnull final DeployableProjectileShooterComponent shooterComponent, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method updateProjectile.

Parameters:
@Nonnull final Ref projectileRef
@Nonnull final DeployableProjectileShooterComponent shooterComponent
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

projectileHit

private void projectileHit (@Nonnull final Ref ref, @Nonnull final Ref projectileRef, @Nonnull final DeployableProjectileShooterComponent shooterComponent, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method projectileHit.

Parameters:
@Nonnull final Ref ref
@Nonnull final Ref projectileRef
@Nonnull final DeployableProjectileShooterComponent shooterComponent
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

Damage

public new Damage (new Damage.EntitySource(ref)

Method Damage.

Parameters:
new Damage.EntitySource(ref

applyKnockback

private void applyKnockback (@Nonnull final Ref targetRef, @Nonnull final Vector3d attackerPos, final float attackerYaw, @Nonnull final Store store)

Method applyKnockback.

Parameters:
@Nonnull final Ref targetRef
@Nonnull final Vector3d attackerPos
final float attackerYaw
@Nonnull final Store store

toString

public String toString ()

Method toString.