public class ResourcePackProfile extends Object implements AutoCloseable
Modifier and Type | Class and Description |
---|---|
static interface |
ResourcePackProfile.Factory |
static class |
ResourcePackProfile.InsertionPosition |
Modifier and Type | Field and Description |
---|---|
private boolean |
alwaysEnabled |
private static PackResourceMetadata |
BROKEN_PACK_META |
private ResourcePackCompatibility |
compatibility |
private Text |
description |
private Text |
displayName |
private static Logger |
LOGGER |
private String |
name |
private Supplier<ResourcePack> |
packGetter |
private boolean |
pinned |
private ResourcePackProfile.InsertionPosition |
position |
private ResourcePackSource |
source |
Constructor and Description |
---|
ResourcePackProfile(String name,
boolean alwaysEnabled,
Supplier<ResourcePack> packFactory,
ResourcePack pack,
PackResourceMetadata metadata,
ResourcePackProfile.InsertionPosition direction,
ResourcePackSource source) |
ResourcePackProfile(String name,
boolean alwaysEnabled,
Supplier<ResourcePack> packFactory,
Text displayName,
Text description,
ResourcePackCompatibility compatibility,
ResourcePackProfile.InsertionPosition direction,
boolean pinned,
ResourcePackSource source) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
ResourcePack |
createResourcePack() |
boolean |
equals(Object o) |
ResourcePackCompatibility |
getCompatibility() |
Text |
getDescription() |
Text |
getDisplayName() |
Text |
getInformationText(boolean enabled) |
ResourcePackProfile.InsertionPosition |
getInitialPosition() |
String |
getName() |
ResourcePackSource |
getSource() |
int |
hashCode() |
boolean |
isAlwaysEnabled() |
boolean |
isPinned() |
static ResourcePackProfile |
of(String name,
boolean alwaysEnabled,
Supplier<ResourcePack> packFactory,
ResourcePackProfile.Factory containerFactory,
ResourcePackProfile.InsertionPosition insertionPosition,
ResourcePackSource resourcePackSource) |
private static final Logger LOGGER
private static final PackResourceMetadata BROKEN_PACK_META
private final String name
private final Supplier<ResourcePack> packGetter
private final Text displayName
private final Text description
private final ResourcePackCompatibility compatibility
private final ResourcePackProfile.InsertionPosition position
private final boolean alwaysEnabled
private final boolean pinned
private final ResourcePackSource source
public ResourcePackProfile(String name, boolean alwaysEnabled, Supplier<ResourcePack> packFactory, Text displayName, Text description, ResourcePackCompatibility compatibility, ResourcePackProfile.InsertionPosition direction, boolean pinned, ResourcePackSource source)
public ResourcePackProfile(String name, boolean alwaysEnabled, Supplier<ResourcePack> packFactory, ResourcePack pack, PackResourceMetadata metadata, ResourcePackProfile.InsertionPosition direction, ResourcePackSource source)
@Nullable public static ResourcePackProfile of(String name, boolean alwaysEnabled, Supplier<ResourcePack> packFactory, ResourcePackProfile.Factory containerFactory, ResourcePackProfile.InsertionPosition insertionPosition, ResourcePackSource resourcePackSource)
@Environment(value=CLIENT) public Text getDisplayName()
@Environment(value=CLIENT) public Text getDescription()
public Text getInformationText(boolean enabled)
public ResourcePackCompatibility getCompatibility()
public ResourcePack createResourcePack()
public String getName()
public boolean isAlwaysEnabled()
public boolean isPinned()
public ResourcePackProfile.InsertionPosition getInitialPosition()
@Environment(value=CLIENT) public ResourcePackSource getSource()
public void close()
close
in interface AutoCloseable