use of net.minecraft.resources.FolderPackFinder in project NetherEx by LogicTechCorp.
the class NetherExBiomes method registerBiomePacks.
public static void registerBiomePacks(MinecraftServer server) {
ResourcePackList<ResourcePackInfo> resourcePacks = server.getResourcePacks();
ModFile modFile = ModList.get().getModFileById(NetherEx.MOD_ID).getFile();
if (NetherExConfig.NETHER.biomePackUseGlobalBiomePacks.get()) {
Path globalBiomePacksPath = FMLPaths.getOrCreateGameRelativePath(FMLPaths.CONFIGDIR.get().resolve(Paths.get("netherex", "biome_packs")), "netherex biome packs");
resourcePacks.addPackFinder(new FolderPackFinder(globalBiomePacksPath.toFile()));
}
if (NetherExConfig.NETHER.biomePackUseDefaultBiomePack.get()) {
resourcePacks.addPackFinder(new BuiltinDataPack(modFile, "default_nether_biome_pack"));
}
if (NetherExConfig.NETHER.biomePackUseNetherExBiomePack.get()) {
resourcePacks.addPackFinder(new BuiltinDataPack(modFile, "netherex_nether_biome_pack"));
}
if (NetherExConfig.NETHER.biomePackUseBOPBiomePack.get()) {
resourcePacks.addPackFinder(new BuiltinDataPack(modFile, "bop_nether_biome_pack"));
}
if (NetherExConfig.NETHER.biomePackUseENBBiomePack.get()) {
resourcePacks.addPackFinder(new BuiltinDataPack(modFile, "enb_nether_biome_pack"));
}
if (NetherExConfig.NETHER.biomePackUseBYGBiomePack.get()) {
resourcePacks.addPackFinder(new BuiltinDataPack(modFile, "byg_nether_biome_pack"));
}
}
Aggregations