Interface ImpactConsumer

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ImpactConsumer
A functional interface that consumes projectile impact events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onImpact(Ref<EntityStore> ref, org.joml.Vector3d position, org.joml.Vector3i bounceBlockPosition, Ref<EntityStore> targetRef, String collisionDetailName, CommandBuffer<EntityStore> commandBuffer)
    Called when a projectile impacts something.
  • Method Details

    • onImpact

      void onImpact(@Nonnull Ref<EntityStore> ref, @Nonnull org.joml.Vector3d position, @Nullable org.joml.Vector3i bounceBlockPosition, @Nullable Ref<EntityStore> targetRef, @Nullable String collisionDetailName, @Nonnull CommandBuffer<EntityStore> commandBuffer)
      Called when a projectile impacts something.
      Parameters:
      ref - The entity reference of the projectile.
      position - The position of the impact.
      bounceBlockPosition - The block the projectile struck, or null if it did not strike a block.
      targetRef - The entity reference of the target that was hit, or null if no entity was hit.
      collisionDetailName - The collision detail name, or null if none.
      commandBuffer - The CommandBuffer<EntityStore> for component access.