Fix API javadoc errors and make API only javadoc export

This commit is contained in:
Brady
2018-12-03 19:37:54 -06:00
parent 7ba987e7f7
commit 5c83ee2648
10 changed files with 59 additions and 24 deletions

View File

@@ -98,6 +98,11 @@ mixin {
add sourceSets.launch, 'mixins.baritone.refmap.json' add sourceSets.launch, 'mixins.baritone.refmap.json'
} }
javadoc {
source = sourceSets.api.allJava
classpath = sourceSets.api.compileClasspath
}
jar { jar {
from sourceSets.launch.output, sourceSets.api.output from sourceSets.launch.output, sourceSets.api.output
preserveFileTimestamps = false preserveFileTimestamps = false

View File

@@ -37,12 +37,12 @@ public interface ICachedRegion extends IBlockTypeAccess {
boolean isCached(int blockX, int blockZ); boolean isCached(int blockX, int blockZ);
/** /**
* The X coordinate of this region * @return The X coordinate of this region
*/ */
int getX(); int getX();
/** /**
* The Z coordinate of this region * @return The Z coordinate of this region
*/ */
int getZ(); int getZ();
} }

View File

@@ -27,12 +27,12 @@ public interface IWorldData {
* Returns the cached world for this world. A cached world is a simplified format * Returns the cached world for this world. A cached world is a simplified format
* of a regular world, intended for use on multiplayer servers where chunks are not * of a regular world, intended for use on multiplayer servers where chunks are not
* traditionally stored to disk, allowing for long distance pathing with minimal disk usage. * traditionally stored to disk, allowing for long distance pathing with minimal disk usage.
*
* @return The cached world for this world
*/ */
ICachedWorld getCachedWorld(); ICachedWorld getCachedWorld();
/** /**
* Returns the waypoint collection for this world.
*
* @return The waypoint collection for this world * @return The waypoint collection for this world
*/ */
IWaypointCollection getWaypoints(); IWaypointCollection getWaypoints();

View File

@@ -41,6 +41,8 @@ public interface IGameEventListener {
* Run once per game tick before screen input is handled. * Run once per game tick before screen input is handled.
* *
* @see Minecraft#runTick() * @see Minecraft#runTick()
*
* @param event The event
*/ */
void onTick(TickEvent event); void onTick(TickEvent event);
@@ -48,13 +50,13 @@ public interface IGameEventListener {
* Run once per game tick from before and after the player rotation is sent to the server. * Run once per game tick from before and after the player rotation is sent to the server.
* *
* @see EntityPlayerSP#onUpdate() * @see EntityPlayerSP#onUpdate()
*
* @param event The event
*/ */
void onPlayerUpdate(PlayerUpdateEvent event); void onPlayerUpdate(PlayerUpdateEvent event);
/** /**
* Run once per game tick from before keybinds are processed. * Run once per game tick from before keybinds are processed.
*
* @see Minecraft#processKeyBinds()
*/ */
void onProcessKeyBinds(); void onProcessKeyBinds();
@@ -62,6 +64,8 @@ public interface IGameEventListener {
* Runs whenever the client player sends a message to the server. * Runs whenever the client player sends a message to the server.
* *
* @see EntityPlayerSP#sendChatMessage(String) * @see EntityPlayerSP#sendChatMessage(String)
*
* @param event The event
*/ */
void onSendChatMessage(ChatEvent event); void onSendChatMessage(ChatEvent event);
@@ -69,6 +73,8 @@ public interface IGameEventListener {
* Runs before and after whenever a chunk is either loaded, unloaded, or populated. * Runs before and after whenever a chunk is either loaded, unloaded, or populated.
* *
* @see WorldClient#doPreChunk(int, int, boolean) * @see WorldClient#doPreChunk(int, int, boolean)
*
* @param event The event
*/ */
void onChunkEvent(ChunkEvent event); void onChunkEvent(ChunkEvent event);
@@ -77,7 +83,7 @@ public interface IGameEventListener {
* <p> * <p>
* <b>Note:</b> {@link GameSettings#anaglyph} has been removed in Minecraft 1.13 * <b>Note:</b> {@link GameSettings#anaglyph} has been removed in Minecraft 1.13
* *
* @see EntityRenderer#renderWorldPass(int, float, long) * @param event The event
*/ */
void onRenderPass(RenderEvent event); void onRenderPass(RenderEvent event);
@@ -85,24 +91,28 @@ public interface IGameEventListener {
* Runs before and after whenever a new world is loaded * Runs before and after whenever a new world is loaded
* *
* @see Minecraft#loadWorld(WorldClient, String) * @see Minecraft#loadWorld(WorldClient, String)
*
* @param event The event
*/ */
void onWorldEvent(WorldEvent event); void onWorldEvent(WorldEvent event);
/** /**
* Runs before a outbound packet is sent * Runs before a outbound packet is sent
* *
* @see NetworkManager#dispatchPacket(Packet, GenericFutureListener[])
* @see Packet * @see Packet
* @see GenericFutureListener * @see GenericFutureListener
*
* @param event The event
*/ */
void onSendPacket(PacketEvent event); void onSendPacket(PacketEvent event);
/** /**
* Runs before an inbound packet is processed * Runs before an inbound packet is processed
* *
* @see NetworkManager#dispatchPacket(Packet, GenericFutureListener[])
* @see Packet * @see Packet
* @see GenericFutureListener * @see GenericFutureListener
*
* @param event The event
*/ */
void onReceivePacket(PacketEvent event); void onReceivePacket(PacketEvent event);
@@ -111,30 +121,29 @@ public interface IGameEventListener {
* and before and after the player jumps. * and before and after the player jumps.
* *
* @see Entity#moveRelative(float, float, float, float) * @see Entity#moveRelative(float, float, float, float)
* @see EntityLivingBase#jump() *
* @param event The event
*/ */
void onPlayerRotationMove(RotationMoveEvent event); void onPlayerRotationMove(RotationMoveEvent event);
/** /**
* Called when the local player interacts with a block, whether it is breaking or opening/placing. * Called when the local player interacts with a block, whether it is breaking or opening/placing.
* *
* @see Minecraft#clickMouse() * @param event The event
* @see Minecraft#rightClickMouse()
*/ */
void onBlockInteract(BlockInteractEvent event); void onBlockInteract(BlockInteractEvent event);
/** /**
* Called when the local player dies, as indicated by the creation of the {@link GuiGameOver} screen. * Called when the local player dies, as indicated by the creation of the {@link GuiGameOver} screen.
* *
* @see GuiGameOver(ITextComponent) * @see GuiGameOver
* @see ITextComponent
*/ */
void onPlayerDeath(); void onPlayerDeath();
/** /**
* When the pathfinder's state changes * When the pathfinder's state changes
* *
* @param event * @param event The event
*/ */
void onPathEvent(PathEvent event); void onPathEvent(PathEvent event);
} }

View File

@@ -51,6 +51,8 @@ public interface IPath {
/** /**
* This path is actually going to be executed in the world. Do whatever additional processing is required. * This path is actually going to be executed in the world. Do whatever additional processing is required.
* (as opposed to Path objects that are just constructed every frame for rendering) * (as opposed to Path objects that are just constructed every frame for rendering)
*
* @return The result of path post processing
*/ */
default IPath postProcess() { default IPath postProcess() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
@@ -121,6 +123,7 @@ public interface IPath {
* <p> * <p>
* The argument is supposed to be a BlockStateInterface LOL LOL LOL LOL LOL * The argument is supposed to be a BlockStateInterface LOL LOL LOL LOL LOL
* *
* @param bsi The block state lookup, highly cursed
* @return The result of this cut-off operation * @return The result of this cut-off operation
*/ */
default IPath cutoffAtLoadedChunks(Object bsi) { default IPath cutoffAtLoadedChunks(Object bsi) {
@@ -131,6 +134,7 @@ public interface IPath {
* Cuts off this path using the min length and cutoff factor settings, and returns the resulting path. * Cuts off this path using the min length and cutoff factor settings, and returns the resulting path.
* Default implementation just returns this path, without the intended functionality. * Default implementation just returns this path, without the intended functionality.
* *
* @param destination The end goal of this path
* @return The result of this cut-off operation * @return The result of this cut-off operation
* @see Settings#pathCutoffMinimumLength * @see Settings#pathCutoffMinimumLength
* @see Settings#pathCutoffFactor * @see Settings#pathCutoffFactor

View File

@@ -34,6 +34,9 @@ public interface IPathFinder {
/** /**
* Calculate the path in full. Will take several seconds. * Calculate the path in full. Will take several seconds.
* *
* @param primaryTimeout If a path is found, the path finder will stop after this amount of time
* @param failureTimeout If a path isn't found, the path finder will continue for this amount of time
*
* @return The final path * @return The final path
*/ */
PathCalculationResult calculate(long primaryTimeout, long failureTimeout); PathCalculationResult calculate(long primaryTimeout, long failureTimeout);

View File

@@ -30,6 +30,10 @@ public interface Goal {
* Returns whether or not the specified position * Returns whether or not the specified position
* meets the requirement for this goal based. * meets the requirement for this goal based.
* *
* @param x The goal X position
* @param y The goal Y position
* @param z The goal Z position
*
* @return Whether or not it satisfies this goal * @return Whether or not it satisfies this goal
*/ */
boolean isInGoal(int x, int y, int z); boolean isInGoal(int x, int y, int z);
@@ -37,6 +41,10 @@ public interface Goal {
/** /**
* Estimate the number of ticks it will take to get to the goal * Estimate the number of ticks it will take to get to the goal
* *
* @param x The goal X position
* @param y The goal Y position
* @param z The goal Z position
*
* @return The estimate number of ticks to satisfy the goal * @return The estimate number of ticks to satisfy the goal
*/ */
double heuristic(int x, int y, int z); double heuristic(int x, int y, int z);

View File

@@ -34,7 +34,9 @@ public final class RayTraceUtils {
* any entity collisions can be ignored, because this method will not recognize if an * any entity collisions can be ignored, because this method will not recognize if an
* entity is in the way or not. The local player's block reach distance will be used. * entity is in the way or not. The local player's block reach distance will be used.
* *
* @param entity The entity representing the raytrace source
* @param rotation The rotation to raytrace towards * @param rotation The rotation to raytrace towards
* @param blockReachDistance The block reach distance of the entity
* @return The calculated raytrace result * @return The calculated raytrace result
*/ */
public static RayTraceResult rayTraceTowards(Entity entity, Rotation rotation, double blockReachDistance) { public static RayTraceResult rayTraceTowards(Entity entity, Rotation rotation, double blockReachDistance) {

View File

@@ -136,6 +136,7 @@ public final class RotationUtils {
* *
* @param entity The viewing entity * @param entity The viewing entity
* @param pos The target block position * @param pos The target block position
* @param blockReachDistance The block reach distance of the entity
* @return The optional rotation * @return The optional rotation
*/ */
public static Optional<Rotation> reachable(EntityPlayerSP entity, BlockPos pos, double blockReachDistance) { public static Optional<Rotation> reachable(EntityPlayerSP entity, BlockPos pos, double blockReachDistance) {
@@ -181,6 +182,7 @@ public final class RotationUtils {
* @param entity The viewing entity * @param entity The viewing entity
* @param pos The target block position * @param pos The target block position
* @param offsetPos The position of the block with the offset applied. * @param offsetPos The position of the block with the offset applied.
* @param blockReachDistance The block reach distance of the entity
* @return The optional rotation * @return The optional rotation
*/ */
public static Optional<Rotation> reachableOffset(Entity entity, BlockPos pos, Vec3d offsetPos, double blockReachDistance) { public static Optional<Rotation> reachableOffset(Entity entity, BlockPos pos, Vec3d offsetPos, double blockReachDistance) {
@@ -204,6 +206,7 @@ public final class RotationUtils {
* *
* @param entity The viewing entity * @param entity The viewing entity
* @param pos The target block position * @param pos The target block position
* @param blockReachDistance The block reach distance of the entity
* @return The optional rotation * @return The optional rotation
*/ */
public static Optional<Rotation> reachableCenter(Entity entity, BlockPos pos, double blockReachDistance) { public static Optional<Rotation> reachableCenter(Entity entity, BlockPos pos, double blockReachDistance) {

View File

@@ -36,6 +36,7 @@ public final class VecUtils {
/** /**
* Calculates the center of the block at the specified position's bounding box * Calculates the center of the block at the specified position's bounding box
* *
* @param world The world that the block is in, used to provide the bounding box
* @param pos The block position * @param pos The block position
* @return The center of the block's bounding box * @return The center of the block's bounding box
* @see #getBlockPosCenter(BlockPos) * @see #getBlockPosCenter(BlockPos)