Record Class VeilShaderSource
java.lang.Object
java.lang.Record
foundry.veil.api.client.render.shader.VeilShaderSource
- Record Components:
sourceId
- The id of the source file this shader was compiled fromsourceCode
- The shader source ready to be uploaded to the GPUuniformBindings
- The bindings set by the shaderdefinitionDependencies
- The shader pre-definitions this shader is dependent onincludes
- All shader imports included in this file
public record VeilShaderSource(net.minecraft.resources.ResourceLocation sourceId, String sourceCode, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes)
extends Record
A shader instance that has additional pre-compiled data.
-
Constructor Summary
ConstructorDescriptionVeilShaderSource
(net.minecraft.resources.ResourceLocation sourceId, String sourceCode) VeilShaderSource
(net.minecraft.resources.ResourceLocation sourceId, String sourceCode, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes) Creates an instance of aVeilShaderSource
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefinitionDependencies
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Set
<net.minecraft.resources.ResourceLocation> includes()
Returns the value of theincludes
record component.Returns the value of thesourceCode
record component.net.minecraft.resources.ResourceLocation
sourceId()
Returns the value of thesourceId
record component.final String
toString()
Returns a string representation of this record class.it.unimi.dsi.fastutil.objects.Object2IntMap
<String> Returns the value of theuniformBindings
record component.
-
Constructor Details
-
VeilShaderSource
-
VeilShaderSource
public VeilShaderSource(net.minecraft.resources.ResourceLocation sourceId, String sourceCode, it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings, Set<String> definitionDependencies, Set<net.minecraft.resources.ResourceLocation> includes) Creates an instance of aVeilShaderSource
record class.- Parameters:
sourceId
- the value for thesourceId
record componentsourceCode
- the value for thesourceCode
record componentuniformBindings
- the value for theuniformBindings
record componentdefinitionDependencies
- the value for thedefinitionDependencies
record componentincludes
- the value for theincludes
record component
-
-
Method Details
-
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 withObjects::equals(Object,Object)
. -
sourceId
public net.minecraft.resources.ResourceLocation sourceId()Returns the value of thesourceId
record component.- Returns:
- the value of the
sourceId
record component
-
sourceCode
Returns the value of thesourceCode
record component.- Returns:
- the value of the
sourceCode
record component
-
uniformBindings
Returns the value of theuniformBindings
record component.- Returns:
- the value of the
uniformBindings
record component
-
definitionDependencies
Returns the value of thedefinitionDependencies
record component.- Returns:
- the value of the
definitionDependencies
record component
-
includes
Returns the value of theincludes
record component.- Returns:
- the value of the
includes
record component
-