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 from
sourceCode - The shader source ready to be uploaded to the GPU
uniformBindings - The bindings set by the shader
definitionDependencies - The shader pre-definitions this shader is dependent on
includes - 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 Details

    • VeilShaderSource

      public VeilShaderSource(net.minecraft.resources.ResourceLocation sourceId, String sourceCode)
    • 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 a VeilShaderSource record class.
      Parameters:
      sourceId - the value for the sourceId record component
      sourceCode - the value for the sourceCode record component
      uniformBindings - the value for the uniformBindings record component
      definitionDependencies - the value for the definitionDependencies record component
      includes - the value for the includes record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sourceId

      public net.minecraft.resources.ResourceLocation sourceId()
      Returns the value of the sourceId record component.
      Returns:
      the value of the sourceId record component
    • sourceCode

      public String sourceCode()
      Returns the value of the sourceCode record component.
      Returns:
      the value of the sourceCode record component
    • uniformBindings

      public it.unimi.dsi.fastutil.objects.Object2IntMap<String> uniformBindings()
      Returns the value of the uniformBindings record component.
      Returns:
      the value of the uniformBindings record component
    • definitionDependencies

      public Set<String> definitionDependencies()
      Returns the value of the definitionDependencies record component.
      Returns:
      the value of the definitionDependencies record component
    • includes

      public Set<net.minecraft.resources.ResourceLocation> includes()
      Returns the value of the includes record component.
      Returns:
      the value of the includes record component