Class BuiltInPackSource
java.lang.Object
net.minecraft.server.packs.repository.BuiltInPackSource
- All Implemented Interfaces:
RepositorySource
- Direct Known Subclasses:
ClientPackSource
,ServerPacksSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KnownPack
private static final org.slf4j.Logger
private final ResourceLocation
private final PackType
private final DirectoryValidator
static final String
private final VanillaPackResources
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltInPackSource
(PackType pPackType, VanillaPackResources pVanillaPack, ResourceLocation pPackDir, DirectoryValidator pValidator) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Pack
createBuiltinPack
(String pId, Pack.ResourcesSupplier pResources, Component pTitle) protected abstract Pack
createVanillaPack
(PackResources pResources) protected void
discoverPacksInPath
(Path pDirectoryPath, BiConsumer<String, Function<String, Pack>> pPackGetter) static Pack.ResourcesSupplier
fixedResources
(PackResources pResources) static Pack.ResourcesSupplier
fromName
(Function<PackLocationInfo, PackResources> onName) protected abstract Component
getPackTitle
(String pId) private void
listBundledPacks
(Consumer<Pack> pPackConsumer) void
private static String
protected void
populatePackList
(BiConsumer<String, Function<String, Pack>> pPopulator)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
VANILLA_ID
- See Also:
-
CORE_PACK_INFO
-
packType
-
vanillaPack
-
packDir
-
validator
-
-
Constructor Details
-
BuiltInPackSource
public BuiltInPackSource(PackType pPackType, VanillaPackResources pVanillaPack, ResourceLocation pPackDir, DirectoryValidator pValidator)
-
-
Method Details
-
loadPacks
- Specified by:
loadPacks
in interfaceRepositorySource
-
createVanillaPack
-
getPackTitle
-
getVanillaPack
-
listBundledPacks
-
populatePackList
-
discoverPacksInPath
-
pathToId
-
createBuiltinPack
@Nullable protected abstract Pack createBuiltinPack(String pId, Pack.ResourcesSupplier pResources, Component pTitle) -
fixedResources
-
fromName
-