nineMinecraft is a joke site.
nineMinecraft is in no way affiliated with Modrinth or 9minecraft. (And frankly, who wants to be affiliated with the latter?)
MS Extras

MS Extras

Mod

This mod is an Pathfinding API for general usage

Client TechnologyUtility

2 downloads
0 followers

This mod is disigned as an API for scripting mods like Minescript.

How to use it

( Minescript Example )

from minescript import echo

# Import the API
PathfinderAPI = JavaClass("gamchu.pathfinder.api.PathfinderAPI")
GoalBlock = JavaClass("gamchu.pathfinder.goals.GoalBlock")

# Get pathfinder instance
pathfinder = PathfinderAPI.getProvider().getPathfinder()

# Create a goal and find a smoothed path
goal = GoalBlock(100, 64, 200)
future = pathfinder.findSmoothedPathAsync(goal)

# Wait for result
result = future.get()

if result.getSuccess():
    echo(f"Path found with {result.getPathSize()} waypoints")
else:
    echo("No path found")

Checking Pathfinding Status

# Check if pathfinding is currently running
if pathfinder.isPathing():
    echo("Pathfinding in progress...")
else:
    echo("No pathfinding running")

Cancelling Pathfinding

# Cancel the current pathfinding operation
if pathfinder.isPathing():
    pathfinder.cancel()
    echo("Pathfinding cancelled")

Regular vs. Smoothed Paths

Compare the difference:

# Regular A* path (all waypoints)
regularFuture = pathfinder.findPathAsync(goal)
regularResult = regularFuture.get()

# Smoothed path (optimized waypoints)
smoothedFuture = pathfinder.findSmoothedPathAsync(goal)
smoothedResult = smoothedFuture.get()

echo(f"Regular: {regularResult.getPathSize()} waypoints")
echo(f"Smoothed: {smoothedResult.getPathSize()} waypoints")
echo(f"Reduction: {100 - (smoothedResult.getPathSize() * 100 / regularResult.getPathSize()):.1f}%")

Project members

gamchu.

Member


Technical information

License
ARR
Client side
required
Server side
unsupported
Project ID