2021-02-14 16:53:44 +01:00
|
|
|
package com.minelittlepony.unicopia.projectile;
|
|
|
|
|
|
|
|
import net.minecraft.block.BlockState;
|
|
|
|
import net.minecraft.entity.Entity;
|
2022-03-27 16:02:14 +02:00
|
|
|
import net.minecraft.entity.projectile.ProjectileEntity;
|
2021-02-14 16:53:44 +01:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
|
|
|
|
2022-03-27 16:02:14 +02:00
|
|
|
public interface ProjectileDelegate<T extends ProjectileEntity> {
|
2021-02-14 16:53:44 +01:00
|
|
|
/**
|
|
|
|
* Called once the projectile lands either hitting the ground or an entity.
|
|
|
|
*/
|
2022-03-27 16:02:14 +02:00
|
|
|
default void onImpact(T projectile, BlockPos pos, BlockState state) {}
|
2021-02-14 16:53:44 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Called once the projectile lands either hitting the ground or an entity.
|
|
|
|
*/
|
2022-03-27 16:02:14 +02:00
|
|
|
default void onImpact(T projectile, Entity entity) {}
|
2021-02-14 16:53:44 +01:00
|
|
|
}
|