描述
World Primer 可以在某些“事件”发生时自动运行一组命令,例如:新世界首次创建时、加载世界时、加载维度时、玩家加入游戏时、退出游戏时、死亡或重生时。此外,还支持定时/周期性运行的命令。
配置
所有配置项也可以通过游戏内的配置菜单进行设置。
请阅读配置文件中的注释。 其中列出了所有可用的命令替换变量,以及大量其他信息。许多替换变量和命令前缀在不同模组版本之间有所变化,较新的模组版本提供了更多的配置项/事件类型和字符串替换功能。查看配置注释是获取特定模组版本正确信息的最佳方式。
注意: 配置文件中的所有命令都不应带有斜杠前缀!斜杠仅在使用聊天窗口或服务器控制台发送命令时需要,用于表明该消息不是聊天内容而是命令。一个显著的例外是 World Edit 命令,因为它们通常通过聊天使用双斜杠,所以在配置文件中应只保留单个斜杠。
命令配置
在各个事件下要运行的命令在以下配置选项中设置。
注意: 旧版模组尚未包含所有这些选项。
dimensionLoadingCommands - 每次加载维度时运行的命令
earlyWorldCreationCommands - 在世界初始创建时运行的命令,此时出生点区块尚未生成或加载。如果启用了维度加载追踪,则此操作甚至会在任何维度被加载/初始化之前发生。
earlyWorldLoadingCommands - 每次世界加载时(即服务器启动时)运行的命令。这些命令在服务器启动时、任何世界加载之前执行。
playerChangedDimensionEnterCommands - 当玩家进入另一个维度后(=之后)运行的命令。注意,这些命令不会在玩家加入游戏或死亡后重生时触发。
playerChangedDimensionLeaveCommands - 当玩家在切换维度过程中离开当前维度时运行的命令。注意: 这些命令将在玩家已经处于新维度后运行!注意: 这些命令不会在玩家离开游戏/服务器时触发。
playerDeathCommands - 玩家死亡时运行的命令
playerJoinCommands - 玩家加入(连接至)服务器时运行的命令
playerQuitCommands - 玩家从服务器断开连接时运行的命令
playerRespawnCommands - 玩家死亡后重生时运行的命令
postWorldCreationCommands - 在世界初始创建时运行的命令,此时出生点区块已生成并加载。
postWorldLoadingCommands - 每次世界加载时(即服务器启动时)运行的命令。这些命令在服务器启动且主世界出生点区块已加载后执行。
timedCommands - 基于世界刻/时间运行的命令。
在 Toggles 类别中还有单独的选项来启用或禁用上述所有功能。这些选项允许你临时禁用命令,而无需删除它们或将其注释掉。
其他配置
enableDebugLogging - 打印来自各种事件的日志消息,并打印任何尝试执行的命令,从而方便跟踪发生了什么以及何时发生
enableDimensionLoadTracking / enableDataTracking - 启用对维度加载次数、服务器启动次数、玩家加入次数、死亡次数等的追踪和保存。这是所有基于计数的命令前缀正常工作所必需的。
强烈建议在测试时使用 enableDebugLogging 日志选项!
命令前缀
有一些不同的命令前缀/过滤器,用于仅在特定情况下运行命令,例如在特定维度中,或仅在特定时间等。
worldprimer-dim-command
可以通过使用此命令前缀,使维度加载命令仅在特定维度加载时运行:
worldprimer-dim-command <dim id> <the actual command>
例如:
worldprimer-dim-command 1 say The End dimension has loaded!
如果你在 dimensionLoadingCommands 中放置不带前缀的命令,那么它将在任何维度加载时执行,例如:
say Some dimension has loaded!
worldprimer-dim-command-nth
自版本 0.3.0 起,还有另一种维度加载命令变体,可以在特定的维度加载次数上运行命令,或在给定值的任意倍数次加载时运行。
注意: 此变体需要启用 enableDimensionLoadTracking 选项!
这些命令的语法(在 0.6.0 及更高版本中)为:
worldprimer-dim-command-nth <load count> <dim id> <the actual command>
因此,要让命令仅在下界第一次加载时运行,你可以使用:
worldprimer-dim-command-nth 1 -1 say The Nether has loaded for the first time!
或者让末地第六次加载时运行:
worldprimer-dim-command-nth 6 1 say The End has loaded for the sixth time!
要在给定值的任意倍数上执行命令,请在值前加上 % 前缀:
worldprimer-dim-command-nth %5 1 say The End has loaded a multiple of 5 times!
注意/警告: 此前缀的参数顺序在模组版本之间发生了变化!该顺序在第一个 0.6.0-dev.* 版本中进行了更改。
在 0.5.0 及更早版本中,用法为:
worldprimer-dim-command-nth <dim id> <load count> <the actual command>
worldprimer-tracked-command-nth
这些前缀允许你限制例如玩家专属命令何时运行。
例如在 playerRespawnCommands 中:
worldprimer-tracked-command-nth 3 say The player {PLAYER_NAME} has respawned for the third time at {PLAYER_X}, {PLAYER_Y}, {PLAYER_Z}
worldprimer-tracked-command-nth %5 say The player {PLAYER_NAME} has respawned for some multiple of 5 times
命令字符串替换
从版本 0.4.0 开始,还支持将某些值(如维度 ID 或当前世界出生点坐标)替换到命令中。它们也支持对常数数值进行简单的加法和减法运算。
注意: 其中一些替换项在后续模组版本中已重命名!许多替换项也是在后续版本中添加的,因此如果你使用的是较旧版本,则可能无法使用所有这些替换项。请检查配置文件注释以查看你的模组版本可用的替换项!
可用的替换字符串(在模组版本 1.12.2-0.6.0-dev.20200122.211517 中)如下:
适用于所有命令:
{DIMENSION} - 维度 ID
{RAND:min,max} - 随机数,整数和双精度类型,例如 {RAND:5,15} 或 {RAND:1.2,3.9}(最大值不包含在内)
{SPAWN_X}, {SPAWN_Y}, {SPAWN_Z} - 维度出生点的 X、Y 和 Z 坐标
{SPAWN_POINT_X}, ... - 出生点 的 X 坐标,而不是可能的 出生坐标(例如在末地中)
{TIME_TICK} - 世界总时间(以刻为单位)
{TIME_TICK_DAY} - 世界白天时间(以刻为单位)
{TIME_Y} - 实际时间的年份(4 位数字:2017)
{TIME_M} - 实际时间的月份(2 位数字:03)
{TIME_D} - 实际时间的日期(2 位数字:04)
{TIME_H} - 实际时间的小时(2 位数字:09)
{TIME_I} - 实际时间的分钟(2 位数字:05)
{TIME_S} - 实际时间的秒数(2 位数字:07)
{TOP_Y:x,z} - 给定坐标处世界中最高方块的 Y 坐标(实际上是它上方的空气方块)。例如:{TOP_Y:-37,538}
{TOP_Y_RAND:x,z;x-range,z-range} - 围绕给定 x,z 位置的随机位置处世界中最高方块的 x y z 坐标(同样,实际上是它上方的空气方块)。例如:{TOP_Y_RAND:-37,538;32,32} 将是位于 x = -37, z = 538 周围 32 个方块内的随机位置处的最高方块。该替换项将被替换为类似 -49 72 544 的坐标字符串。
适用于玩家专属命令(如 playerJoinCommands):
{PLAYER_NAME} - 玩家名称
{PLAYER_X}, {PLAYER_Y}, {PLAYER_Z} - 玩家当前位置的 X、Y 和 Z 坐标
{PLAYER_BED_X}, {PLAYER_BED_Y}, {PLAYER_BED_Z} - 最后设置的(床)出生点
{PLAYER_BED_SPAWN_X}, {PLAYER_BED_SPAWN_Y}, {PLAYER_BED_SPAWN_Z} - 这些还会检查床是否存在,否则将回退到备用世界出生点。请注意,这将加载相应的区块以检查床的存在。
替换示例
因此,例如,你现在可以在 postWorldCreationCommands 中执行以下操作,使玩家在地下一个 5 x 5 x 3 的石砖房间中生成:
gameRule spawnRadius 0
setworldspawn {SPAWN_X} 7 {SPAWN_Z} (moves the world spawnpoint down to y = 7)
fill {SPAWN_X}-3 6 {SPAWN_Z}-3 {SPAWN_X}+3 10 {SPAWN_Z}+3 minecraft:cobblestone
fill {SPAWN_X}-2 7 {SPAWN_Z}-2 {SPAWN_X}+2 9 {SPAWN_Z}+2 minecraft:air
spawnRadius 0 游戏规则将“出生点模糊度”设置为 0,因此玩家将在世界出生点精确生成,而不会在距确切出生点一定半径(水平方向)内的表面上(在最高方块顶部)生成。换句话说,玩家将在小房间的中心生成,而不是随机出现在房间表面的某个位置。
fill 命令将在地下(或原始存在的位置)的石砖外壳(墙壁、地板和天花板)内创建一个 5x5x3 的空气房间。
内置命令
World Primer 提供了一些命令,包括“伪”命令和“实际”命令。“伪”命令仅能从配置文件中工作,并非实际注册的命令。
结构保存/放置命令
create-structure 命令可用于将给定区域保存为 MCEdit/Schematica 格式的 .schematic 文件或原版结构方块模板 .nbt 文件。
place-structure 命令可用于将结构放置/粘贴到世界中。
- 文件存放在
config/worldprimer/structures/ 目录下。
提示: 自动补全功能应适用于所有内容。
create-structure 命令是在模组版本 1.12.2-0.6.0-dev.20180502.210326 中添加的
place-structure 命令是在模组版本 1.12.2-0.6.0-dev.20171010.003436 中添加的
create-structure 的命令格式
/worldprimer create-structure <x1> <y1> <z1> <x2> <y2> <z2> <schematic | vanilla> <name>
其中 schematic 或 vanilla 参数定义是创建为 MCEdit/Schematica .schematic 格式还是原版结构方块模板 .nbt 格式。
示例:
/worldprimer create-structure 123 64 123 180 90 180 vanilla my_structure
/worldprimer create-structure 123 64 123 180 90 180 schematic my_schematic
place-structure 的命令格式
/worldprimer place-structure <x> <y> <z> <name> [rotation: none | cw_90 | cw_180 | ccw_90] [mirror: none | left_right | front_back] [centered] [data-functions]
- 如果不需要
rotation、mirror、centered 和 data-functions 参数,它们可以省略。但由于它们是位置参数,因此需要从左侧开始依次添加。
centered 参数会将结构(仅限水平方向)居中到给定的坐标。
data-functions 参数会使原理图中的任何 DATA 类型结构块的自定义数据标签名称(metadata 字符串标签)被解释为通过原版 /function 命令运行的函数。
示例:
/worldprimer place-structure 123 64 123 my_structure.nbt
/worldprimer place-structure 123 64 123 my_structure.nbt cw_90
/worldprimer place-structure 123 64 123 my_structure.nbt ccw_90 left_right
/worldprimer place-structure 123 64 123 my_structure.nbt none none centered
worldprimer-load-chunks(虚拟命令)
从版本 0.5.0 开始,内置了一个“虚拟”区块加载命令:
worldprimer-load-chunks <chunkXMin> <chunkZMin> <chunkXMax> <chunkZMax>
注意: 这不是一个实际注册的游戏内命令,因此无法通过聊天框或服务器控制台使用,仅当在配置文件中找到时会在内部使用。
它可以用于加载一系列区块,从而使其他命令能够正常工作。例如,原版的 /fill 和 /setblock 命令仅在已加载的区块中生效,因此可以在执行 /fill 或 /setblock 命令之前使用此命令来加载相关区块。这些区块会被立即标记为待卸载状态,因此它们不应一直保留到下一次世界保存发生(通常为每 45 秒,此时正常的“不应加载”区块会被卸载),而是在下一个游戏刻(tick)时卸载。
该“命令”的坐标是区块坐标(即方块坐标除以 16)。范围是包含两端的,即从最小值一直到最大值(含最大值)。
从版本 1.12.2-0.6.0-dev.20171117.213848 开始,还有另一种变体命令 worldprimer-load-blocks,它直接使用方块坐标而非区块坐标。
当然,加载的区域仍然会按区块对齐。
以下是在末地维度首次加载时于 0,0 处建造基岩箱子的示例。这些内容应添加到 dimensionLoadingCommands 中:
worldprimer-dim-command-nth 1 1 worldprimer-load-chunks -1 -1 0 0
worldprimer-dim-command-nth 1 1 fill 10 0 10 -10 7 -10 minecraft:bedrock
worldprimer-dim-command-nth 1 1 fill 9 1 9 -9 6 -9 minecraft:air
worldprimer-dim-command-nth 1 1 say Finished building your box!
/worldprimer spread-player
此命令添加于版本 1.12.2-0.6.0-dev.20190814.220944。
以下是可用选项的描述以及命令的工作原理:
/worldprimer spread-player [options] <playername1 playername2 ...>
该命令有两种位置搜索/选择模式:grid(网格)和 random(随机)。
如果提供了 grid 选项并指定了网格大小,则使用网格模式。
否则,将使用随机位置模式。
选项:
--find-surface=<true | false> - 如果为 true,则将 y 坐标设置为找到的 x/z 位置上的最高固体方块的顶部。
--grid=<integer> - 如果提供,则使用向外螺旋的网格搜索模式代替随机位置。该值为网格点之间的间隔。
--max-radius=<integer> - 距离 0, 0 的最大距离(每个轴单独计算,非绝对直线距离)
--min-separation=<integer> - 与之前散布的玩家位置以及同维度内当前在线玩家的最小距离
--new - 如果提供,则对于之前已经散布过的玩家再次运行此命令时,将生成一个新的位置,而不是将他们传送回原始的散布位置
--y=<integer> - 如果提供,则使用此固定的 y 高度
--y-offset=<integer> - 如果提供且 --find-surface=true,则此偏移量将加到地表 y 位置上。这允许例如将位置偏移至地下一定距离
--y-max=<integer> - 限制来自 --find-surface=true 情况下的(可能经过偏移的)y 位置上限
--y-min=<integer> - 限制来自 --find-surface=true 情况下的(可能经过偏移的)y 位置下限
示例:
/worldprimer spread-player --find-surface=true --min-separation=1024 --max-radius=10000 --new player_name
Discord
如果你有想法、问题或反馈,或者只是想闲聊,欢迎加入我们的 Discord 社区。
链接位于侧边栏。
Description
World Primer can automatically run a set of commands when certain "events" happen, such as when a new world is first created, when a world is loaded, when a dimension is loaded, when a player joins the game, quits the game, dies or respawns. There are also scheduled/periodic commands.
Configuration
All of the configs can also be configured via the in-game config menu.
Read the comments in the configuration file. It has all the possible command substitutions listed, as well as lots of other information. Many of the substitutions and command prefixes have changed between mod versions, and later mod versions have more config/event types and string substitutions. The config comments are the easiest way to see the correct information for that particular mod version.
Note: None of the commands in the configuration file should have the slash prefix! The slash is only required in commands sent via the chat or the server console, to know that the message is not a chat message but a command. One notable exception of course would be World Edit commands, as they normally use the double slash via chat, so they should have a single slash in the configuration file.
Commands configuration
The commands to run at various events are set in the following config options.
Note: Older mod versions don't have all of these yet.
dimensionLoadingCommands - commands to run each time a dimension gets loaded
earlyWorldCreationCommands - Commands to run on initial world creation, before the spawn chunks have been generated or loaded. If dimension load tracking is enabled, then this happens even before any dimensions have been loaded/initialized yet.
earlyWorldLoadingCommands - Commands to run every time the world gets loaded (i.e. when the server is starting). These are run when the server is starting, before any worlds have been loaded.
playerChangedDimensionEnterCommands - Commands to run when (= after) a player entered into another dimension. Note that these will NOT run when a player joins the game or respawns after dying.
playerChangedDimensionLeaveCommands - Commands to run when a player leaves a dimension while changing dimensions. Note: These commands will run after the player is already in the new dimension! Note: These will not run when a player leaves the game/server.
playerDeathCommands - Commands to run when a player dies
playerJoinCommands - Commands to run when a player joins (connects to) the server
playerQuitCommands - Commands to run when a player disconnects from the server
playerRespawnCommands - Commands to run when a player respawns after dying
postWorldCreationCommands - Commands to run on initial world creation, after the spawn chunks have been generated and loaded.
postWorldLoadingCommands - Commands to run every time the world gets loaded (i.e. when the server is starting). These are run when the server has started and the overworld spawn chunks have been loaded.
timedCommands - Commands to run based on the world tick/time.
There are also separate config options to enable or disable all of these in the Toggles category. Those options allow you to disable the commands without having to remove them or comment them out if you want to temporarily disable them.
Other configs
enableDebugLogging - Prints log messages from the various events, and also prints any commands that are attempted to be executed, so that it's easy to track what happens and when
enableDimensionLoadTracking / enableDataTracking - Enables tracking and saving the number of times dimensions have loaded, how many times the server has started, how many times players have joined, died etc. This is needed for all the count based prefixes to work.
It's highly encouraged to use the enableDebugLogging logging option while testing things!
Command prefixes
There are a few different command prefixes/filters for running commands only in specific situation, like in specific dimensions, or only at specific times etc.
worldprimer-dim-command
The dimension loading commands can be targeted to only run when a specific dimension loads, by using this command prefix:
worldprimer-dim-command <dim id> <the actual command>
So for example:
worldprimer-dim-command 1 say The End dimension has loaded!
If you would just have a command without the prefix in dimensionLoadingCommands, then it will be executed any time any dimension loads, for example:
say Some dimension has loaded!
worldprimer-dim-command-nth
As of version 0.3.0, there is also another dimension loading command variant, which can run the command on a specific number of dimension loads, or on any multiple of the given value.
Note: This variant requires the option enableDimensionLoadTracking to be enabled!
The syntax for these (in the 0.6.0 and later versions) is:
worldprimer-dim-command-nth <load count> <dim id> <the actual command>
So to only run a command when the Nether loads for the very first time, you would use:
worldprimer-dim-command-nth 1 -1 say The Nether has loaded for the first time!
Or when the End loads for the 6th time:
worldprimer-dim-command-nth 6 1 say The End has loaded for the sixth time!
To run a command on any multiple of the given value, prefix the value with a '%':
worldprimer-dim-command-nth %5 1 say The End has loaded a multiple of 5 times!
Note/warning: The argument order for this prefix has changed between mod versions! The order was changed in the first 0.6.0-dev.* version.
In version 0.5.0 and older versions the usage was:
worldprimer-dim-command-nth <dim id> <load count> <the actual command>
worldprimer-tracked-command-nth
These prefixes allow you to limit for example when the player-specific commands should run.
For example in the playerRespawnCommands:
worldprimer-tracked-command-nth 3 say The player {PLAYER_NAME} has respawned for the third time at {PLAYER_X}, {PLAYER_Y}, {PLAYER_Z}
worldprimer-tracked-command-nth %5 say The player {PLAYER_NAME} has respawned for some multiple of 5 times
Command string substitutions
As of version 0.4.0, there is also support for substituting some values like the dimension id, or the current world spawn coordinates into the commands. They also support simple addition and subtraction of constant numeric values.
Note: Some of these substitutions were renamed in later mod versions! Many of these were also added in later mod versions, so if you are in an older version, all of these won't be available. Check the config file comments to see the available sunstitutions for your mod version!
The available substitution strings (in mod version 1.12.2-0.6.0-dev.20200122.211517) are:
For any commands:
{DIMENSION} - The dimension ID
{RAND:min,max} - Random numbers, integer and double type, for example {RAND:5,15} or {RAND:1.2,3.9} (the max value is exclusive)
{SPAWN_X}, {SPAWN_Y}, {SPAWN_Z} - The dimension spawn point X, Y and Z coordinates
{SPAWN_POINT_X}, ... - The spawn point X coodinate instead of the possible spawn coordinate (like in the End)
{TIME_TICK} - The total world time in ticks
{TIME_TICK_DAY} - The world day time in ticks
{TIME_Y} - Real time year (4 digits: 2017)
{TIME_M} - Real time month (2 digits: 03)
{TIME_D} - Real time day (2 digits: 04)
{TIME_H} - Real time hour (2 digits: 09)
{TIME_I} - Real time minute (2 digits: 05)
{TIME_S} - Real time second (2 digits: 07)
{TOP_Y:x,z} - The y-coordinate of the top-most block in the world in the given coordinates (actually the air block above it). For example: {TOP_Y:-37,538}
{TOP_Y_RAND:x,z;x-range,z-range} - The x y z coordinates of the top-most block in the world in a random location around a given x,z location (again, actually the air block above it). For example: {TOP_Y_RAND:-37,538;32,32} would be the top block at a random location within 32 blocks of x = -37, z = 538. That substitution will be replaced with the coordinates string like -49 72 544.
For player-specific commands such as playerJoinCommands:
{PLAYER_NAME} - The player's name
{PLAYER_X}, {PLAYER_Y}, {PLAYER_Z} - The player's current position X, Y and Z position
{PLAYER_BED_X}, {PLAYER_BED_Y}, {PLAYER_BED_Z} - The last set (bed) spawn point
{PLAYER_BED_SPAWN_X}, {PLAYER_BED_SPAWN_Y}, {PLAYER_BED_SPAWN_Z} - These also check that the bed exists, or otherwise they will revert to the fallback world spawn point. Note that these will load that one chunk to check for the bed.
Substitution examples
So for example, you can now do this in postWorldCreationCommands, to make the player spawn in a 5 x 5 x 3 cobblestone room under ground:
gameRule spawnRadius 0
setworldspawn {SPAWN_X} 7 {SPAWN_Z} (moves the world spawnpoint down to y = 7)
fill {SPAWN_X}-3 6 {SPAWN_Z}-3 {SPAWN_X}+3 10 {SPAWN_Z}+3 minecraft:cobblestone
fill {SPAWN_X}-2 7 {SPAWN_Z}-2 {SPAWN_X}+2 9 {SPAWN_Z}+2 minecraft:air
The spawnRadius 0 game rule sets the "spawn fuzz" to 0, so the player will spawn exactly at the world spawn point, and not on the surface (on top of the highest block) around the given radius (horizontally) from the exact spawn point. So in other words the player will spawn in the center of the small room, and not randomly somewhere around that room on the surface.
The fill commands will make a 5x5x3 room of air inside a cobblestone shell (walls, floor and ceiling) inside the ground, or whatever happened to be there originally.
Built-in commands
There are a few commands, bot "fake" and "actual commands" that World Primer provides. The "fake" commands only work from the config file, and aren't actual registered commands.
Schematic save/place commands
- The
create-structure command can be used to save a given area either as a MCEdit/Schematica format .schematic file, or a vanilla Structure Block template .nbt file.
- The
place-structure command can be used to place/paste a schematic to the world.
- The files go in
config/worldprimer/structures/.
Tip: Tab-completion should work for everything.
- The
create-structure command was added in mod version 1.12.2-0.6.0-dev.20180502.210326
- The
place-structure command was added in mod version 1.12.2-0.6.0-dev.20171010.003436
Command format for create-structure
/worldprimer create-structure <x1> <y1> <z1> <x2> <y2> <z2> <schematic | vanilla> <name>
Where the schematic or vanilla argument defines if it's created in the MCEdit/Schematica .schematic format or in the vanilla Structure Block template .nbt format.
Examples:
/worldprimer create-structure 123 64 123 180 90 180 vanilla my_structure
/worldprimer create-structure 123 64 123 180 90 180 schematic my_schematic
Command format for place-structure
/worldprimer place-structure <x> <y> <z> <name> [rotation: none | cw_90 | cw_180 | ccw_90] [mirror: none | left_right | front_back] [centered] [data-functions]
- The
rotation, mirror, centered and data-functions arguments are optional if you don't need them, but they are positional, so you need to add them starting from the left.
- The
centered argument centers the structure (only horizontally!) to the given coordinate
- The
data-functions argument causes any DATA type Structure Block's Custom Data Tag Name (metadata String tag) from the schematic to be interpreted as functions to run via the vanilla /function command
Examples:
/worldprimer place-structure 123 64 123 my_structure.nbt
/worldprimer place-structure 123 64 123 my_structure.nbt cw_90
/worldprimer place-structure 123 64 123 my_structure.nbt ccw_90 left_right
/worldprimer place-structure 123 64 123 my_structure.nbt none none centered
worldprimer-load-chunks (fake command)
As of version 0.5.0 there is a built-in "fake" chunk loading command:
worldprimer-load-chunks <chunkXMin> <chunkZMin> <chunkXMax> <chunkZMax>
Note: This isn't an actual registered command, and thus it's not usable via chat/server console, but instead it's only used internally if found in the config file.
It can be used to load a range of chunks, so that some other commands can actually work. For example the vanilla /fill and /setblock commands only work in loaded chunks, so this can be used to load the chunks before executing the /fill or /setblock commands. The chunks are also immediately queued for unloading, so they shouldn't stay loaded even until the next world save happens (every 45 seconds, when "should-not-be-loaded" chunks are normally unloaded), but instead they should unload on the next game tick.
The coordinates for this "command" are chunk coordinates (so block coordinates divided by 16). The range is inclusive, meaning from the minimum up to and including the maximum.
As of version 1.12.2-0.6.0-dev.20171117.213848 there is also another variant of this command, worldprimer-load-blocks, which just uses block coordinates instead of chunk coordinates.
The loaded area will still of course be chunk aligned.
Here is an example of how to build a bedrock box at 0,0 in the End dimension when it loads for the first time. These would be added to dimensionLoadingCommands:
worldprimer-dim-command-nth 1 1 worldprimer-load-chunks -1 -1 0 0
worldprimer-dim-command-nth 1 1 fill 10 0 10 -10 7 -10 minecraft:bedrock
worldprimer-dim-command-nth 1 1 fill 9 1 9 -9 6 -9 minecraft:air
worldprimer-dim-command-nth 1 1 say Finished building your box!
/worldprimer spread-player
This command was added in version 1.12.2-0.6.0-dev.20190814.220944.
Here is the description of the available options, and how the command works:
/worldprimer spread-player [options] <playername1 playername2 ...>
The command has two location search/selection modes: grid, and random.
If the grid option is given with the grid size, then the grid mode is used.
Otherwise the randomized location mode is used.
Options:
--find-surface=<true | false> - If true, then the y-position is set to the top solid block on the found x/z position.
--grid=<integer> - If given, then an outwards spriraling grid search pattern is used instead of randomized locations. The value is the interval betweeen the grid points.
--max-radius=<integer> - The maximum distance from 0, 0 (per axis, not the absolute distance)
--min-separation=<integer> - The minimum distance to previous player spread positions and any currently online players in the same dimension
--new - If given, then if the command is run again for a player who was already spread previously, then a new location is generated, instead of teleporting them back to the original spread location
--y=<integer> - If given, then this fixed y height is used
--y-offset=<integer> - If given, and --find-surface=true, then this offset value will be added to the surface y position. This allows for example the position to be offset a certain distance under ground
--y-max=<integer> - Limits the (possibly offset) y position from the --find-surface=true case
--y-min=<integer> - Limits the (possibly offset) y position from the --find-surface=true case
Example:
/worldprimer spread-player --find-surface=true --min-separation=1024 --max-radius=10000 --new player_name
Discord
If you have ideas or questions or feedback, or maybe you just want to hang out, you can join us on Discord.
It's linked in the side bar.
评论 0
登录后参与评分
还没有评论,来抢沙发吧