Skip to content

Commit

Permalink
Update Adapter Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gabber235 committed Jul 12, 2024
1 parent 58c82b9 commit 0d3d446
Show file tree
Hide file tree
Showing 25 changed files with 266 additions and 83 deletions.
5 changes: 5 additions & 0 deletions documentation/docs/adapters/BasicAdapter/BasicAdapter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ first.
| [Console Command Action](./entries/action/console_run_command.mdx) | Run command from console |
| [Delayed Action](./entries/action/delayed_action.mdx) | Delay an action for a certain amount of time |
| [Drop Item Action](./entries/action/drop_item.mdx) | Drop an item at location, or on player |
| [Firework Action](./entries/action/firework.mdx) | Spawns a firework |
| [Give Item Action](./entries/action/give_item.mdx) | Give an item to the player |
| [Group Trigger Action](./entries/action/group_trigger_action.mdx) | Trigger the next entries for everyone in the same group as the player |
| [Message Action](./entries/action/send_message.mdx) | Send a message to a player |
Expand All @@ -43,10 +44,12 @@ first.
| [Cinematic Audience](./entries/audience/cinematic_audience.mdx) | Filters an audience based on if they are in a cinematic |
| [Closest Group Member Path Stream](./entries/audience/closest_group_member_path_stream.mdx) | A Path Stream to the Closest Group Member |
| [Criteria Audience](./entries/audience/criteria_audience.mdx) | An audience filter based on criteria |
| [Cron Audience](./entries/audience/cron_audience.mdx) | Filters an audience based if the time matches a cron expression |
| [Direct Location Path Stream](./entries/audience/direct_location_path_stream.mdx) | A Path Stream to a Direct Location |
| [Game Time Audience](./entries/audience/game_time_audience.mdx) | Filters an audience based on the game time |
| [Group Members Path Stream](./entries/audience/group_members_path_stream.mdx) | A Path Stream to Group Members |
| [Holding Item Audience](./entries/audience/holding_item_audience.mdx) | Filters an audience based on if they are holding a specific item |
| [Item In Inventory Audience](./entries/audience/item_in_inventory_audience.mdx) | Filters an audience based on if they have a specific item in their inventory |
| [Item In Slot Audience](./entries/audience/item_in_slot_audience.mdx) | Filters an audience based on if they have a specific item in a specific slot |
| [Location Objectives Path Stream](./entries/audience/location_objectives_path_stream.mdx) | A Path Stream to tracked Location Objectives |
| [Looping Cinematic Audience](./entries/audience/looping_cinematic_audience.mdx) | Show the audience members a cinematic that loops |
Expand Down Expand Up @@ -99,6 +102,7 @@ first.
| [Craft Item Event](./entries/event/craft_item_event.mdx) | Called when a player crafts an item |
| [Detect Command Ran Event](./entries/event/on_detect_command_ran.mdx) | When a player runs an existing command |
| [Fire Trigger Event](./entries/event/fire_trigger_event.mdx) | Trigger the event when a player runs `/tw fire <entry id/name> [player]` |
| [Fish Event](./entries/event/on_fish.mdx) | When the a player caught a fish or an item |
| [Interact Block Event](./entries/event/on_interact_with_block.mdx) | When the player interacts with a block |
| [Pickup Item Event](./entries/event/on_item_pickup.mdx) | When the player picks up an item |
| [Player Death Event](./entries/event/on_player_death.mdx) | When a player dies |
Expand All @@ -114,6 +118,7 @@ first.

| Name | Description |
| ---- | ----------- |
| [Countdown Fact](./entries/fact/countdown_fact.mdx) | A fact that counts down from the set value |
| [Cron Fact](./entries/fact/cron_fact.mdx) | Saved until a specified date, like (0 0 * * 1 |
| [In Audience Fact](./entries/fact/in_audience_fact.mdx) | The fact that the player is in the audience |
| [In Cinematic Fact](./entries/fact/in_cinematic_fact.mdx) | If the player is in a cinematic |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Firework Action

The `Firework Action Entry` is an action that spawns a firework.

## How could this be used?
This could be used to create a firework that displays a specific effect.


## Fields

<fields.EntryField name='Triggers' required multiple>
</fields.EntryField>
<fields.CriteriaField />
<fields.ModifiersField />
<fields.EntryField name='Location' required>
The location to spawn the firework.
</fields.EntryField>
<fields.EntryField name='Effects' required multiple>
The effects to display on the firework.
</fields.EntryField>
<fields.EntryField name='Power' required>
The power of the firework.
</fields.EntryField>
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ This action can be useful in a variety of situations. You can use it to create v
<fields.EntryField name='Offset Z' required>
The offset from the location on the Z axis.
</fields.EntryField>
<fields.EntryField name='Speed' required>
The speed of the particles. For some particles, this is the \"extra\" data value to control particle behavior.
</fields.EntryField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Cron Audience

The `Cron Audience` entry filters an audience based on if the real-world time matches a cron expression.
This will use the server's time, not the player's time.

## How could this be used?
This could be used for limited time events, like a holiday.


## Fields

<fields.EntryField name='Children' required multiple>
</fields.EntryField>
<fields.EntryField name='Cron' required>
The <Link to="https://www.netiq.com/documentation/cloud-manager-2-5/ncm-reference/data/bexyssf.html">Cron Expression</Link> when the fact expires.
</fields.EntryField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Item In Inventory Audience

The `Item In Inventory Audience` entry filters an audience based on if they have a specific item in their inventory.

## How could this be used?
This could show a boss bar or sidebar based on if a player has a specific item in their inventory.


## Fields

<fields.EntryField name='Children' required multiple>
</fields.EntryField>
<fields.EntryField name='Item' required>
The item to check for in the inventory.
</fields.EntryField>
<fields.EntryField name='Inverted' required>
</fields.EntryField>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ This can be used to bridge the gap between audiences and sequence pages.
## Fields

<fields.EntryField name='On Enter' required>
The sequence to trigger when the player enters the audience.
</fields.EntryField>
<fields.EntryField name='On Exit' required>
The sequence to trigger when the player exits the audience.
</fields.EntryField>
22 changes: 22 additions & 0 deletions documentation/docs/adapters/BasicAdapter/entries/event/on_fish.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Fish Event

The `Player Fish Event` is triggered when a player catches a fish or an item.

## How could this be used?
You can create custom fishing mechanics, such as catching a specific item when fishing in a specific location.


## Fields

<fields.EntryField name='Triggers' required multiple>
</fields.EntryField>
<fields.EntryField name='Item In Hand' required>
The item the player must be holding when the fish or item is caught.
</fields.EntryField>
<fields.EntryField name='Caught' required>
The item that the player caught.
</fields.EntryField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Countdown Fact

The `Cooldown Fact` is a fact reflects the time since the last set value.

When the value is set, it will count every second down from the set value.

Suppose the value is set to 10.
Then after 3 seconds, the value will be 7.

The countdown will continue regardless if the player is online/offline or if the server is online/offline.

## How could this be used?
This can be used to create a cooldown on a specific action.
For example, daily rewards that the player can only get once a day.


## Fields

<fields.CommentField />
<fields.EntryField name='Group' required>
</fields.EntryField>
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ADVENTURE: 2
SPECTATOR: 3
```
If the placeholder returns `CREATIVE`, the fact value will be `1`.

If no value matches, the fact value will be `0`.

Values can have placeholders inside them.
</fields.EntryField>
9 changes: 5 additions & 4 deletions documentation/docs/adapters/EntityAdapter/EntityAdapter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ first.
| [Game Time Activity](./entries/activity/game_time_activity.mdx) | A game time activity |
| [In Dialogue Activity](./entries/activity/in_dialogue_activity.mdx) | An in dialogue activity |
| [Look Close Activity](./entries/activity/look_close_activity.mdx) | A look close activity |
| [Path Activity](./entries/activity/path_activity.mdx) | Moving along a predefined path |
| [Patrol Activity](./entries/activity/patrol_activity.mdx) | Moving around a set of locations |
| [Player Close By Activity](./entries/activity/player_close_by_activity.mdx) | A player close by activity |
| [Random Look Activity](./entries/activity/random_look_activity.mdx) | A random look activity |
| [Target Location Activity](./entries/activity/target_location_activity.mdx) | A location activity |
| [Timed Activity](./entries/activity/timed_activity.mdx) | Allows child activities for a limited amount of time |
| [Trigger Activity](./entries/activity/trigger_activity.mdx) | Triggers a sequence when the activity active or inactive |

### Audiences

Expand All @@ -48,8 +50,6 @@ first.
| [Custom Name Data](./entries/data/custom_name_data.mdx) | The custom name of the entity |
| [Dancing Data](./entries/data/dancing_data.mdx) | Whether an entity is dancing |
| [Glowing Effect Data](./entries/data/glowing_effect_data.mdx) | If the entity is glowing |
| [Horse Eating Data](./entries/data/horse_eating_data.mdx) | If the horse is eating. |
| [Horse Rearing Data](./entries/data/horse_rearing_data.mdx) | If the horse is rearing. |
| [Horse Variant Data](./entries/data/horse_variant_dat.mdx) | The variant of the horse. |
| [Llama Carpet Color Data](./entries/data/llama_carpet_color_data.mdx) | The color of the llama's carpet. |
| [Llama Variant Data](./entries/data/llama_variant_data.mdx) | The variant of the Llama. |
Expand All @@ -59,17 +59,17 @@ first.
| [Potion Effect Color Data](./entries/data/potion_effect_color_data.mdx) | The color of the potion effect particles |
| [Rabbit Type Data](./entries/data/rabbit_type_data.mdx) | The type of the rabbit |
| [Saddled Data](./entries/data/saddled_data.mdx) | If the entity has a saddle. |
| [Sheep Sheared Data](./entries/data/sheep_sheared_data.mdx) | If the sheep is sheared. |
| [Skin Data](./entries/data/skin_data.mdx) | Skin data for players |
| [Villager Data](./entries/data/villager_data.mdx) | A villager data |
| [Wolf Begging Data](./entries/data/wolf_begging_data.mdx) | The begging state of the wolf |

### Entitys

| Name | Description |
| ---- | ----------- |
| [Cat Instance](./entries/entity/cat_instance.mdx) | An instance of a cat entity |
| [Cow Instance](./entries/entity/cow_instance.mdx) | An instance of a cow entity |
| [Enderman Instance](./entries/entity/enderman_instance.mdx) | An instance of a enderman entity |
| [Hit Box Definition](./entries/entity/hit_box_definition.mdx) | A hit box for an entity to allow interaction with a different entity |
| [Hoglin Instance](./entries/entity/hoglin_instance.mdx) | An instance of a hoglin entity |
| [Husk Instance](./entries/entity/husk_instance.mdx) | An instance of a husk entity |
| [Interaction Indicator Definition](./entries/entity/interaction_indicator_definition.mdx) | Interaction Indicator |
Expand Down Expand Up @@ -99,6 +99,7 @@ first.

| Name | Description |
| ---- | ----------- |
| [Group Advanced Entity Instance](./entries/instance/group_advanced_entity_instance.mdx) | An advanced instance of an entity |
| [Individual Advanced Entity Instance](./entries/instance/individual_advanced_entity_instance.mdx) | An advanced instance of an entity |
| [Shared Advanced Entity Instance](./entries/instance/shared_advanced_entity_instance.mdx) | An advanced instance of an entity |

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Path Activity

The `Path Activity` is an activity that moves along a predefined path.
The entity will move to each location in the set in order.
Once the entity reaches the last location, it will do the idle activity.

## How could this be used?
This could be used to have a tour guide that moves along the post-important paths.


## Fields

<fields.EntryField name='Road Network' required>
</fields.EntryField>
<fields.EntryField name='Nodes' required multiple>
</fields.EntryField>
<fields.EntryField name='Idle Activity' required>
The activity that will be used when the entity is at the final location.
</fields.EntryField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Trigger Activity

The `Trigger Activity` entry is an activity that triggers a sequence when the activity starts or stops.

## How could this be used?
This could be used to trigger dialogue when the entity arrives at a certain location.
Like a tour guide that triggers dialogue when the entity arrives at a point of interest.


## Fields

<fields.EntryField name='Activity' required>
The activity to use when this is active.
</fields.EntryField>
<fields.EntryField name='On Start' required>
The sequence to trigger when the activity starts.
</fields.EntryField>
<fields.EntryField name='On Stop' required>
The sequence to trigger when the activity stops.
</fields.EntryField>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Cat Instance

The `Cat Instance` class is an entry that represents an instance of a cat entity.

## How could this be used?

This could be used to create a cat entity.


## Fields

<fields.EntryField name='Definition' required>
</fields.EntryField>
<fields.EntryField name='Spawn Location' required>
</fields.EntryField>
<fields.EntryField name='Data' required multiple>
</fields.EntryField>
<fields.EntryField name='Activity' required>
</fields.EntryField>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as fields from '@site/src/components/EntryField';
import Admonition from '@theme/Admonition';
import Link from '@docusaurus/Link';

# Hit Box Definition

The `HitBoxDefinition` class is an entry that represents a hit box for an entity to allow interaction with a different entity.

## How could this be used?
This could be when using a display entity since they don't have a hit box to allow interaction with.


## Fields

<fields.EntryField name='Base Entity' required>
</fields.EntryField>
<fields.EntryField name='Offset' required>
The offset of the hit box relative to the base entity.
</fields.EntryField>
<fields.EntryField name='Width' required>
The width of the hit box.
</fields.EntryField>
<fields.EntryField name='Height' required>
The height of the hit box.
</fields.EntryField>
Loading

0 comments on commit 0d3d446

Please sign in to comment.