Interface StringRepresentable
- All Known Subinterfaces:
SkullBlock.Type, SlotRange
- All Known Implementing Classes:
AdvancementType, Armadillo.ArmadilloState, ArmorType, AttachFace, AttributeModifier.Operation, AttributeModifier.OperationId, Axolotl.Variant, BambooLeaves, BedPart, BedRule.Rule, BellAttachType, Biome.Precipitation, Biome.TemperatureModifier, BiomeSpecialEffects.GrassColorModifier, BossEvent.BossBarColor, BossEvent.BossBarOverlay, CaveSurface, ChatFormatting, ChatTrustLevel, ChatTypeDecoration.Parameter, ChestType, ChickenVariant.ModelType, ClickEvent.Action, CloudStatus, CombinedCondition.Operation, ComparatorMode, CompassAngleState.CompassTarget, CookingBookCategory, CopperGolemState, CopperGolemStatueBlock.Pose, CopyCustomDataFunction.MergeStrategy, CowVariant.ModelType, CraftingBookCategory, CreakingHeartState, CrossbowItem.ChargeType, DamageEffects, DamageScaling, DatapackStructureReport.Format, DeathMessageType, DebugScreenEntryStatus, DebugScreenProfile, DensityFunctions.Mapped.Type, DensityFunctions.Marker.Type, DensityFunctions.TwoArgumentSimpleFunction.Type, DensityFunctions.WeirdScaledSampler.RarityValueMapper, DialogAction, Difficulty, DimensionType.CardinalLightType, DimensionType.Skybox, Direction, Direction.Axis, Display.BillboardConstraints, Display.TextDisplay.Align, DisplaySlot, DoorHingeSide, DoubleBlockHalf, DripstoneThickness, DyeColor, EnchantmentTarget, EquipmentClientInfo.LayerType, EquipmentSlot, EquipmentSlotGroup, FilterMask.Type, FireworkExplosion.Shape, FontOption, Fox.Variant, FrontAndTop, GameRuleType, GameType, GenerationStep.Decoration, GlyphProviderType, GossipType, GraphicsPreset, GuiSpriteScaling.Type, Half, HangingSignRenderer.AttachmentType, Heightmap.Types, HoverEvent.Action, HumanoidArm, InactivityFpsLimit, ItemAttributeModifiers.Display.Type, ItemDisplayContext, ItemUseAnimation, JigsawBlockEntity.JointType, Level.ExplosionInteraction, LiquidSettings, ListOperation.Type, Llama.Variant, LoggedChatEvent.Type, LootContext.BlockEntityTarget, LootContext.EntityTarget, LootContext.ItemStackTarget, MineshaftStructure.Type, MipmapStrategy, Mirror, MobCategory, MoonPhase, MushroomCow.Variant, MusicManager.MusicFrequency, MusicToastDisplayState, NoteBlockInstrument, ObjectiveCriteria.RenderType, OceanRuinStructure.Type, OctahedralGroup, PackType, Panda.Gene, Parrot.Variant, PermissionLevel, PigVariant.ModelType, PistonType, PlayerModelPart, PlayerModelType, Pose, QuickPlayLog.Type, Rabbit.Variant, Raid.RaidStatus, RailShape, RandomSpreadType, Rarity, RedstoneSide, Rotation, RuinedPortalPiece.VerticalPlacement, Salmon.Variant, SculkSensorPhase, SetNameFunction.Target, SideChainPart, SkullBlock.Types, SlabType, SpawnParticlesEffect.PositionSourceType, StairsShape, StructureMode, StructurePlacement.FrequencyReductionMethod, StructureSpawnOverride.BoundingBoxType, StructureTemplatePool.Projection, SwingAnimationType, Team.CollisionRule, Team.Visibility, TelemetryProperty.GameMode, TelemetryProperty.ServerType, TerrainAdjustment, TestBlockMode, TestEnvironmentDefinition.Weather.Type, TestInstanceBlockEntity.Status, Tilt, Time.TimeSource, TransformationHelper.TransformOrigin, TrialSpawnerState, TriState, TropicalFish.Pattern, UniformValue.Type, Variant, VaultState, VillagerMetadataSection.Hat, WallSide, WeatheringCopper.WeatherState, ZombieNautilusVariant.ModelType
public interface StringRepresentable
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classStringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>static class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends StringRepresentable>
Function<String, @Nullable T> createNameLookup(T[] valueArray) createNameLookup(T[] valueArray, Function<T, String> converter) static <E extends Enum<E> & StringRepresentable>
StringRepresentable.EnumCodec<E> static <E extends Enum<E> & StringRepresentable>
StringRepresentable.EnumCodec<E> fromEnumWithMapping(Supplier<E[]> values, Function<String, String> converter) static <T extends StringRepresentable>
com.mojang.serialization.Codec<T> fromValues(Supplier<T[]> values) static com.mojang.serialization.Keyablekeys(StringRepresentable[] values)
-
Field Details
-
PRE_BUILT_MAP_THRESHOLD
static final int PRE_BUILT_MAP_THRESHOLD- See Also:
-
-
Method Details
-
getSerializedName
String getSerializedName() -
fromEnum
static <E extends Enum<E> & StringRepresentable> StringRepresentable.EnumCodec<E> fromEnum(Supplier<E[]> values) -
fromEnumWithMapping
static <E extends Enum<E> & StringRepresentable> StringRepresentable.EnumCodec<E> fromEnumWithMapping(Supplier<E[]> values, Function<String, String> converter) -
fromValues
static <T extends StringRepresentable> com.mojang.serialization.Codec<T> fromValues(Supplier<T[]> values) -
createNameLookup
static <T extends StringRepresentable> Function<String, @Nullable T> createNameLookup(T[] valueArray) -
createNameLookup
-
keys
-