Skip to content

Commit

Permalink
1.10 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
samolego committed Jun 9, 2022
1 parent b330c42 commit 484bb53
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private static int listGroupCommands(CommandContext<CommandSourceStack> context)
.withStyle(ChatFormatting.BOLD)
.withStyle(style -> style
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, translate("taterzens.tooltip.delete", finalJ)))
.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/npc edit commands group " + (groupIndex + 1) + " removeCommand " + finalJ))
.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/npc edit commands group id " + (groupIndex + 1) + " removeCommand " + finalJ))
)
)
);
Expand Down Expand Up @@ -279,7 +279,7 @@ private static int listAllTaterzenCommands(CommandContext<CommandSourceStack> co
.withStyle(ChatFormatting.RED)
.withStyle(style -> style
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, translate("taterzens.tooltip.delete", finali)))
.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/npc edit commands group " + finali + " delete"))));
.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/npc edit commands group id " + finali + " delete"))));

for (int j = 0; j < cmdGrp.size(); j++) {
var cmd = cmdGrp.get(j);
Expand All @@ -297,7 +297,7 @@ private static int listAllTaterzenCommands(CommandContext<CommandSourceStack> co
.withStyle(ChatFormatting.BOLD)
.withStyle(style -> style
.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, translate("taterzens.tooltip.delete", finalJ)))
.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/npc edit commands group " + finali + " removeCommand " + finalJ))
.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/npc edit commands group id " + finali + " removeCommand " + finalJ))
)
)
);
Expand Down
8 changes: 4 additions & 4 deletions docs/getting_started/command_actions/bungee_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ title: Bungee Actions
## Setup

1. Make sure that `"bungee" -> "enable_commands"` is set to `true` in [config](../../installation/config.md).

(`/taterzens config edit bungee enableCommands true`)

2. You can now add a bungee / velovity command via
(`/taterzens config edit bungee enableCommands true`)

2. You can now add a bungee / velocity command via
```
/npc edit commands addBungee <cmd> <player> <parameter>
/npc edit commands add bungee <cmd> <player> <parameter>
```
where
* `cmd` - bungee action command, see below
Expand Down
12 changes: 7 additions & 5 deletions docs/getting_started/command_actions/creating_action.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@ title: Adding Command Actions

It's as simple as using
```
/npc edit commands add <command>
/npc edit commands add minecraft <command>
```

*Note: all commands that are added are
*Note: all commands that are added to the group are
executed **AT ONCE** when NPC is interacted with.*

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/nXLDvmP4d6g" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Each group of commands is executed on right click.

When npc is clicked the second time, new group is selected and its commands are executed.
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/ygkj7WZlhq0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
## I want to target the player who interacted with my NPC!

You're in luck! There is built-in `--clicker--` target,
Nothing easier! There is built-in `--clicker--` target,
which is replaced by the name of the player that has
right clicked the NPC.

Let's suppose player with name `samo_lego` interacts with the NPC
that we previously added the following command:
```
/npc edit commands add give --clicker-- sunflower{display:{Name:'{"text":"--clicker--'s coin"}'}}
/npc edit commands add minecraft give --clicker-- sunflower{display:{Name:'{"text":"--clicker--'s coin"}'}}
```

The command Taterzen will execute will change to the following:
Expand Down
3 changes: 2 additions & 1 deletion docs/getting_started/command_actions/editing_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ title: Editing Actions
/npc edit commands list
```


<span style="color:aqua">
Taterzen <span style="color:yellow">Taterzen</span> will execute the following commands on right-click.
</span>
Expand All @@ -32,7 +33,7 @@ title: Editing Actions

Then click on the command you'd like to remove or type
```
/npc edit commands remove <id>
/npc edit commands group id <group id> remove <command id>
```


Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started/command_actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ random player or all players!

NPCs can even edit themselves via commands that they execute! See the following video for example.

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/VjgHzU3wy7A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/mxVgZmFcFPA" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

To see all the commands that will be run when Taterzen is right-clicked, use

Expand Down Expand Up @@ -59,13 +59,13 @@ the player's name when executing the command.

Giving the clicker a gold ingot:
```
/npc edit commands add give --clicker-- gold_ingot
/npc edit commands add minecraft give --clicker-- gold_ingot
```


Teleporting the clicker 10 blocks up:
```
/npc edit commands add execute at --clicker-- run tp --clicker-- ~ ~10 ~
/npc edit commands add minecraft execute at --clicker-- run tp --clicker-- ~ ~10 ~
```

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/PYkcRGhlwWw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fabric_version=0.55.2+1.19
forge_version=41.0.1
enable_forge=false
# Mod Properties
mod_version=1.10.0
mod_version=1.10.1
maven_group=org.samo_lego
archives_base_name=taterzens
# Dependencies
Expand Down

0 comments on commit 484bb53

Please sign in to comment.