Class FluidFX

java.lang.Object
com.hypixel.hytale.protocol.FluidFX

public class FluidFX extends Object
  • Field Details

    • NULLABLE_BIT_FIELD_SIZE

      public static final int NULLABLE_BIT_FIELD_SIZE
      See Also:
    • FIXED_BLOCK_SIZE

      public static final int FIXED_BLOCK_SIZE
      See Also:
    • VARIABLE_FIELD_COUNT

      public static final int VARIABLE_FIELD_COUNT
      See Also:
    • VARIABLE_BLOCK_START

      public static final int VARIABLE_BLOCK_START
      See Also:
    • MAX_SIZE

      public static final int MAX_SIZE
      See Also:
    • id

      @Nullable public String id
    • shader

      @Nonnull public ShaderType shader
    • fogMode

      @Nonnull public FluidFog fogMode
    • fogColor

      @Nullable public Color fogColor
    • fogDistance

      @Nullable public NearFar fogDistance
    • fogDepthStart

      public float fogDepthStart
    • fogDepthFalloff

      public float fogDepthFalloff
    • colorFilter

      @Nullable public Color colorFilter
    • colorSaturation

      public float colorSaturation
    • distortionAmplitude

      public float distortionAmplitude
    • distortionFrequency

      public float distortionFrequency
    • particle

      @Nullable public FluidParticle particle
    • movementSettings

      @Nullable public FluidFXMovementSettings movementSettings
  • Constructor Details

    • FluidFX

      public FluidFX()
    • FluidFX

      public FluidFX(@Nullable String id, @Nonnull ShaderType shader, @Nonnull FluidFog fogMode, @Nullable Color fogColor, @Nullable NearFar fogDistance, float fogDepthStart, float fogDepthFalloff, @Nullable Color colorFilter, float colorSaturation, float distortionAmplitude, float distortionFrequency, @Nullable FluidParticle particle, @Nullable FluidFXMovementSettings movementSettings)
    • FluidFX

      public FluidFX(@Nonnull FluidFX other)
  • Method Details

    • requireBounds

      public static void requireBounds(MemorySegment mem, int offset)
      Checks that the fixed block fits. The per-field getters read without their own bound check, so call this once before reading fields out of an untrusted segment.
    • getId

      @Nullable public static String getId(MemorySegment mem)
    • getId

      @Nullable public static String getId(MemorySegment mem, int offset)
    • getShader

      public static ShaderType getShader(MemorySegment mem)
    • getShader

      public static ShaderType getShader(MemorySegment mem, int offset)
    • getFogMode

      public static FluidFog getFogMode(MemorySegment mem)
    • getFogMode

      public static FluidFog getFogMode(MemorySegment mem, int offset)
    • getFogColor

      @Nullable public static Color getFogColor(MemorySegment mem)
    • getFogColor

      @Nullable public static Color getFogColor(MemorySegment mem, int offset)
    • getFogDistance

      @Nullable public static NearFar getFogDistance(MemorySegment mem)
    • getFogDistance

      @Nullable public static NearFar getFogDistance(MemorySegment mem, int offset)
    • getFogDepthStart

      public static float getFogDepthStart(MemorySegment mem)
    • getFogDepthStart

      public static float getFogDepthStart(MemorySegment mem, int offset)
    • getFogDepthFalloff

      public static float getFogDepthFalloff(MemorySegment mem)
    • getFogDepthFalloff

      public static float getFogDepthFalloff(MemorySegment mem, int offset)
    • getColorFilter

      @Nullable public static Color getColorFilter(MemorySegment mem)
    • getColorFilter

      @Nullable public static Color getColorFilter(MemorySegment mem, int offset)
    • getColorSaturation

      public static float getColorSaturation(MemorySegment mem)
    • getColorSaturation

      public static float getColorSaturation(MemorySegment mem, int offset)
    • getDistortionAmplitude

      public static float getDistortionAmplitude(MemorySegment mem)
    • getDistortionAmplitude

      public static float getDistortionAmplitude(MemorySegment mem, int offset)
    • getDistortionFrequency

      public static float getDistortionFrequency(MemorySegment mem)
    • getDistortionFrequency

      public static float getDistortionFrequency(MemorySegment mem, int offset)
    • getParticle

      @Nullable public static FluidParticle getParticle(MemorySegment mem)
    • getParticle

      @Nullable public static FluidParticle getParticle(MemorySegment mem, int offset)
    • getMovementSettings

      @Nullable public static FluidFXMovementSettings getMovementSettings(MemorySegment mem)
    • getMovementSettings

      @Nullable public static FluidFXMovementSettings getMovementSettings(MemorySegment mem, int offset)
    • hasFogColor

      public static boolean hasFogColor(MemorySegment mem, int offset)
    • hasFogDistance

      public static boolean hasFogDistance(MemorySegment mem, int offset)
    • hasColorFilter

      public static boolean hasColorFilter(MemorySegment mem, int offset)
    • hasMovementSettings

      public static boolean hasMovementSettings(MemorySegment mem, int offset)
    • hasId

      public static boolean hasId(MemorySegment mem, int offset)
    • hasParticle

      public static boolean hasParticle(MemorySegment mem, int offset)
    • toObject

      public static FluidFX toObject(MemorySegment mem)
    • toObject

      public static FluidFX toObject(MemorySegment mem, int offset)
    • toObject

      public static FluidFX toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one FluidFX and reports the end of its encoding through the cursor. The variable block is decoded in field order against a running position, and each offset slot must name that position, so the fields decoded are the bytes walked.
    • serialize

      public int serialize(@Nonnull MemorySegment mem, int offset)
    • computeSize

      public int computeSize()
    • clone

      public FluidFX clone()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object