Package nokunami.floral_warfare.api.util
Class MobUtil
java.lang.Object
nokunami.floral_warfare.api.util.MobUtil
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.core.BlockPosblockPosFromVec3(net.minecraft.world.phys.Vec3 pos) static booleancanHitTarget(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target) static booleancheckForSpace(net.minecraft.world.entity.Entity entity) static voidconvertPlant(net.minecraft.world.entity.Entity upgrade, net.minecraft.world.entity.Entity target) static voidcustomHurt(net.minecraft.world.entity.Entity target, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> source, float amount) static voidcustomHurt(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 voidcustomHurt(net.minecraft.world.entity.Entity target, net.minecraft.world.damagesource.DamageSource source, float amount) static booleancustomHurt1(net.minecraft.world.entity.Entity target, net.minecraft.world.damagesource.DamageSource source, float amount) static net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builderstatic intgetSeedPacketCooldown(net.minecraft.world.entity.Entity entity) static intgetSunCost(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 booleanisAnUpgradePlant(net.minecraft.world.entity.Entity upgrade) static booleanisAttackedByPlayer(net.minecraft.world.entity.Entity victim, net.minecraft.world.entity.Entity abuser) static booleanisChompable(net.minecraft.world.entity.Entity entity, double width, double height) static booleanisChompable(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target) static booleanisChompable(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target, double width, double height) static booleanisEnemyNotTamed(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target) static booleanisEntityHurt(net.minecraft.world.entity.Entity entity) static booleanisGardenerOrOwner(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.Entity owner) static booleanisGardenerOrOwnerAttacked(net.minecraft.world.entity.Entity plant, net.minecraft.world.entity.Entity target) static booleanisNeutral(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target) static booleanisNotHypnotized(net.minecraft.world.entity.LivingEntity entity) static booleanisPacketModified(net.minecraft.world.item.ItemStack stack) static booleanisPartEntity(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target) static booleanisPlantableOn(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 booleanisPlantSwooned(net.minecraft.world.entity.Entity entity) static booleanisPlantUpgradable(net.minecraft.world.entity.Entity upgrade, net.minecraft.world.entity.Entity target) static booleanisPlayerFriendly(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.player.Player player) static booleanisPottableOn(net.minecraft.world.entity.Entity entity, Map<net.minecraft.world.item.Item, PotInteraction> interactionMap, net.minecraft.world.item.ItemStack stack) static booleanisRequestingSun(net.minecraft.world.entity.Entity entity) static booleanisSeenAsEnemy(net.minecraft.world.entity.Entity attacker, net.minecraft.world.entity.Entity target) static booleanisSmallerThan(net.minecraft.world.entity.Entity entity, double width, double height) static booleanisTargetingFriendly(net.minecraft.world.entity.Entity entity) static booleanisValidAttackTarget(net.minecraft.world.entity.Entity me, net.minecraft.world.entity.Entity attacker) static booleanisValidSunCollector(net.minecraft.world.entity.Entity entity) static voidlevelPlaySound(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 voidlevelPlaySound(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 voidlevelPlaySound(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 voidlevelPlaySound(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 voidloadPacketData(net.minecraft.world.entity.Entity entity, net.minecraft.nbt.CompoundTag tag) static booleanpercentHP(net.minecraft.world.entity.LivingEntity plant, float percent) static booleanplayerInstaBuild(net.minecraft.world.entity.Entity entity) static voidplayPlantingSound(net.minecraft.world.entity.Entity entity) static net.minecraft.world.phys.Vec3positionWithEyeOffset(net.minecraft.world.entity.Entity entity) static booleanprojectileDespawnAnd(net.minecraft.world.entity.Entity entity, AbstractPlantProjectile projectile, double min, double max) static intreducedTickDelay(int reduction) static voidsetPotBeforePlanting(net.minecraft.world.entity.Entity entity, net.minecraft.core.BlockPos pos) static voidtamedHealthStat(AbstractPlant plant, double tamedValue) static voidtamedStat(AbstractPlant plant, net.minecraft.world.entity.ai.attributes.Attribute attribute, double tamedValue) static booleantargetHasLineOfSight(net.minecraft.world.entity.Entity entity1, net.minecraft.world.entity.Entity entity2) static net.minecraft.world.InteractionResultupgradeFailedMsg(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity upgrade, int i) static booleanvalidEffectTarget(net.minecraft.world.entity.Entity target, net.minecraft.world.effect.MobEffectCategory category) static booleanvalidHealTarget(net.minecraft.world.entity.Entity target) static booleanvalidReviveTarget(net.minecraft.world.entity.Entity target)
-
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
-
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()
-