Skip to content

26.2 Configuration

Rifa edited this page Aug 22, 2026 · 1 revision

🎨 YACL Configuration GUI & ModMenu (MC 26.2)

πŸ“Œ Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.

Configuration Infobox Details
Config File Path config/ig_magnet.json
GUI Library YetAnotherConfigLib v3 (dev.isxander:yet-another-config-lib)
ModMenu Entrypoint net.instantgratification.magnet.config.ModMenuIntegration
GUI Screen Helper net.instantgratification.magnet.config.YaclScreenHelper
Classloading Safety Isolated via GuiHelper.getOptionalFactory

πŸ“– Configuration System Architecture

Magnet, Let me get that! provides an optional client-side configuration GUI powered by YetAnotherConfigLib v3 (YACL) and accessible through ModMenu.

To ensure that dedicated servers never crash when loading client GUI classes, the GUI factory is resolved through reflection-safe isolated classloading:

public class ModMenuIntegration implements ModMenuApi {
    @Override
    public ConfigScreenFactory<?> getModConfigScreenFactory() {
        return GuiHelper.getOptionalFactory(
                "ig_magnet",
                "net.instantgratification.magnet.config.YaclScreenHelper",
                "createScreen"
        );
    }
}

⚠️ Configuration Precedence Warning

⚠️ Important Notice:
Changes made in the ModMenu GUI or config/ig_magnet.json only affect the baseline default values for NEW worlds.
To modify the settings of an active, already-created world, use the in-game GameRules Reference via /gamerule or the vanilla GameRules edit screen.


πŸ—‚οΈ Configuration Categories & Options

YACL Configuration Screen ("Magnet, Let me get that! Configuration")
  β”œβ”€β”€ General Settings
  β”‚     β”œβ”€β”€ Magnet Enabled (Default: true)
  β”‚     β”œβ”€β”€ Magnet Range (Default: 12, Range: 1..64)
  β”‚     β”œβ”€β”€ Instant Pickup (Default: false)
  β”‚     └── Magnet Noclip (Default: true)
  β”œβ”€β”€ Speeds & Pull Heuristics
  β”‚     β”œβ”€β”€ Item Speed (Default: 80%, Range: 1..1000)
  β”‚     └── Item Acceleration (Default: 10%, Range: 1..1000)
  β”œβ”€β”€ Line of Sight (LOS)
  β”‚     β”œβ”€β”€ Line of Sight Only (Default: true)
  β”‚     β”œβ”€β”€ Keep Moving if Unseen (Default: true)
  β”‚     β”œβ”€β”€ Blocked by Transparent (Default: false)
  β”‚     β”œβ”€β”€ Blocked by Flora (Default: false)
  β”‚     └── Blocked by Block Entities (Default: false)
  └── Visuals & Performance
        β”œβ”€β”€ Attract XP Orbs (Default: true)
        β”œβ”€β”€ Magnet Particles (Default: true)
        β”œβ”€β”€ Particle Count (Default: 1, Range: 0..100)
        └── Max Particle Sources (Default: 5, Range: 0..100)

πŸ“„ Raw JSON Structure (config/ig_magnet.json)

{
  "configVersion": 1,
  "enabled": true,
  "range": 12,
  "noClip": true,
  "affectsXp": true,
  "particles": true,
  "particleCount": 1,
  "maxParticleSources": 5,
  "speed": 80,
  "acceleration": 10,
  "instant": false,
  "losOnly": true,
  "keepMovingIfUnseen": true,
  "blockedByTransparent": false,
  "blockedByFlora": false,
  "blockedByBlockEntities": false
}

πŸ”— Related Wiki Documentation

Clone this wiki locally