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 SummaryFieldsModifier and TypeFieldDescriptionprivate final RegistryAccessThe field for theregistryAccessrecord component.private final ResourceManagerThe field for theresourceManagerrecord component.private final StructureTemplateManagerThe field for thestructureTemplateManagerrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionStructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager) Creates an instance of aStructurePieceSerializationContextrecord class.
- 
Method SummaryModifier 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- 
resourceManagerThe field for theresourceManagerrecord component.
- 
registryAccessThe field for theregistryAccessrecord component.
- 
structureTemplateManagerThe field for thestructureTemplateManagerrecord component.
 
- 
- 
Constructor Details- 
StructurePieceSerializationContextpublic StructurePieceSerializationContext(ResourceManager resourceManager, RegistryAccess registryAccess, StructureTemplateManager structureTemplateManager) Creates an instance of aStructurePieceSerializationContextrecord class.- Parameters:
- resourceManager- the value for the- resourceManagerrecord component
- registryAccess- the value for the- registryAccessrecord component
- structureTemplateManager- the value for the- structureTemplateManagerrecord component
 
 
- 
- 
Method Details- 
fromLevel
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
resourceManagerReturns the value of theresourceManagerrecord component.- Returns:
- the value of the resourceManagerrecord component
 
- 
registryAccessReturns the value of theregistryAccessrecord component.- Returns:
- the value of the registryAccessrecord component
 
- 
structureTemplateManagerReturns the value of thestructureTemplateManagerrecord component.- Returns:
- the value of the structureTemplateManagerrecord component
 
 
-