Package net.neoforged.fml.startup
Record Class StartupArgs
java.lang.Object
java.lang.Record
net.neoforged.fml.startup.StartupArgs
- Record Components:
gameDirectory-headless-dist- If set to null, the distribution being launched is auto-detected, otherwise it is set to this. In a dev-environment where a "joined" distribution is being used, this parameter also disables access to classes and resources of the inactive distribution, ifcleanDistis also set.cleanDist- If enabled, the loader will try to prevent loading Minecraft classes that do not belong todist, but are otherwise present on the classpath (i.e. in joined distribution scenarios in development).programArgs-claimedFiles-unclaimedClassPathEntries-parentClassLoader-
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theclaimedFilesrecord component.private final booleanThe field for thecleanDistrecord component.private final @Nullable net.neoforged.api.distmarker.DistThe field for thedistrecord component.private final PathThe field for thegameDirectoryrecord component.private final booleanThe field for theheadlessrecord component.private final @Nullable ClassLoaderThe field for theparentClassLoaderrecord component.private final String[]The field for theprogramArgsrecord component.The field for theunclaimedClassPathEntriesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStartupArgs(Path gameDirectory, boolean headless, @Nullable net.neoforged.api.distmarker.Dist dist, boolean cleanDist, String[] programArgs, Set<File> claimedFiles, List<File> unclaimedClassPathEntries, @Nullable ClassLoader parentClassLoader) Creates an instance of aStartupArgsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclaimedFilesrecord component.booleanReturns the value of thecleanDistrecord component.@Nullable net.neoforged.api.distmarker.Distdist()Returns the value of thedistrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegameDirectoryrecord component.final inthashCode()Returns a hash code value for this object.booleanheadless()Returns the value of theheadlessrecord component.@Nullable ClassLoaderReturns the value of theparentClassLoaderrecord component.String[]Returns the value of theprogramArgsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunclaimedClassPathEntriesrecord component.
-
Field Details
-
gameDirectory
The field for thegameDirectoryrecord component. -
headless
private final boolean headlessThe field for theheadlessrecord component. -
dist
@Nullable private final @Nullable net.neoforged.api.distmarker.Dist distThe field for thedistrecord component. -
cleanDist
private final boolean cleanDistThe field for thecleanDistrecord component. -
programArgs
The field for theprogramArgsrecord component. -
claimedFiles
The field for theclaimedFilesrecord component. -
unclaimedClassPathEntries
The field for theunclaimedClassPathEntriesrecord component. -
parentClassLoader
The field for theparentClassLoaderrecord component.
-
-
Constructor Details
-
StartupArgs
public StartupArgs(Path gameDirectory, boolean headless, @Nullable @Nullable net.neoforged.api.distmarker.Dist dist, boolean cleanDist, String[] programArgs, Set<File> claimedFiles, List<File> unclaimedClassPathEntries, @Nullable @Nullable ClassLoader parentClassLoader) Creates an instance of aStartupArgsrecord class.- Parameters:
gameDirectory- the value for thegameDirectoryrecord componentheadless- the value for theheadlessrecord componentdist- the value for thedistrecord componentcleanDist- the value for thecleanDistrecord componentprogramArgs- the value for theprogramArgsrecord componentclaimedFiles- the value for theclaimedFilesrecord componentunclaimedClassPathEntries- the value for theunclaimedClassPathEntriesrecord componentparentClassLoader- the value for theparentClassLoaderrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
gameDirectory
Returns the value of thegameDirectoryrecord component.- Returns:
- the value of the
gameDirectoryrecord component
-
headless
public boolean headless()Returns the value of theheadlessrecord component.- Returns:
- the value of the
headlessrecord component
-
dist
@Nullable public @Nullable net.neoforged.api.distmarker.Dist dist()Returns the value of thedistrecord component.- Returns:
- the value of the
distrecord component
-
cleanDist
public boolean cleanDist()Returns the value of thecleanDistrecord component.- Returns:
- the value of the
cleanDistrecord component
-
programArgs
Returns the value of theprogramArgsrecord component.- Returns:
- the value of the
programArgsrecord component
-
claimedFiles
Returns the value of theclaimedFilesrecord component.- Returns:
- the value of the
claimedFilesrecord component
-
unclaimedClassPathEntries
Returns the value of theunclaimedClassPathEntriesrecord component.- Returns:
- the value of the
unclaimedClassPathEntriesrecord component
-
parentClassLoader
Returns the value of theparentClassLoaderrecord component.- Returns:
- the value of the
parentClassLoaderrecord component
-