TIP:When entering commands inside your function,do nottype the/character at the start of each command. If you want to execute multiple commands in a function, just enter each new command on a separate line inside the function file. For example: give @p diamond give @p gold_block setblock ...
/fill Fills all or parts of a region with a specific block. Game Directors Yes /fog Add or remove fog settings file. Game Directors Yes /function Runs commands found in the corresponding function file. Game Directors Yes /gamemode Sets a player's game mode. See more in the Popular Comman...
Continue reading for a complete description of each function, with a link to the corresponding Gamepedia entry for each command. That way, you can immediately follow up and learn everything you need to use your preferred commands. But first, a quick overview on commands. What are console comma...
getAllPlayers(): Player[] Returns an array of all active players within the world. ReturnsPlayer[] Notes: This function can throw errors. getDay getDay(): number Returns the current day. Returnsnumber- The current day, determined by the world time divided by the number of ticks per day....
Added function getAll(): EffectType[] - Returns all of the effects 加入了 getAll(): EffectType[] 函数- 返回所有效果 Updated class Effect 更新了 Effect 类 Updated duration property. Is the duration of the effect in ticks 更新了 duration 属性,是该游戏刻中效果的持续时间 Added property typeId...
Commands ran through animations now will run in the order defined in animation files on all platforms, including Realms 现在基于动画执行的命令会按照各平台上动画文件定义的顺序来执行,包括Realms Animations and events defined in Behavior Packs can now run commands that require cheats without the player ...
import { world, ItemStack, EntityEquippableComponent, EquipmentSlot, EntityComponentTypes, DimensionLocation } from "@minecraft/server"; import { MinecraftItemTypes } from "@minecraft/vanilla-data"; function givePlayerEquipment( targetLocation: DimensionLocation ) { const players = world.getAllPlayers()...
断言给定位置的红石能量等级添加了 Commands.run实体函数 getComponents() - 返回支持的组件数组function ...
Added general-purpose storage for data commands. 为data 命令增加了通用的 storage 子命令。 Extended advancement and loot table predicates. 扩充了进度和战利品表的判据。 Extended schedule command to allow scheduling function multiple times 增强了 schedule 命令,使其可以多次计划执行函数 ...
/perf This command runs a short debug function for 10 seconds. It will create files for you in your server’s debug folder that will give a detailed overview of what is happening on your server. This is particularly useful for diagnosing lag. /perf /save-all Causes the server to create ...