Class DynamicPack
java.lang.Object
com.portingdeadmods.portingdeadlibs.api.resources.DynamicPack
- All Implemented Interfaces:
AutoCloseable, net.minecraft.server.packs.PackResources, net.neoforged.neoforge.common.extensions.IPackResourcesExtension
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.PackResources
net.minecraft.server.packs.PackResources.ResourceOutput -
Field Summary
Fields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META -
Constructor Summary
ConstructorsConstructorDescriptionDynamicPack(net.minecraft.resources.Identifier packId, net.minecraft.server.packs.PackType packType) DynamicPack(net.minecraft.resources.Identifier packId, net.minecraft.server.packs.PackType packType, net.minecraft.server.packs.repository.PackSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<T> @Nullable TgetMetadataSection(net.minecraft.server.packs.metadata.MetadataSectionType<T> metadataSectionType) getNamespaces(net.minecraft.server.packs.PackType packType) @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream> getResource(@NotNull net.minecraft.server.packs.PackType packType, @NotNull net.minecraft.resources.Identifier resourceLocation) @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream> getRootResource(String @NotNull ... elements) voidlistResources(@NotNull net.minecraft.server.packs.PackType packType, @NotNull String namespace, @NotNull String path, @NotNull net.minecraft.server.packs.PackResources.ResourceOutput resourceOutput) @NotNull net.minecraft.server.packs.PackLocationInfolocation()@NotNull StringpackId()put(net.minecraft.resources.Identifier location, byte[] bytes) put(net.minecraft.resources.Identifier location, com.google.gson.JsonElement json) put(net.minecraft.resources.Identifier location, net.minecraft.server.packs.resources.IoSupplier<InputStream> stream) net.minecraft.server.packs.repository.RepositorySourcetoSource(net.minecraft.server.packs.repository.Pack.Position position) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IPackResourcesExtension
isHiddenMethods inherited from interface net.minecraft.server.packs.PackResources
knownPackInfo
-
Constructor Details
-
DynamicPack
public DynamicPack(net.minecraft.resources.Identifier packId, net.minecraft.server.packs.PackType packType) -
DynamicPack
public DynamicPack(net.minecraft.resources.Identifier packId, net.minecraft.server.packs.PackType packType, net.minecraft.server.packs.repository.PackSource source)
-
-
Method Details
-
put
public DynamicPack put(net.minecraft.resources.Identifier location, net.minecraft.server.packs.resources.IoSupplier<InputStream> stream) -
put
-
put
-
put
public DynamicPack put(net.minecraft.resources.Identifier location, com.google.gson.JsonElement json) -
getRootResource
@Nullable public @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream> getRootResource(String @NotNull ... elements) - Specified by:
getRootResourcein interfacenet.minecraft.server.packs.PackResources
-
getResource
@Nullable public @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream> getResource(@NotNull @NotNull net.minecraft.server.packs.PackType packType, @NotNull @NotNull net.minecraft.resources.Identifier resourceLocation) - Specified by:
getResourcein interfacenet.minecraft.server.packs.PackResources
-
listResources
public void listResources(@NotNull @NotNull net.minecraft.server.packs.PackType packType, @NotNull @NotNull String namespace, @NotNull @NotNull String path, @NotNull @NotNull net.minecraft.server.packs.PackResources.ResourceOutput resourceOutput) - Specified by:
listResourcesin interfacenet.minecraft.server.packs.PackResources
-
getNamespaces
-
getMetadataSection
public <T> @Nullable T getMetadataSection(net.minecraft.server.packs.metadata.MetadataSectionType<T> metadataSectionType) throws IOException - Specified by:
getMetadataSectionin interfacenet.minecraft.server.packs.PackResources- Throws:
IOException
-
location
@NotNull public @NotNull net.minecraft.server.packs.PackLocationInfo location()- Specified by:
locationin interfacenet.minecraft.server.packs.PackResources
-
packId
- Specified by:
packIdin interfacenet.minecraft.server.packs.PackResources
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacenet.minecraft.server.packs.PackResources
-
toSource
public net.minecraft.server.packs.repository.RepositorySource toSource(net.minecraft.server.packs.repository.Pack.Position position)
-