Class ExplosionUtils
java.lang.Object
com.hypixel.hytale.server.core.entity.ExplosionUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatprivate static final floatprivate static final floatprivate static final Vector3fprivate static final intprivate static final Vector3fprivate static final intprivate static final Vector3fprivate static final intprivate static final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static floatcalculateBlockDamageScale(float distance, float radius, float fallOff) private static voidcollectPotentialTargets(Set<Ref<EntityStore>> targetRefs, List<Ref<EntityStore>> potentialTargetRefs, Vector3d startPosition, Vector3d endPosition, CommandBuffer<EntityStore> commandBuffer) private static booleanisValidTargetBlock(int blockTypeId, boolean damageBlocks) static voidperformExplosion(Damage.Source damageSource, Vector3d position, ExplosionConfig config, Ref<EntityStore> ignoreRef, CommandBuffer<EntityStore> commandBuffer, ComponentAccessor<ChunkStore> chunkStore) private static booleanprocessPotentialEntity(Ref<EntityStore> ref, Vector3d startPosition, Vector3d endPosition, CommandBuffer<EntityStore> commandBuffer) private static voidprocessTargetBlocks(Vector3d position, ExplosionConfig config, Ref<EntityStore> ignoreRef, Set<Ref<EntityStore>> targetRefs, CommandBuffer<EntityStore> commandBuffer, ComponentAccessor<ChunkStore> chunkStore) private static voidprocessTargetEntities(ExplosionConfig config, Vector3d position, Damage.Source damageSource, Ref<EntityStore> ignoreRef, Set<Ref<EntityStore>> targetRefs, CommandBuffer<EntityStore> commandBuffer) private static voidprocessTargetEntity(ExplosionConfig config, Ref<EntityStore> targetRef, Vector3d position, Damage.Source damageSource, CommandBuffer<EntityStore> commandBuffer)
-
Field Details
-
DEBUG_SHAPES
private static final boolean DEBUG_SHAPES- See Also:
-
DEBUG_POTENTIAL_TARGET_COLOR
-
DEBUG_POTENTIAL_TARGET_TIME
private static final int DEBUG_POTENTIAL_TARGET_TIME- See Also:
-
DEBUG_BLOCK_HIT_SCALE
private static final float DEBUG_BLOCK_HIT_SCALE- See Also:
-
DEBUG_BLOCK_HIT_TIME
private static final float DEBUG_BLOCK_HIT_TIME- See Also:
-
DEBUG_BLOCK_HIT_ALPHA
private static final float DEBUG_BLOCK_HIT_ALPHA- See Also:
-
DEBUG_BLOCK_RADIUS_COLOR
-
DEBUG_ENTITY_RADIUS_COLOR
-
DEBUG_BLOCK_RADIUS_TIME
private static final int DEBUG_BLOCK_RADIUS_TIME- See Also:
-
DEBUG_ENTITY_RADIUS_TIME
private static final int DEBUG_ENTITY_RADIUS_TIME- See Also:
-
-
Constructor Details
-
ExplosionUtils
public ExplosionUtils()
-
-
Method Details
-
performExplosion
public static void performExplosion(@Nonnull Damage.Source damageSource, @Nonnull Vector3d position, @Nonnull ExplosionConfig config, @Nullable Ref<EntityStore> ignoreRef, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
processTargetBlocks
private static void processTargetBlocks(@Nonnull Vector3d position, @Nonnull ExplosionConfig config, @Nullable Ref<EntityStore> ignoreRef, @Nonnull Set<Ref<EntityStore>> targetRefs, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull ComponentAccessor<ChunkStore> chunkStore) -
isValidTargetBlock
private static boolean isValidTargetBlock(int blockTypeId, boolean damageBlocks) -
collectPotentialTargets
private static void collectPotentialTargets(@Nonnull Set<Ref<EntityStore>> targetRefs, @Nonnull List<Ref<EntityStore>> potentialTargetRefs, @Nonnull Vector3d startPosition, @Nonnull Vector3d endPosition, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
processPotentialEntity
private static boolean processPotentialEntity(@Nonnull Ref<EntityStore> ref, @Nonnull Vector3d startPosition, @Nonnull Vector3d endPosition, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
calculateBlockDamageScale
private static float calculateBlockDamageScale(float distance, float radius, float fallOff) -
processTargetEntities
private static void processTargetEntities(@Nonnull ExplosionConfig config, @Nonnull Vector3d position, @Nonnull Damage.Source damageSource, @Nullable Ref<EntityStore> ignoreRef, @Nonnull Set<Ref<EntityStore>> targetRefs, @Nonnull CommandBuffer<EntityStore> commandBuffer) -
processTargetEntity
private static void processTargetEntity(@Nonnull ExplosionConfig config, @Nonnull Ref<EntityStore> targetRef, @Nonnull Vector3d position, @Nonnull Damage.Source damageSource, @Nonnull CommandBuffer<EntityStore> commandBuffer)
-