Class DynamicBuffersChange

java.lang.Object
foundry.veil.api.client.render.dynamicbuffer.DynamicBuffersChange

public class DynamicBuffersChange extends Object
A change in the currently active dynamic buffers
Since:
2.3.0
  • Constructor Details

    • DynamicBuffersChange

      @Internal public DynamicBuffersChange(int previousBuffers, int newBuffers)
  • 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

      public int getPreviouslyEnabledBuffersMask()
      Returns:
      a mask representing the enabled state of every dynamic buffer
    • getEnabledBuffersMask

      public int getEnabledBuffersMask()
      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