Class Fluid

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

public class Fluid 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
    • maxFluidLevel

      public int maxFluidLevel
    • cubeTextures

      @Nullable public BlockTextures[] cubeTextures
    • requiresAlphaBlending

      public boolean requiresAlphaBlending
    • opacity

      @Nonnull public Opacity opacity
    • shaderEffect

      @Nullable public ShaderType[] shaderEffect
    • light

      @Nullable public ColorLight light
    • particles

      @Nullable public ModelParticle[] particles
    • drawType

      @Nonnull public FluidDrawType drawType
    • fluidFXIndex

      public int fluidFXIndex
    • blockSoundSetIndex

      public int blockSoundSetIndex
    • blockParticleSetId

      @Nullable public String blockParticleSetId
    • particleColor

      @Nullable public Color particleColor
    • tagIndexes

      @Nullable public int[] tagIndexes
  • Constructor Details

    • Fluid

      public Fluid()
    • Fluid

      public Fluid(@Nullable String id, int maxFluidLevel, @Nullable BlockTextures[] cubeTextures, boolean requiresAlphaBlending, @Nonnull Opacity opacity, @Nullable ShaderType[] shaderEffect, @Nullable ColorLight light, @Nullable ModelParticle[] particles, @Nonnull FluidDrawType drawType, int fluidFXIndex, int blockSoundSetIndex, @Nullable String blockParticleSetId, @Nullable Color particleColor, @Nullable int[] tagIndexes)
    • Fluid

      public Fluid(@Nonnull Fluid 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)
    • getMaxFluidLevel

      public static int getMaxFluidLevel(MemorySegment mem)
    • getMaxFluidLevel

      public static int getMaxFluidLevel(MemorySegment mem, int offset)
    • getCubeTextures

      @Nullable public static BlockTextures[] getCubeTextures(MemorySegment mem)
    • getCubeTextures

      @Nullable public static BlockTextures[] getCubeTextures(MemorySegment mem, int offset)
    • getRequiresAlphaBlending

      public static boolean getRequiresAlphaBlending(MemorySegment mem)
    • getRequiresAlphaBlending

      public static boolean getRequiresAlphaBlending(MemorySegment mem, int offset)
    • getOpacity

      public static Opacity getOpacity(MemorySegment mem)
    • getOpacity

      public static Opacity getOpacity(MemorySegment mem, int offset)
    • getShaderEffect

      @Nullable public static ShaderType[] getShaderEffect(MemorySegment mem)
    • getShaderEffect

      @Nullable public static ShaderType[] getShaderEffect(MemorySegment mem, int offset)
    • getLight

      @Nullable public static ColorLight getLight(MemorySegment mem)
    • getLight

      @Nullable public static ColorLight getLight(MemorySegment mem, int offset)
    • getParticles

      @Nullable public static ModelParticle[] getParticles(MemorySegment mem)
    • getParticles

      @Nullable public static ModelParticle[] getParticles(MemorySegment mem, int offset)
    • getDrawType

      public static FluidDrawType getDrawType(MemorySegment mem)
    • getDrawType

      public static FluidDrawType getDrawType(MemorySegment mem, int offset)
    • getFluidFXIndex

      public static int getFluidFXIndex(MemorySegment mem)
    • getFluidFXIndex

      public static int getFluidFXIndex(MemorySegment mem, int offset)
    • getBlockSoundSetIndex

      public static int getBlockSoundSetIndex(MemorySegment mem)
    • getBlockSoundSetIndex

      public static int getBlockSoundSetIndex(MemorySegment mem, int offset)
    • getBlockParticleSetId

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

      @Nullable public static String getBlockParticleSetId(MemorySegment mem, int offset)
    • getParticleColor

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

      @Nullable public static Color getParticleColor(MemorySegment mem, int offset)
    • getTagIndexes

      @Nullable public static int[] getTagIndexes(MemorySegment mem)
    • getTagIndexes

      @Nullable public static int[] getTagIndexes(MemorySegment mem, int offset)
    • hasLight

      public static boolean hasLight(MemorySegment mem, int offset)
    • hasParticleColor

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

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

      public static boolean hasCubeTextures(MemorySegment mem, int offset)
    • hasShaderEffect

      public static boolean hasShaderEffect(MemorySegment mem, int offset)
    • hasParticles

      public static boolean hasParticles(MemorySegment mem, int offset)
    • hasBlockParticleSetId

      public static boolean hasBlockParticleSetId(MemorySegment mem, int offset)
    • hasTagIndexes

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

      public static Fluid toObject(MemorySegment mem)
    • toObject

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

      public static Fluid toObject(MemorySegment mem, int offset, @Nullable ReadCursor cursor)
      Decodes one Fluid 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 Fluid clone()
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object