Contents
Class WalkBreathingRules
java.lang.Object
com.hypixel.hytale.server.npc.util.WalkBreathingRules
Stateless helper that decides which breathing samples a walk position needs.
A walk position takes up to two samples. One sits at breathing height, the other near the feet.
RelaxedConstraint.BREATHE relaxes the breathing question itself, so it skips both.
RelaxedConstraint.WADE relaxes only the sample near the feet, so an NPC may stand in water
while it still has to breathe at breathing height.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanneedsFeetSample(EnumSet<RelaxedConstraint> constraints, double breathingDepth, double constraintDepth) True when the sample near the feet still applies.static booleanskipsBreathingTests(EnumSet<RelaxedConstraint> constraints) True when the position needs no breathing sample at all.
-
Method Details
-
skipsBreathingTests
True when the position needs no breathing sample at all. -
needsFeetSample
public static boolean needsFeetSample(@Nonnull EnumSet<RelaxedConstraint> constraints, double breathingDepth, double constraintDepth) True when the sample near the feet still applies. Equal depths make it a repeat of the breathing height sample.
-