Package net.minecraftforge.debug.world
Class LoginPacketSplitTest.InMemoryResourcePack
java.lang.Object
net.minecraftforge.debug.world.LoginPacketSplitTest.InMemoryResourcePack
- All Implemented Interfaces:
AutoCloseable
,PackResources
,IForgePackResources
- Enclosing class:
- LoginPacketSplitTest
public static final class LoginPacketSplitTest.InMemoryResourcePack
extends Object
implements PackResources
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.PackResources
PackResources.ResourceOutput
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceLocation,
Supplier<byte[]>> private final String
Fields inherited from interface net.minecraft.server.packs.PackResources
METADATA_EXTENSION, PACK_META
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static byte[]
fromJson
(com.google.gson.JsonElement json) <T> T
getMetadataSection
(MetadataSectionSerializer<T> section) getNamespaces
(PackType type) @Nullable IoSupplier<InputStream>
getResource
(PackType type, ResourceLocation loc) @Nullable IoSupplier<InputStream>
getRootResource
(String... loc) void
listResources
(PackType type, String namespace, String startingPath, PackResources.ResourceOutput out) private <T> @Nullable IoSupplier<InputStream>
openResource
(Map<T, Supplier<byte[]>> map, T key) packId()
void
putData
(ResourceLocation path, com.google.gson.JsonObject json) void
putData
(ResourceLocation path, Supplier<byte[]> data) void
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgePackResources
getChildren, isHidden
Methods inherited from interface net.minecraft.server.packs.PackResources
isBuiltin
-
Field Details
-
data
-
root
-
id
-
-
Constructor Details
-
InMemoryResourcePack
-
-
Method Details
-
getRootResource
- Specified by:
getRootResource
in interfacePackResources
-
getResource
- Specified by:
getResource
in interfacePackResources
-
openResource
@Nullable private <T> @Nullable IoSupplier<InputStream> openResource(Map<T, Supplier<byte[]>> map, @NotNull T key) -
listResources
public void listResources(PackType type, String namespace, String startingPath, PackResources.ResourceOutput out) - Specified by:
listResources
in interfacePackResources
-
getNamespaces
- Specified by:
getNamespaces
in interfacePackResources
-
getMetadataSection
- Specified by:
getMetadataSection
in interfacePackResources
- Throws:
IOException
-
packId
- Specified by:
packId
in interfacePackResources
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfacePackResources
-
putRoot
-
putRoot
-
putData
-
putData
-
fromJson
public static byte[] fromJson(com.google.gson.JsonElement json)
-