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.entity.LivingEntity target, net.minecraft.util.math.Vec3d anchor) static floatanchorDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d explosionPos, DamageUtils.RaycastFactory raycastFactory) static floatbedDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d bed) static floatbedDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d explosionPos, DamageUtils.RaycastFactory raycastFactory) static floatcalculateReductions(float damage, net.minecraft.entity.LivingEntity entity, net.minecraft.entity.damage.DamageSource damageSource) static floatcrystalDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d crystal) static floatcrystalDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d crystal, boolean predictMovement, net.minecraft.util.math.BlockPos obsidianPos) Meteor Client implementationsstatic floatcrystalDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d explosionPos, DamageUtils.RaycastFactory raycastFactory) static floatexplosionDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d 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.entity.LivingEntity entity) static floatgetAttackDamage(net.minecraft.entity.LivingEntity attacker, net.minecraft.entity.LivingEntity target) static floatgetAttackDamage(net.minecraft.entity.LivingEntity attacker, net.minecraft.entity.LivingEntity target, net.minecraft.item.ItemStack weapon) static DamageUtils.RaycastFactorygetOverridingHitFactory(net.minecraft.util.math.BlockPos overridePos, net.minecraft.block.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.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d explosionPos, DamageUtils.RaycastFactory raycastFactory) -
bedDamage
public static float bedDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d explosionPos, DamageUtils.RaycastFactory raycastFactory) -
anchorDamage
public static float anchorDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d explosionPos, DamageUtils.RaycastFactory raycastFactory) -
explosionDamage
public static float explosionDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d targetPos, net.minecraft.util.math.Box targetBox, net.minecraft.util.math.Vec3d 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.entity.LivingEntity target, net.minecraft.util.math.Vec3d crystal, boolean predictMovement, net.minecraft.util.math.BlockPos obsidianPos) Meteor Client implementations -
crystalDamage
public static float crystalDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d crystal) -
bedDamage
public static float bedDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d bed) -
anchorDamage
public static float anchorDamage(net.minecraft.entity.LivingEntity target, net.minecraft.util.math.Vec3d anchor) -
getOverridingHitFactory
public static DamageUtils.RaycastFactory getOverridingHitFactory(net.minecraft.util.math.BlockPos overridePos, net.minecraft.block.BlockState overrideState) -
getAttackDamage
public static float getAttackDamage(net.minecraft.entity.LivingEntity attacker, net.minecraft.entity.LivingEntity target) - See Also:
-
getAttackDamage
public static float getAttackDamage(net.minecraft.entity.LivingEntity attacker, net.minecraft.entity.LivingEntity target, net.minecraft.item.ItemStack weapon) -
fallDamage
public static float fallDamage(net.minecraft.entity.LivingEntity entity) - See Also:
-
calculateReductions
public static float calculateReductions(float damage, net.minecraft.entity.LivingEntity entity, net.minecraft.entity.damage.DamageSource damageSource) - See Also:
-