Record Class DirectPoolAlias
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.pools.alias.DirectPoolAlias
- All Implemented Interfaces:
PoolAliasBinding
public record DirectPoolAlias(ResourceKey<StructureTemplatePool> alias, ResourceKey<StructureTemplatePool> target)
extends Record
implements PoolAliasBinding
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceKey<StructureTemplatePool> The field for thealiasrecord component.(package private) static final com.mojang.serialization.MapCodec<DirectPoolAlias> private final ResourceKey<StructureTemplatePool> The field for thetargetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionDirectPoolAlias(ResourceKey<StructureTemplatePool> alias, ResourceKey<StructureTemplatePool> target) Creates an instance of aDirectPoolAliasrecord class. -
Method Summary
Modifier and TypeMethodDescriptionalias()Returns the value of thealiasrecord component.com.mojang.serialization.MapCodec<DirectPoolAlias> codec()final booleanIndicates whether some other object is "equal to" this one.voidforEachResolved(RandomSource random, BiConsumer<ResourceKey<StructureTemplatePool>, ResourceKey<StructureTemplatePool>> aliasAndTargetConsumer) final inthashCode()Returns a hash code value for this object.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
alias
The field for thealiasrecord component. -
target
The field for thetargetrecord component. -
CODEC
-
-
Constructor Details
-
DirectPoolAlias
public DirectPoolAlias(ResourceKey<StructureTemplatePool> alias, ResourceKey<StructureTemplatePool> target) Creates an instance of aDirectPoolAliasrecord class.- Parameters:
alias- the value for thealiasrecord componenttarget- the value for thetargetrecord component
-
-
Method Details
-
forEachResolved
public void forEachResolved(RandomSource random, BiConsumer<ResourceKey<StructureTemplatePool>, ResourceKey<StructureTemplatePool>> aliasAndTargetConsumer) - Specified by:
forEachResolvedin interfacePoolAliasBinding
-
allTargets
- Specified by:
allTargetsin interfacePoolAliasBinding
-
codec
- Specified by:
codecin interfacePoolAliasBinding
-
toString
-
hashCode
-
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). -
alias
Returns the value of thealiasrecord component.- Returns:
- the value of the
aliasrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-