
AtomicStryker's Magic Yarn
What is this mod?
AtomicStryker's Magic Yarn adds a unique item to Minecraft - the Magic Ball of Yarn. This tool becomes your faithful companion in exploring dangerous places, helping you never get lost even in the most confusing caves or the Nether.
How to craft the Magic Ball of Yarn
To craft it, you need to surround a compass with any type of wool. However, in multiplayer, crafting through a workbench is not available - instead, use a special button (default "J"). Button settings can be changed in the mods/MagicYarn.txt file, which is created automatically.
How to use the Magic Ball of Yarn
Getting started
When you have no set points:
- Right click: sets your current position as the origin point
Route planning
After setting the origin point:
- Right click: creates a waypoint and calculates the shortest walkable path to the origin point
Route management
When the path is displayed:
- Right click: hides the path
- If you're standing on the path when clicking, the route is cut off from your current position (convenient for creating circular routes)
Additional functions
When the path is not visible:
- Short right click: creates a waypoint and builds a path to the LAST waypoint
- Long right click (>0.5 seconds): creates a waypoint and builds a path to the ORIGIN point
Reset settings
At any time:
- Long right click (>2.5 seconds): completely resets the Magic Ball of Yarn to its initial state
Important features
- The path is displayed only when you're holding the Magic Ball of Yarn
- The algorithm uses Manhattan distance to calculate the shortest route
- You'll no longer waste torches to mark paths in caves
- Perfect for exploring the Nether and complex underground systems
Technical details
The mod implements the A* pathfinding algorithm, which is highly efficient in open spaces. For optimization, it uses the binary heap method - one of the best approaches for such tasks. Pathfinding is performed in a separate Java thread, which ensures:
- Utilization of multi-core processors
- No Minecraft freezes
- Smooth operation even with complex calculations