### Run the Server Installer Source: https://github.com/ftbteam/docs/blob/main/docs/support/Guides/Server/index.md Execute the server installer to begin the installation process. Replace `{id}` and `{versionid}` with the correct numbers from your installer file name. The installer will prompt you for necessary information. ```bash ./serverinstaller_{id}_{versionid} ``` -------------------------------- ### Navigate to Server Directory Source: https://github.com/ftbteam/docs/blob/main/docs/support/Guides/Server/index.md Use the `cd` command to change your current directory to the folder where you have placed the server installer. Replace the example path with your actual server folder location. ```bash cd /home/servers/Stoneblock3 ``` -------------------------------- ### Start the Server Source: https://github.com/ftbteam/docs/blob/main/docs/support/Guides/Server/index.md Once the installation is complete, use the provided `run.sh` script to start your modded Minecraft server. ```bash ./run.sh ``` -------------------------------- ### Start Local Development Server Source: https://github.com/ftbteam/docs/blob/main/README.md Starts a local development server for live previewing changes. No server restart is needed for most updates. ```bash pnpm start ``` -------------------------------- ### Install Dependencies Source: https://github.com/ftbteam/docs/blob/main/README.md Installs project dependencies using pnpm. ```bash pnpm install ``` -------------------------------- ### Grant Execution Permissions Source: https://github.com/ftbteam/docs/blob/main/docs/support/Guides/Server/index.md Make the server installer executable by running this command in the terminal. Ensure you replace `{id}` and `{versionid}` with the specific identifiers from your downloaded installer file. ```bash chmod +x serverinstaller_{id}_{versionid} ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/ftbteam/docs/blob/main/scripts/mesh-weights-gen/README.md Installs project dependencies using the Bun package manager. ```bash bun install ``` -------------------------------- ### Example Usage of Get Integer Node Value Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/API.md Demonstrates how to use the getInt method to retrieve a specific node's integer value with a default. ```java int cooldown = getInt(player, "ftbessentials.home.cooldown", 5); ``` -------------------------------- ### Install MTR on MacOS Source: https://github.com/ftbteam/docs/blob/main/docs/support/Troubleshooting/connection-issues.mdx Use Homebrew to install the MTR tool on MacOS. Ensure Homebrew is installed first. ```bash brew install mtr ``` -------------------------------- ### Configure /home Warmup and Cooldown Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Warmups_Cooldowns.md Example configuration for the /home command to set a 5-second cooldown and a 5-second warmup time. This demonstrates how to adjust these values in the configuration file. ```yaml # Allows users to set 'homes', which they can then freely teleport to by using /home afterwards home: { # Cooldown between /home commands (in seconds) # You can override this with FTB Ranks using ftbessentials.home.cooldown # Default: 10 # Range: 0 ~ 604800 cooldown: 5 # Default: true enabled: true # Max amount of homes a user can have. # You can override this with FTB Ranks using ftbessentials.home.max # Default: 1 # Range: 0 ~ 2147483647 max: 1 # Warm-up time before /home command executes (in seconds) # You can override this with FTB Ranks using ftbessentials.home.warmup # Default: 0 # Range: 0 ~ 604800 warmup: 5 } ``` -------------------------------- ### Example of Excluding Files in FTB Backups 3 Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Backups-3/config.mdx Specify files or patterns to exclude from backups. This example excludes temporary files and session locks. ```toml excluded_files = ["glob:*.neoforge-tmp", "glob:session.lock"] ``` -------------------------------- ### Creating and Configuring a Kit with FTB Ranks Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Ranks_Integration.md Create a kit from inventory and set up a corresponding FTB Ranks permission node to allow players to receive the kit. This example sets up the 'emergency_supplies' kit. ```bash /ftbessentials kit create_from_inventory emergency_supplies 3h ``` ```bash /ftbranks create resupply 100 /ftbranks node add resupply ftbessentials.give_me_kit.emergency_supplies true ``` -------------------------------- ### Custom Server Start Script Source: https://github.com/ftbteam/docs/blob/main/docs/support/Guides/Server/index.md If you prefer not to use the default `run.sh` script, you can delete it and create your own. Ensure your custom script includes the correct Java arguments for launching the server. ```bash # Example of a custom start script (not provided in source, conceptual) # java -Xmx4G -jar forge-server.jar nogui # Replace with your actual Java command and arguments ``` -------------------------------- ### Configure Anvil Command Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Configuration.md Example of configuring the `/anvil` command. Set `enabled` to `false` to disable the command. Requires server restart. ```json5 # Allows users to access an Anvil GUI without needing an Anvil. anvil: { # Default: true enabled: true } ``` -------------------------------- ### Configure Home Command Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Configuration.md Example of configuring the `/home` command, including cooldown, enabled status, maximum homes, and warmup time. These defaults can be overridden with FTB Ranks. Requires server restart. ```json5 # Allows users to set 'homes', which they can then freely teleport to by using /home afterwards home: { # Cooldown between /home commands (in seconds) # You can override this with FTB Ranks using ftbessentials.home.cooldown # Default: 10 # Range: 0 ~ 604800 cooldown: 10, # Default: true enabled: true, # Max amount of homes a user can have. # You can override this with FTB Ranks using ftbessentials.home.max # Default: 1 # Range: 0 ~ 2147483647 max: 1, # Warm-up time before /home command executes (in seconds) # You can override this with FTB Ranks using ftbessentials.home.warmup # Default: 0 # Range: 0 ~ 604800 warmup: 0 } ``` -------------------------------- ### Crafting Table Recipe: Logs from Planks Source: https://github.com/ftbteam/docs/blob/main/README.md Example of a crafting table recipe to create logs from oak planks. ```crafting table planks_oak planks_oak - planks_oak planks_oak - planks_oak planks_oak - result: #logs,3 ``` -------------------------------- ### Smelting Recipe: Compressed Cobblestone Source: https://github.com/ftbteam/docs/blob/main/README.md Example of a smelting recipe to create compressed cobblestone. ```crafting smelting ftbsa:compressed_cobble planks_oak result: ftbsa:#compressed,20 ``` -------------------------------- ### Example Command for Setting Advanced Condition Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Demonstrates how to use the /ftbranks command to set an advanced condition for a rank. This is a quick way to apply conditions without directly editing config files. ```bash /ftbranks condition senior { type: "playtime", time: 3, time_unit: weeks } ``` -------------------------------- ### Example SNBT Config File Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/technical/SNBT/index.md This snippet shows a typical SNBT configuration file structure, including comments, nested objects, and various data types. ```jsonc { # Boolean test 3 # Default: false "test 3": false, # Default: true test_1: true # Boolean test 2 # Default: true test_2: true # Group comment test # Line 2 sub_test: { # Default: false boolean: false # Default: 0.5d # Range: 0.0d ~ 1.0d double: 1.0d # Default: 50 # Range: 30 ~ +∞ int: 30 # Default: "hello" string: "hello" # Default: [ 1, 2, 3 ] list: [ 1, 2, 3 ] } } ``` -------------------------------- ### AND Condition Example Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Combines multiple subconditions. The rank is applied only if all specified subconditions are met. Useful for requiring several criteria to be true simultaneously. ```json { admin: { name: "Op and At Spawn" power: 1000 condition: { type: "and" conditions: [ { type: "op" } { type: "spawn" } ] } } } ``` -------------------------------- ### Example Ranks Configuration (ranks.snbt) Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Configuration.md Defines various ranks with their power levels, membership conditions, and associated permissions or game-specific settings like FTB Chunks claim limits. Use this to set up the hierarchy and capabilities of different player roles. ```json { member: { name: "Member" power: 1 condition: "always_active" ftbranks.name_format: "<{name}>" ftbchunks.max_claimed: 40 ftbchunks.max_force_loaded: 10 } vip: { name: "VIP" power: 50 ftbranks.name_format: "<&bVIP {name}&r>" ftbchunks.max_force_loaded: 15 } admin: { name: "Admin" power: 1000 condition: "op" command.ftbranks: true ftbchunks.max_claimed: 100 ftbchunks.max_force_loaded: 50 } alien: { name: "Alien" power: 100 condition: { type: "not" condition: { type: "dimension" dimension: "minecraft:overworld" } } command: false command.say: true command.msg: true } senior: { name: "Senior" power: 100 ftbranks.name_format: "<&2Senior {name}&r>" condition: { type: "playtime" time: 3 time_unit: "weeks" } ftbchunks.max_claimed: 500 } } ``` -------------------------------- ### Minimal Quest Creation Example Source: https://github.com/ftbteam/docs/blob/main/docs/marketplace/Addons/quests/api.md This snippet demonstrates the basic workflow for creating a quest chapter and adding a single quest to it using script events. Ensure the necessary imports are present in your script pack. ```typescript import { system } from "@minecraft/server"; system.sendScriptEvent( "ftbquests:create_chapter", JSON.stringify({ id: "api_demo", title: "api.demo.title", description: "api.demo.desc", icon: "minecraft:book", }), ); system.sendScriptEvent( "ftbquests:add_quests", JSON.stringify({ chapter_id: "api_demo", quests: [ { id: "cook_beef", name: "api.demo.cook_beef.name", description: "api.demo.cook_beef.desc", icon: "minecraft:cooked_beef", tasks: { anyOf: { "00": { type: "ftb_quest:item_use_complete", item_id: "minecraft:cooked_beef", consumes_item: true, }, }, }, rewards: [{ type: "ftb_quest:item", item: "minecraft:diamond", count: 3 }], }, ], }), ); system.sendScriptEvent("ftbquests:commit_chapter", JSON.stringify({ chapter_id: "api_demo" })); ``` -------------------------------- ### Example run script line for memory allocation Source: https://github.com/ftbteam/docs/blob/main/docs/support/Guides/Server/memory.md This line from the run script shows the Java command with memory allocation flags. The -Xmx flag sets the maximum memory, and -Xms sets the initial memory. ```shell "jre/jdk-17.0.11+9-jre/Contents/Home/bin/java" -javaagent:log4jfix/Log4jPatcher-1.0.0.jar -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx8192M -Xms6144M @user_jvm_args.txt @libraries/net/neoforged/neoforge/20.4.237/unix_args.txt nogui ``` -------------------------------- ### Example Custom Restriction Handler Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ultimine/api.md Implement the `RestrictionHandler` interface to define custom criteria for when a player can ultimine. The `canUltimine` method should return true if ultimining is allowed. ```java public enum MyHandler implements RestrictionHandler { @Override public boolean canUltimine(Player player) { return player.getMainHandItem().getItem() instanceof SomeCustomItem; } } ``` -------------------------------- ### Adding Extra Files to Backups in FTB Backups 3 Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Backups-3/config.mdx Include additional files or folders in backups beyond the default world folder. These must be within the game instance. This example adds the config directory, logs, and ops.json. ```toml extra_files = [ "config/" "logs" "ops.json" ] ``` -------------------------------- ### Implement Custom Block Selection Handler Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ultimine/api.md Example implementation of a custom block-selection handler. It performs a quick check for block equivalence, such as matching facades, before returning TRUE or FALSE. ```java public enum MySelectionHandler implements BlockSelectionHandler { INSTANCE; @Override public Result customSelectionCheck(Player player, BlockPos origPos, BlockPos pos, BlockState origState, BlockState state) { // Called for every block in the current shape; keep the checks quick and efficient! // check if it's your block first, and return Result.PASS immediately if it's not // then check for block equivalence (e.g. do both blocks have the same facade?) // return Result.TRUE or Result.FALSE as appropriate return Result.TRUE; } } ``` -------------------------------- ### Example Custom Right-Click Handler Implementation Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ultimine/api.md Implement the `RightClickHandler` interface to define custom behavior when a block is right-clicked while Ultimine is active. The `handleRightClickBlock` method should return the number of blocks affected. ```java public enum MyHandler implements RightClickHandler { INSTANCE; @Override public int handleRightClickBlock(ShapeContext shapeContext, InteractionHand hand, Collection positions) { // do the work you need here return numberOfBlocksAffected; } } ``` -------------------------------- ### Example Player to Rank Assignment (players.snbt) Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Configuration.md Assigns specific players, identified by their UUID, to ranks. The timestamp indicates when the player was added to the rank. Use commands like `/ftbranks add` for management. ```json { 380df991-f603-344c-a090-369bad2a924a: { name: "Dev" ranks: { vip: "2024-01-24T09:31:18.960345288Z" } } } ``` -------------------------------- ### List Available Kits Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Kits.md Displays a list of all currently configured kits. Kit names in the output are clickable for convenience. ```minecraft /kit list ``` -------------------------------- ### Clear Rank Condition Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Commands.md Example command to clear the condition from a rank. After this, players can only have the rank by direct assignment. ```minecraft_commands /ftbranks condition VIP "" ``` -------------------------------- ### Smelting Recipe: Double Compressed Cobblestone Source: https://github.com/ftbteam/docs/blob/main/README.md Example of a smelting recipe to create double compressed cobblestone. ```crafting smelting ftbsa:compressed_cobble planks_oak result: ftbsa:double_compressed_cobble ``` -------------------------------- ### Run Project with Bun Source: https://github.com/ftbteam/docs/blob/main/scripts/mesh-weights-gen/README.md Executes the main script of the project using the Bun runtime. ```bash bun run index.ts ``` -------------------------------- ### Get Drawer Status Source: https://github.com/ftbteam/docs/blob/main/docs/marketplace/Addons/storage-drawers/API/drawer_manipulation.md Requests the current status of items within a drawer, including the amount and type of item in each slot. ```APIDOC ## Get Drawer Status ### Description Requests the current status of items within a drawer, including the amount and type of item in each slot. ### Method Script Event ### Event ID ftb_sd:status_v2 ### Parameters #### JSON Payload - **dimId** (string) - Required - The dimension ID of the drawer. - **blockLocation** (object) - Required - The location of the drawer block. - **slots** (array) - Optional - The slots to query. If not specified, it will query all drawer slots. - **feedbackId** (string) - Required - The ID of the feedback event to send when the item is added. ### Response #### Success Response The status is returned with the script event id `ftb_sd:status_status_v2` and contains the following data: - **dimId** (string) - The dimension ID of the drawer. - **blockLocation** (object) - The location of the drawer block. - **feedbackId** (string) - The ID of the feedback event. - **slotInfo** (object) - A map of the slots and their item info, where the key is the slot and the value is an object with `amount` and `itemTypeId`. ### Response Example ```json { "dimId": "minecraft:overworld", "blockLocation": { "x": 0, "y": 64, "z": 0 }, "feedbackId": "my_status_request", "slotInfo": { "BOTTOM": { "amount": 64, "itemTypeId": "minecraft:stone" } } } ``` ``` -------------------------------- ### Registering a Compacting Recipe via Command Source: https://github.com/ftbteam/docs/blob/main/docs/marketplace/Addons/storage-drawers/API/compacting_recipe.md This command registers a compacting recipe. Remember to run this command every time the world is loaded if using commands for registration. ```bash /scriptevent ftb_sd:register_compacting_recipe '{"topSlot":"minecraft:diamond_block","bottomSlot":"minecraft:diamond","bottomSlotCount":9}' ``` -------------------------------- ### NOT Condition Example Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Negates a single subcondition. The rank is applied if the specified subcondition is NOT met. Useful for excluding players from certain conditions. ```json { admin: { name: "Not in the Nether" power: 1000 condition: { type: "not" condition: { type: "dimension", "dimension": "minecraft:the_nether" } } } } ``` -------------------------------- ### Build Static Content Source: https://github.com/ftbteam/docs/blob/main/README.md Generates static content for deployment. The output is placed in the 'build' directory. ```bash pnpm build ``` -------------------------------- ### Crafting Table Recipe: Oak Door Source: https://github.com/ftbteam/docs/blob/main/README.md Example of a crafting table recipe to create an oak door from oak planks. ```crafting table planks_oak #logs - planks_oak #logs - planks_oak #planks - result: oak_door ``` -------------------------------- ### XOR Condition Example Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Applies a rank if exactly one of the provided subconditions is met. Useful for scenarios where alternative achievements grant the same rank. ```json { "admin": { "name": "Only one of Op or One Week Played" "power": 1000 "condition": { "type": "xor" "conditions": [ { "type": "op" } { "type": "playtime", "time": 1, "time_unit": "weeks" } ] } } } ``` -------------------------------- ### Set Simple Rank Condition Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Commands.md Example command to set a simple condition on a rank. This assigns the 'spawn' condition to the 'Near Spawn' rank. ```minecraft_commands /ftbranks condition "Near Spawn" spawn ``` -------------------------------- ### Run FTB Debug Tool on Linux/MacOS Source: https://github.com/ftbteam/docs/blob/main/docs/app/Troubleshooting/ftb-debug.md This snippet demonstrates the command-line steps to make the FTB Debug tool executable and then run it on Linux or MacOS systems. Ensure you replace the filename with the correct one for your architecture (e.g., amd64, arm64). ```bash # Example of the full flow cd /home/mikey/Downloads chmod +x ftb-debug-linux-amd64 ./ftb-debug-linux ``` -------------------------------- ### Rank Added Condition Example Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Checks if a specific rank has been explicitly added to a player. This condition is useful for creating complex rank hierarchies or dependencies. ```json { admin: { name: "Has the 'xyz' rank added" power: 1000 condition: { type: "rank_added" rank: "xyz" } } } ``` -------------------------------- ### Show Kit Details Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Kits.md Displays the contents, cooldowns, and other relevant information for a specific kit. ```minecraft /kit show ``` -------------------------------- ### OR Condition Example Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Combines multiple subconditions. The rank is applied if ANY of the specified subconditions are met. Ideal for granting ranks based on multiple possible criteria. ```json { admin: { name: "Op or One Week Played or Creative Mode" power: 1000 condition: { type: "or" conditions: [ { type: "op" } { type: "playtime", "time": 1, "time_unit": "weeks" } { type: "creative_mode"} ] } } } ``` -------------------------------- ### Show Rank Configuration Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Commands.md Dumps the configuration information for the specified rank. ```minecraft_commands /ftbranks show_rank ``` -------------------------------- ### Give Kit to Yourself Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Essentials/Kits.md A shortcut command to give a kit to the executing player. It also checks for the 'ftbessentials.give_me_kit.' permission node for granular player control. ```minecraft /give_me_kit ``` -------------------------------- ### Dimension Condition Example Source: https://github.com/ftbteam/docs/blob/main/mod-docs/mods/suite/Ranks/Advanced Conditions.md Checks if the player is currently in a specific dimension. Use this to apply ranks based on the player's location in the game world. ```json { admin: { name: "In the Overworld" power: 1000 condition: { type: "dimension" dimension: "minecraft:overworld" } } } ```