Record Class ScriptRunConfiguration
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.zencode.scriptrun.ScriptRunConfiguration
- Record Components:
loader- TheIScriptLoaderthat will be used to execute the run.loadSource- TheIScriptLoadSourceresponsible for creating the run.runKind- The kind of run that will be executed.
public record ScriptRunConfiguration(IScriptLoader loader, IScriptLoadSource loadSource, ScriptRunConfiguration.RunKind runKind)
extends Record
Holds information relative to the configuration for a specific
IScriptRun.- Since:
- 9.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumIndicates the kind of run that theIScriptRunwill perform. -
Constructor Summary
ConstructorsConstructorDescriptionScriptRunConfiguration(IScriptLoader loader, IScriptLoadSource loadSource, ScriptRunConfiguration.RunKind runKind) Creates an instance of aScriptRunConfigurationrecord class.ScriptRunConfiguration(String loader, net.minecraft.resources.ResourceLocation loadSource, ScriptRunConfiguration.RunKind runKind) Creates aScriptRunConfigurationwith the given info, performing lookups if necessary. -
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.loader()Returns the value of theloaderrecord component.Returns the value of theloadSourcerecord component.runKind()Returns the value of therunKindrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScriptRunConfiguration
public ScriptRunConfiguration(String loader, net.minecraft.resources.ResourceLocation loadSource, ScriptRunConfiguration.RunKind runKind) Creates aScriptRunConfigurationwith the given info, performing lookups if necessary.- Parameters:
loader- The name of the loader that will be used to execute the run.loadSource- TheResourceLocationidentifying the load source responsible for creating the run.runKind- The kind of run that will be executed.- Throws:
IllegalArgumentException- If the loader or the load source are not registered.- Since:
- 9.1.0
-
ScriptRunConfiguration
public ScriptRunConfiguration(IScriptLoader loader, IScriptLoadSource loadSource, ScriptRunConfiguration.RunKind runKind) Creates an instance of aScriptRunConfigurationrecord class.- Parameters:
loader- the value for theloaderrecord componentloadSource- the value for theloadSourcerecord componentrunKind- the value for therunKindrecord 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). -
loader
Returns the value of theloaderrecord component.- Returns:
- the value of the
loaderrecord component
-
loadSource
Returns the value of theloadSourcerecord component.- Returns:
- the value of the
loadSourcerecord component
-
runKind
Returns the value of therunKindrecord component.- Returns:
- the value of the
runKindrecord component
-