Mod
EnvironmentDetector (API)
No reviews yet
EnvironmentDetector is a lightweight Fabric API that automatically detects launcher, platform, modpack, loader, and environment information through a simple placeholder and developer API system.
Provides a framework or library for other mods to use.
Fabric is a mod loader for versions 1.14+ of Minecraft, particularly popular for client side and optimization mods.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
EnvironmentDetector API
A lightweight and crash-safe Minecraft environment detection API for Fabric, Quilt and modern modpack launchers.
EnvironmentDetector automatically identifies:
- Launcher
- Modpack instance
- Loader
- Minecraft version
- Special client environments
The API is designed for:
- Mods
- HUDs
- Placeholder systems
- Analytics
- Compatibility layers
- Launcher-aware integrations
✨ Features
Automatic Launcher Detection
EnvironmentDetector can automatically detect:
- Modrinth App
- CurseForge
- GDLauncher
- Prism Launcher
- MultiMC
- ATLauncher
- Feather Client
- NoRisk Client
- Lunar Client
- Badlion Client
- Official Minecraft Launcher
No manual configuration required.
🧩 Compatibility
Supported Minecraft Versions
Primary Support
- Minecraft
1.21.x(1.21,1.21.1,1.21.2, etc.) - Optimized and tested for modern Minecraft environments.
The project currently targets:
Java 21- modern Fabric Loader versions
- current launcher ecosystems
Backwards Compatibility
EnvironmentDetector mainly relies on:
- Fabric Loader APIs
- filesystem checks
- runtime analysis
The API does NOT deeply modify Minecraft internals and avoids complex mixins for detection logic.
Because of this, the project can also be ported to older versions like:
1.20.11.19.4
with only minimal adjustments:
- lowering the Java target from
21→17 - adjusting
fabric.mod.json - rebuilding the project
Supported Mod Loaders
Fabric
✅ Full native support (Main target platform)
Quilt
✅ Full native support
Quilt supports Fabric mods natively and EnvironmentDetector includes dedicated Quilt detection logic.
This means logs will correctly show:
Loader=Quilt
instead of Fabric when running on Quilt.
NeoForge / Forge
⚡ Not natively supported
EnvironmentDetector is primarily a Fabric mod.
However, the mod works correctly through compatibility layers such as:
- Sinytra Connector
- Fabric Connector implementations
When used through these layers, the API can even detect that the environment is running on:
- Forge
- NeoForge
Technical Requirements
Java Version
- Java
21required for Minecraft1.20.5+
Fabric Loader
- Fabric Loader
0.16.0+
Compatibility Overview
| Feature | Status |
|---|---|
| Minecraft 1.21.x | ✅ Optimized & Tested |
| Fabric | ✅ Native Support |
| Quilt | ✅ Native Support |
| NeoForge / Forge | ⚡ Via Connector Only |
| Dedicated Server | ✅ Fully Compatible |
| Java 21 | 🛠️ Required |
🧠 High Precision Detection System
Unlike many other mods, EnvironmentDetector does NOT rely on process names only.
Instead, it uses:
- file-based validation
- recursive directory scanning
- launcher metadata verification
- classpath analysis
- runtime environment analysis
This avoids false positives and duplicate detections.
Example:
Other mods may simply scan for "Modrinth" running on the system.
EnvironmentDetector instead uses a more advanced runtime-based detection system.
1. JVM Argument Scan
The API scans Minecraft startup arguments (the same information normally visible in logs and runtime launch parameters).
If the word:
modrinth
appears inside JVM arguments, launch paths or runtime parameters, the launcher is automatically detected as:
Modrinth App
This works reliably because the Modrinth launcher usually injects Modrinth-related paths or identifiers into the Minecraft runtime environment.
2. Manual Configuration Fallback
On first startup, EnvironmentDetector automatically creates:
config/environmentdetector.properties
Inside this file, custom values can be manually configured:
manual_pack_name=Your Modpack Name
manual_launcher_name=Your Custom Launcher
If these values are set, they always take highest priority and override automatic detection.
This allows:
- custom launchers
- private modpacks
- unsupported launchers
- development environments
- portable instances
to work reliably with the API.
🔍 Detection Logic
The API scans multiple directory levels to identify launcher structures.
Supported Markers
Modrinth App
- Runtime JVM analysis
- launch argument analysis
- optional metadata validation
CurseForge
CURSEFORGE_INSTANCE_NAMEminecraftinstance.json.curseclient
Feather Client
featherfeather-core.feather
NoRisk Client
norisk.config- Mod ID:
norisk
GDLauncher
gd-launcher.jsongdlauncher.json
Prism Launcher / MultiMC
prism.configprism.jsonmultimc.cfg
ATLauncher
instance.jsonatlauncher.json
Lunar / Badlion
Classpath keyword analysis:
lunarbadlion
Official Launcher
launcher_profiles.json
📜 Standardized Logging
After initialization, EnvironmentDetector outputs a unified log entry.
Example:
[EnvironmentDetector] Launcher=Modrinth App, Instance=Ultra Survival, NoRisk=false, Loader=Fabric, Version=1.21.1
Other examples:
[EnvironmentDetector] Launcher=CurseForge, Instance=BetterMC, NoRisk=false, Loader=Fabric, Version=1.21.1
[EnvironmentDetector] Launcher=NoRisk Client, Instance=Unknown Pack, NoRisk=true, Loader=Fabric, Version=1.21.1
Fallback:
[EnvironmentDetector] Unknown Environment
⚡ Performance
- Single startup scan
- Cached results
- Thread-safe internals
- Minimal overhead
- No background scanning
EnvironmentDetector runs once during startup and afterwards only serves cached data.
🛠 Developer Integration
Gradle Setup
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
Dependency
dependencies {
modImplementation "maven.modrinth:environmentdetector-api:VERSION"
}
Replace VERSION with the latest release.
💻 Usage Example
public String getLauncherName() {
if (FabricLoader.getInstance().isModLoaded("environmentdetector")) {
return de.felixfgf.environmentdetector.EnvironmentDetectorAPI
.getEnvironment()
.launcher();
}
return "Vanilla";
}
⚠ Best Practices
Always use optional integration
Do NOT hard depend on EnvironmentDetector.
Always check:
FabricLoader.getInstance().isModLoaded("environmentdetector")
before using the API.
🚫 Common Mistakes
Wrong package
Correct package:
de.felixfgf.environmentdetector
NOT:
de.felixfgf.environmentdetector.api
Missing modLoaded check
Direct API access without checking if the mod exists can crash other mods.
Using placeholders every frame
Do not resolve placeholders every render frame. Cache values when opening menus or HUDs.
🐛 Bug Reports & Support
Found a bug or detection issue?
Please report:
- launcher used
- Minecraft version
- loader
- latest.log
- detected environment output
Join the Discord server for support, bug reports and API discussions:
🎯 Goals
- Maximum environment transparency
- Reliable launcher identification
- High compatibility
- Zero-config setup
- Crash-safe integration
- Lightweight architecture
EnvironmentDetector is built to become the standard environment API for modern Minecraft launcher ecosystems 🚀
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources
![Join DC [middle small]](https://cdn.modrinth.com/data/cached_images/bfca91ef533789255f946e0c21aa5a6f4925876f_0.webp)