# Configuration file ########################################################################################################## # Commands #--------------------------------------------------------------------------------------------------------# # Command documentation: # There are a few substitutions available to use in the commands: # Basic number substitutions from world data: # {DIMENSION} # {SPAWN_X} # {SPAWN_Y} # {SPAWN_Z}. # # Also {SPAWN_POINT_X} etc. that return the spawn point instead of the possible spawn coordinate (like in the End). # Any occurences of those strings will be replaced by the current dimension ID, # or the coordinates of the spawn point respectively. # # Random numbers, integer and double type: {RAND:min,max}, # for example {RAND:5,15} or {RAND:1.2,3.9} (the max value is exclusive) # # Real time/clock values: # {TIME_Y} => year (4 digits: 2017) # {TIME_M} => month (2 digits: 03) # {TIME_D} => day (2 digits: 04) # {TIME_H} => hour (2 digits: 09) # {TIME_I} => minute (2 digits: 05) # {TIME_S} => second (2 digits: 07) # {TIME_TICK} => current world total time in ticks # {TIME_TICK_DAY} => current world/day time in ticks # # The y-coordinate of the top-most block in the world in the given coordinates # (actually the air block above it): {TOP_Y:x,z} for example: {TOP_Y:-37,538} # # 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): {TOP_Y_RAND:x,z;x-range,z-range} # 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 a string like '-49 72 544' (without the quotes) # # For the player-specific commands, the following substitutions are available: # {PLAYER_X}, {PLAYER_Y}, {PLAYER_Z} and {PLAYER_NAME} # # Also {PLAYER_BED_X}, {PLAYER_BED_Y} and {PLAYER_BED_Z} for the last set (bed) spawn point. # There are also {PLAYER_BED_SPAWN_X}, {PLAYER_BED_SPAWN_Y} and {PLAYER_BED_SPAWN_Z} that also check that the bed exists, # or otherwise they will revert to the fallback world spawn point. # Note that these will thus load that one chunk to check for the bed. # # The player-specific commands can be targeted to specific counts (like the 6th respawn for example) # or a multiple of a count (similarly to the dim-loading-command prefix) # by prefixing the command like so: 'worldprimer-tracked-command-nth ' # 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 # # Note that the above only applies to the other player-specific commands, but not the playerChangedDimension commands. # For the playerChangedDimension commands, the same format works instead as for the dimension loading commands: # worldprimer-dim-command-nth 3 1 say The player {PLAYER_NAME} has entered The End (dimension {DIMENSION}) for the third time # # The substitutions also support very basic arithmetic operations [+-*/]. # So you can do for example: # fill {SPAWN_X}-2 {SPAWN_Y}+3 {SPAWN_Z}-2 {SPAWN_X}+2 {SPAWN_Y}+7 {SPAWN_Z}+2 minecraft:emerald_block # # Note however that there is no actual order of operations/priorities/grouping. # The commands are parsed/substituted from the left, and if there is an arithmetic # operation immediately following the closing curly brace of a substitution, then the value # of the following string interpreted as a number is added to the substituted value. # That string following the arithmetic operation is first substituted recursively though, # which means that the order of operations is actually starting from the right. # # Both the substitutions and the arithmetic operations following them can be escaped by a preceding backslash '\', # if it should actually appear in the command as-is and not be substituted. # For example: 'say Foo bar \{SPANW_X}' would become 'say Foo bar {SPANW_X}' in the final command. # Or 'say Foo bar {SPAWN_X}\+16' would become 'say Foo bar 34+16', assuming the spawn x-coordinate is 34. # # Note, that the earlyWorldCreationCommands and the earlyWorldLoadingCommands # DO NOT have a world available yet, so the substitutions will NOT happen for those commands. # Thus, those commands also can't do anything that would require a world. # An example of this is setting the game rules - those are kept in the WorldInfo object, # which is stored in the World, so the overworld specifically needs to be loaded for changing any game rules. # # Additionally, the postWorldCreationCommands and the postWorldLoadingCommands will use # the Overworld (or whichever world is dimension 0) for the substitutions. # # So it's mostly the dimension loading commands that benefit from the {DIMENSION} substitution. # # Note also, that by default in vanilla/Forge, ALL dimensions use the WorldInfo from the overworld, # which means that they will have the exact same spawn coordinates and game rules etc. as the overworld. # Some mods may change this so that dimensions can have separate spawn points, game rules etc. # One such mod is Just Enough Dimensions. ########################################################################################################## Commands { # Commands to run when a dimension gets loaded. # You can target these to only be run when a specific dimension loads # by specifying the command as 'worldprimer-dim-command '. # So for example: 'worldprimer-dim-command 1 say The End has loaded!'. # You can also run a command only when a dimension loads for specific number of times: # 'worldprimer-dim-command-nth '. # This would run the command only when the dimension loads for the 'load count'-th time. # The count is incremented before the commands are parsed, so in other words the first load is 1, not 0. # You can also run the command every count-th time the dimension loads, # by prefixing the count with a '%', so for example: # worldprimer-dim-command-nth %5 1 say The End has loaded some multiple of 5 times! # An asterisk '*' can be used as the dimension ID to run # the command in all dimensions (mostly makes sense for the nth variant). S:dimensionLoadingCommands < say Dimension {DIMENSION} is loading #worldprimer-dim-command 1 say The End has loaded! #worldprimer-dim-command 1 worldprimer-load-chunks -1 -1 0 0 #worldprimer-dim-command 1 fill 10 0 10 -10 7 -10 minecraft:bedrock #worldprimer-dim-command 1 fill 9 1 9 -9 6 -9 minecraft:air #worldprimer-dim-command 1 say Finished building your room #worldprimer-dim-command -1 say The Nether has loaded! #worldprimer-dim-command -1 worldprimer-load-chunks 100 100 100 100 #worldprimer-dim-command -1 fill 1600 130 1600 1615 140 1615 minecraft:diamond_block #worldprimer-dim-command-nth 3 1 say The End has loaded for the 3rd time! #worldprimer-dim-command-nth %4 1 say The End has loaded a multiple of 4 times! #worldprimer-dim-command-nth 4 -1 say The Nether has loaded for the 4th time! #worldprimer-dim-command-nth %5 -1 say The Nether has loaded a multiple of 5 times! #worldprimer-dim-command-nth 1 6 worldprimer-load-blocks {SPAWN_X}-3 {SPAWN_Z}-3 {SPAWN_X}+3 {SPAWN_Z}+3 #worldprimer-dim-command-nth 1 6 fill {SPAWN_X}-3 {SPAWN_Y}-1 {SPAWN_Z}-3 {SPAWN_X}+3 {SPAWN_Y}-1 {SPAWN_Z}+3 minecraft:stone variant=smooth_diorite #worldprimer-dim-command-nth 1 6 say Test{SPAWN_X} Test\{SPAWN_X} Spawn: {SPAWN_X} \{SPAWN_X} {SPAWN_X}+10 {SPAWN_X}\+10 \{SPAWN_X}+10 {SPAWN_X}-10 {SPAWN_X}\-10 \{SPAWN_X}-10 #worldprimer-dim-command-nth 1 0 testruin testtree 0 120 0 #worldprimer-dim-command-nth 1 0 worldprimer-load-chunks -1 -1 0 0 #worldprimer-dim-command-nth 1 0 say Finished building your ruins! worldprimer-dim-command-nth 1 0 say Dim 0 loading worldprimer-dim-command-nth 1 0 gamerule spawnRadius 0 worldprimer-dim-command-nth 1 0 worldprimer place-structure {SPAWN_X}+8 {SPAWN_Y}-2 {SPAWN_Z} concrete_factory none none centered > # 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. S:earlyWorldCreationCommands < > # Commands to run every time the world gets loaded. # These are run when the server is starting, before any worlds have been loaded. S:earlyWorldLoadingCommands < > # Commands to run when a player enters a dimension while changing dimensions. # Note that these will NOT run when a player joins the game or respawns after dying. # You can use the 'worldprimer-dim-command ' (or the -nth variant) prefix to target entering a specific dimension. S:playerChangedDimensionEnterCommands < > # Commands to run when a player leaves a dimension while changing dimensions. # Note that these will NOT run when a player leaves the game/server. # You can use the 'worldprimer-dim-command ' (or the -nth variant) prefix to target leaving a specific dimension. # NOTE: These commands will run AFTER the player is already in the new dimension!! S:playerChangedDimensionLeaveCommands < > # Commands to run when a player dies S:playerDeathCommands < > # Commands to run when a player joins (connects to) the server S:playerJoinCommands < tell {PLAYER_NAME} Test foo bar, dim: {DIMENSION} ! worldprimer-tracked-command-nth 1 tell {PLAYER_NAME} First login! > # Commands to run when a player disconnects from the server S:playerQuitCommands < > # Commands to run when a player respawns after dying S:playerRespawnCommands < > # Commands to run on initial world creation, after the spawn chunks have been generated and loaded. S:postWorldCreationCommands < fill {SPAWN_X}-3 {SPAWN_Y}-1 {SPAWN_Z}-3 {SPAWN_X}+3 {SPAWN_Y}-1 {SPAWN_Z}+3 minecraft:stone variant=smooth_diorite say Test{SPAWN_X} Test\{SPAWN_X} Spawn: {SPAWN_X} \{SPAWN_X} {SPAWN_X}+10 {SPAWN_X}\+10 \{SPAWN_X}+10 {SPAWN_X}-10 {SPAWN_X}\-10 \{SPAWN_X}-10 > # Commands to run every time the world gets loaded. # These are run when the server has started and the overworld spawn chunks have been loaded. S:postWorldLoadingCommands < say Post world loading #fill 253 68 253 257 72 257 minecraft:iron_block #fill {SPAWNX}-20 {SPAWNY}+8 {SPAWNZ}-20 {SPAWNX}-16 {SPAWNY}+12 {SPAWNZ}-16 minecraft:gold_block #fill {SPAWNX} {SPAWNY}+20 {SPAWNZ} {SPAWNX} {SPAWNY}+24 {SPAWNZ} minecraft:diamond_block #fill {SPAWNX}-2 {SPAWNY}+3 {SPAWNZ}-2 {SPAWNX}+2 {SPAWNY}+17 {SPAWNZ}+2 minecraft:emerald_block > # Commands to run based on the world time. # Must be in the format: 'worldprimer-timed-command