Record Class StructurePieceSerializationContext
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext
public record StructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureManager structureManager)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryAccessThe field for theregistryAccessrecord component.private final ResourceManagerThe field for theresourceManagerrecord component.private final StructureManagerThe field for thestructureManagerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureManager structureManager) Creates an instance of aStructurePieceSerializationContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fromLevel(ServerLevel p_192771_) final inthashCode()Returns a hash code value for this object.Returns the value of theregistryAccessrecord component.Returns the value of theresourceManagerrecord component.Returns the value of thestructureManagerrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
resourceManager
The field for theresourceManagerrecord component. -
registryAccess
The field for theregistryAccessrecord component. -
structureManager
The field for thestructureManagerrecord component.
-
-
Constructor Details
-
StructurePieceSerializationContext
public StructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureManager structureManager) Creates an instance of aStructurePieceSerializationContextrecord class.- Parameters:
resourceManager- the value for theresourceManagerrecord componentregistryAccess- the value for theregistryAccessrecord componentstructureManager- the value for thestructureManagerrecord component
-
-
Method Details
-
fromLevel
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
resourceManager
Returns the value of theresourceManagerrecord component.- Returns:
- the value of the
resourceManagerrecord component
-
registryAccess
Returns the value of theregistryAccessrecord component.- Returns:
- the value of the
registryAccessrecord component
-
structureManager
Returns the value of thestructureManagerrecord component.- Returns:
- the value of the
structureManagerrecord component
-