From afeea22abe2a2469c0a31ced3576ea387e059ee5 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Mon, 27 Apr 2020 16:22:28 -0400 Subject: [PATCH] Improve Documentation --- src/main/resources/scriptcraft/minecraft/core.ts | 4 ++-- src/main/resources/scriptcraft/minecraft/index.ts | 10 ++++++++++ src/main/resources/scriptcraft/minecraft/item.ts | 2 +- src/main/resources/scriptcraft/minecraft/world.ts | 2 +- src/main/resources/scriptcraft/typedoc.json | 2 ++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/resources/scriptcraft/minecraft/core.ts b/src/main/resources/scriptcraft/minecraft/core.ts index 46d32fe..7c76e01 100644 --- a/src/main/resources/scriptcraft/minecraft/core.ts +++ b/src/main/resources/scriptcraft/minecraft/core.ts @@ -158,7 +158,7 @@ export class Identifier { /** * Check Equality * @param id Other Value - * @returns True If Equal + * @returns TRUE If Equal, Otherwise FALSE */ equals(id: Identifier): boolean { return id.getNamespace() === this.getNamespace() && id.getPath() === this.getPath(); @@ -271,7 +271,7 @@ export class Pos { /** * Check Equality * @param id Other Value - * @returns True If Equal + * @returns TRUE If Equal, Otherwise FALSE */ equals(pos: Pos): boolean { return pos.getX() === this.getX() && pos.getY() === this.getY() && pos.getZ() === this.getZ(); diff --git a/src/main/resources/scriptcraft/minecraft/index.ts b/src/main/resources/scriptcraft/minecraft/index.ts index d57192f..9bf931e 100644 --- a/src/main/resources/scriptcraft/minecraft/index.ts +++ b/src/main/resources/scriptcraft/minecraft/index.ts @@ -1,3 +1,13 @@ +/** + * API Entry-Point + * + * Import With: + * ```typescript + * import { ... } from 'minecraft'; + * ``` + * @packageDocumentation + */ + export { Identifier, ActionResult, Hand, Pos, Direction, DirectionUtil } from './core'; export { CustomBlock, CustomBlockEntity, CustomBlockWithEntity, BlockSettings, BlockState } from './block'; export { ItemStack, ItemSettings, CustomItem, BlockItem } from './item'; diff --git a/src/main/resources/scriptcraft/minecraft/item.ts b/src/main/resources/scriptcraft/minecraft/item.ts index 34243a6..0e222d7 100644 --- a/src/main/resources/scriptcraft/minecraft/item.ts +++ b/src/main/resources/scriptcraft/minecraft/item.ts @@ -88,7 +88,7 @@ export class ItemStack { /** * Is Item Damageable - * @returns True If Item Is Damageable + * @returns TRUE If Item Is Damageable, Otherwise FALSE */ isDamageable(): boolean { return useBridge('ItemStack.isDamageable', this.javaObject) as boolean; diff --git a/src/main/resources/scriptcraft/minecraft/world.ts b/src/main/resources/scriptcraft/minecraft/world.ts index 4d5341c..5f875a4 100644 --- a/src/main/resources/scriptcraft/minecraft/world.ts +++ b/src/main/resources/scriptcraft/minecraft/world.ts @@ -22,7 +22,7 @@ export class World { * Set Block State * @param pos Position * @param state Block State - * @returns True If Successful + * @returns TRUE If Successful, Otherwise FALSE */ setBlockState(pos: Pos, state: BlockState): boolean { return useBridge('World.setBlockState', this.javaObject, pos.getX(), pos.getY(), pos.getZ(), state.javaObject) as boolean; diff --git a/src/main/resources/scriptcraft/typedoc.json b/src/main/resources/scriptcraft/typedoc.json index 2102109..5fb920f 100644 --- a/src/main/resources/scriptcraft/typedoc.json +++ b/src/main/resources/scriptcraft/typedoc.json @@ -1,7 +1,9 @@ { + "name": "ScriptCraft API", "mode": "modules", "readme": "none", "excludeNotExported": true, "excludePrivate": true, + "excludeExternals": true, "stripInternal": true } \ No newline at end of file