Skip to content

Instantly share code, notes, and snippets.

@ezterry
Last active February 20, 2017 08:39
Show Gist options
  • Save ezterry/26fb07d361435fa76d75177fe9e43e66 to your computer and use it in GitHub Desktop.
Save ezterry/26fb07d361435fa76d75177fe9e43e66 to your computer and use it in GitHub Desktop.
Sample config for the Minecraft mod jsonRecipeEdit, implements starting inventory in virtual command chains, see giveinitialinv chain to update for your modpack
[
"** Start with some basic gloal settings **",
{
"command": "virtual command chain",
"trigger": "ServerStart",
"name": "ServerLoad",
"chain": [
"jsonRecipeEdit set server_init"
]
},
"** First load: set gamerules **",
{
"command": "virtual command chain",
"trigger": "OnSet: server_init",
"log": true,
"name": "InitWorld",
"chain": [
"gamerule logAdminCommands false",
"gamerule commandBlockOutput false"
]
},
"** First load: initial inventory scoreboard **",
{
"command": "virtual command chain",
"trigger": "OnSet: server_init",
"name": "InitInitialInv",
"chain": [
"scoreboard objectives add initialinv dummy"
]
},
"** Trigger when a player joins**",
{
"command": "virtual command chain",
"trigger": "PlayerJoin",
"dim": "*",
"filter": "",
"name": "initialinv_init",
"chain": [
"scoreboard players add @a[r=-1] initialinv 0",
"testfor @p[score_initialinv=1,r=-1]",
"jsonRecipeEdit run giveinitialinv",
"scoreboard players set @p[score_initialinv=1,r=-1] initialinv 2"
]
},
"** Here is where you actually give the player the **",
"** initial inventory **",
{
"command": "virtual command chain",
"trigger": "Run: giveinitialinv",
"dim": "*",
"name": "InitialInv",
"chain": [
"give @p[score_initialinv=1,r=-1] minecraft:stick 3",
"give @p[score_initialinv=1,r=-1] minecraft:sapling 1",
"give @p[score_initialinv=1,r=-1] minecraft:dirt 1",
"give @p[score_initialinv=1,r=-1] minecraft:dye 32 15"
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment