All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.lukebemish.dynamicassetgenerator.impl.mixin.MultiPackResourceManagerMixin Maven / Gradle / Ivy

The newest version!
package dev.lukebemish.dynamicassetgenerator.impl.mixin;

import dev.lukebemish.dynamicassetgenerator.impl.ResourceFinder;
import net.minecraft.server.packs.PackResources;
import net.minecraft.server.packs.PackType;
import net.minecraft.server.packs.resources.MultiPackResourceManager;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;

import java.util.List;

@Mixin(MultiPackResourceManager.class)
public class MultiPackResourceManagerMixin {
    @ModifyVariable(method = "", at = @At(value = "HEAD"), argsOnly = true)
    private static List dynamic_asset_generator$loadPacks(List packs, PackType type, List packsAgain) {
        ResourceFinder.INSTANCES[type.ordinal()] = packs::stream;
        return packs;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy