Package net.minecraft.resource
Class ResourcePackProfile
java.lang.Object
net.minecraft.resource.ResourcePackProfile
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 ResourcePackProvider
s.
Closing the profile doesn't have any effect.
- Mappings:
Namespace Name official akg
intermediary net/minecraft/class_3288
named net/minecraft/resource/ResourcePackProfile
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static final record
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final ResourcePackCompatibility
private final Text
private final Text
private static final Logger
private final String
private final ResourcePackProfile.PackFactory
private final boolean
private final ResourcePackProfile.InsertionPosition
private final FeatureSet
private final ResourcePackSource
-
Constructor Summary
ModifierConstructorDescriptionprivate
ResourcePackProfile
(String name, boolean alwaysEnabled, ResourcePackProfile.PackFactory packFactory, Text displayName, ResourcePackProfile.Metadata metadata, ResourcePackCompatibility compatibility, ResourcePackProfile.InsertionPosition position, boolean pinned, ResourcePackSource source) -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable ResourcePackProfile
create
(String name, Text displayName, boolean alwaysEnabled, ResourcePackProfile.PackFactory packFactory, ResourceType type, ResourcePackProfile.InsertionPosition position, ResourcePackSource source) boolean
getInformationText
(boolean enabled) getName()
int
hashCode()
boolean
boolean
isPinned()
loadMetadata
(String name, ResourcePackProfile.PackFactory packFactory) static ResourcePackProfile
of
(String name, Text displayName, boolean alwaysEnabled, ResourcePackProfile.PackFactory packFactory, ResourcePackProfile.Metadata metadata, ResourceType type, ResourcePackProfile.InsertionPosition position, boolean pinned, ResourcePackSource source) Creates a resource pack profile from the given parameters.
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Lakg;a:Lorg/slf4j/Logger;
intermediary field_14279
Lnet/minecraft/class_3288;field_14279:Lorg/slf4j/Logger;
named LOGGER
Lnet/minecraft/resource/ResourcePackProfile;LOGGER:Lorg/slf4j/Logger;
-
name
- Mappings:
Namespace Name Mixin selector official b
Lakg;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
- Mappings:
Namespace Name Mixin selector official c
Lakg;c:Lakg$c;
intermediary field_14273
Lnet/minecraft/class_3288;field_14273:Lnet/minecraft/class_3288$class_7680;
named packFactory
Lnet/minecraft/resource/ResourcePackProfile;packFactory:Lnet/minecraft/resource/ResourcePackProfile$PackFactory;
-
displayName
- Mappings:
Namespace Name Mixin selector official d
Lakg;d:Lsw;
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
- Mappings:
Namespace Name Mixin selector official e
Lakg;e:Lsw;
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
- Mappings:
Namespace Name Mixin selector official f
Lakg;f:Lakh;
intermediary field_14278
Lnet/minecraft/class_3288;field_14278:Lnet/minecraft/class_3281;
named compatibility
Lnet/minecraft/resource/ResourcePackProfile;compatibility:Lnet/minecraft/resource/ResourcePackCompatibility;
-
requestedFeatures
- Mappings:
Namespace Name Mixin selector official g
Lakg;g:Lcaw;
intermediary field_40046
Lnet/minecraft/class_3288;field_40046:Lnet/minecraft/class_7699;
named requestedFeatures
Lnet/minecraft/resource/ResourcePackProfile;requestedFeatures:Lnet/minecraft/resource/featuretoggle/FeatureSet;
-
position
- Mappings:
Namespace Name Mixin selector official h
Lakg;h:Lakg$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 i
Lakg;i: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 j
Lakg;j:Z
intermediary field_14270
Lnet/minecraft/class_3288;field_14270:Z
named pinned
Lnet/minecraft/resource/ResourcePackProfile;pinned:Z
-
source
- Mappings:
Namespace Name Mixin selector official k
Lakg;k:Lakj;
intermediary field_25346
Lnet/minecraft/class_3288;field_25346:Lnet/minecraft/class_5352;
named source
Lnet/minecraft/resource/ResourcePackProfile;source:Lnet/minecraft/resource/ResourcePackSource;
-
-
Constructor Details
-
ResourcePackProfile
private ResourcePackProfile(String name, boolean alwaysEnabled, ResourcePackProfile.PackFactory packFactory, Text displayName, ResourcePackProfile.Metadata metadata, ResourcePackCompatibility compatibility, ResourcePackProfile.InsertionPosition position, boolean pinned, ResourcePackSource source) - Mappings:
Namespace Name Mixin selector official <init>
Lakg;<init>(Ljava/lang/String;ZLakg$c;Lsw;Lakg$a;Lakh;Lakg$b;ZLakj;)V
intermediary <init>
Lnet/minecraft/class_3288;<init>(Ljava/lang/String;ZLnet/minecraft/class_3288$class_7680;Lnet/minecraft/class_2561;Lnet/minecraft/class_3288$class_7679;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;ZLnet/minecraft/resource/ResourcePackProfile$PackFactory;Lnet/minecraft/text/Text;Lnet/minecraft/resource/ResourcePackProfile$Metadata;Lnet/minecraft/resource/ResourcePackCompatibility;Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;ZLnet/minecraft/resource/ResourcePackSource;)V
-
-
Method Details
-
create
@Nullable public static @Nullable ResourcePackProfile create(String name, Text displayName, boolean alwaysEnabled, ResourcePackProfile.PackFactory packFactory, ResourceType type, ResourcePackProfile.InsertionPosition position, ResourcePackSource source) - Mappings:
Namespace Name Mixin selector official a
Lakg;a(Ljava/lang/String;Lsw;ZLakg$c;Lajm;Lakg$b;Lakj;)Lakg;
intermediary method_45275
Lnet/minecraft/class_3288;method_45275(Ljava/lang/String;Lnet/minecraft/class_2561;ZLnet/minecraft/class_3288$class_7680;Lnet/minecraft/class_3264;Lnet/minecraft/class_3288$class_3289;Lnet/minecraft/class_5352;)Lnet/minecraft/class_3288;
named create
Lnet/minecraft/resource/ResourcePackProfile;create(Ljava/lang/String;Lnet/minecraft/text/Text;ZLnet/minecraft/resource/ResourcePackProfile$PackFactory;Lnet/minecraft/resource/ResourceType;Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;Lnet/minecraft/resource/ResourcePackSource;)Lnet/minecraft/resource/ResourcePackProfile;
-
of
public static ResourcePackProfile of(String name, Text displayName, boolean alwaysEnabled, ResourcePackProfile.PackFactory packFactory, ResourcePackProfile.Metadata metadata, ResourceType type, ResourcePackProfile.InsertionPosition position, boolean pinned, ResourcePackSource source) 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 returnsnull
.- Returns:
- the created profile, or
null
if missing metadata - Mappings:
Namespace Name Mixin selector official a
Lakg;a(Ljava/lang/String;Lsw;ZLakg$c;Lakg$a;Lajm;Lakg$b;ZLakj;)Lakg;
intermediary method_14456
Lnet/minecraft/class_3288;method_14456(Ljava/lang/String;Lnet/minecraft/class_2561;ZLnet/minecraft/class_3288$class_7680;Lnet/minecraft/class_3288$class_7679;Lnet/minecraft/class_3264;Lnet/minecraft/class_3288$class_3289;ZLnet/minecraft/class_5352;)Lnet/minecraft/class_3288;
named of
Lnet/minecraft/resource/ResourcePackProfile;of(Ljava/lang/String;Lnet/minecraft/text/Text;ZLnet/minecraft/resource/ResourcePackProfile$PackFactory;Lnet/minecraft/resource/ResourcePackProfile$Metadata;Lnet/minecraft/resource/ResourceType;Lnet/minecraft/resource/ResourcePackProfile$InsertionPosition;ZLnet/minecraft/resource/ResourcePackSource;)Lnet/minecraft/resource/ResourcePackProfile;
-
loadMetadata
@Nullable public static @Nullable ResourcePackProfile.Metadata loadMetadata(String name, ResourcePackProfile.PackFactory packFactory) - Mappings:
Namespace Name Mixin selector official a
Lakg;a(Ljava/lang/String;Lakg$c;)Lakg$a;
intermediary method_45274
Lnet/minecraft/class_3288;method_45274(Ljava/lang/String;Lnet/minecraft/class_3288$class_7680;)Lnet/minecraft/class_3288$class_7679;
named loadMetadata
Lnet/minecraft/resource/ResourcePackProfile;loadMetadata(Ljava/lang/String;Lnet/minecraft/resource/ResourcePackProfile$PackFactory;)Lnet/minecraft/resource/ResourcePackProfile$Metadata;
-
getDisplayName
- Mappings:
Namespace Name Mixin selector official a
Lakg;a()Lsw;
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
- Mappings:
Namespace Name Mixin selector official b
Lakg;b()Lsw;
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
- Mappings:
Namespace Name Mixin selector official a
Lakg;a(Z)Lsw;
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
- Mappings:
Namespace Name Mixin selector official c
Lakg;c()Lakh;
intermediary method_14460
Lnet/minecraft/class_3288;method_14460()Lnet/minecraft/class_3281;
named getCompatibility
Lnet/minecraft/resource/ResourcePackProfile;getCompatibility()Lnet/minecraft/resource/ResourcePackCompatibility;
-
getRequestedFeatures
- Mappings:
Namespace Name Mixin selector official d
Lakg;d()Lcaw;
intermediary method_45276
Lnet/minecraft/class_3288;method_45276()Lnet/minecraft/class_7699;
named getRequestedFeatures
Lnet/minecraft/resource/ResourcePackProfile;getRequestedFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet;
-
createResourcePack
- Mappings:
Namespace Name Mixin selector official e
Lakg;e()Lajl;
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
- Mappings:
Namespace Name Mixin selector official f
Lakg;f()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 g
Lakg;g()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 h
Lakg;h()Z
intermediary method_14465
Lnet/minecraft/class_3288;method_14465()Z
named isPinned
Lnet/minecraft/resource/ResourcePackProfile;isPinned()Z
-
getInitialPosition
- Mappings:
Namespace Name Mixin selector official i
Lakg;i()Lakg$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
- Mappings:
Namespace Name Mixin selector official j
Lakg;j()Lakj;
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
-
hashCode
public int hashCode()
-