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 bufferenabledBuffersMask- 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 Summary
ConstructorsConstructorDescriptionDynamicBuffersChange(int previouslyEnabledBuffersMask, int enabledBuffersMask) Creates an instance of aDynamicBuffersChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theenabledBuffersMaskrecord component.final booleanIndicates whether some other object is "equal to" this one.Creates a new array containing all dynamic buffers that are now enabled.intDeprecated.intDeprecated.UseenabledBuffersMask()insteadbooleanhasChanged(DynamicBufferType buffer) Checks if a specificDynamicBufferTypechanged enabled statusfinal inthashCode()Returns a hash code value for this object.booleanisEnabled(DynamicBufferType buffer) Checks if a specificDynamicBufferTypeis enabled in the new stateintReturns the value of thepreviouslyEnabledBuffersMaskrecord component.final StringtoString()Returns a string representation of this record class.booleanChecks if a specificDynamicBufferTypewas enabled in the previous state
-
Constructor Details
-
DynamicBuffersChange
@Internal public DynamicBuffersChange(int previouslyEnabledBuffersMask, int enabledBuffersMask) Creates an instance of aDynamicBuffersChangerecord class.- Parameters:
previouslyEnabledBuffersMask- the value for thepreviouslyEnabledBuffersMaskrecord componentenabledBuffersMask- the value for theenabledBuffersMaskrecord component
-
-
Method Details
-
getPreviouslyEnabledBuffers
- Returns:
- a new array containing all buffers that were previously enabled
-
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
Deprecated.UseenabledBuffersMask()instead- Returns:
- a mask representing the enabled state of every dynamic buffer
-
getEnabledBuffersMask
Deprecated.UseenabledBuffersMask()instead- Returns:
- a mask representing the previous enabled state of every dynamic buffer
-
hasChanged
Checks if a specificDynamicBufferTypechanged enabled status- Parameters:
buffer- the buffer type to check- Returns:
- if the buffer was enabled / disabled
-
isEnabled
Checks if a specificDynamicBufferTypeis enabled in the new state- Parameters:
buffer- the buffer type to check- Returns:
- if the buffer is now enabled
-
wasPreviouslyEnabled
Checks if a specificDynamicBufferTypewas enabled in the previous state- Parameters:
buffer- the buffer type to check- Returns:
- if the buffer was previously enabled
-
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. -
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. -
equals
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 '=='. -
previouslyEnabledBuffersMask
public int previouslyEnabledBuffersMask()Returns the value of thepreviouslyEnabledBuffersMaskrecord component.- Returns:
- the value of the
previouslyEnabledBuffersMaskrecord component
-
enabledBuffersMask
public int enabledBuffersMask()Returns the value of theenabledBuffersMaskrecord component.- Returns:
- the value of the
enabledBuffersMaskrecord component
-
enabledBuffersMask()instead