Record Class StructurePieceSerializationContext
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext
public record StructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryAccessThe field for theregistryAccessrecord component.private final ResourceManagerThe field for theresourceManagerrecord component.private final StructureTemplateManagerThe field for thestructureTemplateManagerrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager) 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 thestructureTemplateManagerrecord 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. -
structureTemplateManager
The field for thestructureTemplateManagerrecord component.
-
-
Constructor Details
-
StructurePieceSerializationContext
public StructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager) Creates an instance of aStructurePieceSerializationContextrecord class.- Parameters:
resourceManager- the value for theresourceManagerrecord componentregistryAccess- the value for theregistryAccessrecord componentstructureTemplateManager- the value for thestructureTemplateManagerrecord 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
-
structureTemplateManager
Returns the value of thestructureTemplateManagerrecord component.- Returns:
- the value of the
structureTemplateManagerrecord component
-