Record Class MaterialAssetGroup
java.lang.Object
java.lang.Record
net.minecraft.world.item.equipment.trim.MaterialAssetGroup
public record MaterialAssetGroup(MaterialAssetGroup.AssetInfo base, Map<ResourceKey<EquipmentAsset>,MaterialAssetGroup.AssetInfo> overrides)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MaterialAssetGroupprivate final MaterialAssetGroup.AssetInfoThe field for thebaserecord component.static final MaterialAssetGroupstatic final MaterialAssetGroupstatic final MaterialAssetGroupstatic final MaterialAssetGroupstatic final MaterialAssetGroupstatic final MaterialAssetGroupstatic final com.mojang.serialization.MapCodec<MaterialAssetGroup> static final MaterialAssetGroupprivate final Map<ResourceKey<EquipmentAsset>, MaterialAssetGroup.AssetInfo> The field for theoverridesrecord component.static final MaterialAssetGroupstatic final MaterialAssetGroupstatic final MaterialAssetGroupstatic final Stringstatic final StreamCodec<io.netty.buffer.ByteBuf, MaterialAssetGroup> -
Constructor Summary
ConstructorsConstructorDescriptionMaterialAssetGroup(MaterialAssetGroup.AssetInfo base, Map<ResourceKey<EquipmentAsset>, MaterialAssetGroup.AssetInfo> overrides) Creates an instance of aMaterialAssetGrouprecord class. -
Method Summary
Modifier and TypeMethodDescriptionassetId(ResourceKey<EquipmentAsset> pAssetKey) base()Returns the value of thebaserecord component.static MaterialAssetGroupstatic MaterialAssetGroupcreate(String pName, Map<ResourceKey<EquipmentAsset>, String> pOverrides) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoverridesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
base
The field for thebaserecord component. -
overrides
The field for theoverridesrecord component. -
SEPARATOR
- See Also:
-
MAP_CODEC
-
STREAM_CODEC
-
QUARTZ
-
IRON
-
NETHERITE
-
REDSTONE
-
COPPER
-
GOLD
-
EMERALD
-
DIAMOND
-
LAPIS
-
AMETHYST
-
RESIN
-
-
Constructor Details
-
MaterialAssetGroup
public MaterialAssetGroup(MaterialAssetGroup.AssetInfo base, Map<ResourceKey<EquipmentAsset>, MaterialAssetGroup.AssetInfo> overrides) Creates an instance of aMaterialAssetGrouprecord class.- Parameters:
base- the value for thebaserecord componentoverrides- the value for theoverridesrecord component
-
-
Method Details
-
create
-
create
public static MaterialAssetGroup create(String pName, Map<ResourceKey<EquipmentAsset>, String> pOverrides) -
assetId
-
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). -
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
overrides
Returns the value of theoverridesrecord component.- Returns:
- the value of the
overridesrecord component
-