Package net.minecraft.resources
Record Class RegistryResourceAccess.InMemoryStorage.Entry
java.lang.Object
java.lang.Record
net.minecraft.resources.RegistryResourceAccess.InMemoryStorage.Entry
- Enclosing class:
- RegistryResourceAccess.InMemoryStorage
static record RegistryResourceAccess.InMemoryStorage.Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEntry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle) Creates an instance of aEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElementdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.com.mojang.serialization.LifecycleReturns the value of thelifecyclerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
data
private final com.google.gson.JsonElement dataThe field for thedatarecord component. -
id
private final int idThe field for theidrecord component. -
lifecycle
private final com.mojang.serialization.Lifecycle lifecycleThe field for thelifecyclerecord component.
-
-
Constructor Details
-
Entry
Entry(com.google.gson.JsonElement data, int id, com.mojang.serialization.Lifecycle lifecycle) Creates an instance of aEntryrecord class.- Parameters:
data- the value for thedatarecord componentid- the value for theidrecord componentlifecycle- the value for thelifecyclerecord 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 '=='. -
data
public com.google.gson.JsonElement data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
lifecycle
public com.mojang.serialization.Lifecycle lifecycle()Returns the value of thelifecyclerecord component.- Returns:
- the value of the
lifecyclerecord component
-