Record Class ExtensionInfo
java.lang.Object
java.lang.Record
net.neoforged.fml.common.asm.enumextension.ExtensionInfo
- Record Components:
extended- Whether this enum had additional entries added to itvanillaCount- How many entries the enum originally contained, 0 if the enum is not extendedtotalCount- How many entries the enum contains after extension, 0 if the enum is not extendednetCheck- Whether the enum needs to be checked for network compatibility
public record ExtensionInfo(boolean extended, int vanillaCount, int totalCount, NetworkedEnum.NetworkCheck netCheck)
extends Record
Provides information on whether an enum was extended and how many entries are vanilla vs. modded
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theextendedrecord component.private final NetworkedEnum.NetworkCheckThe field for thenetCheckrecord component.private final intThe field for thetotalCountrecord component.private final intThe field for thevanillaCountrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionExtensionInfo(boolean extended, int vanillaCount, int totalCount, NetworkedEnum.NetworkCheck netCheck) Creates an instance of aExtensionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanextended()Returns the value of theextendedrecord component.final inthashCode()Returns a hash code value for this object.netCheck()Returns the value of thenetCheckrecord component.static <T extends Enum<T> & IExtensibleEnum>
ExtensionInfononExtended(Class<T> enumClass) final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalCountrecord component.intReturns the value of thevanillaCountrecord component.
-
Field Details
-
extended
private final boolean extendedThe field for theextendedrecord component. -
vanillaCount
private final int vanillaCountThe field for thevanillaCountrecord component. -
totalCount
private final int totalCountThe field for thetotalCountrecord component. -
netCheck
The field for thenetCheckrecord component.
-
-
Constructor Details
-
ExtensionInfo
public ExtensionInfo(boolean extended, int vanillaCount, int totalCount, @Nullable NetworkedEnum.NetworkCheck netCheck) Creates an instance of aExtensionInforecord class.- Parameters:
extended- the value for theextendedrecord componentvanillaCount- the value for thevanillaCountrecord componenttotalCount- the value for thetotalCountrecord componentnetCheck- the value for thenetCheckrecord component
-
-
Method Details
-
nonExtended
-
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 '=='. -
extended
public boolean extended()Returns the value of theextendedrecord component.- Returns:
- the value of the
extendedrecord component
-
vanillaCount
public int vanillaCount()Returns the value of thevanillaCountrecord component.- Returns:
- the value of the
vanillaCountrecord component
-
totalCount
public int totalCount()Returns the value of thetotalCountrecord component.- Returns:
- the value of the
totalCountrecord component
-
netCheck
Returns the value of thenetCheckrecord component.- Returns:
- the value of the
netCheckrecord component
-