Skip to content

26.1.2 Instant Pickup Mode

Rifa edited this page Aug 22, 2026 · 1 revision

⚑ Instant Pickup Mode (MC 26.1.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.

Feature Infobox Technical Parameters
System Class net.instantgratification.magnet.mixin.PlayerMixin
Enabling GameRule ig:magnet_instant (Default: false)
Radius GameRule ig:magnet_range (Default: 12, Range: 1..64)
Injection Point @ModifyVariable(method = "aiStep", at = @At("STORE"), ordinal = 0)
Target Variable Player Collection Bounding Box (AABB pickupArea)

πŸ“– Instant Pickup Overview

In Minecraft 26.1.2, Instant Pickup Mode eliminates item travel time by expanding the player's collection bounding box in Player.aiStep(), instantly feeding drops into the player's inventory through vanilla pickup handlers.

+-----------------------------------------------------------------------------------+
|                            VANILLA PLAYER aiStep() TICK                           |
+-----------------------------------------------------------------------------------+
                                          |
                                          v
                +---------------------------------------------------+
                |   PlayerMixin.ig_magnet$expandPickupArea()        |
                |   pickupArea = pickupArea.inflate(range);         |
                +---------------------------------------------------+
                                          |
                                          v
+-----------------------------------------------------------------------------------+
|               VANILLA ItemEntity.playerTouch(Player) EXECUTION                    |
|   - Native Inventory Stacking & Partial Pickups                                   |
|   - Vanilla Pickup Animation & Sound Events (item.pickup / entity.experience_orb) |
|   - Native Statistics & Advancements Triggers                                     |
|   - Full Container Overflow & Remaining Item Retention                            |
+-----------------------------------------------------------------------------------+

🧩 Architectural Implementation (PlayerMixin.java)

@ModifyVariable(
        method = "aiStep",
        at = @At(value = "STORE"),
        ordinal = 0
)
private AABB ig_magnet$expandPickupArea(AABB pickupArea) {
    Player player = (Player) (Object) this;
    Level level = player.level();
    
    if (!level.isClientSide()) {
        if (ModGameRules.getBoolean(level, ModGameRules.MAGNET_INSTANT)) {
            int range = ModGameRules.getInt(level, ModGameRules.MAGNET_RANGE);
            if (range > 0) {
                return pickupArea.inflate(range);
            }
        }
    }
    
    return pickupArea;
}

βš™οΈ Relevant Configuration & GameRules

GameRule Type Default Description
ig:magnet_instant Boolean false If true, items immediately teleport to the player instead of flying.
ig:magnet_range Integer 12 Radius in blocks for the expanded pickup area.
ig:magnet_enabled Boolean true Master toggle for the entire mod.

πŸ”— Related Wiki Documentation

Clone this wiki locally