-
Notifications
You must be signed in to change notification settings - Fork 0
26.1.2 Architecture and Mixins
Rifa edited this page Aug 22, 2026
·
1 revision
π 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.
| Architecture Infobox | Technical Parameters |
|---|---|
| Root Package | net.instantgratification.magnet |
| Mixin Configuration | src/main/resources/magnet.mixins.json |
| Access Widener | src/main/resources/magnet.accesswidener |
| Compatibility Level | JAVA_25 |
| Total Mixin Classes |
2 (MixinEntity, PlayerMixin) |
net.instantgratification.magnet/
βββ IMagnetEntity.java # Entity interface for NoClip & magnetization flags
βββ MagnetCommand.java # Server command registration (/magnet toggle)
βββ MagnetManager.java # Entity scanning & spatial execution loop
βββ MagnetMod.java # Mod initializer & packet receivers
βββ MagnetModClient.java # Client initializer, Ctrl+M keybind & overlay toast
βββ MagnetMovement.java # Trajectory vector math, lerp velocity & particles
βββ MagnetPlayerState.java # Thread-safe ConcurrentHashMap player toggle storage
βββ MagnetTogglePayload.java # Network packet record & StreamCodec composite
βββ SecondaryVisionCheck.java # Granular block raycasting (Flora, Block Entities, Glass)
βββ config/
β βββ ClothConfigScreenHelper.java # Cloth Config Fabric GUI builder
β βββ MagnetConfig.java # JSON configuration storage & POJO fields
β βββ ModMenuIntegration.java # Reflection-safe ModMenu API entrypoint
βββ mixin/
β βββ MixinEntity.java # Injects NoClip and gravity cancellation into Entity
β βββ PlayerMixin.java # Injects tick execution & instant pickup into Player
βββ registry/
βββ ModGameRules.java # DynamicGameRuleManager registrations
Targets net.minecraft.world.entity.Entity and implements IMagnetEntity.
| Injected Method | Injection Target Point | Action & Behavior |
|---|---|---|
ig_magnet$decrementNoClipTicks |
@Inject(method = "tick", at = @At("HEAD")) |
Decrements noClipTicks countdown by 1 per tick when active. |
ig_magnet$preventPushOut |
@Inject(method = "moveTowardsClosestSpace", at = @At("HEAD"), cancellable = true) |
Cancels vanilla push-out velocity if noClipTicks > 0 on server. |
ig_magnet$forceNoClipOnMove |
@Inject(method = "move", at = @At("HEAD")) |
Caches originalNoPhysics and forces entity.noPhysics = true if noClipTicks > 0. |
ig_magnet$restoreNoPhysicsAfterMove |
@Inject(method = "move", at = @At("RETURN")) |
Restores entity.noPhysics = originalNoPhysics after move completes. |
ig_magnet$conditionalCancelGravity |
@Inject(method = "applyGravity", at = @At("HEAD"), cancellable = true) |
Cancels gravity downward acceleration only when item is inside a solid block. |
Targets net.minecraft.world.entity.player.Player.
| Injected Method | Injection Target Point | Action & Behavior |
|---|---|---|
ig_magnet$tick |
@Inject(method = "tick", at = @At("HEAD")) |
Invokes MagnetManager.tick(player) on the server each game tick. |
ig_magnet$expandPickupArea |
@ModifyVariable(method = "aiStep", at = @At("STORE"), ordinal = 0) |
Expands pickup bounding box (pickupArea.inflate(range)) when ig:magnet_instant is true. |
Magnet, Let me get that! β’ Developed by Dasik (Rifaditya) β’ Licensed under GNU GPLv3
Documentation reflects active repository source code. Features may precede public releases on CurseForge/Modrinth.
- π 26.2 Overview
- Gameplay Mechanics
- Administration & Config
- Technical & Development
- π 26.1.2 Overview
- Gameplay Mechanics
- Administration & Config
- Technical & Development