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
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.final inthashCode()Returns a hash code value for this object.voidinject(io.github.ocelot.glslprocessor.api.node.GlslTree tree, VeilJobParameters parameters) 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
public void inject(io.github.ocelot.glslprocessor.api.node.GlslTree tree, VeilJobParameters parameters) throws io.github.ocelot.glslprocessor.api.GlslSyntaxException Description copied from interface:ShaderModificationInjects this modification into the specified shader source.- Specified by:
injectin interfaceShaderModification- Parameters:
tree- The source to modifyparameters- The parameters to use when injecting- Throws:
io.github.ocelot.glslprocessor.api.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 thepriorityrecord component.- Specified by:
priorityin interfaceShaderModification- 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
-