Commands - ForestOfLight/Canopy GitHub Wiki
Table of Contents:
- Help
- Global Rule Setting
- InfoDisplay Rule Setting
- Game Information
- Tick
- Hopper Counters
- Hopper Generators
- Spawn Tracking
- Lifetime Tracking
- Warps
- Quality of Life
Before Reading Onward:
Some commands are prefixed with ./ and some are prefixed with /. The / commands are vanilla commands that support autocomplete and can (usually) be run in command blocks. The ./ commands are Canopy-specific commands that can be run in chat. Canopy is currently in the process of transitioning all ./ commands to / commands, so some commands may still use ./.
Usage: ./help [page|searchTerm]
Displays every command's usage and a short description. Default page names include "InfoDisplay", "Rules", and several numbered pages of commands. There is also a page for any loaded extensions. Specifying a search term will display any command or rule that includes that term.
This only includes ./ commands. To see a list of / commands, use the vanilla /help command.
Manages which global rules are enabled. These are global rules that affect all players and can be toggled by opped players.
Usage: ./canopy menu
Displays a menu with toggles for every rule. Flip the switches for the ones you want a hit the submit button at the bottom to save your changes.
Usage: ./canopy <rule> <true|false|integer|float>
Sets the value of a Global Rule. You can also use list syntax to change multiple rules at once (ex. ./canopy [ruleOne,ruleTwo] true).
Manages which InfoDisplay rules are enabled for you. These are per-player rules and do not affect other players.
Usage: ./info menu
Displays a menu with toggles for every InfoDisplay rule. Flip the switches for the ones you want a hit the submit button at the bottom to save your changes.
Usage: ./info <rule|all> <true|false>
Enables/disables an InfoDisplay rule. You can also use list syntax to change multiple rules at once (ex. ./info [ruleOne,ruleTwo] true). Alias: ./i <rule|all> <true|false>
These commands will help you gather information about the world around you.
Usage: ./canopy version
Displays information about the active Canopy installation.
Usage: /data [entity]
Displays information about blocks or entities. If the entity argument is specified, it will display information about that entity. Otherwise, information about the block or entity you are looking at will be displayed. This includes the its name, location, dimension, properties, states, components, component data, tags, and other info.
Usage: /debugentity <targets> <add|remove> <property>
Overlays debug information on selected entities. Not available in realms version.
Numerical properties: age, breath, container, effects, equipment, exhaustion, flyspeed, friction, growup, headlocation, health, hunger, id, isclimbing, isfalling, isillagercaptain, isinwater, isonground, issleeping, issneaking, issprinting, isswimming, isvalid, item, lavamovement, leash, location, nametag, onfire, projectile, pushthrough, ride, riding, rotation, saturation, scale, skinid, speed, tame, target, tnt, typeid, families, variant, velocity, viewdirection, wantsjockey
Visual properties: attackbox, collisionbox, hitbox, eyelevel, viewdirectionvector
Calculates the cartesian, flat cartesian, and manhattan distances between two points.
Usage: ./distance target
Calculates the distance in blocks between your head and the block or entity you are looking at down to three decimal places. Note that entity positions are at their foot. Alias: ./d target
Usage: ./distance from <x y z> to [x y z]
Calculates the distance in blocks between the two points. The to coordinates can be omitted to use your player's position. Alias: ./d from <x y z> to [x y z]
Usage: ./distance from [x y z]
Saves a location to calculate distance to later. The coordinates can be omitted to use your player's position. Alias: ./d from [x y z]
Usage: ./distance to [x y z]
Calculates the distance in blocks between the saved location and the specified coordinates. The coordinates can be omitted to use your player's position. Alias: ./d to [x y z]
Usage: /entitydensity [dimension] <grid size>
Displays the entity count for each dimension and identifies dense areas of entities in the specified dimension. The dimension argument can be omitted to use your current dimension. Valid dimension names include overworld, nether, end, the_end, o, n, and, e. Recommended grid sizes: 100-512 or more.
Usage: /health
Profiles the server's tick speed for five seconds, displaying the average ticks per second (TPS) and the milliseconds per tick (MSPT). Also shows the lowest and highest values of each over that time. Additionally, this command also displays the entity count for each dimension.
Usage: /log <tnt|projectiles|falling_blocks> [precision]
Logs the location of the specified entity type in chat. The precision argument is optional and sets the number of decimal places to truncate the entity location at. There is a maximum of 15 and the default is 3.
Usage: /peek [search term]
Show the inventory of the block or entity you're looking at up to 64 chunks away. Using the "search term" argument will highlight any items that include your search term in your InfoDisplay.
Usage: /pos [player]
Displays your current position, or the position of another player. Shows dimension and relative nether/overworld position as well.
Usage: /trackevent <event> [beforeEvent|afterEvent]
Toggles tracking for the specified event. Each time the event occurs, the tracker will increment. You can view the trackers' count in realtime in the InfoDisplay by enabling the eventTrackers InfoDisplay rule. If you need to find the names of some events, use these links: beforeEvents, afterEvents. If the last argument is not specified, afterEvent is assumed.
Usage: /biomeedges add <x1 y1 z1 x2 y2 z2>
Creates a visual representation of biome edges in the specified region.
Usage: /biomeedges removelast
Removes the last created biome edge visualization.
Usage: /biomeedges clear
Removes all biome edge visualizations.
Usage: ./simmap [distance] [dimension x z] [display <distance / dimension x z / here>]
Displays a map showing the simulation status of chunks in an area. Ticking chunks are displayed in green and non-ticking chunks are displayed in red. The dimension and x/z coordinates configure the center of the map. The distance argument sets the size of the area to display (in chunks away from the center). The display argument allows you to configure these settings for the simulation map in your InfoDisplay. Using "display here" will reset your display settings to follow your player.
Usage: /hss <calculate|fortress|stop>
Displays nearby hardcoded spawn spots (HSS). Stand inside a structure and run /hss calculate to find HSSes in the area. Use /hss stop to clear the HSS visualization.
Fortress mode uses the mob spawning algorithm, so it may take a few minutes to identify all of them. For speed, spawns are mocked while the search is running, so no mobs will spawn while finding HSSes.
Usage: ./tick [mspt]
Sets the world's tick speed to the desired mspt. There will always be some extra. Requires OP.
Note
This command cannot make the game run faster. It can only slow it down.
If you exceed 10,000 mspt, Minecraft will close the world. You can disable this limit on BDS by setting script-watchdog-enable-shutdown=false & script-watchdog-hang-exception=false in your server.properties file (though it can be unsafe to do so).
Usage: ./tick step [steps]
Makes the world at normal speed for the specified number of ticks. Leave the [steps] argument blank to step only one tick.
Usage: ./tick reset
Resets the world's tick speed to normal.
Usage: ./tick sleep [milliseconds]
Pauses the game for the specified number of milliseconds. Can be run through a command block using /scriptevent canopy:tick sleep [milliseconds].
Hopper Counters are a great way to count items and test farm rates. There are 16 channels, each named after a Minecraft wool color (red, cyan, light_blue, etc.). To get set up with a hopper counter, just place a hopper that faces into a wool block. When you place down your first hopper counter, a timer which is used to calculate item rates starts. Note: A hopper counter will only be created when you place it down, not when the two blocks are connected in other ways (pistons, structure blocks, cloning, etc.). This can easily be accounted for by just breaking and replacing the wool or hopper after cloning or, as in the case with a piston, moving a hopper above the hopper connected to the wool block.
Usage: ./counter
Displays information about the item counts in each channel. This includes metrics like the total items and items per hour, and the same divided up into individual item types. Alias: ./ct
Usage: ./counter <color>
Does the same as ./counter, but displays info for only one channel. Using the all keyword has exactly the same behavior as ./counter. Alias: ./ct <color> This command can also be triggered with the vanilla command /scriptevent canopy:counter [color] (ie. in a command block).
Usage: ./counter [color|all] realtime
Displays information about the item counts using real-world time instead of Minecraft tick-based time to do rate calculations. Alias: ./ct realtime, ./ct <color|all> realtime
Usage: ./counter [color|all] reset
Resets the count of all channels to zero and restarts the timer. Alias: ./ct [color|all] reset. This command can also be triggered with the vanilla command /scriptevent canopy:counter [color|all] reset (ie. in a command block).
Usage: ./counter [color|all] remove
Removes all known hoppers in the specified channel or all channels. This will also reset the timer for that channel or all channels. Alias: ./ct remove, ./ct <color|all> remove This command can also be triggered with the vanilla command /scriptevent canopy:counter [color|all] remove (ie. in a command block).
In the InfoDisplay
Hopper Counters can be viewed in the InfoDisplay in real-time. By enabling the hopperCounterCounts rule in the InfoDisplay, all active hopper counter channels will show up in your InfoDisplay. Additionally, you can change whether each channel is set to display how many items its receiving per hour, minute, or second instead of the normal count using the command below.
Usage: ./counter <color|all> <count|hr|min|sec>
Changes the mode of a channel while tracking hopper counters in the InfoDisplay. count displays a count of every item that passes through. hr, min, sec displays the number of items per hour, minute, and second respectively. Alias: ./ct <color|all> <count|hr|min|sec>
Hopper Generators are a great way to generate items and test farm rates. There are 16 channels, each named after a Minecraft wool color (red, cyan, light_blue, etc.). To get set up with a hopper generator, just place a wool block above a hopper and then place an item in the hopper. When you place down your first hopper generator, a timer which is used to calculate item rates starts. Note: A hopper generator will only be created when you place it down, not when the two blocks are connected in other ways (pistons, structure blocks, cloning, etc.). This can easily be accounted for by just breaking and replacing the wool or hopper after cloning or, as in the case with a piston, moving a hopper below the hopper connected to the wool block.
Usage: ./generator
Displays information about the item counts in each channel. This includes metrics like the total items and items per hour, and the same divided up into individual item types. Alias: ./gt
Usage: ./generator <color>
Does the same as ./generator, but displays info for only one channel. Using the all keyword has exactly the same behavior as ./generator. Alias: ./gt <color> This command can also be triggered with the vanilla command /scriptevent canopy:generator [color] (ie. in a command block).
Usage: ./generator [color|all] realtime
Displays information about the item counts using real-world time instead of Minecraft tick-based time to do rate calculations. Alias: ./gt realtime, ./gt <color|all> realtime
Usage: ./generator [color|all] reset
Resets the count of all channels to zero and restarts the timer. Alias: ./gt [color|all] reset. This command can also be triggered with the vanilla command /scriptevent canopy:generator [color|all] reset (ie. in a command block).
This command allows you to track mob spawning in your worlds and farms. It can be used to track all entities or specific mobs, and can even be used to track mob spawning rates in a specific area.
Usage: ./spawn entities
Displays a list of all entities in the world and their locations.
Usage: ./spawn tracking start [x1 y1 z1] [x2 y2 z2]
Starts spawn tracking. Specify coordinates to track a specific area.
Usage: ./spawn tracking <mobname> [x1 y1 z1] [x2 y2 z2]
Starts spawn tracking for a specific mob. Specify coordinates to track a specific area. Run this command again with a new mob name to track multiple mobs types at once.
Usage: ./spawn tracking
Displays statistics about mob spawning since spawn tracking started. Mob categories are based on population control.
Usage: ./spawn tracking stop
Displays statistics about mob spawning since spawn tracking started and then stops spawn tracking.
Usage: ./spawn mocking <true|false>
Allows the spawning algorithm to continue running while no mobs spawn. Useful for getting an upper bound on your farm's rates while tracking spawns. Requires OP.
Usage: ./spawn recent [mobname]
Displays a list of all mob spawns from the last 30 seconds. Specify a mob name to see only that mob's spawns.
This command allows you to track the lifetime and spawning / removal reasons of entities and items in your world. It is particularly useful for debugging and optimizing mob farms.
Usage: /lifetimetracking <start|stop|restart>
Starts, stops, or restarts lifetime tracking.
Usage: /lifetimequery <entityType> [queryType: lifetime|spawning|removal|useRealtime] [useRealtime: true|false]
Queries lifetime tracking data for the specified entity type. You can choose to see lifetime, spawning, removal statistics, or a summary of all three. Adding the useRealtime argument will calculate rates based on real-world time instead of tick-based time.
Usage: /lifetimequeryitem <itemType> [queryType: lifetime|spawning|removal] [useRealtime: true|false]
The same as /lifetimequery, but for items instead of entities.
Warps are simple teleport locations that can be set by any player. They are global, so any player can teleport to a warp once it has been created. These commands are particularly useful in a CMP (Creative MultiPlayer) setting. Warps cannot be added, removed, or teleported to while in survival mode unless the commandWarpSurvival rule is enabled.
Usage: ./warp <add|remove> <name>
Adds or removes a warp. Alias: ./w <add|remove> <name>
Usage: ./warp <name>
Teleports you to a warp. Alias: ./w <name>
Usage: ./warps
Lists all available warps in chat.
Usage: /butcher [entity]
Instantly removes entities without dropping their items. If the entity argument is unspecified, the entity you are looking at is assumed. Requires OP.
Allows you to switch to a survival-friendly spectator mode, or set up a tripod to view your work on-demand.
Usage: /cam spectate
Toggles a survival-friendly freecam. It switches you to spectator mode with night vision and conduit power. When you are finished, just run the command again to return to your original position. Alias: /cs
Usage: /cam place
Places down a camera for you to view later on.
Usage: /cam view
Toggles viewing your placed camera. Your player will still be able to move around and interact as normal while viewing your placed camera.
Usage: /claimprojectiles [radius|player] [radius]
Makes you (or another specified player) the owner of all projectile within a certain block radius. If no radius is specified, the default is 25 blocks.
Usage: /cleanup [distance]
Removes all items and xp orbs within 50 blocks, or at a specified distance. Requires OP. Alias: /k
Usage: /dtp <dimension> [x y z] [victim]
Teleports entities to the specified dimension. If you include coordinates, the victim will be teleported to those coordinates in the specified dimension, otherwise coordinates will keep your current coordinates in the new dimension. Coordinates are converted like a nether portal when changing between the nether and the overworld. When the victim argument is empty, the command sender is assumed. Requires OP.
Usage: /c, /s, /a, and /sp
Can be used to quickly switch between creative (c), survival (s), adventure (a), and spectator (sp) mode. Requires OP.
Usage: /jump
Teleports you to the block you are currently looking at with a maximum range of 64 chunks. Jumping is disabled in Survival mode unless the commandJumpSurvival rule is enabled. Alias: /j
Usage: /loop <amount> "<command to run>"
Runs the specified command a certain number of times in a single tick. Note that the looped command must be encased in quotes. Requires OP.
Usage: /retest
Resets spawn tracking, hopper counters, and hopper generators. This is great if you want to restart a test for a machine or farm!
Usage: /sit
Makes your player sit down.
Usage: /velocity <entity> <query|add|set> [x y z]
Queries or modifies the velocity of the specified entity. Requires OP.