Record Class ModVersions
java.lang.Object
java.lang.Record
net.minecraftforge.network.packets.ModVersions
Prefixes S2CModList by sending additional data about the mods installed on the server to the client
 The mod data is stored as follows: [modId -> [modName, modVersion]]
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate final Map<String,ModVersions.Info> The field for themodsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionModVersions(Map<String, ModVersions.Info> mods) Creates an instance of aModVersionsrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic ModVersionscreate()static ModVersionsdecode(FriendlyByteBuf buf) voidencode(FriendlyByteBuf output) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mods()Returns the value of themodsrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
modsThe field for themodsrecord component.
- 
MAX_LENGTHprivate static final int MAX_LENGTH- See Also:
 
 
- 
- 
Constructor Details- 
ModVersionsCreates an instance of aModVersionsrecord class.- Parameters:
- mods- the value for the- modsrecord component
 
 
- 
- 
Method Details- 
create
- 
decode
- 
encode
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
modsReturns the value of themodsrecord component.- Returns:
- the value of the modsrecord component
 
 
-