Record Class StructuredDataKey<T>
java.lang.Object
java.lang.Record
com.viaversion.viaversion.api.minecraft.data.StructuredDataKey<T>
- Type Parameters:
T- data type- Record Components:
identifier- string identifiertype- data type
Holds data component keys.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StructuredDataKey<AttributeModifiers1_20_5>static final StructuredDataKey<AttributeModifiers1_21>static final StructuredDataKey<AttributeModifiers1_21>static final StructuredDataKey<AttributeModifiers1_21>static final StructuredDataKey<Integer>static final StructuredDataKey<BannerPatternLayer[]>static final StructuredDataKey<Integer>static final StructuredDataKey<Bee[]>static final StructuredDataKey<Bee[]>static final StructuredDataKey<com.viaversion.nbt.tag.CompoundTag>static final StructuredDataKey<BlockEntityData>static final StructuredDataKey<BlockStateProperties>static final StructuredDataKey<BlocksAttacks>static final StructuredDataKey<Holder<SoundEvent>>static final StructuredDataKey<com.viaversion.nbt.tag.CompoundTag>static final StructuredDataKey<AdventureModePredicate>static final StructuredDataKey<AdventureModePredicate>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Either<Integer,String>> static final StructuredDataKey<Consumable1_21_2>static final StructuredDataKey<com.viaversion.nbt.tag.CompoundTag>static final StructuredDataKey<Integer>static final StructuredDataKey<Unit>static final StructuredDataKey<com.viaversion.nbt.tag.CompoundTag>static final StructuredDataKey<Integer>static final StructuredDataKey<CustomModelData1_21_4>static final StructuredDataKey<com.viaversion.nbt.tag.Tag>static final StructuredDataKey<Integer>static final StructuredDataKey<DamageResistant>static final StructuredDataKey<DeathProtection>static final StructuredDataKey<DebugStickState>static final StructuredDataKey<DyedColor>static final StructuredDataKey<DyedColor>static final StructuredDataKey<Enchantable>static final StructuredDataKey<Boolean>static final StructuredDataKey<Enchantments>static final StructuredDataKey<Enchantments>static final StructuredDataKey<com.viaversion.nbt.tag.CompoundTag>static final StructuredDataKey<EntityData>static final StructuredDataKey<Equippable>static final StructuredDataKey<Equippable>static final StructuredDataKey<Equippable>static final StructuredDataKey<Unit>static final StructuredDataKey<FireworkExplosion>static final StructuredDataKey<Fireworks>static final StructuredDataKey<FoodProperties1_20_5>static final StructuredDataKey<FoodProperties1_20_5>static final StructuredDataKey<FoodProperties1_21_2>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Unit>static final StructuredDataKey<Unit>static final StructuredDataKey<Unit>static final StructuredDataKey<Integer>static final StructuredDataKey<Holder<Instrument1_20_5>>static final StructuredDataKey<Holder<Instrument1_21_2>>static final StructuredDataKey<EitherHolder<Instrument1_21_2>>static final StructuredDataKey<com.viaversion.nbt.tag.Tag>static final StructuredDataKey<ItemModel>static final StructuredDataKey<com.viaversion.nbt.tag.Tag>static final StructuredDataKey<JukeboxPlayable>static final StructuredDataKey<JukeboxPlayable>static final StructuredDataKey<Integer>static final StructuredDataKey<com.viaversion.nbt.tag.Tag>static final StructuredDataKey<LockCode>static final StructuredDataKey<LodestoneTracker>static final StructuredDataKey<com.viaversion.nbt.tag.Tag[]>static final StructuredDataKey<Integer>static final StructuredDataKey<com.viaversion.nbt.tag.CompoundTag>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Key>static final StructuredDataKey<Integer>static final StructuredDataKey<Holder<PaintingVariant>>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<PotDecorations>static final StructuredDataKey<PotionContents>static final StructuredDataKey<PotionContents>static final StructuredDataKey<Float>static final StructuredDataKey<GameProfile>static final StructuredDataKey<ResolvableProfile>static final StructuredDataKey<Key>static final StructuredDataKey<ProvidesTrimMaterial>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<com.viaversion.nbt.tag.Tag>static final StructuredDataKey<Integer>static final StructuredDataKey<Repairable>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Enchantments>static final StructuredDataKey<Enchantments>static final StructuredDataKey<SuspiciousStewEffect[]>static final StructuredDataKey<ToolProperties>static final StructuredDataKey<ToolProperties>static final StructuredDataKey<TooltipDisplay>static final StructuredDataKey<Key>static final StructuredDataKey<ArmorTrim>static final StructuredDataKey<ArmorTrim>static final StructuredDataKey<ArmorTrim>static final StructuredDataKey<ArmorTrim>static final StructuredDataKey<Integer>static final StructuredDataKey<TropicalFishPattern>static final StructuredDataKey<Integer>static final StructuredDataKey<Unbreakable>static final StructuredDataKey<Unit>static final StructuredDataKey<UseCooldown>static final StructuredDataKeys1_20_5static final StructuredDataKeys1_20_5static final StructuredDataKeys1_21_2static final StructuredDataKeys1_21_2static final StructuredDataKeys1_21_5static final StructuredDataKeys1_21_5static final StructuredDataKeys1_21_5static final StructuredDataKey<Integer>static final StructuredDataKey<Weapon>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<Integer>static final StructuredDataKey<WritableBook>static final StructuredDataKey<WrittenBook> -
Constructor Summary
ConstructorsConstructorDescriptionStructuredDataKey(String identifier, Type<T> type) Creates an instance of aStructuredDataKeyrecord 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 theidentifierrecord component.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
CUSTOM_DATA
-
MAX_STACK_SIZE
-
MAX_DAMAGE
-
DAMAGE
-
UNBREAKABLE1_20_5
-
UNBREAKABLE1_21_5
-
CUSTOM_NAME
-
ITEM_NAME
-
ITEM_MODEL
-
LORE
-
RARITY
-
ENCHANTMENTS1_20_5
-
ENCHANTMENTS1_21_5
-
CAN_PLACE_ON1_20_5
-
CAN_BREAK1_20_5
-
ATTRIBUTE_MODIFIERS1_20_5
-
ATTRIBUTE_MODIFIERS1_21
-
ATTRIBUTE_MODIFIERS1_21_5
-
ATTRIBUTE_MODIFIERS1_21_6
-
CUSTOM_MODEL_DATA1_20_5
-
CUSTOM_MODEL_DATA1_21_4
-
HIDE_ADDITIONAL_TOOLTIP
-
HIDE_TOOLTIP
-
TOOLTIP_DISPLAY
-
REPAIR_COST
-
CREATIVE_SLOT_LOCK
-
ENCHANTMENT_GLINT_OVERRIDE
-
INTANGIBLE_PROJECTILE
-
FOOD1_20_5
-
FOOD1_21
-
FOOD1_21_2
-
CONSUMABLE1_21_2
-
USE_COOLDOWN
-
FIRE_RESISTANT
-
DAMAGE_RESISTANT
-
TOOL1_20_5
-
TOOL1_21_5
-
WEAPON
-
ENCHANTABLE
-
EQUIPPABLE1_21_2
-
EQUIPPABLE1_21_5
-
EQUIPPABLE1_21_6
-
REPAIRABLE
-
GLIDER
-
TOOLTIP_STYLE
-
DEATH_PROTECTION
-
BLOCKS_ATTACKS
-
STORED_ENCHANTMENTS1_20_5
-
STORED_ENCHANTMENTS1_21_5
-
DYED_COLOR1_20_5
-
DYED_COLOR1_21_5
-
MAP_COLOR
-
MAP_ID
-
MAP_DECORATIONS
-
MAP_POST_PROCESSING
-
POTION_CONTENTS1_20_5
-
POTION_CONTENTS1_21_2
-
POTION_DURATION_SCALE
-
SUSPICIOUS_STEW_EFFECTS
-
WRITABLE_BOOK_CONTENT
-
WRITTEN_BOOK_CONTENT
-
TRIM1_20_5
-
TRIM1_21_2
-
TRIM1_21_4
-
TRIM1_21_5
-
DEBUG_STICK_STATE
-
ENTITY_DATA1_20_5
-
ENTITY_DATA1_21_9
-
BUCKET_ENTITY_DATA
-
BLOCK_ENTITY_DATA1_20_5
-
BLOCK_ENTITY_DATA1_21_9
-
INSTRUMENT1_20_5
-
INSTRUMENT1_21_2
-
INSTRUMENT1_21_5
-
PROVIDES_TRIM_MATERIAL
-
OMINOUS_BOTTLE_AMPLIFIER
-
JUKEBOX_PLAYABLE1_21
-
JUKEBOX_PLAYABLE1_21_5
-
PROVIDES_BANNER_PATTERNS
-
RECIPES
-
LODESTONE_TRACKER
-
FIREWORK_EXPLOSION
-
FIREWORKS
-
PROFILE1_20_5
-
PROFILE1_21_9
-
NOTE_BLOCK_SOUND
-
BANNER_PATTERNS
-
BASE_COLOR
-
POT_DECORATIONS
-
BLOCK_STATE
-
BEES1_20_5
-
BEES1_21_9
-
LOCK1_20_5
-
LOCK1_21_2
-
CONTAINER_LOOT
-
BREAK_SOUND
-
VILLAGER_VARIANT
-
WOLF_VARIANT
-
WOLF_SOUND_VARIANT
-
WOLF_COLLAR
-
FOX_VARIANT
-
SALMON_SIZE
-
PARROT_VARIANT
-
TROPICAL_FISH_PATTERN
-
TROPICAL_FISH_BASE_COLOR
-
TROPICAL_FISH_PATTERN_COLOR
-
MOOSHROOM_VARIANT
-
RABBIT_VARIANT
-
PIG_VARIANT
-
COW_VARIANT
-
CHICKEN_VARIANT
-
FROG_VARIANT
-
HORSE_VARIANT
-
PAINTING_VARIANT
-
LLAMA_VARIANT
-
AXOLOTL_VARIANT
-
CAT_VARIANT
-
CAT_COLLAR
-
SHEEP_COLOR
-
SHULKER_COLOR
-
V1_20_5
-
V1_21
-
V1_21_2
-
V1_21_4
-
V1_21_5
-
V1_21_6
-
V1_21_9
-
-
Constructor Details
-
StructuredDataKey
Creates an instance of aStructuredDataKeyrecord class.- Parameters:
identifier- the value for theidentifierrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
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). -
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-