Contents
Class DamageCalculatorSystems
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.damage.DamageCalculatorSystems
Systems to support
DamageCalculator-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA damage sequence tracker for damage calculation.static classA sequence of hits for damage calculation.static classA system that modifies damage based on the damage sequence. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MetaKey<DamageCalculatorSystems.DamageSequence> A meta key forDamageCalculatorSystems.DamageSequenceinstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Damage[]queueDamageCalculator(World world, it.unimi.dsi.fastutil.objects.Object2FloatMap<DamageCause> relativeDamage, Ref<EntityStore> ref, CommandBuffer<EntityStore> commandBuffer, Damage.Source source, ItemStack itemInHand) Called to queue up damage calculations based on relative damage values.
-
Field Details
-
DAMAGE_SEQUENCE
A meta key forDamageCalculatorSystems.DamageSequenceinstances.
-
-
Constructor Details
-
DamageCalculatorSystems
public DamageCalculatorSystems()
-
-
Method Details
-
queueDamageCalculator
@Nonnull public static Damage[] queueDamageCalculator(@Nonnull World world, @Nonnull it.unimi.dsi.fastutil.objects.Object2FloatMap<DamageCause> relativeDamage, @Nonnull Ref<EntityStore> ref, @Nonnull CommandBuffer<EntityStore> commandBuffer, @Nonnull Damage.Source source, @Nullable ItemStack itemInHand) Called to queue up damage calculations based on relative damage values.- Parameters:
world- The world that the damage is being calculated in.relativeDamage- A map of relative damage values byDamageCause.ref- The entity reference of the target entity.commandBuffer- TheCommandBuffer<EntityStore>for component access.source- The source of the damage.itemInHand- The item in hand of the attacker, ornullif none.- Returns:
- an array of
Damageinstances representing the calculated damage.
-