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
No known key found for this signature in database
GPG Key ID: 73A788379A197567
10 changed files with 59 additions and 24 deletions

View File

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

View File

@ -37,12 +37,12 @@ public interface ICachedRegion extends IBlockTypeAccess {
boolean isCached(int blockX, int blockZ);
/**
* The X coordinate of this region
* @return The X coordinate of this region
*/
int getX();
/**
* The Z coordinate of this region
* @return The Z coordinate of this region
*/
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
* 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.
*
* @return The cached world for this world
*/
ICachedWorld getCachedWorld();
/**
* Returns the waypoint collection for this world.
*
* @return The waypoint collection for this world
*/
IWaypointCollection getWaypoints();

View File

@ -41,6 +41,8 @@ public interface IGameEventListener {
* Run once per game tick before screen input is handled.
*
* @see Minecraft#runTick()
*
* @param event The 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.
*
* @see EntityPlayerSP#onUpdate()
*
* @param event The event
*/
void onPlayerUpdate(PlayerUpdateEvent event);
/**
* Run once per game tick from before keybinds are processed.
*
* @see Minecraft#processKeyBinds()
*/
void onProcessKeyBinds();
@ -62,6 +64,8 @@ public interface IGameEventListener {
* Runs whenever the client player sends a message to the server.
*
* @see EntityPlayerSP#sendChatMessage(String)
*
* @param event The 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.
*
* @see WorldClient#doPreChunk(int, int, boolean)
*
* @param event The event
*/
void onChunkEvent(ChunkEvent event);
@ -77,7 +83,7 @@ public interface IGameEventListener {
* <p>
* <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);
@ -85,24 +91,28 @@ public interface IGameEventListener {
* Runs before and after whenever a new world is loaded
*
* @see Minecraft#loadWorld(WorldClient, String)
*
* @param event The event
*/
void onWorldEvent(WorldEvent event);
/**
* Runs before a outbound packet is sent
*
* @see NetworkManager#dispatchPacket(Packet, GenericFutureListener[])
* @see Packet
* @see GenericFutureListener
*
* @param event The event
*/
void onSendPacket(PacketEvent event);
/**
* Runs before an inbound packet is processed
*
* @see NetworkManager#dispatchPacket(Packet, GenericFutureListener[])
* @see Packet
* @see GenericFutureListener
*
* @param event The event
*/
void onReceivePacket(PacketEvent event);
@ -111,30 +121,29 @@ public interface IGameEventListener {
* and before and after the player jumps.
*
* @see Entity#moveRelative(float, float, float, float)
* @see EntityLivingBase#jump()
*
* @param event The event
*/
void onPlayerRotationMove(RotationMoveEvent event);
/**
* Called when the local player interacts with a block, whether it is breaking or opening/placing.
*
* @see Minecraft#clickMouse()
* @see Minecraft#rightClickMouse()
* @param event The event
*/
void onBlockInteract(BlockInteractEvent event);
/**
* Called when the local player dies, as indicated by the creation of the {@link GuiGameOver} screen.
*
* @see GuiGameOver(ITextComponent)
* @see ITextComponent
* @see GuiGameOver
*/
void onPlayerDeath();
/**
* When the pathfinder's state changes
*
* @param event
* @param event The 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.
* (as opposed to Path objects that are just constructed every frame for rendering)
*
* @return The result of path post processing
*/
default IPath postProcess() {
throw new UnsupportedOperationException();
@ -121,6 +123,7 @@ public interface IPath {
* <p>
* 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
*/
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.
* 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
* @see Settings#pathCutoffMinimumLength
* @see Settings#pathCutoffFactor

View File

@ -34,6 +34,9 @@ public interface IPathFinder {
/**
* 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
*/
PathCalculationResult calculate(long primaryTimeout, long failureTimeout);

View File

@ -30,6 +30,10 @@ public interface Goal {
* Returns whether or not the specified position
* 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
*/
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
*
* @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
*/
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
* entity is in the way or not. The local player's block reach distance will be used.
*
* @param rotation The rotation to raytrace towards
* @param entity The entity representing the raytrace source
* @param rotation The rotation to raytrace towards
* @param blockReachDistance The block reach distance of the entity
* @return The calculated raytrace result
*/
public static RayTraceResult rayTraceTowards(Entity entity, Rotation rotation, double blockReachDistance) {

View File

@ -134,8 +134,9 @@ public final class RotationUtils {
* side that is reachable. The return type will be {@link Optional#empty()} if the entity is
* unable to reach any of the sides of the block.
*
* @param entity The viewing entity
* @param pos The target block position
* @param entity The viewing entity
* @param pos The target block position
* @param blockReachDistance The block reach distance of the entity
* @return The optional rotation
*/
public static Optional<Rotation> reachable(EntityPlayerSP entity, BlockPos pos, double blockReachDistance) {
@ -178,9 +179,10 @@ public final class RotationUtils {
* the given offsetted position. The return type will be {@link Optional#empty()} if
* the entity is unable to reach the block with the offset applied.
*
* @param entity The viewing entity
* @param pos The target block position
* @param offsetPos The position of the block with the offset applied.
* @param entity The viewing entity
* @param pos The target block position
* @param offsetPos The position of the block with the offset applied.
* @param blockReachDistance The block reach distance of the entity
* @return The optional rotation
*/
public static Optional<Rotation> reachableOffset(Entity entity, BlockPos pos, Vec3d offsetPos, double blockReachDistance) {
@ -202,8 +204,9 @@ public final class RotationUtils {
* Determines if the specified entity is able to reach the specified block where it is
* looking at the direct center of it's hitbox.
*
* @param entity The viewing entity
* @param pos The target block position
* @param entity The viewing entity
* @param pos The target block position
* @param blockReachDistance The block reach distance of the entity
* @return The optional rotation
*/
public static Optional<Rotation> reachableCenter(Entity entity, BlockPos pos, double blockReachDistance) {

View File

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