Record Class ReplaceShaderModification
java.lang.Object
java.lang.Record
foundry.veil.impl.client.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.impl.client.render.shader.modifier.ShaderModification
ShaderModification.Function
-
Field Summary
Fields inherited from interface foundry.veil.impl.client.render.shader.modifier.ShaderModification
IN_PATTERN, OUT_PATTERN, PLACEHOLDER_PATTERN, RETURN_PATTERN, UNIFORM_PATTERN, VERSION_PATTERN
-
Constructor Summary
ConstructorDescriptionReplaceShaderModification
(int priority, net.minecraft.resources.ResourceLocation veilShader) Creates an instance of aReplaceShaderModification
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.void
inject
(GlslTree tree, VeilJobParameters parameters) Injects this modification into the specified shader source.int
priority()
Returns the value of thepriority
record component.final String
toString()
Returns a string representation of this record class.net.minecraft.resources.ResourceLocation
Returns the value of theveilShader
record component.
-
Constructor Details
-
ReplaceShaderModification
public ReplaceShaderModification(int priority, net.minecraft.resources.ResourceLocation veilShader) Creates an instance of aReplaceShaderModification
record class.- Parameters:
priority
- the value for thepriority
record componentveilShader
- the value for theveilShader
record component
-
-
Method Details
-
inject
Description copied from interface:ShaderModification
Injects this modification into the specified shader source.- Specified by:
inject
in interfaceShaderModification
- Parameters:
tree
- The source to modifyparameters
- The parameters to use when injecting- Throws:
GlslSyntaxException
- If an error occurs when parsing GLSL code
-
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 thepriority
record component.- Specified by:
priority
in interfaceShaderModification
- Returns:
- the value of the
priority
record component
-
veilShader
public net.minecraft.resources.ResourceLocation veilShader()Returns the value of theveilShader
record component.- Returns:
- the value of the
veilShader
record component
-