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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
The field for thefromServer
record component.private final Map<ResourceLocation,
NetworkContext.NetworkMismatchData.Version> The field for themismatched
record component.private final Set<ResourceLocation>
The field for themissing
record component.private final Map<String,
ModVersions.Info> The field for themods
record component. -
Constructor Summary
ConstructorDescriptionNetworkMismatchData
(Map<ResourceLocation, NetworkContext.NetworkMismatchData.Version> mismatched, Set<ResourceLocation> missing, boolean fromServer, Map<String, ModVersions.Info> mods) Creates an instance of aNetworkMismatchData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thefromServer
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of themismatched
record component.missing()
Returns the value of themissing
record component.mods()
Returns the value of themods
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
mismatched
The field for themismatched
record component. -
missing
The field for themissing
record component. -
fromServer
private final boolean fromServerThe field for thefromServer
record component. -
mods
The field for themods
record 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 aNetworkMismatchData
record class.- Parameters:
mismatched
- the value for themismatched
record componentmissing
- the value for themissing
record componentfromServer
- the value for thefromServer
record componentmods
- the value for themods
record 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 themismatched
record component.- Returns:
- the value of the
mismatched
record component
-
missing
Returns the value of themissing
record component.- Returns:
- the value of the
missing
record component
-
fromServer
public boolean fromServer()Returns the value of thefromServer
record component.- Returns:
- the value of the
fromServer
record component
-
mods
Returns the value of themods
record component.- Returns:
- the value of the
mods
record component
-