AtomicStryker's Magic Yarn

AtomicStryker's Magic Yarn

81.3k Downloads

Introduces a new Item to Minecraft, the Ball of Magic Yarn.
It is crafted by surrounding a Compass with Wool (any kind).

NOTE:
In Multiplayer, you can't craft this Item. You use a button instead, by default "J". Button can be customized in auto-created file under mods/MagicYarn.txt


The Item serves as pathfinding Tool and to keep track of your movements. In other words, you should never again get lost exploring the Nether or some complex cave system, and without leaving a ridiculous amount of Torches to mark your trail.


Usage once crafted [button instead mouse in multiplayer]:

[Nothing set]
Rightclick: Specifies your current location as point of origin.

[Origin set, no path]
Rightclick: Sets your current location as waypoint. Computes the shortest (Manhattan) walkable path to the origin and displays it.

[Path visible]
Rightclick: Makes the path disappear. If you stand in a path while right clicking, any path after the point you stand in will be cut off and deleted (for circling around).

You can only see the Path at all times while holding the Magic Yarn.

[Path invisible]
Rightclick, short: Sets your current location as waypoint. Computes the shortest (Manhattan) walkable path to the LAST WAYPOINT and displays it.
Rightclick, >0.5s: Sets your current location as waypoint. Computes the shortest (Manhattan) walkable path to the ORIGIN and displays it. If that fails, it falls back to the LAST WAYPOINT.

[At any point]
Rightclick, >2.5s: Resets the Magic Yarn to the [Nothing set] status.




Technical Information for the interested:

Features implementation of A* pathing Algorithm.
A* is heuristic (that means its very efficient in open spaces) and my implementation has a binary heap sorting method aswell, which apparently is the best method for this task.

Pathfinding is done in a seperate java Thread, so this uses Multicore CPUs and should never lock up your Minecraft.