diff --git a/src/SUMMARY.md b/src/SUMMARY.md index d900957..c967010 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -59,6 +59,9 @@ - [Roughen](tools/manipulation/roughen.md) - [Shatter](tools/manipulation/shatter.md) - [Extrude](tools/manipulation/extrude.md) + - [Modify](tools/manipulation/modify.md) - [Ruler Tool](tools/ruler.md) - [Path Tool](tools/path.md) - +- [Advanced](advanced/intro.md) + - [Commands](advanced/commands.md) + - [Config](advanced/configuration.md) diff --git a/src/advanced/commands.md b/src/advanced/commands.md new file mode 100644 index 0000000..72fa409 --- /dev/null +++ b/src/advanced/commands.md @@ -0,0 +1,31 @@ +# Commands + +Commands are essential for management and debugging. + +### /axiomdocs + +- This command provides a link to this documentation. + +### /axiomenablecheats + +- Forces the world to have cheats enabled, even if they are disabled. + +### /axiomhandshake + +- Tests the connection by emulating a player join on a server. + +### /axiomintro + +- Displays the introduction shown when first using the mod. + +### /axiomtogglecapability + +- Target a capability and toggle it. + +### /whynoaxiom + +- Returns Axiom's status and information on how to resolve issues. + +## Compatible commands + +`//pos1` and `//pos2` are part of Axiom, but are intended to be used alongside WorldEdit. \ No newline at end of file diff --git a/src/advanced/configuration.md b/src/advanced/configuration.md new file mode 100644 index 0000000..57abecd --- /dev/null +++ b/src/advanced/configuration.md @@ -0,0 +1,41 @@ +# Configuration + +Axiom has its own dedicated configuration located in `.minecraft/config/axiom` containing 3 folders and 3 files. + +The folders are used to store saved [Blueprints](editor/blueprints.md), [Heightmaps](editor/tools/heightmap/elevation.md) and [Tool Presets](editor/toolpresets.md) so even if the mod is removed, your assets are saved. + +The files contain the more important information such as UI layout and enabled capabilities. Axiom uses a variant of JSON called HOCON (Human-Optimized Config Object Notation). + +Below are the three files alongside their descriptions. + +### `.axiominternal.hocon` + +| Key | Description | +| ------------------------------ | --------------------------------------------------------------------- | +| completedTutorials | Lists the tools that have shown their short tutorial. | +| customDowngradeSuggestions | Lists the downgrades suggested by Axiom. | +| globalScale | A float representing the [Editor](editor/intro.md) UI Scale. | +| lastTranslationCount | A value determining the amount of translations. | +| openEditorWindowTypes | A list of open windows in the editor. | +| rootEditorPalette | The default block palette for the editor mode. | +| savedCustomTheme | Stores the currently active theme as a string. | +| showCloseWindowButton | A boolean to toggle the "x" to close windows. | +| showNon90DegreeRotationWarning | A boolean to toggle the warning before applying non-90-degree angles. | +| showToolMaskOpenWarning | A boolean to toggle the warning when using tool masks. | +| shownIntroduction | A boolean representing whether the introduction has been completed. | + +### `.axiom.hocon` + +| Key | Description | +| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| blockAttributes | Contains the currently toggled block attributes. | +| blueprint | Stores the toggle to automatically refresh and a list of all used blueprint tags. | +| capabilities | Lists all abilities and their state. Also contains the `autoSwapToCreative` boolean that controls switching to creative when opening the [context menu](builder/contextmenu.md). | +| keybinds | Stores in-game keybinds and settings for the Builder Mode and camera movement. | +| toolKeybinds | Stores all Editor keybinds for switching tools. | +| rendering | Stores booleans representing the toggles in the Toolbox found in the [Context Menu](builder/contextmenu.md). | + + +### `imgui.ini` + +This file is generally not meant to be modified, hence why it uses a different file format. However, if you're having an issue with a specific window that you can't recover, you can either edit or delete this file to fix the issue. \ No newline at end of file diff --git a/src/advanced/intro.md b/src/advanced/intro.md new file mode 100644 index 0000000..a8ce53a --- /dev/null +++ b/src/advanced/intro.md @@ -0,0 +1,3 @@ +# Advanced + +The advanced section covers some of the niche but good-to-know bits of information such as commands and configurations. This can be especially helpful for debugging issues. \ No newline at end of file diff --git a/src/editor/mainmenubar.md b/src/editor/mainmenubar.md index 2ad3d54..0145040 100644 --- a/src/editor/mainmenubar.md +++ b/src/editor/mainmenubar.md @@ -9,7 +9,7 @@ The main menu bar gives users access to crucial functionality of the mod. Here y | Export Schematic | Exports a selection as a schematic file | | Open Reference Image | Adds a window with an image of your choice | | Load Bedrock Packs | Allows you to import Bedrock Edition textures or models. | -| Save Selection as CSV | Exports a selection to a CSV[^note3] format. | +| Save Selection as CSV | Exports a selection to a CSV[^note1] format. | | Save Clipboard as JSON Model | This allows you to take blocks and convert them to an item model. Models can be used in resource packs or imported into Blockbench. | ## Edit @@ -43,11 +43,11 @@ The View submenu lets you configure options related to viewing and rendering cer |----------------|------------------|-------------| | New View | None | Create a new [View](views.html) | | Show Selection | None | Lets you toggle the rendering of your selections | -| Show Biomes | Ctrl+B | Enables the biome overlay[^note1] | +| Show Biomes | Ctrl+B | Enables the biome overlay[^note2] | | Show Key Presses| None | This shows your inputs including mouse clicks on the bottom right of the viewport. This can be useful for making tutorials. | | UI Scale | None | A slider ranging from 0.5 to 2. This lets you change the size of all graphical elements in the editor mode. | | Min Brightness | None | A slider ranging from 0 to 1. This lets you change how dark unlit places look in your world. A value of 1 means all blocks are fully lit, this is also known as Fullbright. | -| Fluid Opacity | None | A slider ranging from 0 to 1. This lets you change the opacity of transluscent[^note2] fluids to make it easier to look through. A value of 0 will make the fluid invisible. | +| Fluid Opacity | None | A slider ranging from 0 to 1. This lets you change the opacity of transluscent[^note3] fluids to make it easier to look through. A value of 0 will make the fluid invisible. | ## Operations @@ -89,10 +89,11 @@ The **Help** submenu contains useful information and configuration options. The dropdown contains links to information and resources. The style editor can be accessed through this window, allowing you to change and import custom colours for the UI. -[^note1]: Be aware that biomes in Minecraft are defined in a 4x4x4 grid. However, to make biomes feel more natural, vanilla warps the biomes visually. The biome overlay shows the "real" position of biomes, while biome blending and the f3 screen show the "warped" position of biomes. - -[^note2]: Lava and other non-translucent fluids (if the game is modded) are not affected by opacity due to performance and mod compatibility concerns. +## References +[^note1]: comma-separated values (CSV) is a plaintext format that uses commas to separate values in a table-like manner. -[^note3]: comma-separated values (CSV) is a plaintext format that uses commas to separate values in a table-like manner. +[^note2]: Be aware that biomes in Minecraft are defined in a 4x4x4 grid. However, to make biomes feel more natural, vanilla warps the biomes visually. The biome overlay shows the "real" position of biomes, while biome blending and the f3 screen show the "warped" position of biomes. + +[^note3]: Lava and other non-translucent fluids (if the game is modded) are not affected by opacity due to performance and mod compatibility concerns. [^note4]: [CIELAB](https://en.wikipedia.org/wiki/CIELAB_color_space) is a type of colour space that can utilise the XYZ coordinates to display colours. \ No newline at end of file diff --git a/src/editor/toolmasks.md b/src/editor/toolmasks.md index 8f3f663..b6c1fe7 100644 --- a/src/editor/toolmasks.md +++ b/src/editor/toolmasks.md @@ -5,33 +5,56 @@ Tool Masks empower users to set up rules for tools, applying their effects only The conditions fall into two main categories: Logic and Masks. ## Logic conditions - -- **Any** -The 'Any' condition enables any rules within this block to take effect. For example, when selecting multiple blocks to mask, select 'any' block that matches grass_block or stone. - -- **All** -The 'All' condition requires all rules within this block to apply. For instance, if you want to select a block that has air above and dirt below it. However, conflicting rules won't function in the same 'All' block, meaning you can't have two 'block =' masks or two 'above =' masks simultaneously. But, it's possible to nest another 'Any' block inside. -- **Not** -The 'Not' condition reverses the rule outcomes, making them true only when the original conditions are not met. For example, setting the rule 'above = air' within a 'Not' block selects all blocks that do not have air above them. - Combining these logic conditions allows for a broad range of expressions in masks, enabling you to select almost all blocks meeting specific criteria. - + +| Logic | Description | +|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **OR** | The `OR` condition enables any rules within this block to take effect. For example, when selecting multiple blocks to mask, select blocks that match grass_block `OR` stone. | +| **AND** | The `AND` condition requires all rules within this block to apply. For instance, if you want to select a block that has air above and dirt below it. However, conflicting rules won't function in the same `ANY` block, meaning you can't have two `block =` masks or two `above =` masks simultaneously. But, it's possible to nest another `AND` block inside. | +| **NOT** | The `NOT` condition reverses the rule outcomes, making them true only when the original conditions are not met. For example, setting the rule `above = air` within a `NOT` block selects all blocks that do not have air above them. | +| **OFFSET** | The `OFFSET` condition allows coordinate input to apply a mask for a nearby block relative to the current block. For example, using `offset(0,-1,0){ surface }` will mask block 1 block above the surface. | + ## Masks Masks are conditions that depend on the target's state or the surrounding blocks' state. - -- **Block** -The 'Block' mask returns true when the target matches the specified block or block state. -- **Y** -The 'Y' mask returns true when the target aligns with the given condition relating to the block's Y coordinate level. There are several conditions for the Y mask which can be modified by clicking on the '=' sign. -- **In Selection** -The 'In Selection' condition returns true when the target block is within the user-defined selection area. -- **Above** -The 'Above' condition is true when the block directly above the target block matches the specified block or block state. -- **Below** -The 'Below' condition is true when the block directly below the target block matches the specified block or block state. -- **Near** -The 'Near' condition is true when any of the blocks in the 3x3 area (26 blocks) surrounding the target match the specified block or block state. -- **Neighbor** -The 'Neighbor' condition returns true when any of the six blocks directly adjacent (up, down, north, south, east, west) to the target match the specified block or block state which allows the mask to check the immediate vicinity of the target block. + +| Mask | Description | +|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Block** | The `Block` mask returns true when the target matches the specified block or block state. | +| **Above** | The `Above` condition is true when the block directly above the target block matches the specified block or block state. | +| **Below** | The `Below` condition is true when the block directly below the target block matches the specified block or block state. | +| **Near** | The `Near` condition is true when any of the blocks in the set radius surrounding the target match the specified block or block state. | +| **Neighbour** | The `Neighbor` condition returns true when any of the six blocks directly adjacent (up, down, north, south, east, west) to the target match the specified block or block state which allows the mask to check the immediate vicinity of the target block. | +| **Adjacent** | The `Adjacent` condition returns true when any of the four horizontally touching blocks match the specified block or block state. | +| **Y** | The `Y` mask returns true when the target aligns with the given condition relating to the block's Y coordinate level. There are several conditions for the Y mask which can be modified by clicking on the `=` sign. | +| **Angle** | The `Angle` mask utilises two inputs. The `Angle` input is used to mask a specific angle and the `Range` input is how many angles are used originating from the `Angle` input. For example, an angle of 90 and a range of 10 would cover all angles from 80 to 100. | +| **In Selection** | The `In Selection` condition returns true when the target block is within the user-defined selection area. | +| **Can See Sky** | The `Can See Sky` condition returns true if the target block has direct access to the sky. | +| **Surface** | The `Surface` mask returns true if the block is adjacent to air or liquids. | + +# Scripting + +Similar to the [Script Brush](/tools/painting/scriptbrush.md), the mask scripting allows users to input custom scripts using Lua. However, the rule of returning a boolean value still applies. + +## Custom Variables + +| Variables | Description | Example | +|-----------|----------------------------------------------------------------|--------------| +| x,y,z | These three variables represent the XYZ coordinates. | if y==5 | +| blocks | Can be used to retrieve the blockstate[^note4] ID for a block. | blocks.stone | + +## Custom Functions + +|
-chance=$float(Chance,0.5,0,1)$ -multiplier=$float(Multiplier,1,0,2)$ +> [!NOTE] +> Feel free to copy these and mess around with them. + +### **Novice** + +This script below is very basic, it replaces oak leaves with birch leaves. + +```lua +if getBlock(x,y,z)==blocks.oak_leaves then + return blocks.birch_leaves +end +``` + ++``` + +++ +### **Advanced** + +This script places pink petal flowers using simplex noise to control the block property. + +```lua +multiplier=$float(Multiplier,1,0,2)$ noise=getSimplexNoise(x/8,y/8,z/8) -if getBlock(x,y-1,z)==blocks.water and getBlock(x,y,z)==blocks.air and noise<(0.5*multiplier) and math.random()< chance then - return blocks.lily_pad +if getBlock(x,y,z)==blocks.air and isSolid(getBlock(x,y-1,z)) and noise<(0.75*multiplier) then + return withBlockProperty(blocks.pink_petals,"flower_amount="..math.floor((getSimplexNoise(x/2,y/2,z/2,0)*4))) end -Novice Code Breakdown
+ The if check ensures that the current block is oak leaves. Using "getBlock(x,y,z)" targets the active block. + + Then "blocks.oak_leaves" is used to check if the block IDs match. + + Finally, the script returns birch leaves, therefore replacing oak leaves. + +
+