Record Class VillagerTrades.VillagerExplorerMapEntry
java.lang.Object
java.lang.Record
net.minecraft.world.item.trading.VillagerTrades.VillagerExplorerMapEntry
- Enclosing class:
VillagerTrades
private static record VillagerTrades.VillagerExplorerMapEntry(ResourceKey<VillagerTrade> resourceKey, TagKey<Structure> structureTagKey, Holder<MapDecorationType> mapDecorationType, String translationKey, List<ResourceKey<VillagerType>> villagerTypes)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<MapDecorationType> The field for themapDecorationTyperecord component.private final ResourceKey<VillagerTrade> The field for theresourceKeyrecord component.The field for thestructureTagKeyrecord component.private final StringThe field for thetranslationKeyrecord component.private final List<ResourceKey<VillagerType>> The field for thevillagerTypesrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateVillagerExplorerMapEntry(ResourceKey<VillagerTrade> resourceKey, TagKey<Structure> structureTagKey, Holder<MapDecorationType> mapDecorationType, String translationKey, List<ResourceKey<VillagerType>> villagerTypes) Creates an instance of aVillagerExplorerMapEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themapDecorationTyperecord component.Returns the value of theresourceKeyrecord component.Returns the value of thestructureTagKeyrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.Returns the value of thevillagerTypesrecord component.
-
Field Details
-
resourceKey
The field for theresourceKeyrecord component. -
structureTagKey
-
mapDecorationType
The field for themapDecorationTyperecord component. -
translationKey
The field for thetranslationKeyrecord component. -
villagerTypes
The field for thevillagerTypesrecord component.
-
-
Constructor Details
-
VillagerExplorerMapEntry
private VillagerExplorerMapEntry(ResourceKey<VillagerTrade> resourceKey, TagKey<Structure> structureTagKey, Holder<MapDecorationType> mapDecorationType, String translationKey, List<ResourceKey<VillagerType>> villagerTypes) Creates an instance of aVillagerExplorerMapEntryrecord class.- Parameters:
resourceKey- the value for theresourceKeyrecord componentstructureTagKey- the value for thestructureTagKeyrecord componentmapDecorationType- the value for themapDecorationTyperecord componenttranslationKey- the value for thetranslationKeyrecord componentvillagerTypes- the value for thevillagerTypesrecord component
-
-
Method Details
-
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). -
resourceKey
Returns the value of theresourceKeyrecord component.- Returns:
- the value of the
resourceKeyrecord component
-
structureTagKey
-
mapDecorationType
Returns the value of themapDecorationTyperecord component.- Returns:
- the value of the
mapDecorationTyperecord component
-
translationKey
Returns the value of thetranslationKeyrecord component.- Returns:
- the value of the
translationKeyrecord component
-
villagerTypes
Returns the value of thevillagerTypesrecord component.- Returns:
- the value of the
villagerTypesrecord component
-