mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 20:22:28 +00:00
Fix merged mod resource pack not returning all resources with the same name when asked. Closes #9194
This commit is contained in:
3 files changed
+46
No files matched your search
@@ -5,7 +5,12 @@
|
||||
|
||||
package net.minecraftforge.common.extensions;
|
||||
|
||||
import java.util.Collection;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import net.minecraft.server.packs.PackResources;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraft.server.packs.resources.ResourceManager;
|
||||
import net.minecraftforge.resource.DelegatingPackResources;
|
||||
|
||||
public interface IForgePackResources
|
||||
{
|
||||
@@ -20,4 +25,14 @@ public interface IForgePackResources
|
||||
default void initForNamespace(final String nameSpace) {}
|
||||
|
||||
default void init(final PackType packType) {}
|
||||
|
||||
/**
|
||||
* Gets a collection of {@code PackResource} instances nested inside this pack.
|
||||
* Used to merge several packs into one entry in the resource pack selection UI without
|
||||
* losing the ability for each pack to return a resource in
|
||||
* {@link ResourceManager#getResourceStack(ResourceLocation)}
|
||||
* @return Collection of nested {@code PackResource}, or null if this pack has no children
|
||||
* @see DelegatingPackResources
|
||||
*/
|
||||
@Nullable default Collection<PackResources> getChildren() { return null; }
|
||||
}
|
||||
Reference in new issue
Block a user