Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib/sidebar/tabs/WikiPages.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import IconScoreboard from "~icons/tabler/Table";
import IconRange from "~icons/tabler/math-lower";
import IconConcepts from "~icons/tabler/blocks";
import IconDialog from "~icons/tabler/category-2";
</script>

<!-- ADD PAGES AND CATEGORIES BELOW -->
Expand Down Expand Up @@ -59,6 +60,7 @@
<SidebarPage label="Advancements" icon={IconStar} page="/wiki/files/advancements" />
<SidebarPlaceholder label="Loot Tables" icon={IconChest} />
<SidebarPage label="Recipes" icon={IconGrid} page="/wiki/files/recipes" />
<SidebarPage label="Dialogs" icon={IconDialog} page="/wiki/files/dialogs" />
<SidebarPage label="Tags" icon={IconFilters} page="/wiki/files/tags" />
</SidebarCategory>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Recipes for your Custom Items
description: "Learn how to make custom crafting recipes for custom items in Minecraft Datapacks."
version: 1.21.5
version: 1.21.6
---

# Creating Recipes for your Custom Items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Recipes for your Custom Items
description: "Learn how to make custom items with Minecraft Java datapacks"
tags: beginner, guide, custom_items, item_components
version: 1.21.5
version: 1.21.6
---

# Creating Custom Items
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Adding Jukebox Songs
description: "Learn how to create custom music discs and custom jukebox songs with Minecraft datapacks"
version: 1.21.5
version: 1.21.6
---

# How to add custom jukebox songs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Adding Paitings
description: "Learn how to add custom paitings to Minecraft just with a datapack and a resourcepack!"
version: 1.21.5
version: 1.21.6
---

# How to add custom paintings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Adding Smithing Trims
description: "Learn how to add custom smithing trims patterns to Minecraft just with a datapack and a resourcepack!"
version: 1.21.5
version: 1.21.6
---

# How to add custom Smithing Trims
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: MCFunction vs Coding
description: "Learn the differences between using MCFunctions and traditional coding."
version: 1.21.5
version: 1.21.6
---

# Mods vs Datapacks
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/getting-started/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: How to Make a Minecraft Datapack - Beginner's Guide
tags: guide, beginner, Minecraft, datapack, tutorial, step-by-step
description: Learn how to create a Minecraft datapack with our beginner's guide. This step-by-step tutorial will help you understand the basics of datapack creation, even if you have little coding knowledge. Start enhancing your Minecraft experience today!
version: 1.21.5
version: 1.21.6
---

<script lang="ts">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/mcf-vs-code/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: MCFunction vs Coding
description: "Learn the differences between using MCFunctions and traditional coding."
version: 1.21.5
version: 1.21.6
---

# MCFunction vs Traditional Coding
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/misc/raycasts/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Raycasts
description: "Raycasting is when we shoot a line from the player's eyes in the direction they are looking. We use this to get what the player is looking at, and do something to it, such as spawning an explosion."
version: 1.21.5
version: 1.21.6
---

# Raycasting
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/misc/slowcasts/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Slowcast
description: "Like a raycast but in slow. Useful if simply using tp every tick skips over too much when making it fast."
version: 1.21.5
version: 1.21.6
---

# Slowcasting
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/nbt-and-scores/array-iteration/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Array Iteration
description: This guide explains how to loop through an array's items in a Minecraft datapack
version: 1.21.5
version: 1.21.6
---

# Array Iteration
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/nbt-and-scores/division/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Floating Point Division
description: Learn how to divide numbers in Minecraft which have decimal points.
version: 1.21.5
version: 1.21.6
---

# Division with floating points
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/nbt-and-scores/player-id-system/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Player ID System
description: Create a player ID system in a Minecraft datapack for linking players to entities.
version: 1.21.5
version: 1.21.6
---

# Player ID System
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/nbt-and-scores/random-numbers/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Generating Random Numbers
description: Generate a random number in a datapack using the /random command, or alternatively, a loot table.
version: 1.21.5
version: 1.21.6
---

# Generating Random Numbers using Datapacks!
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/right-click/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Right Click Detection Summary
description: This section goes over the various ways of detecting right clicks with a Minecraft datapack.
version: 1.21.5
version: 1.21.6
---

# Right Click Detection
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/right-click/coas/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Using COAS/WFOAS for RC detection
description: "Using a carrot on a stick for right click detection is an easy way to detect right clicks with a datapack."
version: 1.21.5
version: 1.21.6
---

# Carrot on a Stick Right Click Detection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Using the Consumable component for RC detection
description: "Using the minecraft:consumable component to detect when the user right clicks an item in a datapack."
version: 1.21.5
version: 1.21.6
---

# Consumable Component Right Click Detection
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/right-click/eoe/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Using an Eye of Ender for RC detection
description: "An intresting right click detection method for sure, due to the fact that it can only be used in worlds without strongholds!"
version: 1.21.5
version: 1.21.6
---

# Eye of Ender Right Click Detection
Expand Down
2 changes: 1 addition & 1 deletion src/routes/guide/right-click/interaction/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Using an Interaction Entity for RC detection
description: Interaction entities can be used to detect when a player rightclicks or leftclicks in a specific area of the world.
version: 1.21.5
version: 1.21.6
---

# Interaction Right (and left) Click Detection
Expand Down
2 changes: 1 addition & 1 deletion src/routes/search.json/meta.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/routes/wiki/command/all/+page.svx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: All Commands List
version: 1.21.5
version: 1.21.6
---

# List of all commands
Expand Down Expand Up @@ -57,8 +57,9 @@ These commands require a permission level same or bigger than 2 to run them.
- `/clone <<begin-xyz> <end-xyz> ... | from <sourceDimension> <begin-xyz> <end-xyz> ...>` - Copies blocks in an area from one place to another, or from one dimension to another
- `/damage <target> <amount> [<damageType>] [at <location>]|[by <entity>] [from <cause>]` - Damages selected entities/players.
- `/data <get|merge|modify|remove> ...` - Changes block entity or entity NBT data. See more on its [dedicated page](/wiki/command/data).
- `/datapack disable <name>|enable <name> <first|last|before|after>|list [available|enabled]` - Enables and disables selected datapacks
- `/datapack disable <name>|enable <name> <first|last|before|after>|list [available|enabled]|create <id> <name>` - Enables, disables or creates a datapack
- `/defaultgamemode <survival|adventure|creative|spectator>` - Sets the default gamemode of a world
- `/dialog <show <targets> <dialog>|clear <targets>>` - Shows and hides [dialog](/wiki/files/dialogs) screens from players
- `/difficulty [peaceful|easy|normal|hard]` - Sets or gets the difficulty of a world
- `/effect <clear [<targets>] [<effect>]|give <targets> <effect> [<seconds>|infinite] [<amplifier>] [<hideParticles>]>` - Changes the entity's active effects
- `/enchant <targets> <enchantment> [<level>]` - Adds enchantments onto held item. (Note that you can't enchant items with a level higher than what is possible in survival)
Expand Down Expand Up @@ -134,6 +135,7 @@ These commands require a permission level same or bigger than 4 to run them.
- `/save-off` - Disables automatic server saves
- `/setidletimeout <minutes>` - Used to set the time before idle players are kicked (If 0 - disabled)
- `/stop` - Stops the server
- `/version` - Sends the server's version info (the name, protocol version and the resourcepack and datapack formats).

## List of commands by Server Type

Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/command/data/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: /data
description: "The data command is used to modify and fetch NBT data of blocks, entities and storages."
version: 1.21.5
version: 1.21.6
---

# /data command
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/command/execute/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: /execute
description: "The execute command is used to execute other commands conditionally, or in a different context. The execute command is made up of multiple subcommands, which can be chained repeatedly and in any order to modify context in various ways."
version: 1.21.5
version: 1.21.6
---

# /execute command
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/command/function/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: /function
description: "This command runs any `.mcfunction` file when called. You can also pass in a NBT compound or NBT source path if the function is a macro function. All functions are run independently and one after another - for example, if you run `function1` and then `function2`, then `function2` will only run once `function1` has finished."
version: 1.21.5
version: 1.21.6
---

# /function command
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/command/summon/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: /summon
description: "The /summon command is used to summon an entity at a position, along with any entity NBT."
version: 1.21.5
version: 1.21.6
---

# /summon command
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/concepts/commands/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Commands
description: "Commands tell the game to do things. [Functions](/wiki/files/functions) are files which are made up of many commands. They form the basic building blocks for any function datapack."
version: 1.21.5
version: 1.21.6
---

# Commands
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/concepts/coordinates/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Coordinates
description: "Coordinates in Minecraft are represented by an `x`, `y`, and `z` value. They are used to represent positions of entities, blocks, particles, sounds and more. In commands, they are represented as simply `x y z`, where `x`, `y`, and `z` are decimal numbers representing the coordinates on each axis."
version: 1.21.5
version: 1.21.6
---

# Coordinates
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/concepts/item-components/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Item Components
description:
"Item components are data structures which can be applied to items in Minecraft to give them special attributes, such as
a name, lore, being able to be eaten, etc."
version: 1.21.5
version: 1.21.6
---

# Item Components
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/concepts/ranges/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Ranges
description: A range specifies a set of values between two numbers.
version: 1.21.5
version: 1.21.6
---

# Ranges
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/concepts/target-selectors/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Target Selectors
description:
"Target Selectors are used as an argument in commands to select entities and players in the world. We use target
selectors to find players or mobs and do things to them."
version: 1.21.5
version: 1.21.6
---

# Target Selectors
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/concepts/text/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Styled Text
description: Styled text in Minecraft commands is done through an NBT text format.
version: 1.21.5
version: 1.21.6
---

# Styled Text
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/files/advancements/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Advancements
description: In a datapack, we can create advancements, which can additionally be used to detect events.
version: 1.21.5
version: 1.21.6
---

# Advancements
Expand Down
61 changes: 61 additions & 0 deletions src/routes/wiki/files/dialogs/+page.svx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Dialogs
description: "Dialogs are pop-up menus that you can send to the user"
version: 1.21.6
---

# Dialogs
A dialog is a "pop-up" menu/form which we can send to the user by using the `/dialog` command. They can show text to the user, and can also have text inputs, check boxes, select menus, number inputs, and action buttons.

For example, you could create a settings menu for your datapack with a dialog. They can open the dialog with a function (which runs the `/dialog show` command), and when they are done, their inputs in the form will be converted into a command which will change the settings of the datapack.

Dialogs are stored as JSON files in the `/data/<namespace>/dialog/` folder.

## Types of dialog
There are many different types of dialog that we can create.

All dialogs can have a **title** (displayed at the top of the screen), a **body** (which can contain text), and any number of **inputs** (e.g text, number, multiselect, checkbox). The exact format of the dialog (including whether there are buttons in the footer) depends on the type:

- **Confirmation** (`minecraft:confirmation`): This type of dialog has two buttons in the footer (e.g "Yes" and "No", or "Submit" and "Cancel").
- **Notice** (`minecraft:notice`): This type of dialog has one button in the footer - it is the simplest type of dialog.
- **Multi Action** (`minecraft:multi_action`): This type of dialog has a list of buttons (arranged in columns), and optionally a "close" button at the bottom.
- **Dialog List** (`minecraft:dialog_list`): This type of dialog consists of any number of buttons that open another dialog when clicked (arranged in columns)
- **Server Links** (`minecraft:server_links`): This type of dialog will display the server's preset custom links.

:::info
The **body** can contain items as well as text. If an item is used, then it will display graphically, and will look as if it is in the inventory when it is hovered over by the cursor.
:::

## Inputs
There are different types of input we can use on form dialogs (simple input form and multi action input form):
- **Text** (`minecraft:text`): Allows the user to enter text.
- **Number range** (`minecraft:number_range`): Allows the user to select a number with a slider (like in the settings menu)
- **Boolean** (`minecraft:boolean`): This is a checkbox. When the checkbox is ticked, then the value is `true`, and vice versa.
- **Single Option** (`minecraft:single_option`): Allows the user to select one from a list of options. It looks like a button, but you click on it to cycle through the values.

Each input also has a `key`. This is the name of the macro value that is used when a `dynamic/run_command` button is clicked. For instance, if one input has the key `message`, and a button runs the command `/tellraw @a "$(message)`, then the value from that input is used in the command.

These inputs are pretty customisable. For instance, Text, Number range, and Single Option types can have a custom width, text inputs can be made multiline, etc.

## Actions
Actions are basically buttons (e.g the submit button) which will do something when clicked. On forms, actions will run a command which uses the inputs from the form, like a submit button. On other dialog types, they can do things such as running a set command, opening a URL, opening another dialog, etc.

The action button has a click event when the player is clicked (which is essentially the same as text components). This click event can be: Open URL, Run Command, Suggest Command, Copy Text to Clipboard, or Show Dialog.

If the dialog has inputs, you can also use **dynamic actions** such as `dynamic/run_command`. This works similar to the run command action, except the arguments of the commmand can change based on the values of the inputs.

For example, if a simple input form has one text input with the ID `name` and the user has entered the value `Silabear`, and the action is a `dynamic/run_action` action which runs the command `kill @a[name=$(name)]`, then when the action is clicked, the player will run the command `kill @a[name=Silabear]`.

:::warning
Note that the player needs permission to run the command. This means that, if the player does not have operator status, then most useful commands cannot be run.
:::

## JSON Format
The [Minecraft Wiki](https://minecraft.wiki/w/Dialog) goes into detail on the JSON format of a dialog file. However, we recommend that you use [Misode's Dialog Editor](https://misode.github.io/dialog/) to create dialog files, which also allows you to preview the dialog in the browser.

## Using dialogs
Dialogs can be shown to a player in three different ways:
- **`/dialog` command**: The `/dialog` command can be used to show a dialog to a player at any time. For example, `/dialog show @a namespace:my_dialog` will show the dialog in `/data/namespace/dialog/my_dialog.json` to all players.
- **Pause Screen**: Any dialogs listed in the dialog tag `minecraft:pause_screen_additions` (`/data/minecraft/tags/dialog/pause_screen_additions.json`) will be available from the pause screen. If this tag only has one dialog, then there will be a button on the pause screen which opens that dialog. If there are more dialogs in the tag, then the button on the pause screen will open a menu which lets you open any of the dialogs in the tag. Note that this replaces the "Send Feedback"/"Report Bugs" button on the home screen if used.
- **Quick Actions**: Any dialogs listed in the dialog tag `minecraft:quick_actions` (`/data/minecraft/tags/dialog/quick_actions.json`) will be available when a player clicks the Quick Actions keybind (which is `G` by default). If the tag only has one dialog, then clicking `G` will open that dialog, otherwise it will open a menu where you can select any of the dialogs, like the pause screen additions
- **Click Events**: In text components and actions in other dialogs, one click event type is **Open Dialog**. This lets the player open a dialog when they click on text (in chat, in a book, on a sign, etc) or a button (in a dialog).
2 changes: 1 addition & 1 deletion src/routes/wiki/files/functions/+page.svx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description:
"Functions are files essentially containing a list of Minecraft commands. Function files end in `.mcfunction`, and are
located in the `data/<namespace>/function` folder. Functions can be called (ran) using the `function` command. (See
[`/function`](/wiki/command/function) for more information)"
version: 1.21.5
version: 1.21.6
---

# Functions
Expand Down
2 changes: 1 addition & 1 deletion src/routes/wiki/files/recipes/+page.svx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Recipes
description: "Recipes are files which define crafting recipes in-game."
version: 1.21.5
version: 1.21.6
---

# Recipes
Expand Down
Loading