类 ResourcePackProfile

  • 所有已实现的接口:
    AutoCloseable

    public class ResourcePackProfile
    extends Object
    implements AutoCloseable
    Represents a resource pack in a ResourcePackManager.

    Compared to a single-use ResourcePack, a profile is persistent and serves as a factory for the single-use packs. It also contains user-friendly information about resource packs.

    The profiles are registered by ResourcePackProviders.

    Closing the profile doesn't have any effect.

    Mappings:
    Namespace Name
    official acy
    intermediary net/minecraft/class_3288
    named net/minecraft/resource/ResourcePackProfile
    • 字段详细资料

      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official a Lacy;a:Lorg/apache/logging/log4j/Logger;
        intermediary field_14279 Lnet/minecraft/class_3288;field_14279:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/resource/ResourcePackProfile;LOGGER:Lorg/apache/logging/log4j/Logger;
      • name

        private final String name
        Mappings:
        Namespace Name Mixin selector
        official b Lacy;b:Ljava/lang/String;
        intermediary field_14272 Lnet/minecraft/class_3288;field_14272:Ljava/lang/String;
        named name Lnet/minecraft/resource/ResourcePackProfile;name:Ljava/lang/String;
      • packFactory

        private final Supplier<ResourcePack> packFactory
        Mappings:
        Namespace Name Mixin selector
        official c Lacy;c:Ljava/util/function/Supplier;
        intermediary field_14273 Lnet/minecraft/class_3288;field_14273:Ljava/util/function/Supplier;
        named packFactory Lnet/minecraft/resource/ResourcePackProfile;packFactory:Ljava/util/function/Supplier;
      • displayName

        private final Text displayName
        Mappings:
        Namespace Name Mixin selector
        official d Lacy;d:Lon;
        intermediary field_14274 Lnet/minecraft/class_3288;field_14274:Lnet/minecraft/class_2561;
        named displayName Lnet/minecraft/resource/ResourcePackProfile;displayName:Lnet/minecraft/text/Text;
      • description

        private final Text description
        Mappings:
        Namespace Name Mixin selector
        official e Lacy;e:Lon;
        intermediary field_14275 Lnet/minecraft/class_3288;field_14275:Lnet/minecraft/class_2561;
        named description Lnet/minecraft/resource/ResourcePackProfile;description:Lnet/minecraft/text/Text;
      • compatibility

        private final ResourcePackCompatibility compatibility
        Mappings:
        Namespace Name Mixin selector
        official f Lacy;f:Lacz;
        intermediary field_14278 Lnet/minecraft/class_3288;field_14278:Lnet/minecraft/class_3281;
        named compatibility Lnet/minecraft/resource/ResourcePackProfile;compatibility:Lnet/minecraft/resource/ResourcePackCompatibility;
      • position

        private final ResourcePackProfile.InsertionPosition position
        Mappings:
        Namespace Name Mixin selector
        official g Lacy;g:Lacy$b;
        intermediary field_14277 Lnet/minecraft/class_3288;field_14277:Lnet/minecraft/class_3288$class_3289;
        named position Lnet/minecraft/resource/ResourcePackProfile;position:Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;
      • alwaysEnabled

        private final boolean alwaysEnabled
        Mappings:
        Namespace Name Mixin selector
        official h Lacy;h:Z
        intermediary field_14271 Lnet/minecraft/class_3288;field_14271:Z
        named alwaysEnabled Lnet/minecraft/resource/ResourcePackProfile;alwaysEnabled:Z
      • pinned

        private final boolean pinned
        Mappings:
        Namespace Name Mixin selector
        official i Lacy;i:Z
        intermediary field_14270 Lnet/minecraft/class_3288;field_14270:Z
        named pinned Lnet/minecraft/resource/ResourcePackProfile;pinned:Z
      • source

        private final ResourcePackSource source
        Mappings:
        Namespace Name Mixin selector
        official j Lacy;j:Ladb;
        intermediary field_25346 Lnet/minecraft/class_3288;field_25346:Lnet/minecraft/class_5352;
        named source Lnet/minecraft/resource/ResourcePackProfile;source:Lnet/minecraft/resource/ResourcePackSource;
    • 构造器详细资料

      • ResourcePackProfile

        public ResourcePackProfile​(String name,
                                   boolean alwaysEnabled,
                                   Supplier<ResourcePack> packFactory,
                                   Text displayName,
                                   Text description,
                                   ResourcePackCompatibility compatibility,
                                   ResourcePackProfile.InsertionPosition direction,
                                   boolean pinned,
                                   ResourcePackSource source)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lacy;<init>(Ljava/lang/String;ZLjava/util/function/Supplier;Lon;Lon;Lacz;Lacy$b;ZLadb;)V
        intermediary <init> Lnet/minecraft/class_3288;<init>(Ljava/lang/String;ZLjava/util/function/Supplier;Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Lnet/minecraft/class_3281;Lnet/minecraft/class_3288$class_3289;ZLnet/minecraft/class_5352;)V
        named <init> Lnet/minecraft/resource/ResourcePackProfile;<init>(Ljava/lang/String;ZLjava/util/function/Supplier;Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Lnet/minecraft/resource/ResourcePackCompatibility;Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;ZLnet/minecraft/resource/ResourcePackSource;)V
      • ResourcePackProfile

        public ResourcePackProfile​(String name,
                                   Text displayName,
                                   boolean alwaysEnabled,
                                   Supplier<ResourcePack> packFactory,
                                   PackResourceMetadata metadata,
                                   ResourceType type,
                                   ResourcePackProfile.InsertionPosition direction,
                                   ResourcePackSource source)
        Mappings:
        Namespace Name Mixin selector
        official <init> Lacy;<init>(Ljava/lang/String;Lon;ZLjava/util/function/Supplier;Lacs;Laco;Lacy$b;Ladb;)V
        intermediary <init> Lnet/minecraft/class_3288;<init>(Ljava/lang/String;Lnet/minecraft/class_2561;ZLjava/util/function/Supplier;Lnet/minecraft/class_3272;Lnet/minecraft/class_3264;Lnet/minecraft/class_3288$class_3289;Lnet/minecraft/class_5352;)V
        named <init> Lnet/minecraft/resource/ResourcePackProfile;<init>(Ljava/lang/String;Lnet/minecraft/text/Text;ZLjava/util/function/Supplier;Lnet/minecraft/resource/metadata/PackResourceMetadata;Lnet/minecraft/resource/ResourceType;Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;Lnet/minecraft/resource/ResourcePackSource;)V
    • 方法详细资料

      • of

        @Nullable
        public static @Nullable ResourcePackProfile of​(String name,
                                                       boolean alwaysEnabled,
                                                       Supplier<ResourcePack> packFactory,
                                                       ResourcePackProfile.Factory profileFactory,
                                                       ResourcePackProfile.InsertionPosition insertionPosition,
                                                       ResourcePackSource packSource)
        Creates a resource pack profile from the given parameters.

        Compared to calling the factory directly, this utility method obtains the pack's metadata information from the pack created by the packFactory. If the created pack doesn't have metadata information, this method returns null.

        返回:
        the created profile, or null if missing metadata
        Mappings:
        Namespace Name Mixin selector
        official a Lacy;a(Ljava/lang/String;ZLjava/util/function/Supplier;Lacy$a;Lacy$b;Ladb;)Lacy;
        intermediary method_14456 Lnet/minecraft/class_3288;method_14456(Ljava/lang/String;ZLjava/util/function/Supplier;Lnet/minecraft/class_3288$class_5351;Lnet/minecraft/class_3288$class_3289;Lnet/minecraft/class_5352;)Lnet/minecraft/class_3288;
        named of Lnet/minecraft/resource/ResourcePackProfile;of(Ljava/lang/String;ZLjava/util/function/Supplier;Lnet/minecraft/resource/ResourcePackProfile$Factory;Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;Lnet/minecraft/resource/ResourcePackSource;)Lnet/minecraft/resource/ResourcePackProfile;
      • getDisplayName

        public Text getDisplayName()
        Mappings:
        Namespace Name Mixin selector
        official a Lacy;a()Lon;
        intermediary method_14457 Lnet/minecraft/class_3288;method_14457()Lnet/minecraft/class_2561;
        named getDisplayName Lnet/minecraft/resource/ResourcePackProfile;getDisplayName()Lnet/minecraft/text/Text;
      • getDescription

        public Text getDescription()
        Mappings:
        Namespace Name Mixin selector
        official b Lacy;b()Lon;
        intermediary method_14459 Lnet/minecraft/class_3288;method_14459()Lnet/minecraft/class_2561;
        named getDescription Lnet/minecraft/resource/ResourcePackProfile;getDescription()Lnet/minecraft/text/Text;
      • getInformationText

        public Text getInformationText​(boolean enabled)
        Mappings:
        Namespace Name Mixin selector
        official a Lacy;a(Z)Lon;
        intermediary method_14461 Lnet/minecraft/class_3288;method_14461(Z)Lnet/minecraft/class_2561;
        named getInformationText Lnet/minecraft/resource/ResourcePackProfile;getInformationText(Z)Lnet/minecraft/text/Text;
      • getCompatibility

        public ResourcePackCompatibility getCompatibility()
        Mappings:
        Namespace Name Mixin selector
        official c Lacy;c()Lacz;
        intermediary method_14460 Lnet/minecraft/class_3288;method_14460()Lnet/minecraft/class_3281;
        named getCompatibility Lnet/minecraft/resource/ResourcePackProfile;getCompatibility()Lnet/minecraft/resource/ResourcePackCompatibility;
      • createResourcePack

        public ResourcePack createResourcePack()
        Mappings:
        Namespace Name Mixin selector
        official d Lacy;d()Lacn;
        intermediary method_14458 Lnet/minecraft/class_3288;method_14458()Lnet/minecraft/class_3262;
        named createResourcePack Lnet/minecraft/resource/ResourcePackProfile;createResourcePack()Lnet/minecraft/resource/ResourcePack;
      • getName

        public String getName()
        Mappings:
        Namespace Name Mixin selector
        official e Lacy;e()Ljava/lang/String;
        intermediary method_14463 Lnet/minecraft/class_3288;method_14463()Ljava/lang/String;
        named getName Lnet/minecraft/resource/ResourcePackProfile;getName()Ljava/lang/String;
      • isAlwaysEnabled

        public boolean isAlwaysEnabled()
        Mappings:
        Namespace Name Mixin selector
        official f Lacy;f()Z
        intermediary method_14464 Lnet/minecraft/class_3288;method_14464()Z
        named isAlwaysEnabled Lnet/minecraft/resource/ResourcePackProfile;isAlwaysEnabled()Z
      • isPinned

        public boolean isPinned()
        Mappings:
        Namespace Name Mixin selector
        official g Lacy;g()Z
        intermediary method_14465 Lnet/minecraft/class_3288;method_14465()Z
        named isPinned Lnet/minecraft/resource/ResourcePackProfile;isPinned()Z
      • getInitialPosition

        public ResourcePackProfile.InsertionPosition getInitialPosition()
        Mappings:
        Namespace Name Mixin selector
        official h Lacy;h()Lacy$b;
        intermediary method_14466 Lnet/minecraft/class_3288;method_14466()Lnet/minecraft/class_3288$class_3289;
        named getInitialPosition Lnet/minecraft/resource/ResourcePackProfile;getInitialPosition()Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;
      • getSource

        public ResourcePackSource getSource()
        Mappings:
        Namespace Name Mixin selector
        official i Lacy;i()Ladb;
        intermediary method_29483 Lnet/minecraft/class_3288;method_29483()Lnet/minecraft/class_5352;
        named getSource Lnet/minecraft/resource/ResourcePackProfile;getSource()Lnet/minecraft/resource/ResourcePackSource;
      • equals

        public boolean equals​(Object o)
        覆盖:
        equals 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official equals Lacy;equals(Ljava/lang/Object;)Z
        intermediary equals Lnet/minecraft/class_3288;equals(Ljava/lang/Object;)Z
        named equals Lnet/minecraft/resource/ResourcePackProfile;equals(Ljava/lang/Object;)Z
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 Object
        Mappings:
        Namespace Name Mixin selector
        official hashCode Lacy;hashCode()I
        intermediary hashCode Lnet/minecraft/class_3288;hashCode()I
        named hashCode Lnet/minecraft/resource/ResourcePackProfile;hashCode()I
      • close

        public void close()
        指定者:
        close 在接口中 AutoCloseable
        Mappings:
        Namespace Name Mixin selector
        official close Lacy;close()V
        intermediary close Lnet/minecraft/class_3288;close()V
        named close Lnet/minecraft/resource/ResourcePackProfile;close()V