Class AutoPlayerClient
java.lang.Object
com.chiefminingdad.autoplayer.AutoPlayerClient
- All Implemented Interfaces:
net.fabricmc.api.ClientModInitializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BlockManagerstatic final CommandManagerstatic PathManagerstatic Thread -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidsetPathManager(net.minecraft.core.Vec3i endLocation) Creates a new pathManager instance with the end location as, now the world should be loaded.static intsetPathManagerWithCommand(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 callssetPathManager(net.minecraft.core.Vec3i)with that location as the endLocation.
-
Field Details
-
blockManager
-
commandManager
-
pathManager
-
thread
-
-
Constructor Details
-
AutoPlayerClient
public AutoPlayerClient()
-
-
Method Details
-
onInitializeClient
public void onInitializeClient()- Specified by:
onInitializeClientin interfacenet.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 callssetPathManager(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.
-