public class ExplosionUtils
Class ExplosionUtils. Provides explosionutils functionality for the Hytale server.
java.lang.Object > ExplosionUtils
Field Summary
blockPosition
Field blockPosition.
random
Field random.
world
Field world.
range
Field range.
itemTool
Field itemTool.
targetBlocks
Field targetBlocks.
posX
Field posX.
posY
Field posY.
posZ
Field posZ.
avoidBlocks
Field avoidBlocks.
targetBlockPosition
Field targetBlockPosition.
distance
Field distance.
direction
Field direction.
targetBlockPos
Field targetBlockPos.
entityHitPos
Field entityHitPos.
targetBlockPosD
Field targetBlockPosD.
damageDistance
Field damageDistance.
damageScale
Field damageScale.
chunkIndex
Field chunkIndex.
chunkReference
Field chunkReference.
canDamageBlock
Field canDamageBlock.
blockType
Field blockType.
gathering
Field gathering.
boundingBoxComponent
Field boundingBoxComponent.
transformComponent
Field transformComponent.
entityPosition
Field entityPosition.
boundingBox
Field boundingBox.
normalizedDistance
Field normalizedDistance.
entityDamageRadius
Field entityDamageRadius.
explosionDamage
Field explosionDamage.
explosionFalloff
Field explosionFalloff.
targetTransformComponent
Field targetTransformComponent.
targetVelocityComponent
Field targetVelocityComponent.
targetPosition
Field targetPosition.
diff
Field diff.
damage
Field damage.
knockbackConfig
Field knockbackConfig.
Method Detail
performExplosion
void
performExplosion
(@Nonnull final Damage.Source damageSource, @Nonnull final Vector3d position, @Nonnull final ExplosionConfig config, @Nullable final Ref ignoreRef, @Nonnull final CommandBuffer commandBuffer, @Nonnull final ComponentAccessor chunkStore)
Method performExplosion.
- Parameters:
@Nonnull final Damage.SourcedamageSource@Nonnull final Vector3dposition@Nonnull final ExplosionConfigconfig@Nullable final RefignoreRef@Nonnull final CommandBuffercommandBuffer@Nonnull final ComponentAccessorchunkStore
Vector3d
new
Vector3d
(Math.floor(position.x)
Method Vector3d.
- Parameters:
Math.floor(position.xMath.floor(position.x
processTargetBlocks
void
processTargetBlocks
(@Nonnull final Vector3d position, @Nonnull final ExplosionConfig config, @Nullable final Ref ignoreRef, @Nonnull final Set> targetRefs, @Nonnull final CommandBuffer commandBuffer, @Nonnull final ComponentAccessor chunkStore)
Method processTargetBlocks.
- Parameters:
@Nonnull final Vector3dposition@Nonnull final ExplosionConfigconfig@Nullable final RefignoreRef@Nonnull final Set>targetRefs@Nonnull final CommandBuffercommandBuffer@Nonnull final ComponentAccessorchunkStore
Vector3i
new
Vector3i
(x, y, z)
Method Vector3i.
- Parameters:
xxyyzz
isValidTargetBlock
>
isValidTargetBlock
(id, config.damageBlocks)
Method isValidTargetBlock.
- Parameters:
ididconfig.damageBlocksconfig.damageBlocks
collectPotentialTargets
void
collectPotentialTargets
(@Nonnull final Set> targetRefs, @Nonnull final List> potentialTargetRefs, @Nonnull final Vector3d startPosition, @Nonnull final Vector3d endPosition, @Nonnull final CommandBuffer commandBuffer)
Method collectPotentialTargets.
- Parameters:
@Nonnull final Set>targetRefs@Nonnull final List>potentialTargetRefs@Nonnull final Vector3dstartPosition@Nonnull final Vector3dendPosition@Nonnull final CommandBuffercommandBuffer
processPotentialEntity
boolean
processPotentialEntity
(@Nonnull final Ref ref, @Nonnull final Vector3d startPosition, @Nonnull final Vector3d endPosition, @Nonnull final CommandBuffer commandBuffer)
Method processPotentialEntity.
- Parameters:
@Nonnull final Refref@Nonnull final Vector3dstartPosition@Nonnull final Vector3dendPosition@Nonnull final CommandBuffercommandBuffer
calculateBlockDamageScale
float
calculateBlockDamageScale
(final float distance, final float radius, final float fallOff)
Method calculateBlockDamageScale.
- Parameters:
final floatdistancefinal floatradiusfinal floatfallOff
processTargetEntities
void
processTargetEntities
(@Nonnull final ExplosionConfig config, @Nonnull final Vector3d position, @Nonnull final Damage.Source damageSource, @Nullable final Ref ignoreRef, @Nonnull final Set> targetRefs, @Nonnull final CommandBuffer commandBuffer)
Method processTargetEntities.
- Parameters:
@Nonnull final ExplosionConfigconfig@Nonnull final Vector3dposition@Nonnull final Damage.SourcedamageSource@Nullable final RefignoreRef@Nonnull final Set>targetRefs@Nonnull final CommandBuffercommandBuffer
processTargetEntity
void
processTargetEntity
(@Nonnull final ExplosionConfig config, @Nonnull final Ref targetRef, @Nonnull final Vector3d position, @Nonnull final Damage.Source damageSource, @Nonnull final CommandBuffer commandBuffer)
Method processTargetEntity.
- Parameters:
@Nonnull final ExplosionConfigconfig@Nonnull final ReftargetRef@Nonnull final Vector3dposition@Nonnull final Damage.SourcedamageSource@Nonnull final CommandBuffercommandBuffer
Damage
new
Damage
(damageSource, DamageCause.ENVIRONMENT, damage)
Method Damage.
- Parameters:
damageSourcedamageSourceDamageCause.ENVIRONMENTDamageCause.ENVIRONMENTdamagedamage