Class CombatUtils
java.lang.Object
com.minecolonies.core.entity.ai.combat.CombatUtils
Utility class of combat functions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.entity.projectile.AbstractArrowcreateArrowForShooter(net.minecraft.world.entity.LivingEntity shooter) Get an arrow entity for the given shooterstatic voidnotifyGuardsOfTarget(AbstractEntityCitizen user, net.minecraft.world.entity.LivingEntity target, int callRange) Actions on changing to a new target entitystatic voidshootArrow(net.minecraft.world.entity.projectile.AbstractArrow arrow, net.minecraft.world.entity.LivingEntity target, float hitChance) Shoots a given arrow at the given target with a hit chance
-
Constructor Details
-
CombatUtils
public CombatUtils()
-
-
Method Details
-
createArrowForShooter
public static net.minecraft.world.entity.projectile.AbstractArrow createArrowForShooter(net.minecraft.world.entity.LivingEntity shooter) Get an arrow entity for the given shooter- Parameters:
shooter- entity- Returns:
- arrow entity
-
shootArrow
public static void shootArrow(net.minecraft.world.entity.projectile.AbstractArrow arrow, net.minecraft.world.entity.LivingEntity target, float hitChance) Shoots a given arrow at the given target with a hit chance- Parameters:
arrow- the arrow entity to be shottarget- the target to be shot athitChance- the chance the target will be hit
-
notifyGuardsOfTarget
public static void notifyGuardsOfTarget(AbstractEntityCitizen user, net.minecraft.world.entity.LivingEntity target, int callRange) Actions on changing to a new target entity
-