Package net.minecraftforge.network
Record Class NetworkContext.NetworkMismatchData
java.lang.Object
java.lang.Record
net.minecraftforge.network.NetworkContext.NetworkMismatchData
- Enclosing class:
NetworkContext
@Internal
public static record NetworkContext.NetworkMismatchData(Map<ResourceLocation,NetworkContext.NetworkMismatchData.Version> mismatched, Set<ResourceLocation> missing, boolean fromServer, Map<String,ModVersions.Info> mods)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thefromServerrecord component.private final Map<ResourceLocation, NetworkContext.NetworkMismatchData.Version> The field for themismatchedrecord component.private final Set<ResourceLocation> The field for themissingrecord component.private final Map<String, ModVersions.Info> The field for themodsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionNetworkMismatchData(Map<ResourceLocation, NetworkContext.NetworkMismatchData.Version> mismatched, Set<ResourceLocation> missing, boolean fromServer, Map<String, ModVersions.Info> mods) Creates an instance of aNetworkMismatchDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefromServerrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themismatchedrecord component.missing()Returns the value of themissingrecord component.mods()Returns the value of themodsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
mismatched
The field for themismatchedrecord component. -
missing
The field for themissingrecord component. -
fromServer
private final boolean fromServerThe field for thefromServerrecord component. -
mods
The field for themodsrecord component.
-
-
Constructor Details
-
NetworkMismatchData
public NetworkMismatchData(Map<ResourceLocation, NetworkContext.NetworkMismatchData.Version> mismatched, Set<ResourceLocation> missing, boolean fromServer, Map<String, ModVersions.Info> mods) Creates an instance of aNetworkMismatchDatarecord class.- Parameters:
mismatched- the value for themismatchedrecord componentmissing- the value for themissingrecord componentfromServer- the value for thefromServerrecord componentmods- the value for themodsrecord 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 '=='. -
mismatched
Returns the value of themismatchedrecord component.- Returns:
- the value of the
mismatchedrecord component
-
missing
Returns the value of themissingrecord component.- Returns:
- the value of the
missingrecord component
-
fromServer
public boolean fromServer()Returns the value of thefromServerrecord component.- Returns:
- the value of the
fromServerrecord component
-
mods
Returns the value of themodsrecord component.- Returns:
- the value of the
modsrecord component
-