Record Class ReplaceShaderModification
java.lang.Object
java.lang.Record
foundry.veil.render.shader.modifier.ReplaceShaderModification
- All Implemented Interfaces:
ShaderModification
@Internal
public record ReplaceShaderModification(int priority, net.minecraft.resources.ResourceLocation veilShader)
extends Record
implements ShaderModification
-
Nested Class Summary
Nested classes/interfaces inherited from interface foundry.veil.render.shader.modifier.ShaderModification
ShaderModification.Function -
Field Summary
Fields inherited from interface foundry.veil.render.shader.modifier.ShaderModification
ALLOW_OUT, APPLY_VERSION, IN_PATTERN, OUT_PATTERN, PLACEHOLDER_PATTERN, RETURN_PATTERN, UNIFORM_PATTERN, VERSION_PATTERN -
Constructor Summary
ConstructorsConstructorDescriptionReplaceShaderModification(int priority, net.minecraft.resources.ResourceLocation veilShader) Creates an instance of aReplaceShaderModificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.Injects this modification into the specified shader source.intpriority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.resources.ResourceLocationReturns the value of theveilShaderrecord component.
-
Constructor Details
-
ReplaceShaderModification
public ReplaceShaderModification(int priority, net.minecraft.resources.ResourceLocation veilShader) Creates an instance of aReplaceShaderModificationrecord class.- Parameters:
priority- the value for thepriorityrecord componentveilShader- the value for theveilShaderrecord component
-
-
Method Details
-
inject
Description copied from interface:ShaderModificationInjects this modification into the specified shader source.- Specified by:
injectin interfaceShaderModification- Parameters:
source- The source to inject intoflags- The flags to use when injecting- Returns:
- The injected shader source
- Throws:
IOException- If an error occurs with the format or applying the modifications
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceShaderModification- Returns:
- The priority of this modification. A higher priority will be applied before a lower priority modification
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
veilShader
public net.minecraft.resources.ResourceLocation veilShader()Returns the value of theveilShaderrecord component.- Returns:
- the value of the
veilShaderrecord component
-