From 7528ea455aab0ed92a0e774a30b7d4b33b29474f Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sun, 22 Mar 2020 19:33:58 -0500 Subject: [PATCH 01/14] Add files via upload --- docs/home.md | 7 ++ docs/recipes/adding_recipes/blast_furnace.md | 27 ++++++ docs/recipes/adding_recipes/campfire.md | 27 ++++++ docs/recipes/adding_recipes/crafting_table.md | 95 +++++++++++++++++++ docs/recipes/adding_recipes/furnace.md | 27 ++++++ docs/recipes/adding_recipes/smoker.md | 27 ++++++ docs/recipes/adding_recipes/stonecutter.md | 19 ++++ docs/recipes/removing_recipes.md | 63 ++++++++++++ docs/vanilla/stations.md | 10 ++ 9 files changed, 302 insertions(+) create mode 100644 docs/home.md create mode 100644 docs/recipes/adding_recipes/blast_furnace.md create mode 100644 docs/recipes/adding_recipes/campfire.md create mode 100644 docs/recipes/adding_recipes/crafting_table.md create mode 100644 docs/recipes/adding_recipes/furnace.md create mode 100644 docs/recipes/adding_recipes/smoker.md create mode 100644 docs/recipes/adding_recipes/stonecutter.md create mode 100644 docs/recipes/removing_recipes.md create mode 100644 docs/vanilla/stations.md diff --git a/docs/home.md b/docs/home.md new file mode 100644 index 000000000000..4c7469e95936 --- /dev/null +++ b/docs/home.md @@ -0,0 +1,7 @@ +# CraftTweaker + +CraftTweaker is a Minecraft mod that allows modpack authors to customize the game, allowing for new recipes to be added, old ones to be removed and just general modpack customization! + +CraftTweaker uses a custom scripting language called ZenScript, which is a fairly easy to learn language that fits CraftTweaker's needs more than an already existing language would (such as JavaScript). + +This site will hopefully help guide you through everything that is possible with CraftTweaker, all that would be left is for you to use the knowledge and create something amazing! \ No newline at end of file diff --git a/docs/recipes/adding_recipes/blast_furnace.md b/docs/recipes/adding_recipes/blast_furnace.md new file mode 100644 index 000000000000..b112d3cb9b61 --- /dev/null +++ b/docs/recipes/adding_recipes/blast_furnace.md @@ -0,0 +1,27 @@ +# Blast Furnace + + +## Syntax +Blast Furnaces use several different new syntax that you will be using: +```zenscript +addRecipe(recipeName as String, output as crafttweaker.api.item.IItemStack, input as crafttweaker.api.item.IIngredient, xp as float, cookTime as int); +``` +Just like before, let's break this down: +```zenscript +addRecipe(recipeName, output, input, xp, cookTime); +``` + +| Name | Function | Data Type | Required | +|------|----------|-----------|----------| +| recipeName | name of the new recipe | string | yes | +| output | IItemStack output of the recipe | IItemStack | yes | +| input | IIngredient input of the recipe | IIngredient | yes | +| xp | how much xp the player gets | float | yes | +| cookTime | how long it takes to cook | integer | yes | + +Here is an example: + +```zenscript +addRecipe("diamond_ingot", , , 1.0, 200); +``` +What you see here is that smelting an iron ore would award a diamond. \ No newline at end of file diff --git a/docs/recipes/adding_recipes/campfire.md b/docs/recipes/adding_recipes/campfire.md new file mode 100644 index 000000000000..1f025b60557d --- /dev/null +++ b/docs/recipes/adding_recipes/campfire.md @@ -0,0 +1,27 @@ +# Campfire + + +## Syntax +Campfires use several different new syntax that you will be using: +```zenscript +addRecipe(recipeName as String, output as crafttweaker.api.item.IItemStack, input as crafttweaker.api.item.IIngredient, xp as float, cookTime as int); +``` +Just like before, let's break this down: +```zenscript +addRecipe(recipeName, output, input, xp, cookTime); +``` + +| Name | Function | Data Type | Required | +|------|----------|-----------|----------| +| recipeName | name of the new recipe | string | yes | +| output | IItemStack output of the recipe | IItemStack | yes | +| input | IIngredient input of the recipe | IIngredient | yes | +| xp | how much xp the player gets | float | yes | +| cookTime | how long it takes to cook | integer | yes | + +Here is an example: + +```zenscript +addRecipe("cooked_glowstone", , , 10.0, 150); +``` +What you see here is that smelting a glowstone dust would award a glowstone. \ No newline at end of file diff --git a/docs/recipes/adding_recipes/crafting_table.md b/docs/recipes/adding_recipes/crafting_table.md new file mode 100644 index 000000000000..5054a59fe5ab --- /dev/null +++ b/docs/recipes/adding_recipes/crafting_table.md @@ -0,0 +1,95 @@ +# Crafting Table + + +## Introduction + +There are three main types of recipes for a crafting table. Each one serves a similar but very distinct purpose. + +| Name | Function | +|------|----------| +| addShaped | A shaped recipe. A shaped recipe is a recipe like a pickaxe, in which the ingredients have to be arranged in a specific way or the recipe will not produce. | +| addShapedMirrored | A shaped(mirrored) recipe. This is a recipe that is shaped, but will also work flipped, like when you craft an axe. | +| addShapeless | This is the recipe type when you put a flower in your crafting table and it gives you dye. It doesnt matter where the flower goes, as long as its just the flower. | + +Some things to note: +- The 2x2 crafting grid located in the inventory is considered a `craftingTable` + + +## Syntax: +```zenscript +craftingTable.addShaped(String recipeName, IItemStack output, IIngredient[][] ingredients, @ZenCodeType.Optional RecipeFunctionMatrix recipeFunction); +``` +Okay, that's the technical syntax. Let's digest that into its most basic: +```zenscript +craftingTable.addShaped(recipeName, output, ingredients, recipeFunction); +``` + +Now what does all that mean? + +| Name | Function | Data Type | Required | +|------|----------|-----------|----------| +| recipeName | Used to create an identifier for your recipe. Must be unique for and from each recipe | String | Yes | +| output | This value is what item you want the recipe to make. | IIngredient | Yes | +| ingredients | The actual recipe | Matrix | Yes | +| recipeFunction | ? | ? | No | + +`recipeName` is presented as a string in lowercase, such as `"my_new_recipe"`. It is good practice to create a relevant name, like `"custom_arrow_recipe"` for an Arrow recipe. +`output` is presented as ``. The `<>` and `item:` are required. An example would look like this: `` +`ingredients` is where the fun part comes in. The `IIngredient` is presented as a matrix, which would look something like this: + +3x3 +```zenscript +[[, , ], +[, , ], +[, , ]] +``` + +2x2 +```zenscript +[[, ], +[, ]] +``` + + +### Add Shaped Recipe +```zenscript +craftingTable.addShaped(String recipeName, IItemStack output, IIngredient[][] ingredients, @ZenCodeType.Optional RecipeFunctionMatrix recipeFunction); +``` +This script will add a shaped recipe to the game. Example: +```zenscript +craftingTable.addShaped("iron_tipped_arrow", , [ +[, , ], +[, , ], +[, , ] +]); +``` +This script would create a recipe that not only allows arrows to be crafted diagonally, but with an iron ingot in place of the typical flint. + + +### Add Shaped(Mirrored) Recipe +```zenscript +addShapedMirrored(String recipeName, IItemStack output, IIngredient[][] ingredients, @ZenCodeType.Optional RecipeFunctionMatrix recipeFunction); +``` +This script will add a shaped(mirrored) recipe to the game. Example: +```zenscript +craftingTable.addShapedMirrored("iron_tipped_arrow", , [ +[, , ], +[, , ], +[, , ] +]); +``` +This script is almost identical to the example provided for a `shapedRecipe`, except now, the recipe can be input from both diagonals and still give the output. Good for recipes like axes, arrows, bows, and fishing rods that commonly get flipped around. + + +### Add Shapeless Recipe +```zenscript +addShapeless(String recipeName, IItemStack output, IIngredient[] ingredients, @ZenCodeType.Optional RecipeFunctionArray recipeFunction); +``` +This script will add a shapeless recipe to the game. I will provide a 2x2 example, however this would work in a 3x3 as well: +```zenscript +craftingTable.addShapeless("iron_tipped_arrow", , [ +[, ], +[,] +]); +``` +This script would allow arrows to be crafted in a 2x2 grid by just throwing in those items anywhere. \ No newline at end of file diff --git a/docs/recipes/adding_recipes/furnace.md b/docs/recipes/adding_recipes/furnace.md new file mode 100644 index 000000000000..5f0ff5433b1e --- /dev/null +++ b/docs/recipes/adding_recipes/furnace.md @@ -0,0 +1,27 @@ +# Furnace + + +## Syntax +Furnaces use several different new syntax that you will be using: +```zenscript +addRecipe(recipeName as String, output as crafttweaker.api.item.IItemStack, input as crafttweaker.api.item.IIngredient, xp as float, cookTime as int); +``` +Just like before, let's break this down: +```zenscript +addRecipe(recipeName, output, input, xp, cookTime); +``` + +| Name | Function | Data Type | Required | +|------|----------|-----------|----------| +| recipeName | name of the new recipe | string | yes | +| output | IItemStack output of the recipe | IItemStack | yes | +| input | IIngredient input of the recipe | IIngredient | yes | +| xp | how much xp the player gets | float | yes | +| cookTime | how long it takes to cook | integer | yes | + +Here is an example: + +```zenscript +addRecipe("arrow_to_glowing_arrow", , , 7283.0, 9999); +``` +What you see here is that smelting an arrow would award a spectral arrow, a extremely huge amount of exp, in exchange for a very large cook time. \ No newline at end of file diff --git a/docs/recipes/adding_recipes/smoker.md b/docs/recipes/adding_recipes/smoker.md new file mode 100644 index 000000000000..a5e28e6fda73 --- /dev/null +++ b/docs/recipes/adding_recipes/smoker.md @@ -0,0 +1,27 @@ +# Smoker + + +## Syntax +Smokers use several different new syntax that you will be using: +```zenscript +addRecipe(recipeName as String, output as crafttweaker.api.item.IItemStack, input as crafttweaker.api.item.IIngredient, xp as float, cookTime as int); +``` +Just like before, let's break this down: +```zenscript +addRecipe(recipeName, output, input, xp, cookTime); +``` + +| Name | Function | Data Type | Required | +|------|----------|-----------|----------| +| recipeName | name of the new recipe | string | yes | +| output | IItemStack output of the recipe | IItemStack | yes | +| input | IIngredient input of the recipe | IIngredient | yes | +| xp | how much xp the player gets | float | yes | +| cookTime | how long it takes to cook | integer | yes | + +Here is an example: + +```zenscript +addRecipe("cooked_diamond", , , 1.0, 100); +``` +What you see here is that smelting a raw porkchop would award a diamond. \ No newline at end of file diff --git a/docs/recipes/adding_recipes/stonecutter.md b/docs/recipes/adding_recipes/stonecutter.md new file mode 100644 index 000000000000..928c5e035236 --- /dev/null +++ b/docs/recipes/adding_recipes/stonecutter.md @@ -0,0 +1,19 @@ +# Stonecutter + + +## Syntax +Stonecutters use similar syntax to a furnace, with a few key omissions: +```zenscript +addRecipe(recipeName as String, output as crafttweaker.api.item.IItemStack, input as crafttweaker.api.item.IIngredient); +``` +Just like before, let's break this down: +```zenscript +addRecipe(recipeName, output, input); +``` + +Here is an example: + +```zenscript +addRecipe("arrow_to_glowing_arrow", , ); +``` +What you see here is that "stonecutting" an arrow would award a spectral arrow. \ No newline at end of file diff --git a/docs/recipes/removing_recipes.md b/docs/recipes/removing_recipes.md new file mode 100644 index 000000000000..c9990d7c6332 --- /dev/null +++ b/docs/recipes/removing_recipes.md @@ -0,0 +1,63 @@ +# Removing Recipes +In order to remove recipes from the game, you will use the desired stationID followed by any of the below functions. All recipe-related globals in CraftTweaker use these following functions, meaning these scripts will work for removing recipes for every vanilla and modded crafting station. +**- THESE FUNCTIONS WILL NOT WORK BY THEMSELVES.** In order to use the listed functions, each script will have to start with the stationID that you want to remove the recipe from. For instance: +```zenscript +craftingTable.removeRecipe(); +``` +Would remove the arrow recipe from a crafting table, but if you could craft it in a smoker, it wont remove it from there. Any and all scripts listed below will not include the stationID. You can find a list of all stationIDs at [INSERT]. + + + +## Functions: + + +### Remove a Recipe +```zenscript +removeRecipe(IItemStack output); +``` +This script will remove a(ll) recipes for a referenced item. For instance, typing +```zenscript +removeRecipe(); +``` +will remove all recipes for a normal Arrow. + + +### Remove by Name +```zenscript +removeByName(String name); +``` +This script will remove every recipe for every item that has the input name. For instance, +```zenscript +removeByName("minecraft:arrow"); +``` +will remove the vanilla recipe for an Arrow. In function, this is identical to the script you were just showed, but this one is better for removing a *certain* recipe instead of all of an items recipes because you can replace `minecraft:arrow` with `:arrow` to ONLY remove that mods recipe for an Arrow. + + +### Remove by Mod ID +```zenscript +removeByModid(String modid); +``` +This script will remove every recipe from a single mod by referencing its `id`. For instance, Minecraft has an id of `minecraft`, so typing +```zenscript +removebyModid("minecraft"); +``` +would remove *every* recipe in Vanilla minecraft, but not recipes added by other mods. + + +### Remove by Regex +```zenscript +removeByRegex(String regex); +``` +This script will remove every recipe that contains the given string somewhere in its name. For instance, +```zenscript +removeByRegex(".*arrow.*"); +``` +would remove every recipe, added by every mod, for every item whose recipe contains the string "arrow". This one is a bit more complex to understand, but try running that example script and then use a mod like `JEI` to try and find recipes for an arrow. +**Note: The `.*` tag searches anywhere in the recipe name. Without it, the string would have to be an exact match. Then it isnt very helpful, because a normal `removeRecipe` would do the same trick.** + + +### Remove All +```zenscript +removeAll(); +``` +This script will remove every recipe from the game. It isnt recommended for general use, but its an option. \ No newline at end of file diff --git a/docs/vanilla/stations.md b/docs/vanilla/stations.md new file mode 100644 index 000000000000..ae2632ce0de6 --- /dev/null +++ b/docs/vanilla/stations.md @@ -0,0 +1,10 @@ +## Stations + +Crafting Table - `craftingTable` +Furnace - `furnace` +Smoker - `smoker` +Blast Furnace - `blastFurnace` +Stonecutter - `stoneCutter` +Campfire - `campfire` + +*As more managers are added, more stations will be added* \ No newline at end of file From ea2c190bfe303146850e67715097e48775eb650b Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sun, 22 Mar 2020 19:51:14 -0500 Subject: [PATCH 02/14] Delete examples.md redundant, examples provided per-file now --- docs/examples.md | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 docs/examples.md diff --git a/docs/examples.md b/docs/examples.md deleted file mode 100644 index de82bb86c615..000000000000 --- a/docs/examples.md +++ /dev/null @@ -1,6 +0,0 @@ -# Examples -Script examples can be found here: - -[Examples](https://github.com/CraftTweaker/CraftTweaker-Examples/tree/master/1.14) - -These are the scripts that have been used to test CraftTweaker in 1.14, they should all work and load just fine, you can use them to get familiarized with the new syntax \ No newline at end of file From 98c17d8414fda9e7afb002c4e05f1a4e0dbfc9a4 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sun, 22 Mar 2020 19:52:34 -0500 Subject: [PATCH 03/14] Delete index.md renamed "home.md" for clarity --- docs/index.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 docs/index.md diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 4c7469e95936..000000000000 --- a/docs/index.md +++ /dev/null @@ -1,7 +0,0 @@ -# CraftTweaker - -CraftTweaker is a Minecraft mod that allows modpack authors to customize the game, allowing for new recipes to be added, old ones to be removed and just general modpack customization! - -CraftTweaker uses a custom scripting language called ZenScript, which is a fairly easy to learn language that fits CraftTweaker's needs more than an already existing language would (such as JavaScript). - -This site will hopefully help guide you through everything that is possible with CraftTweaker, all that would be left is for you to use the knowledge and create something amazing! \ No newline at end of file From 2119a6088e62ca330727694ef3d1187ccc47f60c Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sun, 22 Mar 2020 19:53:28 -0500 Subject: [PATCH 04/14] Delete recipe_managers.md renamed "removing_recipes.md" and expanded upon --- docs/recipes/recipe_managers.md | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 docs/recipes/recipe_managers.md diff --git a/docs/recipes/recipe_managers.md b/docs/recipes/recipe_managers.md deleted file mode 100644 index 740deeb1228c..000000000000 --- a/docs/recipes/recipe_managers.md +++ /dev/null @@ -1,27 +0,0 @@ -# Recipe managers - - -All recipe related globals extend from this class, and have all of these methods. - -```zenscript -removeRecipe(IItemStack output); -``` - -```zenscript -removeByName(String name); -``` - -```zenscript -removeByModid(String modid); -``` - -```zenscript -removeByRegex(String regex); -``` - -```zenscript -removeAll(); -``` - - - From def03d1e156a823ba987ffb5b90d96f49f127d42 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sun, 22 Mar 2020 19:53:56 -0500 Subject: [PATCH 05/14] Delete crafting_table.md moved to "removing_recipes" --- docs/recipes/crafting_table.md | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 docs/recipes/crafting_table.md diff --git a/docs/recipes/crafting_table.md b/docs/recipes/crafting_table.md deleted file mode 100644 index d79a29dea6ac..000000000000 --- a/docs/recipes/crafting_table.md +++ /dev/null @@ -1,20 +0,0 @@ -# Crafting Table - -### Addition: -```zenscript -craftingTable.addShaped(String recipeName, IItemStack output, IIngredient[][] ingredients, @ZenCodeType.Optional RecipeFunctionMatrix recipeFunction); - -craftingTable.addShaped("shaped_mirror_test", , [[, ], [, ], [, ]], null); - -``` - -```zenscript -addShapedMirrored(String recipeName, IItemStack output, IIngredient[][] ingredients, @ZenCodeType.Optional RecipeFunctionMatrix recipeFunction); - -``` - -```zenscript -addShapeless(String recipeName, IItemStack output, IIngredient[] ingredients, @ZenCodeType.Optional RecipeFunctionArray recipeFunction); - -``` - From ff28a5fabb9b6e89439fb22f22b2d3b7e6be3c80 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:29:25 -0500 Subject: [PATCH 06/14] Add files via upload --- mkdocs.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 7943a8325267..0096381dc0f1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,15 +1,21 @@ # If you add a page, you must add it to the index here pages: - - Home: 'index.md' + - Home: 'home.md' - Getting Started With Scripts: 'getting_started.md' - Commands: "commands.md" - - Examples: "examples.md" - Recipes: - - Recipe Managers: "recipes/recipe_managers.md" - - Crafting Table: "recipes/crafting_table.md" + - Removing Recipes: "recipes/removing_recipes.md" + - Adding Recipes: + - Blast Furnace: "recipes/blast_furnace.md" + - Campfire: "recipes/campfire.md" + - Crafting Table: "recipes/crafting_table.md" + - Furnace: "recipes/furnace.md" + - Smoker: "recipes/smoker.md" + - Stone Cutter: "recipes/stonecutter.md" - Vanilla: - How to: - How to: 'vanilla/how_to/how_to.md' + - Stations: "vanilla/stations.md" - Api: - Block: - Material: From f11fcfff6e5d664b96499bd9630a48817f98b4db Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:36:44 -0500 Subject: [PATCH 07/14] Add files via upload --- mkdocs.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 0096381dc0f1..7316fc17061b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,12 +6,12 @@ pages: - Recipes: - Removing Recipes: "recipes/removing_recipes.md" - Adding Recipes: - - Blast Furnace: "recipes/blast_furnace.md" - - Campfire: "recipes/campfire.md" - - Crafting Table: "recipes/crafting_table.md" - - Furnace: "recipes/furnace.md" - - Smoker: "recipes/smoker.md" - - Stone Cutter: "recipes/stonecutter.md" + - Blast Furnace: "recipes/adding_recipes/blast_furnace.md" + - Campfire: "recipes/adding_recipes/campfire.md" + - Crafting Table: "recipes/adding_recipes/crafting_table.md" + - Furnace: "recipes//adding_recipes/furnace.md" + - Smoker: "recipes/adding_recipes/smoker.md" + - Stone Cutter: "recipes/adding_recipes/stonecutter.md" - Vanilla: - How to: - How to: 'vanilla/how_to/how_to.md' From e1d07eb169da8ad9502443aadbe2ed6e7254b038 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:43:13 -0500 Subject: [PATCH 08/14] Rename home.md to index.md --- docs/{home.md => index.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/{home.md => index.md} (90%) diff --git a/docs/home.md b/docs/index.md similarity index 90% rename from docs/home.md rename to docs/index.md index 4c7469e95936..bb8594cda7e7 100644 --- a/docs/home.md +++ b/docs/index.md @@ -4,4 +4,4 @@ CraftTweaker is a Minecraft mod that allows modpack authors to customize the gam CraftTweaker uses a custom scripting language called ZenScript, which is a fairly easy to learn language that fits CraftTweaker's needs more than an already existing language would (such as JavaScript). -This site will hopefully help guide you through everything that is possible with CraftTweaker, all that would be left is for you to use the knowledge and create something amazing! \ No newline at end of file +This site will hopefully help guide you through everything that is possible with CraftTweaker, all that would be left is for you to use the knowledge and create something amazing! From 5243ea3589f7107647776c3bca97227a706dd40a Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:44:02 -0500 Subject: [PATCH 09/14] Update mkdocs.yml --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 7316fc17061b..32ec403df89c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,6 @@ # If you add a page, you must add it to the index here pages: - - Home: 'home.md' + - Home: 'index.md' - Getting Started With Scripts: 'getting_started.md' - Commands: "commands.md" - Recipes: From c4b8b7fcd37c4aa6cfdfa8d4a19947b7d8c288c5 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:58:35 -0500 Subject: [PATCH 10/14] Update getting_started.md --- docs/getting_started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index 0ad02f376a97..a97f6ad64371 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -71,4 +71,6 @@ a multiline comment! */ ``` -Just note, that `#` comments are also used for PreProcessors (TODO link to PreProcessors when they are documented), so while they are still valid comments, they could cause unwanted side effects. \ No newline at end of file +Just note, that `#` comments are also used for PreProcessors (TODO link to PreProcessors when they are documented), so while they are still valid comments, they could cause unwanted side effects. + +When you feel comfortable with the basics of scripts, feel free to navigate to Recipes to learn how to edit them. From 3cf26948c041afed5e4bb998329cfad43f9db507 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 14:58:54 -0500 Subject: [PATCH 11/14] Update getting_started.md --- docs/getting_started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting_started.md b/docs/getting_started.md index a97f6ad64371..0b89bf2da381 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -73,4 +73,4 @@ multiline comment! */ Just note, that `#` comments are also used for PreProcessors (TODO link to PreProcessors when they are documented), so while they are still valid comments, they could cause unwanted side effects. -When you feel comfortable with the basics of scripts, feel free to navigate to Recipes to learn how to edit them. +When you feel comfortable with the basics of scripts, feel free to navigate to Recipes to learn how to edit recipes. From ba21f625cca4a92330914fa30ae1412306b8dab3 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 15:04:47 -0500 Subject: [PATCH 12/14] Update getting_started.md --- docs/getting_started.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/getting_started.md b/docs/getting_started.md index 0b89bf2da381..982a37ea170e 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -73,4 +73,8 @@ multiline comment! */ Just note, that `#` comments are also used for PreProcessors (TODO link to PreProcessors when they are documented), so while they are still valid comments, they could cause unwanted side effects. +## Live Editing + +You can use the command `/reload` in CraftTweaker to reload all of your scripts in-game! This feature was deprecated in 1.12.2 but was brought back in 1.14.4 due to a change in when scripts were loaded in in Forge! Use this feature to your advantage to save a lot of time. + When you feel comfortable with the basics of scripts, feel free to navigate to Recipes to learn how to edit recipes. From 5746ecd9b7a0ad2c8f1b95904f9dc1b41bb2eec3 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 15:09:49 -0500 Subject: [PATCH 13/14] Create syntax.md --- docs/syntax.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/syntax.md diff --git a/docs/syntax.md b/docs/syntax.md new file mode 100644 index 000000000000..c03326a8699e --- /dev/null +++ b/docs/syntax.md @@ -0,0 +1,10 @@ +# Syntax + +## Avoiding Script Errors +- Every function in your script has to end with a semicolon (`;`). You will see this inside examples and you will get used to doing it very quickly. +- Use proper brackets. + - Remember to close your brackets. Most text editors come with either a bracket pair highlighting or automatically creating a closing bracket. + +## Referencing +- Every reference to an item in game **must** be referenced with `<>`. + - `` From 1fe33113b54f9ee3f015652d6a6158ee82828438 Mon Sep 17 00:00:00 2001 From: InQuognito <44120299+InQuognito@users.noreply.github.com> Date: Sat, 28 Mar 2020 15:10:36 -0500 Subject: [PATCH 14/14] Update mkdocs.yml --- mkdocs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 32ec403df89c..938b420f300e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,8 @@ pages: - Home: 'index.md' - Getting Started With Scripts: 'getting_started.md' - - Commands: "commands.md" + - Syntax: 'syntax.md' + - Commands: 'commands.md' - Recipes: - Removing Recipes: "recipes/removing_recipes.md" - Adding Recipes: