Skip to content

Commit 6a15c10

Browse files
committed
Updated comments
1 parent 68405d1 commit 6a15c10

11 files changed

+530
-482
lines changed

src/MolangData/Animations.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3+
/**Molang data for animations */
34
export namespace Animations {
4-
/** */
5-
export const Variables: Data[] = [{ id: "attack_time" }];
6-
/** */
7-
export const Contexts: Data[] = [
8-
{ id: "is_first_person" },
9-
{ id: "item_slot" }
10-
];
11-
/** */
12-
export const Temps: Data[] = [];
13-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [{ id: "attack_time" }];
7+
/**The list of specific contexts usable for this specific type*/
8+
export const Contexts: Data[] = [{ id: "is_first_person" }, { id: "item_slot" }];
9+
/**The list of usable temp variables for this specific type*/
10+
export const Temps: Data[] = [];
11+
}
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3+
/**Molang data for animations controllers*/
34
export namespace AnimationsControllers {
4-
/** */
5-
export const Variables: Data[] = [{ id: "attack_time" }];
6-
/** */
7-
export const Contexts: Data[] = [
8-
{ id: "is_first_person" },
9-
{ id: "item_slot" }
10-
];
11-
/** */
12-
export const Temps: Data[] = [];
13-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [{ id: "attack_time" }];
7+
/**The list of specific contexts usable for this specific type*/
8+
export const Contexts: Data[] = [{ id: "is_first_person" }, { id: "item_slot" }];
9+
/**The list of usable temp variables for this specific type*/
10+
export const Temps: Data[] = [];
11+
}

src/MolangData/Blocks.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3-
/** */
3+
/**Molang data for blocks*/
44
export namespace Blocks {
5-
/** */
6-
export const Variables: Data[] = [];
7-
/** */
8-
export const Contexts: Data[] = [];
9-
/** */
10-
export const Temps: Data[] = [];
11-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [];
7+
/**The list of specific contexts usable for this specific type*/
8+
export const Contexts: Data[] = [];
9+
/**The list of usable temp variables for this specific type*/
10+
export const Temps: Data[] = [];
11+
}

src/MolangData/Data.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
import { Types } from 'bc-minecraft-bedrock-types';
1+
import { Types } from "bc-minecraft-bedrock-types";
22

3-
export type Data = Types.Identifiable & Types.Documentated;
3+
/**The base type of a molang data item*/
4+
export type Data = Types.Identifiable & Types.Documentated;

src/MolangData/Entities.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3+
/**Molang data for entities*/
34
export namespace Entities {
4-
/** */
5-
export const Variables: Data[] = [{ id: "attack_time" }];
6-
/** */
7-
export const Contexts: Data[] = [
8-
{ id: "is_first_person" },
9-
{ id: "item_slot" }
10-
];
11-
/** */
12-
export const Temps: Data[] = [];
13-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [{ id: "attack_time" }];
7+
/**The list of specific contexts usable for this specific type*/
8+
export const Contexts: Data[] = [{ id: "is_first_person" }, { id: "item_slot" }];
9+
/**The list of usable temp variables for this specific type*/
10+
export const Temps: Data[] = [];
11+
}

src/MolangData/FeaturesRules.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3-
/** */
3+
/**Molang data for feature rules*/
44
export namespace FeaturesRules {
5-
/** */
6-
export const Variables: Data[] = [{ id: "originx" }, { id: "originy" }, { id: "originz" }, { id: "worldx" }, { id: "worldy" }, { id: "worldz" }];
7-
/** */
8-
export const Contexts: Data[] = [];
9-
/** */
10-
export const Temps: Data[] = [];
11-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [{ id: "originx" }, { id: "originy" }, { id: "originz" }, { id: "worldx" }, { id: "worldy" }, { id: "worldz" }];
7+
/**The list of specific contexts usable for this specific type*/
8+
export const Contexts: Data[] = [];
9+
/**The list of usable temp variables for this specific type*/
10+
export const Temps: Data[] = [];
11+
}

src/MolangData/General.ts

Lines changed: 445 additions & 390 deletions
Large diffs are not rendered by default.

src/MolangData/Items.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { Data } from "./Data";
22

3-
/** */
3+
/**Molang data for items*/
44
export namespace Items {
5-
/** */
5+
/**The list of usable variables for this specific type*/
66
export const Variables: Data[] = [];
7-
/** */
7+
/**The list of specific contexts usable for this specific type*/
88
export const Contexts: Data[] = [{ id: "is_first_person" }, { id: "item_slot" }];
9-
/** */
9+
/**The list of usable temp variables for this specific type*/
1010
export const Temps: Data[] = [];
1111
}

src/MolangData/Particles.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3-
/** */
3+
/**Molang data for particles*/
44
export namespace Particles {
5-
/** */
6-
export const Variables: Data[] = [
7-
{ documentation: "The total lifetime of the emitter in seconds", id: "emitter_lifetime" },
8-
{ documentation: "The age of the emitter in seconds", id: "emitter_age" },
9-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_1" },
10-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_2" },
11-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_3" },
12-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_4" },
13-
{ documentation: "The total lifetime of the particle in seconds", id: "particle_lifetime" },
14-
{ documentation: "The age of the particle in seconds", id: "particle_age" },
15-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_1" },
16-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_2" },
17-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_3" },
18-
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_4" },
19-
{ documentation: "The scale of the entity that is using the particle", id: "entity_scale" },
20-
];
21-
/** */
22-
export const Contexts: Data[] = [];
23-
/** */
24-
export const Temps: Data[] = [];
25-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [
7+
{ documentation: "The total lifetime of the emitter in seconds", id: "emitter_lifetime" },
8+
{ documentation: "The age of the emitter in seconds", id: "emitter_age" },
9+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_1" },
10+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_2" },
11+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_3" },
12+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the emitter", id: "emitter_random_4" },
13+
{ documentation: "The total lifetime of the particle in seconds", id: "particle_lifetime" },
14+
{ documentation: "The age of the particle in seconds", id: "particle_age" },
15+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_1" },
16+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_2" },
17+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_3" },
18+
{ documentation: "A random value between 0 - 1 that gets sets at spawn of the particle", id: "particle_random_4" },
19+
{ documentation: "The scale of the entity that is using the particle", id: "entity_scale" },
20+
];
21+
/**The list of specific contexts usable for this specific type*/
22+
export const Contexts: Data[] = [];
23+
/**The list of usable temp variables for this specific type*/
24+
export const Temps: Data[] = [];
25+
}

src/MolangData/RenderControllers.ts

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { Data } from './Data';
1+
import { Data } from "./Data";
22

3+
/**Molang data for render controllers*/
34
export namespace RenderControllers {
4-
/** */
5-
export const Variables: Data[] = [{ id: "attack_time" }];
6-
/** */
7-
export const Contexts: Data[] = [
8-
{ id: "is_first_person" },
9-
{ id: "item_slot" }
10-
];
11-
/** */
12-
export const Temps: Data[] = [];
13-
}
5+
/**The list of usable variables for this specific type*/
6+
export const Variables: Data[] = [{ id: "attack_time" }];
7+
/**The list of specific contexts usable for this specific type*/
8+
export const Contexts: Data[] = [{ id: "is_first_person" }, { id: "item_slot" }];
9+
/**The list of usable temp variables for this specific type*/
10+
export const Temps: Data[] = [];
11+
}

src/MolangData/include.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export { Animations, AnimationsControllers, Blocks, Entities, FeaturesRules, Ite
1313

1414
/**Returns either an object with molang data or undefined
1515
* @param id The identification of molang data to return
16-
* @returns */
16+
* @returns A namespace carrying the data or undefined if nothing was found*/
1717
export function get(
1818
id: "animation" | "animation_controller" | "block" | "entity" | "feature" | "item" | "particle" | "render_controller"
1919
): typeof Blocks | undefined {

0 commit comments

Comments
 (0)