Class AutoPlayerClient

java.lang.Object
com.chiefminingdad.autoplayer.AutoPlayerClient
All Implemented Interfaces:
net.fabricmc.api.ClientModInitializer

public class AutoPlayerClient extends Object implements net.fabricmc.api.ClientModInitializer
  • Field Details

    • blockManager

      public static final BlockManager blockManager
    • commandManager

      public static final CommandManager commandManager
    • pathManager

      public static PathManager pathManager
    • thread

      public static Thread thread
  • Constructor Details

    • AutoPlayerClient

      public AutoPlayerClient()
  • Method Details

    • onInitializeClient

      public void onInitializeClient()
      Specified by:
      onInitializeClient in interface net.fabricmc.api.ClientModInitializer
    • setPathManager

      public static void setPathManager(net.minecraft.core.Vec3i endLocation)
      Creates a new pathManager instance with the end location as, now the world should be loaded. Then it creates the Thread that runs the algorithm and starts it off.
      Parameters:
      endLocation - The location the algorithm will pathfind to.
    • setPathManagerWithCommand

      public static int setPathManagerWithCommand(com.mojang.brigadier.context.CommandContext<net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource> commandContext)
      Gets from the context of the command the Coordinates the User wants to pathfind and calls setPathManager(net.minecraft.core.Vec3i) with that location as the endLocation.
      Parameters:
      commandContext - The context passed on from the command move.
      Returns:
      Whether the code worked.