Class MobUtil

java.lang.Object
nokunami.floral_warfare.api.util.MobUtil

public class MobUtil extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.BlockPos
    blockPosFromVec3(net.minecraft.world.phys.Vec3 pos)
     
    static boolean
    canHitTarget(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
     
    static boolean
    checkForSpace(net.minecraft.world.entity.Entity entity)
     
    static void
    convertPlant(net.minecraft.world.entity.Entity upgrade, net.minecraft.world.entity.Entity target)
     
    static void
    customHurt(net.minecraft.world.entity.Entity target, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> source, float amount)
     
    static void
    customHurt(net.minecraft.world.entity.Entity target, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> source, net.minecraft.world.entity.Entity attacker, float amount)
     
    static void
    customHurt(net.minecraft.world.entity.Entity target, net.minecraft.world.damagesource.DamageSource source, float amount)
     
    static boolean
    customHurt1(net.minecraft.world.entity.Entity target, net.minecraft.world.damagesource.DamageSource source, float amount)
     
    static net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder
     
    static int
    getSeedPacketCooldown(net.minecraft.world.entity.Entity entity)
     
    static int
    getSunCost(net.minecraft.world.entity.Entity entity)
     
    static Set<net.minecraft.world.entity.Entity>
    getTargetsInCone(net.minecraft.world.entity.LivingEntity entity, double range, double angleDegrees)
     
    static boolean
    isAnUpgradePlant(net.minecraft.world.entity.Entity upgrade)
     
    static boolean
    isAttackedByPlayer(net.minecraft.world.entity.Entity victim, net.minecraft.world.entity.Entity abuser)
     
    static boolean
    isChompable(net.minecraft.world.entity.Entity entity, double width, double height)
     
    static boolean
    isChompable(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target)
     
    static boolean
    isChompable(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target, double width, double height)
     
    static boolean
    isEnemyNotTamed(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
     
    static boolean
    isEntityHurt(net.minecraft.world.entity.Entity entity)
     
    static boolean
    isGardenerOrOwner(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.Entity owner)
     
    static boolean
    isGardenerOrOwnerAttacked(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target)
     
    static boolean
    isNeutral(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
     
    static boolean
    isNotHypnotized(net.minecraft.world.entity.LivingEntity entity)
     
    static boolean
    isPacketModified(net.minecraft.world.item.ItemStack stack)
     
    static boolean
    isPartEntity(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
     
    static boolean
    isPlantableOn(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos spawnPos, net.minecraft.world.item.ItemStack stack)
     
    static boolean
    isPlantSwooned(net.minecraft.world.entity.Entity entity)
     
    static boolean
    isPlantUpgradable(net.minecraft.world.entity.Entity upgrade, net.minecraft.world.entity.Entity target)
     
    static boolean
    isPlayerFriendly(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.player.Player player)
     
    static boolean
    isPottableOn(net.minecraft.world.entity.Entity entity, Map<net.minecraft.world.item.Item,PotInteraction> interactionMap, net.minecraft.world.item.ItemStack stack)
     
    static boolean
    isRequestingSun(net.minecraft.world.entity.Entity entity)
     
    static boolean
    isSeenAsEnemy(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
     
    static boolean
    isSmallerThan(net.minecraft.world.entity.Entity entity, double width, double height)
     
    static boolean
    isTargetingFriendly(net.minecraft.world.entity.Entity entity)
     
    static boolean
    isValidAttackTarget(net.minecraft.world.entity.Entity me, net.minecraft.world.entity.Entity attacker)
     
    static boolean
    isValidSunCollector(net.minecraft.world.entity.Entity entity)
     
    static void
    levelPlaySound(net.minecraft.world.level.Level level, double pX, double pY, double pZ, Supplier<net.minecraft.sounds.SoundEvent> sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
     
    static void
    levelPlaySound(net.minecraft.world.level.Level level, double pX, double pY, double pZ, net.minecraft.sounds.SoundEvent sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
     
    static void
    levelPlaySound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, Supplier<net.minecraft.sounds.SoundEvent> sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
     
    static void
    levelPlaySound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.sounds.SoundEvent sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
     
    static void
    loadPacketData(net.minecraft.world.entity.Entity entity, net.minecraft.nbt.CompoundTag tag)
     
    static boolean
    percentHP(net.minecraft.world.entity.LivingEntity plant, float percent)
     
    static boolean
    playerInstaBuild(net.minecraft.world.entity.Entity entity)
     
    static void
    playPlantingSound(net.minecraft.world.entity.Entity entity)
     
    static net.minecraft.world.phys.Vec3
    positionWithEyeOffset(net.minecraft.world.entity.Entity entity)
     
    static boolean
    projectileDespawnAnd(net.minecraft.world.entity.Entity entity, AbstractPlantProjectile projectile, double min, double max)
     
    static int
    reducedTickDelay(int reduction)
     
    static void
    setPotBeforePlanting(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos pos)
     
    static void
    tamedHealthStat(AbstractPlant plant, double tamedValue)
     
    static void
    tamedStat(AbstractPlant plant, net.minecraft.world.entity.ai.attributes.Attribute attribute, double tamedValue)
     
    static boolean
    targetHasLineOfSight(net.minecraft.world.entity.Entity entity1, net.minecraft.world.entity.Entity entity2)
     
    static net.minecraft.world.InteractionResult
    upgradeFailedMsg(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity upgrade, int i)
     
    static boolean
    validEffectTarget(net.minecraft.world.entity.Entity target, net.minecraft.world.effect.MobEffectCategory category)
     
    static boolean
    validHealTarget(net.minecraft.world.entity.Entity target)
     
    static boolean
    validReviveTarget(net.minecraft.world.entity.Entity target)
     

    Methods inherited from class java.lang.Object

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

    • MobUtil

      public MobUtil()
  • Method Details

    • customHurt

      public static void customHurt(net.minecraft.world.entity.Entity target, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> source, net.minecraft.world.entity.Entity attacker, float amount)
    • customHurt

      public static void customHurt(net.minecraft.world.entity.Entity target, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> source, float amount)
    • customHurt

      public static void customHurt(net.minecraft.world.entity.Entity target, net.minecraft.world.damagesource.DamageSource source, float amount)
    • customHurt1

      public static boolean customHurt1(net.minecraft.world.entity.Entity target, net.minecraft.world.damagesource.DamageSource source, float amount)
    • isGardenerOrOwnerAttacked

      public static boolean isGardenerOrOwnerAttacked(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target)
    • isGardenerOrOwner

      public static boolean isGardenerOrOwner(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.Entity owner)
    • isAttackedByPlayer

      public static boolean isAttackedByPlayer(net.minecraft.world.entity.Entity victim, net.minecraft.world.entity.Entity abuser)
    • isSeenAsEnemy

      public static boolean isSeenAsEnemy(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
    • isEnemyNotTamed

      public static boolean isEnemyNotTamed(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
    • isNeutral

      public static boolean isNeutral(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
    • validHealTarget

      public static boolean validHealTarget(net.minecraft.world.entity.Entity target)
    • validEffectTarget

      public static boolean validEffectTarget(net.minecraft.world.entity.Entity target, net.minecraft.world.effect.MobEffectCategory category)
    • validReviveTarget

      public static boolean validReviveTarget(net.minecraft.world.entity.Entity target)
    • isEntityHurt

      public static boolean isEntityHurt(net.minecraft.world.entity.Entity entity)
    • isTargetingFriendly

      public static boolean isTargetingFriendly(net.minecraft.world.entity.Entity entity)
    • isPlayerFriendly

      public static boolean isPlayerFriendly(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.player.Player player)
    • isNotHypnotized

      public static boolean isNotHypnotized(net.minecraft.world.entity.LivingEntity entity)
    • isValidAttackTarget

      public static boolean isValidAttackTarget(net.minecraft.world.entity.Entity me, net.minecraft.world.entity.Entity attacker)
    • isRequestingSun

      public static boolean isRequestingSun(net.minecraft.world.entity.Entity entity)
    • isValidSunCollector

      public static boolean isValidSunCollector(net.minecraft.world.entity.Entity entity)
    • isSmallerThan

      public static boolean isSmallerThan(net.minecraft.world.entity.Entity entity, double width, double height)
    • isChompable

      public static boolean isChompable(net.minecraft.world.entity.Entity entity, double width, double height)
    • isChompable

      public static boolean isChompable(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target)
    • isChompable

      public static boolean isChompable(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target, double width, double height)
    • targetHasLineOfSight

      public static boolean targetHasLineOfSight(net.minecraft.world.entity.Entity entity1, net.minecraft.world.entity.Entity entity2)
    • canHitTarget

      public static boolean canHitTarget(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
    • getTargetsInCone

      public static Set<net.minecraft.world.entity.Entity> getTargetsInCone(net.minecraft.world.entity.LivingEntity entity, double range, double angleDegrees)
    • isPartEntity

      public static boolean isPartEntity(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target)
    • getSunCost

      public static int getSunCost(net.minecraft.world.entity.Entity entity)
    • isPlantableOn

      public static boolean isPlantableOn(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos spawnPos, net.minecraft.world.item.ItemStack stack)
    • isPottableOn

      public static boolean isPottableOn(net.minecraft.world.entity.Entity entity, Map<net.minecraft.world.item.Item,PotInteraction> interactionMap, net.minecraft.world.item.ItemStack stack)
    • checkForSpace

      public static boolean checkForSpace(net.minecraft.world.entity.Entity entity)
    • playPlantingSound

      public static void playPlantingSound(net.minecraft.world.entity.Entity entity)
    • loadPacketData

      public static void loadPacketData(net.minecraft.world.entity.Entity entity, net.minecraft.nbt.CompoundTag tag)
    • setPotBeforePlanting

      public static void setPotBeforePlanting(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos pos)
    • getSeedPacketCooldown

      public static int getSeedPacketCooldown(net.minecraft.world.entity.Entity entity)
    • isAnUpgradePlant

      public static boolean isAnUpgradePlant(net.minecraft.world.entity.Entity upgrade)
    • isPacketModified

      public static boolean isPacketModified(net.minecraft.world.item.ItemStack stack)
    • isPlantUpgradable

      public static boolean isPlantUpgradable(net.minecraft.world.entity.Entity upgrade, net.minecraft.world.entity.Entity target)
    • upgradeFailedMsg

      public static net.minecraft.world.InteractionResult upgradeFailedMsg(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity upgrade, int i)
    • convertPlant

      public static void convertPlant(net.minecraft.world.entity.Entity upgrade, net.minecraft.world.entity.Entity target)
    • positionWithEyeOffset

      public static net.minecraft.world.phys.Vec3 positionWithEyeOffset(net.minecraft.world.entity.Entity entity)
    • blockPosFromVec3

      public static net.minecraft.core.BlockPos blockPosFromVec3(net.minecraft.world.phys.Vec3 pos)
    • tamedHealthStat

      public static void tamedHealthStat(AbstractPlant plant, double tamedValue)
    • tamedStat

      public static void tamedStat(AbstractPlant plant, net.minecraft.world.entity.ai.attributes.Attribute attribute, double tamedValue)
    • percentHP

      public static boolean percentHP(net.minecraft.world.entity.LivingEntity plant, float percent)
    • projectileDespawnAnd

      public static boolean projectileDespawnAnd(net.minecraft.world.entity.Entity entity, AbstractPlantProjectile projectile, double min, double max)
    • levelPlaySound

      public static void levelPlaySound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, Supplier<net.minecraft.sounds.SoundEvent> sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
    • levelPlaySound

      public static void levelPlaySound(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.sounds.SoundEvent sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
    • levelPlaySound

      public static void levelPlaySound(net.minecraft.world.level.Level level, double pX, double pY, double pZ, Supplier<net.minecraft.sounds.SoundEvent> sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
    • levelPlaySound

      public static void levelPlaySound(net.minecraft.world.level.Level level, double pX, double pY, double pZ, net.minecraft.sounds.SoundEvent sound, net.minecraft.sounds.SoundSource source, float vol, float pitch)
    • playerInstaBuild

      public static boolean playerInstaBuild(net.minecraft.world.entity.Entity entity)
    • isPlantSwooned

      public static boolean isPlantSwooned(net.minecraft.world.entity.Entity entity)
    • reducedTickDelay

      public static int reducedTickDelay(int reduction)
    • defaultPlantAttributes

      public static net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder defaultPlantAttributes()