Class DamageUtils
java.lang.Object
meteordevelopment.meteorclient.utils.entity.DamageUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DamageUtils.RaycastFactoryIt is recommended to use thisDamageUtils.RaycastFactoryunless you implement custom behaviour, as soon:tm: it will be the target of optimizations to make it more performant. -
Method Summary
Modifier and TypeMethodDescriptionstatic floatanchorDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 anchor) static floatanchorDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, DamageUtils.RaycastFactory raycastFactory) static floatbedDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 bed) static floatbedDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, DamageUtils.RaycastFactory raycastFactory) static floatcalculateReductions(float damage, net.minecraft.world.entity.Entity entity, net.minecraft.world.damagesource.DamageSource damageSource) static floatcrystalDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 crystal) static floatcrystalDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 crystal, boolean predictMovement, net.minecraft.core.BlockPos obsidianPos) Meteor Client implementationsstatic floatcrystalDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, DamageUtils.RaycastFactory raycastFactory) static floatexplosionDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, float power, DamageUtils.RaycastFactory raycastFactory) Low level control of parameters without having to reimplement everything, for addon authors who wish to use their own predictions or other systems.static floatfallDamage(net.minecraft.world.entity.LivingEntity entity) static floatgetAttackDamage(net.minecraft.world.entity.LivingEntity attacker, net.minecraft.world.entity.Entity target) static floatgetAttackDamage(net.minecraft.world.entity.LivingEntity attacker, net.minecraft.world.entity.Entity target, net.minecraft.world.item.ItemStack weapon) static DamageUtils.RaycastFactorygetOverridingHitFactory(net.minecraft.core.BlockPos overridePos, net.minecraft.world.level.block.state.BlockState overrideState)
-
Field Details
-
HIT_FACTORY
It is recommended to use thisDamageUtils.RaycastFactoryunless you implement custom behaviour, as soon:tm: it will be the target of optimizations to make it more performant.- See Also:
-
-
Method Details
-
crystalDamage
public static float crystalDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, DamageUtils.RaycastFactory raycastFactory) -
bedDamage
public static float bedDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, DamageUtils.RaycastFactory raycastFactory) -
anchorDamage
public static float anchorDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, DamageUtils.RaycastFactory raycastFactory) -
explosionDamage
public static float explosionDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 targetPos, net.minecraft.world.phys.AABB targetBox, net.minecraft.world.phys.Vec3 explosionPos, float power, DamageUtils.RaycastFactory raycastFactory) Low level control of parameters without having to reimplement everything, for addon authors who wish to use their own predictions or other systems.- See Also:
-
crystalDamage
public static float crystalDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 crystal, boolean predictMovement, net.minecraft.core.BlockPos obsidianPos) Meteor Client implementations -
crystalDamage
public static float crystalDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 crystal) -
bedDamage
public static float bedDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 bed) -
anchorDamage
public static float anchorDamage(net.minecraft.world.entity.LivingEntity target, net.minecraft.world.phys.Vec3 anchor) -
getOverridingHitFactory
public static DamageUtils.RaycastFactory getOverridingHitFactory(net.minecraft.core.BlockPos overridePos, net.minecraft.world.level.block.state.BlockState overrideState) -
getAttackDamage
public static float getAttackDamage(net.minecraft.world.entity.LivingEntity attacker, net.minecraft.world.entity.Entity target) - See Also:
-
getAttackDamage
public static float getAttackDamage(net.minecraft.world.entity.LivingEntity attacker, net.minecraft.world.entity.Entity target, net.minecraft.world.item.ItemStack weapon) -
fallDamage
public static float fallDamage(net.minecraft.world.entity.LivingEntity entity) - See Also:
-
calculateReductions
public static float calculateReductions(float damage, net.minecraft.world.entity.Entity entity, net.minecraft.world.damagesource.DamageSource damageSource) - See Also:
-