Class EntityUtil

java.lang.Object
com.binaris.wizardry.api.content.util.EntityUtil

public final class EntityUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.world.entity.EquipmentSlot[]
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    attackEntityWithoutKnockback(net.minecraft.world.entity.Entity entity, net.minecraft.world.damagesource.DamageSource source, float amount)
     
    static boolean
    canDamageBlocks(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level world)
     
    static boolean
    doAllArmorPiecesHaveMana(net.minecraft.world.entity.LivingEntity entity)
     
    static boolean
    doesPlayerHaveItem(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item item)
     
    static net.minecraft.world.phys.Vec3
    findSpaceForTeleport(net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.Vec3 destination, boolean accountForPassengers)
     
    static Collection<net.minecraft.world.item.ItemStack>
    getAllItems(net.minecraft.world.entity.player.Player player)
     
    static Collection<net.minecraft.world.item.ItemStack>
    getAllItemsIncludingCarried(net.minecraft.world.entity.player.Player player)
     
    static int
    getDefaultAimingError(net.minecraft.world.Difficulty difficulty)
     
    static <T extends net.minecraft.world.entity.Entity>
    List<T>
    getEntitiesInRange(net.minecraft.world.level.Level world, double x, double y, double z, double range, Class<T> entityClass)
     
    static <T extends net.minecraft.world.entity.Entity>
    List<T>
    getEntitiesWithinCylinder(double radius, double x, double y, double z, double height, net.minecraft.world.level.Level world, Class<T> entityType)
     
    static <T extends net.minecraft.world.entity.Entity>
    List<T>
    getEntitiesWithinRadius(double radius, double x, double y, double z, net.minecraft.world.level.Level world, Class<T> entityType)
     
    static @Nullable net.minecraft.world.entity.Entity
    getEntityByUUID(net.minecraft.world.level.Level world, @Nullable UUID id)
     
    static List<net.minecraft.world.item.ItemStack>
    getHotBarAndHandItems(net.minecraft.world.entity.player.Player player)
     
    static List<net.minecraft.world.item.ItemStack>
    getHotbarItems(net.minecraft.world.entity.player.Player player)
     
    static List<net.minecraft.world.entity.LivingEntity>
    getLivingEntitiesInRange(net.minecraft.world.level.Level world, double x, double y, double z, double range)
     
    static List<net.minecraft.world.entity.LivingEntity>
    getLivingWithinCylinder(double radius, double x, double y, double z, double height, net.minecraft.world.level.Level world)
     
    static List<net.minecraft.world.entity.LivingEntity>
    getLivingWithinRadius(double radius, double x, double y, double z, net.minecraft.world.level.Level world)
     
    static @Nullable net.minecraft.world.entity.Entity
    getRider(net.minecraft.world.entity.Entity entity)
     
    static @NotNull net.minecraft.world.item.ItemStack
    getWandInUse(net.minecraft.world.entity.player.Player player)
     
    static boolean
    isCasting(net.minecraft.world.entity.LivingEntity caster, Spell spell)
     
    static boolean
    isWearingFullMagicArmorSet(net.minecraft.world.entity.LivingEntity entity, @Nullable Element element, @Nullable WizardArmorMaterial armor)
     
    static void
    playSoundAtPlayer(net.minecraft.world.entity.player.Player player, net.minecraft.sounds.SoundEvent sound, float volume, float pitch)
     
    static SpellTier
    populateSpells(List<Spell> spells, Element e, boolean master, int n, net.minecraft.util.RandomSource random)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ARMOR_SLOTS

      public static final net.minecraft.world.entity.EquipmentSlot[] ARMOR_SLOTS
  • Method Details

    • getEntityByUUID

      @Nullable public static @Nullable net.minecraft.world.entity.Entity getEntityByUUID(net.minecraft.world.level.Level world, @Nullable @Nullable UUID id)
    • getLivingEntitiesInRange

      public static List<net.minecraft.world.entity.LivingEntity> getLivingEntitiesInRange(net.minecraft.world.level.Level world, double x, double y, double z, double range)
    • getLivingWithinRadius

      public static List<net.minecraft.world.entity.LivingEntity> getLivingWithinRadius(double radius, double x, double y, double z, net.minecraft.world.level.Level world)
    • getEntitiesInRange

      public static <T extends net.minecraft.world.entity.Entity> List<T> getEntitiesInRange(net.minecraft.world.level.Level world, double x, double y, double z, double range, Class<T> entityClass)
    • getEntitiesWithinRadius

      public static <T extends net.minecraft.world.entity.Entity> List<T> getEntitiesWithinRadius(double radius, double x, double y, double z, net.minecraft.world.level.Level world, Class<T> entityType)
    • attackEntityWithoutKnockback

      public static boolean attackEntityWithoutKnockback(net.minecraft.world.entity.Entity entity, net.minecraft.world.damagesource.DamageSource source, float amount)
    • getRider

      @Nullable public static @Nullable net.minecraft.world.entity.Entity getRider(net.minecraft.world.entity.Entity entity)
    • findSpaceForTeleport

      public static net.minecraft.world.phys.Vec3 findSpaceForTeleport(net.minecraft.world.entity.Entity entity, net.minecraft.world.phys.Vec3 destination, boolean accountForPassengers)
    • getLivingWithinCylinder

      public static List<net.minecraft.world.entity.LivingEntity> getLivingWithinCylinder(double radius, double x, double y, double z, double height, net.minecraft.world.level.Level world)
    • getEntitiesWithinCylinder

      public static <T extends net.minecraft.world.entity.Entity> List<T> getEntitiesWithinCylinder(double radius, double x, double y, double z, double height, net.minecraft.world.level.Level world, Class<T> entityType)
    • canDamageBlocks

      public static boolean canDamageBlocks(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.level.Level world)
    • getDefaultAimingError

      public static int getDefaultAimingError(net.minecraft.world.Difficulty difficulty)
    • playSoundAtPlayer

      public static void playSoundAtPlayer(net.minecraft.world.entity.player.Player player, net.minecraft.sounds.SoundEvent sound, float volume, float pitch)
    • isCasting

      public static boolean isCasting(net.minecraft.world.entity.LivingEntity caster, Spell spell)
    • populateSpells

      public static SpellTier populateSpells(List<Spell> spells, Element e, boolean master, int n, net.minecraft.util.RandomSource random)
    • getWandInUse

      @NotNull public static @NotNull net.minecraft.world.item.ItemStack getWandInUse(net.minecraft.world.entity.player.Player player)
    • getAllItems

      public static Collection<net.minecraft.world.item.ItemStack> getAllItems(net.minecraft.world.entity.player.Player player)
    • getAllItemsIncludingCarried

      public static Collection<net.minecraft.world.item.ItemStack> getAllItemsIncludingCarried(net.minecraft.world.entity.player.Player player)
    • getHotBarAndHandItems

      public static List<net.minecraft.world.item.ItemStack> getHotBarAndHandItems(net.minecraft.world.entity.player.Player player)
    • doesPlayerHaveItem

      public static boolean doesPlayerHaveItem(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item item)
    • getHotbarItems

      public static List<net.minecraft.world.item.ItemStack> getHotbarItems(net.minecraft.world.entity.player.Player player)
    • isWearingFullMagicArmorSet

      public static boolean isWearingFullMagicArmorSet(net.minecraft.world.entity.LivingEntity entity, @Nullable @Nullable Element element, @Nullable @Nullable WizardArmorMaterial armor)
    • doAllArmorPiecesHaveMana

      public static boolean doAllArmorPiecesHaveMana(net.minecraft.world.entity.LivingEntity entity)