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 -
Constructor Summary
ConstructorsConstructorDescriptionShaderInjectionDefinition(@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 aShaderInjectionDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.Gsonbooleandebug()Returns the value of thedebugrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.intpriority()Returns the value of thepriorityrecord component.List<net.minecraft.resources.ResourceLocation> Returns the value of theredirectsrecord component.@Nullable net.minecraft.resources.ResourceLocationreplace()Returns the value of thereplacerecord component.@Nullable net.minecraft.resources.ResourceLocationtarget()List<net.minecraft.resources.ResourceLocation> targets()Returns the value of thetargetsrecord component.final StringtoString()Returns a string representation of this record class.withDefaultId(net.minecraft.resources.ResourceLocation defaultId)
-
Field Details
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY- See Also:
-
-
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 aShaderInjectionDefinitionrecord class.- Parameters:
id- the value for theidrecord componenttargets- the value for thetargetsrecord componentredirects- the value for theredirectsrecord componentpriority- the value for thepriorityrecord componentreplace- the value for thereplacerecord componentdebug- the value for thedebugrecord component
-
-
Method Details
-
createGson
public static com.google.gson.Gson createGson() -
withDefaultId
-
target
@Nullable public @Nullable net.minecraft.resources.ResourceLocation target() -
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 '=='. -
id
@Nullable public @Nullable net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
targets
Returns the value of thetargetsrecord component.- Returns:
- the value of the
targetsrecord component
-
redirects
Returns the value of theredirectsrecord component.- Returns:
- the value of the
redirectsrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
replace
@Nullable public @Nullable net.minecraft.resources.ResourceLocation replace()Returns the value of thereplacerecord component.- Returns:
- the value of the
replacerecord component
-
debug
public boolean debug()Returns the value of thedebugrecord component.- Returns:
- the value of the
debugrecord component
-