Contents
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.
A functional interface that consumes projectile impact events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonImpact(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, ornullif it did not strike a block.targetRef- The entity reference of the target that was hit, ornullif no entity was hit.collisionDetailName- The collision detail name, ornullif none.commandBuffer- TheCommandBuffer<EntityStore>for component access.
-