Record Class ShaderInjectionDefinition

java.lang.Object
java.lang.Record
foundry.veil.impl.client.render.shader.injection.util.ShaderInjectionDefinition

@Internal public record ShaderInjectionDefinition(@Nullable net.minecraft.resources.ResourceLocation id, List<net.minecraft.resources.ResourceLocation> targets, List<net.minecraft.resources.ResourceLocation> redirects, int priority, @Nullable net.minecraft.resources.ResourceLocation replace, boolean debug) extends Record
JSON-deserialized model for shader injection definitions.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ShaderInjectionDefinition(@Nullable net.minecraft.resources.ResourceLocation id, List<net.minecraft.resources.ResourceLocation> targets, List<net.minecraft.resources.ResourceLocation> redirects, int priority, @Nullable net.minecraft.resources.ResourceLocation replace, boolean debug)
    Creates an instance of a ShaderInjectionDefinition record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.gson.Gson
     
    boolean
    Returns the value of the debug record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @Nullable net.minecraft.resources.ResourceLocation
    id()
    Returns the value of the id record component.
    int
    Returns the value of the priority record component.
    List<net.minecraft.resources.ResourceLocation>
    Returns the value of the redirects record component.
    @Nullable net.minecraft.resources.ResourceLocation
    Returns the value of the replace record component.
    @Nullable net.minecraft.resources.ResourceLocation
     
    List<net.minecraft.resources.ResourceLocation>
    Returns the value of the targets record component.
    final String
    Returns a string representation of this record class.
    withDefaultId(net.minecraft.resources.ResourceLocation defaultId)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • ShaderInjectionDefinition

      public ShaderInjectionDefinition(@Nullable @Nullable net.minecraft.resources.ResourceLocation id, List<net.minecraft.resources.ResourceLocation> targets, List<net.minecraft.resources.ResourceLocation> redirects, int priority, @Nullable @Nullable net.minecraft.resources.ResourceLocation replace, boolean debug)
      Creates an instance of a ShaderInjectionDefinition record class.
      Parameters:
      id - the value for the id record component
      targets - the value for the targets record component
      redirects - the value for the redirects record component
      priority - the value for the priority record component
      replace - the value for the replace record component
      debug - the value for the debug record component
  • Method Details

    • createGson

      public static com.google.gson.Gson createGson()
    • withDefaultId

      public ShaderInjectionDefinition withDefaultId(net.minecraft.resources.ResourceLocation defaultId)
    • target

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation target()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • id

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • targets

      public List<net.minecraft.resources.ResourceLocation> targets()
      Returns the value of the targets record component.
      Returns:
      the value of the targets record component
    • redirects

      public List<net.minecraft.resources.ResourceLocation> redirects()
      Returns the value of the redirects record component.
      Returns:
      the value of the redirects record component
    • priority

      public int priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • replace

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation replace()
      Returns the value of the replace record component.
      Returns:
      the value of the replace record component
    • debug

      public boolean debug()
      Returns the value of the debug record component.
      Returns:
      the value of the debug record component