Overview of Minecraft Scoreboards
/scoreboard or /execute store commands. Objectives can be displayed on the sidebar, under a player's name, or in the tab list.website·Indexed 32 days ago
https://datapack.wikiComprehensive documentation for creating Minecraft datapacks, covering functions, predicates, loot tables, advancements, and custom world generation. Includes detailed guides on command usage (/execute, /data), NBT, target selectors, and performance measurement, with technical references updated for Minecraft versions up to 26.2.
/scoreboard or /execute store commands. Objectives can be displayed on the sidebar, under a player's name, or in the tab list.execute if command chains and can be used in datapacks, advancements, and loot tables. They are invoked using the predicate= selector argument or the execute if predicate command./data/<namespace>/dialog/ directory./data command allows developers to modify and fetch NBT (Named Binary Tag) data from three primary sources: blocks, entities, and storages. Note that player data cannot be modified using these commands; any attempt to do so will result in failure.Depending on the requirements, there are several ways to detect right-clicks in a Minecraft datapack. The choice of method depends on whether you need to detect a specific item being used or a specific location in the world being clicked.
interaction entity in the world, rather than detecting the item held by the player./execute command allows for the conditional execution of other commands or the modification of the execution context. It consists of multiple subcommands that can be chained in any order. The execution context includes the Position (origin of relative coordinates), Anchor (eyes or feet), Executor (the entity referred to by @s), Rotation, and Dimension.Commands in Minecraft are executed with a specific context consisting of an executor entity, a position (within a dimension), and a rotation. This context determines how relative coordinates (~ ~ ~) and target selectors (like @s) are resolved.
Context varies based on how the command is triggered:
@s refers to the player), and the position/rotation are based on where the player is standing and looking.@s refers to nothing), the position is the world spawn, and the rotation is 0, 0.key:value) contained within compounds, which are marked by curly brackets {}. Multiple pairs within a compound are separated by commas.{name:"Silabear",age:102,friends:["Flynecraft","Aandeel","Cobblestone"],socials:{discord:"silabear"}}A resource location is a unique identifier used to reference a resource (such as a function) within a datapack or resource pack. It typically follows the format namespace:path/to/resource.
Key rules include:
minecraft namespace./.a-z), numbers (0-9), underscores (_), dashes (-), and periods (.) are permitted. Forward slashes (/) are used specifically for folder separation./function my_namespace:some_folder/my_functionminecraft:consumable component. Developers and players can add new components or remove existing ones from items using the /give or /item commands.Minecraft positions are represented by x, y, and z decimal values.
x.0 y.0 z.0 represents the bottom-left corner of a block. The center of a block is x.5 y.5 z.5.summon creeper 0 0 0), the game interprets the x and z axes as the center of the block (e.g., 0.5 0.0 0.5).# Example: Set a block at specific integer coordinates
/setblock 123 86 94 minecraft:pink_concrete
# Example: Teleport to precise decimal coordinates
/tp @s 66.2 98 45.7