Interface StringIdentifiable

All Known Implementing Classes:
Attachment, BambooLeaves, BedPart, Biome.Category, Biome.Precipitation, Biome.TemperatureModifier, BiomeEffects.GrassColorModifier, BlockHalf, ChestType, ComparatorMode, Direction, Direction.Axis, DirectionTransformation, DoorHinge, DoubleBlockHalf, DyeColor, GenerationStep.Carver, Heightmap.Type, Instrument, JigsawBlockEntity.Joint, JigsawOrientation, MineshaftFeature.Type, OceanRuinFeature.BiomeType, PistonType, RailShape, RuinedPortalFeature.Type, SculkSensorPhase, SlabType, SpawnGroup, StairShape, StructureBlockMode, StructurePool.Projection, Thickness, Tilt, VerticalSurfaceType, WallMountLocation, WallShape, WireConnection

public interface StringIdentifiable
Mappings:
Namespace Name
official ahh
intermediary net/minecraft/class_3542
named net/minecraft/util/StringIdentifiable
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static <E extends Enum<E> & StringIdentifiable>
    com.mojang.serialization.Codec<E>
    createCodec(Supplier<E[]> enumValues, Function<? super String,? extends E> fromString)
    Creates a codec that serializes an enum implementing this interface either using its ordinals (when compressed) or using its asString() method and a given decode function.
    static <E extends StringIdentifiable>
    com.mojang.serialization.Codec<E>
    createCodec(ToIntFunction<E> compressedEncoder, IntFunction<E> compressedDecoder, Function<? super String,? extends E> decoder)
    Creates a codec that serializes a class implementing this interface using either the given toInt and fromInt mapping functions (when compressed output is requested), or its asString() method and a given fromString function.
    static com.mojang.serialization.Keyable
     
  • Method Details

    • asString

      String asString()
      Mappings:
      Namespace Name Mixin selector
      official c Lahh;c()Ljava/lang/String;
      intermediary method_15434 Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
      named asString Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
    • createCodec

      static <E extends Enum<E> & StringIdentifiable> com.mojang.serialization.Codec<E> createCodec(Supplier<E[]> enumValues, Function<? super String,? extends E> fromString)
      Creates a codec that serializes an enum implementing this interface either using its ordinals (when compressed) or using its asString() method and a given decode function.
      Mappings:
      Namespace Name Mixin selector
      official a Lahh;a(Ljava/util/function/Supplier;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      intermediary method_28140 Lnet/minecraft/class_3542;method_28140(Ljava/util/function/Supplier;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      named createCodec Lnet/minecraft/util/StringIdentifiable;createCodec(Ljava/util/function/Supplier;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
    • createCodec

      static <E extends StringIdentifiable> com.mojang.serialization.Codec<E> createCodec(ToIntFunction<E> compressedEncoder, IntFunction<E> compressedDecoder, Function<? super String,? extends E> decoder)
      Creates a codec that serializes a class implementing this interface using either the given toInt and fromInt mapping functions (when compressed output is requested), or its asString() method and a given fromString function.
      Mappings:
      Namespace Name Mixin selector
      official a Lahh;a(Ljava/util/function/ToIntFunction;Ljava/util/function/IntFunction;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      intermediary method_28141 Lnet/minecraft/class_3542;method_28141(Ljava/util/function/ToIntFunction;Ljava/util/function/IntFunction;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
      named createCodec Lnet/minecraft/util/StringIdentifiable;createCodec(Ljava/util/function/ToIntFunction;Ljava/util/function/IntFunction;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;
    • toKeyable

      static com.mojang.serialization.Keyable toKeyable(StringIdentifiable[] values)
      Mappings:
      Namespace Name Mixin selector
      official a Lahh;a([Lahh;)Lcom/mojang/serialization/Keyable;
      intermediary method_28142 Lnet/minecraft/class_3542;method_28142([Lnet/minecraft/class_3542;)Lcom/mojang/serialization/Keyable;
      named toKeyable Lnet/minecraft/util/StringIdentifiable;toKeyable([Lnet/minecraft/util/StringIdentifiable;)Lcom/mojang/serialization/Keyable;