Record Class DynamicBuffersChange

java.lang.Object
java.lang.Record
foundry.veil.api.client.render.dynamicbuffer.DynamicBuffersChange
Record Components:
previouslyEnabledBuffersMask - A mask representing the enabled state of every dynamic buffer
enabledBuffersMask - A mask representing the previous enabled state of every dynamic buffer

public record DynamicBuffersChange(int previouslyEnabledBuffersMask, int enabledBuffersMask) extends Record
A change in the currently active dynamic buffers
Since:
2.3.0
  • Constructor Details

    • DynamicBuffersChange

      @Internal public DynamicBuffersChange(int previouslyEnabledBuffersMask, int enabledBuffersMask)
      Creates an instance of a DynamicBuffersChange record class.
      Parameters:
      previouslyEnabledBuffersMask - the value for the previouslyEnabledBuffersMask record component
      enabledBuffersMask - the value for the enabledBuffersMask record component
  • Method Details

    • getPreviouslyEnabledBuffers

      public DynamicBufferType[] getPreviouslyEnabledBuffers()
      Returns:
      a new array containing all buffers that were previously enabled
    • getEnabledBuffers

      public DynamicBufferType[] getEnabledBuffers()
      Creates a new array containing all dynamic buffers that are now enabled.
      The returned values are in the correct attachment order starting at attachment 1. Attachment 0 will always be the regular vanilla minecraft framebuffer attachment.
      Returns:
      a new array containing all dynamic buffers that are now enabled
    • getPreviouslyEnabledBuffersMask

      @ScheduledForRemoval(inVersion="4.0.0") @Deprecated public int getPreviouslyEnabledBuffersMask()
      Deprecated.
      Returns:
      a mask representing the enabled state of every dynamic buffer
    • getEnabledBuffersMask

      @ScheduledForRemoval(inVersion="4.0.0") @Deprecated public int getEnabledBuffersMask()
      Deprecated.
      Returns:
      a mask representing the previous enabled state of every dynamic buffer
    • hasChanged

      public boolean hasChanged(DynamicBufferType buffer)
      Checks if a specific DynamicBufferType changed enabled status
      Parameters:
      buffer - the buffer type to check
      Returns:
      if the buffer was enabled / disabled
    • isEnabled

      public boolean isEnabled(DynamicBufferType buffer)
      Checks if a specific DynamicBufferType is enabled in the new state
      Parameters:
      buffer - the buffer type to check
      Returns:
      if the buffer is now enabled
    • wasPreviouslyEnabled

      public boolean wasPreviouslyEnabled(DynamicBufferType buffer)
      Checks if a specific DynamicBufferType was enabled in the previous state
      Parameters:
      buffer - the buffer type to check
      Returns:
      if the buffer was previously enabled
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • previouslyEnabledBuffersMask

      public int previouslyEnabledBuffersMask()
      Returns the value of the previouslyEnabledBuffersMask record component.
      Returns:
      the value of the previouslyEnabledBuffersMask record component
    • enabledBuffersMask

      public int enabledBuffersMask()
      Returns the value of the enabledBuffersMask record component.
      Returns:
      the value of the enabledBuffersMask record component