Class CombatUtils

java.lang.Object
com.minecolonies.core.entity.ai.combat.CombatUtils

public class CombatUtils extends Object
Utility class of combat functions
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.entity.projectile.AbstractArrow
    createArrowForShooter(net.minecraft.world.entity.LivingEntity shooter)
    Get an arrow entity for the given shooter
    static void
    notifyGuardsOfTarget(AbstractEntityCitizen user, net.minecraft.world.entity.LivingEntity target, int callRange)
    Actions on changing to a new target entity
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 shot
      target - the target to be shot at
      hitChance - 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