# Builder (/en/docs/builder) Pick an action, behaviour, or recipe, fill in the fields, and copy the generated YAML straight into your item config. * **Actions**: paste the output inside your item's `events` section. See the [action parameters](/en/docs/actions/parameters) page for a full example. * **Behaviours**: paste the output directly under your item definition. * **Recipes**: paste the output into any ItemsAdder content YML file (the full `info` + `recipes` block is included). # Components (/en/docs/components) ItemsAdderAdditions applies Minecraft data components to custom items at pack-generation time via the ItemsAdder item modifier hook. Add a `components` section under your item definition and run `/iazip`. ```yaml items: my_item: components: rarity: RARE use_cooldown: cooldown: 1.5 tool: default_mining_speed: 2.0 rules: - blocks: "#minecraft:logs" speed: 4.0 correct_for_drops: true ``` Components are applied when ItemsAdder rebuilds the pack/item data. Run `/iazip` after changing component YAML. `/iareload` reloads other ItemsAdderAdditions content, but not components. ## Status legend [#status-legend] | Status | Meaning | | ----------------- | --------------------------------------------------------------------- | | **Specialized** | Dedicated IAA handler with an IAA-specific YAML syntax | | **Generic** | No dedicated handler; falls through to the generic NMS codec pipeline | | **Handled by IA** | Set by ItemsAdder itself; IAA skips it | | **Unsupported** | No Paper/NMS API; cannot be applied | ## Generic NMS components [#generic-nms-components] For component keys that have no specialized IAA handler, IAA falls back to a generic NMS pipeline. The key is normalized (`custom_data` becomes `minecraft:custom_data`), the value tree is parsed from YAML, and the result is applied through Minecraft's Mojang codec system via NMS. **Minimum server version for generic components: 1.21.3.** On 1.20.6 and 1.21.1, the generic NMS pipeline is not available. Specialized handlers still work on those versions. ### Usage [#usage] Use the full namespaced key or the short form (the `minecraft:` prefix is added automatically): ```yaml items: my_item: components: minecraft:custom_data: my_plugin: id: my_item tier: 3 enabled: true ``` Short form (equivalent): ```yaml items: my_item: components: custom_data: my_plugin: id: my_item ``` The YAML structure must match the vanilla codec for that component. IAA does not reinterpret the shape. If the codec rejects the value, IAA logs a warning and skips that component. **Note:** `minecraft:custom_data` is a real vanilla NBT compound component. Do not confuse it with Bukkit's `PersistentDataContainer` (PDC). The two systems are independent. PDC data is stored internally by Bukkit and is not `custom_data`. ## Components reference [#components-reference] ### `attack_range` [#attack_range] **Status:** Specialized | **Minimum version:** 1.21.11 Overrides the attack range of the item for melee and projectile attacks. | Property | Type | Default | Range | | -------------------- | ----- | ------- | ---------- | | `min_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_reach` | Float | `3.0` | 0.0 - 64.0 | | `min_creative_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_creative_reach` | Float | `5.0` | 0.0 - 64.0 | | `hitbox_margin` | Float | `0.3` | 0.0 - 1.0 | | `mob_factor` | Float | `1.0` | 0.0 - 2.0 | ```yaml components: attack_range: max_reach: 5.0 max_creative_reach: 7.0 hitbox_margin: 0.5 ``` ### `banner_patterns` [#banner_patterns] **Status:** Specialized Sets the banner pattern layers on a banner item. | Property | Type | Format | | -------- | ------ | ---------------------------------------------------------- | | `type` | String | Pattern type key (e.g. `stripe_top`, `square_bottom_left`) | | `color` | String | Dye color name (`WHITE`, `RED`, `BLUE`, etc.) | ```yaml components: banner_patterns: - type: stripe_top color: RED - type: square_bottom_left color: BLUE ``` Valid dye colors: `WHITE`, `ORANGE`, `MAGENTA`, `LIGHT_BLUE`, `YELLOW`, `LIME`, `PINK`, `GRAY`, `LIGHT_GRAY`, `CYAN`, `PURPLE`, `BLUE`, `BROWN`, `GREEN`, `RED`, `BLACK`. Pattern type keys are Minecraft registry keys. The `minecraft:` prefix is optional (e.g. `stripe_top` and `minecraft:stripe_top` are equivalent). ### `base_color` [#base_color] **Status:** Specialized Sets the base color of a shield item. | Property | Type | Values | | -------- | ------ | -------------- | | (value) | String | Dye color name | ```yaml components: base_color: RED ``` ### `blocks_attacks` [#blocks_attacks] **Status:** Specialized Makes the item block incoming attacks like a shield. | Property | Type | Default | | ------------------------ | ---------------- | ----------------------------------------------------------- | | `block_delay_seconds` | Float | `0.0` | | `disable_cooldown_scale` | Float | `1.0` | | `bypassed_by` | String | `null` (damage type tag, e.g. `#minecraft:bypasses_shield`) | | `block_sound` | String | `null` (sound key) | | `disable_sound` | String | `null` (sound key) | | `damage_reductions` | List of sections | `[]` | | `item_damage` | Section | `null` | `damage_reductions` entry: | Property | Type | Default | | --------------------------- | -------------- | --------------------------------------------------- | | `type` | String or List | `null` (damage type tag or IDs; omit for all types) | | `horizontal_blocking_angle` | Float | `90.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | `item_damage` section: | Property | Type | Default | | ----------- | ----- | ------- | | `threshold` | Float | `0.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | ```yaml components: blocks_attacks: block_delay_seconds: 0.25 disable_cooldown_scale: 1.0 bypassed_by: "#minecraft:bypasses_shield" block_sound: minecraft:item.shield.block disable_sound: minecraft:item.shield.break damage_reductions: - type: "#minecraft:is_projectile" horizontal_blocking_angle: 90.0 base: 0.0 factor: 0.5 - type: minecraft:player_attack base: 1.0 factor: 1.0 item_damage: threshold: 3.0 base: 1.0 factor: 1.0 ``` The `type` field in `damage_reductions` accepts a tag string (`#minecraft:is_fire`), a single damage type key (`minecraft:fire`), or a list of damage type keys. ### `bundle_contents` [#bundle_contents] **Status:** Specialized Sets the initial contents of a bundle item. Accepts vanilla IDs, ItemsAdder IDs, and `mmoitems:TYPE:ID` format. See [ID reference](/en/docs/compatibility/ids) for full format details. ```yaml components: bundle_contents: - minecraft:arrow - my_pack:special_arrow ``` ### `can_break` [#can_break] **Status:** Specialized Restricts what blocks this item can break in Adventure mode. ```yaml components: can_break: - minecraft:stone - "#minecraft:logs" ``` Accepts block IDs (`minecraft:stone`) and block tags (`#minecraft:logs`). The `minecraft:` prefix is optional. ### `can_place_on` [#can_place_on] **Status:** Specialized Restricts what blocks this item can be placed on in Adventure mode. ```yaml components: can_place_on: - minecraft:grass_block - "#minecraft:dirt" ``` Same format as `can_break`. ### `charged_projectiles` [#charged_projectiles] **Status:** Specialized Sets the projectiles pre-loaded in a crossbow. Accepts vanilla IDs, ItemsAdder IDs, and `mmoitems:TYPE:ID` format. See [IDs](/en/docs/compatibility/ids). ```yaml components: charged_projectiles: - minecraft:arrow - my_pack:special_bolt ``` ### `damage_resistant` [#damage_resistant] **Status:** Specialized Makes the item entity immune to a category of damage (like netherite ignoring fire). ```yaml components: damage_resistant: minecraft:is_fire ``` Accepts a damage type tag key. The `#` prefix and `minecraft:` prefix are both optional (`is_fire`, `#is_fire`, `minecraft:is_fire`, `#minecraft:is_fire` are all equivalent). ### `damage_type` [#damage_type] **Status:** Specialized Sets the damage type used when the item entity deals damage. ```yaml components: damage_type: minecraft:magic ``` Must be a valid damage type registry key. ### `death_protection` [#death_protection] **Status:** Specialized Prevents death and optionally applies effects when triggered (like a totem of undying). | Property | Type | Default | | --------------- | ---------------- | ------------------------------- | | `death_effects` | List of sections | `[]` (omit for bare protection) | Effect types in `death_effects`: | Type | Properties | | ------------------- | ---------------------------------------------------------------------- | | `apply_effects` | `effects` (list of potion effects), `probability` (float, default 1.0) | | `remove_effects` | `effects` (list of effect type keys) | | `clear_all_effects` | *(no properties)* | | `teleport_randomly` | `diameter` (float, default 16.0) | | `play_sound` | `sound` (namespaced sound key) | Potion effect entry (used in `apply_effects`): | Property | Type | Default | | ----------- | ------- | ------------------------------------- | | `type` | String | Effect type key (e.g. `regeneration`) | | `duration` | Integer | Duration in ticks | | `amplifier` | Integer | Level - 1 (0 = level I) | ```yaml components: death_protection: death_effects: - type: apply_effects probability: 1.0 effects: - type: regeneration duration: 900 amplifier: 1 - type: absorption duration: 100 amplifier: 1 - type: remove_effects effects: - wither - poison - type: play_sound sound: minecraft:item.totem.use ``` Omit `death_effects` entirely for a bare totem effect (prevents death, no extra effects): ```yaml components: death_protection: {} ``` ### `dyed_color` [#dyed_color] **Status:** Specialized Sets the dye color of leather armor or other dyeable items. ```yaml components: dyed_color: "#FF4400" ``` Accepts `#RRGGBB` hex color strings. ### `enchantable` [#enchantable] **Status:** Specialized Sets the enchantability value of the item (affects enchantment quality in the enchanting table). ```yaml components: enchantable: 15 ``` Range: 1 - 255. Higher values improve enchantment quality. ### `firework_explosion` [#firework_explosion] **Status:** Specialized Sets the firework explosion effect on a firework star item. | Property | Type | Default | | ------------- | ------------------------- | ------- | | `type` | String | `BALL` | | `colors` | List of `#RRGGBB` strings | `[]` | | `fade_colors` | List of `#RRGGBB` strings | `[]` | | `trail` | Boolean | `false` | | `flicker` | Boolean | `false` | Valid types: `BALL`, `BALL_LARGE`, `STAR`, `BURST`, `CREEPER`. ```yaml components: firework_explosion: type: STAR colors: - "#FF0000" - "#0000FF" fade_colors: - "#FFFFFF" trail: true flicker: false ``` ### `fireworks` [#fireworks] **Status:** Specialized Sets the firework properties on a firework rocket item. | Property | Type | Default | | ----------------- | ---------------- | ------------- | | `flight_duration` | Integer | `1` (0 - 255) | | `explosions` | List of sections | `[]` | Each entry in `explosions` uses the same schema as `firework_explosion`. ```yaml components: fireworks: flight_duration: 2 explosions: - type: BURST colors: - "#FFAA00" trail: true ``` ### `intangible_projectile` [#intangible_projectile] **Status:** Specialized Marks this item as an intangible projectile (cannot be picked up after being shot). ```yaml components: intangible_projectile: true ``` Set to `true` or any non-null value to enable. This is a marker component with no properties. ### `kinetic_weapon` [#kinetic_weapon] **Status:** Specialized | **Minimum version:** 1.21.5 Makes the item deal damage based on player movement speed (like a mace). | Property | Type | Default | | ------------------------ | ----------------------- | ------- | | `contact_cooldown_ticks` | Integer | `0` | | `delay_ticks` | Integer | `0` | | `forward_movement` | Float | `1.0` | | `damage_multiplier` | Float | `1.0` | | `sound` | String (namespaced key) | `null` | | `hit_sound` | String (namespaced key) | `null` | | `dismount_conditions` | Section | `null` | | `knockback_conditions` | Section | `null` | | `damage_conditions` | Section | `null` | Condition sections (`dismount_conditions`, `knockback_conditions`, `damage_conditions`): | Property | Type | Default | | -------------------- | ------- | ------- | | `max_duration_ticks` | Integer | `0` | | `min_speed` | Float | `0.0` | | `min_relative_speed` | Float | `0.0` | ```yaml components: kinetic_weapon: damage_multiplier: 2.0 forward_movement: 1.5 sound: minecraft:entity.player.attack.sweep damage_conditions: min_speed: 0.1 ``` ### `lodestone_tracker` [#lodestone_tracker] **Status:** Specialized Makes a compass point toward a lodestone location. | Property | Type | Default | | --------- | ------- | ------------------------------------------------- | | `tracked` | Boolean | `true` | | `world` | String | `null` (world name; omit for an unlinked tracker) | | `x` | Integer | `0` | | `y` | Integer | `0` | | `z` | Integer | `0` | ```yaml components: lodestone_tracker: world: world x: 100 y: 64 z: -200 tracked: true ``` If `world` is omitted, the compass is unlinked (shows a spinning needle). If `world` is set but the world is not loaded at reload time, IAA logs a warning and applies the component without a location. ### `map_color` [#map_color] **Status:** Specialized Sets the border color of a filled map item. ```yaml components: map_color: "#2A6DB5" ``` Accepts `#RRGGBB` hex color strings. ### `map_decorations` [#map_decorations] **Status:** Specialized Sets fixed decorations (markers) on a filled map. ```yaml components: map_decorations: my_marker: type: RED_MARKER x: 100.0 z: 200.0 rotation: 0.0 another_marker: type: player x: -50.0 z: 75.0 rotation: 90.0 ``` Each key under `map_decorations` is a unique decoration ID. `type` is a `MapCursor.Type` key (case-insensitive; `minecraft:` prefix optional). `x` and `z` are world coordinates. `rotation` is in degrees. ### `map_id` [#map_id] **Status:** Specialized Links the item to a specific map by its integer ID. ```yaml components: map_id: 42 ``` ### `minimum_attack_charge` [#minimum_attack_charge] **Status:** Specialized | **Minimum version:** 1.21.1 Sets the minimum attack charge fraction required to trigger full-charge effects. ```yaml components: minimum_attack_charge: 0.9 ``` Range: 0.0 - 1.0. ### `ominous_bottle_amplifier` [#ominous_bottle_amplifier] **Status:** Specialized Sets the amplifier level of an ominous bottle (affects Bad Omen strength when consumed). ```yaml components: ominous_bottle_amplifier: 3 ``` Range: 0 - 4. ### `piercing_weapon` [#piercing_weapon] **Status:** Specialized | **Minimum version:** 1.21.5 Makes the item pierce through entities (like an arrow with Piercing). | Property | Type | Default | | ----------------- | ----------------------- | ------- | | `deals_knockback` | Boolean | `true` | | `dismounts` | Boolean | `true` | | `sound` | String (namespaced key) | `null` | | `hit_sound` | String (namespaced key) | `null` | ```yaml components: piercing_weapon: deals_knockback: true dismounts: false hit_sound: minecraft:entity.arrow.hit ``` ### `pot_decorations` [#pot_decorations] **Status:** Specialized Sets the pottery sherd decorations on a decorated pot. | Property | Type | Default | | -------- | ------ | ------------------------------------------------------ | | `back` | String | `null` (vanilla item ID, e.g. `arms_up_pottery_sherd`) | | `left` | String | `null` | | `right` | String | `null` | | `front` | String | `null` | ```yaml components: pot_decorations: back: arms_up_pottery_sherd left: archer_pottery_sherd right: blade_pottery_sherd front: burn_pottery_sherd ``` Accepts vanilla item IDs. The `minecraft:` prefix is optional. ### `potion_contents` [#potion_contents] **Status:** Specialized Sets the potion effects of a potion, splash potion, or lingering potion item. | Property | Type | Default | | ------------- | ---------------- | -------------------------------------------------- | | `potion` | String | `null` (PotionType key, e.g. `minecraft:strength`) | | `color` | String | `null` (#RRGGBB hex override) | | `custom_name` | String | `null` | | `effects` | List of sections | `[]` | At least one of `potion`, `color`, `custom_name`, or `effects` must be present. ```yaml components: potion_contents: potion: minecraft:strength color: "#FF0000" custom_name: "Super Strength" effects: - type: strength duration: 600 amplifier: 2 ``` ### `potion_duration_scale` [#potion_duration_scale] **Status:** Specialized Multiplies the duration of all potion effects applied by this item. ```yaml components: potion_duration_scale: 2.0 ``` Range: 0.0 - 255.0. ### `profile` [#profile] **Status:** Specialized Sets the player skin profile on a player head item. Accepts a player name (resolved by the client) or a section with explicit profile data. Simple form (player name): ```yaml components: profile: Notch ``` Section form (explicit UUID, name, or texture): ```yaml components: profile: name: Notch uuid: 069a79f4-44e9-4726-a5be-fca90e38aaf5 texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvLi4uIn19fQ== ``` At least one of `name`, `uuid`, or `texture` is required in the section form. ### `provides_banner_patterns` [#provides_banner_patterns] **Status:** Specialized Marks the item as an ingredient that unlocks banner patterns when placed in a loom. ```yaml components: provides_banner_patterns: minecraft:no_item_required ``` Accepts a banner pattern tag key. The `#` prefix is optional. ### `provides_trim_material` [#provides_trim_material] **Status:** Specialized Marks the item as a smithing trim material. ```yaml components: provides_trim_material: gold ``` Accepts a trim material registry key. The `minecraft:` prefix is optional. ### `rarity` [#rarity] **Status:** Specialized Sets the rarity of the item, which affects the item name color in the default resource pack. ```yaml components: rarity: RARE ``` Valid values: `COMMON`, `UNCOMMON`, `RARE`, `EPIC`. ### `repairable` [#repairable] **Status:** Specialized Sets what items can repair this item in an anvil. Accepts a tag string or a list of item IDs: ```yaml # Using a tag components: repairable: "#minecraft:planks" ``` ```yaml # Using a list of items components: repairable: - minecraft:diamond - minecraft:netherite_ingot ``` ### `stored_enchantments` [#stored_enchantments] **Status:** Specialized Sets the enchantments stored in an enchanted book. Uses a section of `enchantment_key: level` pairs. ```yaml components: stored_enchantments: sharpness: 5 looting: 3 minecraft:mending: 1 ``` Level range: 1 - 255. The `minecraft:` prefix is optional. ### `suspicious_stew_effects` [#suspicious_stew_effects] **Status:** Specialized Sets the effects given by a suspicious stew item. ```yaml components: suspicious_stew_effects: - type: speed duration: 200 - type: minecraft:night_vision duration: 400 ``` `duration` is in ticks. Default is 160. The `minecraft:` prefix on effect types is optional. ### `swing_animation` [#swing_animation] **Status:** Specialized | **Minimum version:** 1.21.5 Sets the swing animation type and duration for melee attacks. | Property | Type | Values | | ---------- | ------- | ----------------------- | | `type` | String | `NONE`, `WHACK`, `STAB` | | `duration` | Integer | >= 1 | ```yaml components: swing_animation: type: WHACK duration: 6 ``` ### `tool` [#tool] **Status:** Specialized Configures the item as a tool with mining speed rules. | Property | Type | Default | | ------------------------- | ---------------- | ------- | | `default_mining_speed` | Float | `1.0` | | `damage_per_block` | Integer | `1` | | `can_destroy_in_creative` | Boolean | `true` | | `rules` | List of sections | `[]` | Rule section: | Property | Type | Default | | ------------------- | -------------------- | -------------------- | | `blocks` | String, tag, or List | Required | | `speed` | Float | `null` (no override) | | `correct_for_drops` | Boolean or omitted | `null` (NOT\_SET) | ```yaml components: tool: default_mining_speed: 1.0 damage_per_block: 1 can_destroy_in_creative: true rules: - blocks: "#minecraft:mineable/pickaxe" speed: 6.0 correct_for_drops: true - blocks: - minecraft:obsidian - minecraft:crying_obsidian speed: 12.0 correct_for_drops: true ``` `blocks` accepts a tag string (`#minecraft:logs`), a single block ID (`minecraft:stone`), or a list of block IDs. `correct_for_drops`: `true` means this tool produces correct drops; `false` means it does not; omitting the key means NOT\_SET (inherits vanilla defaults). ### `tooltip_display` [#tooltip_display] **Status:** Specialized Controls which components are shown in the item tooltip. | Property | Type | Default | | ------------------- | ---------------------- | ------- | | `hide_tooltip` | Boolean | `false` | | `hidden_components` | List of component keys | `[]` | ```yaml components: tooltip_display: hide_tooltip: false hidden_components: - enchantments - attribute_modifiers - stored_enchantments ``` `hidden_components` accepts `DataComponentTypes` field names (case-insensitive). Use the Minecraft component key without the `minecraft:` prefix and in UPPER\_SNAKE\_CASE (e.g. `ATTRIBUTE_MODIFIERS`). The lookup is case-insensitive. ### `use_cooldown` [#use_cooldown] **Status:** Specialized Sets a use cooldown on the item. | Property | Type | Required | | ---------- | ----------------------- | -------- | | `cooldown` | Float (seconds) | Yes | | `group` | String (namespaced key) | No | ```yaml components: use_cooldown: cooldown: 2.0 ``` If `group` is omitted, the cooldown group defaults to `itemsadder:`, making the cooldown item-specific. Set `group` to share a cooldown with other items: ```yaml components: use_cooldown: cooldown: 5.0 group: my_pack:special_items ``` ### `use_remainder` [#use_remainder] **Status:** Specialized Sets what item remains in the slot after this item is fully consumed. ```yaml components: use_remainder: minecraft:glass_bottle ``` Accepts vanilla IDs, ItemsAdder IDs, and `mmoitems:TYPE:ID` format. See [IDs](/en/docs/compatibility/ids). ### `weapon` [#weapon] **Status:** Specialized | **Minimum version:** 1.21.5 Configures the item as a weapon with custom damage and blocking interaction. | Property | Type | Default | | ------------------------------ | ------- | ------- | | `item_damage_per_attack` | Integer | `1` | | `disable_blocking_for_seconds` | Float | `0.0` | ```yaml components: weapon: item_damage_per_attack: 2 disable_blocking_for_seconds: 0.6 ``` `disable_blocking_for_seconds`: when this weapon hits a blocking entity, blocking is disabled for this duration. ### `writable_book_content` [#writable_book_content] **Status:** Specialized Sets the pages of a writable book (book and quill). ```yaml components: writable_book_content: - "Page 1 content here." - "Page 2 content here." ``` ## Version summary [#version-summary] | Component | Minimum version | | ----------------------- | --------------- | | `minimum_attack_charge` | 1.21.1 | | `kinetic_weapon` | 1.21.5 | | `piercing_weapon` | 1.21.5 | | `swing_animation` | 1.21.5 | | `weapon` | 1.21.5 | | `attack_range` | 1.21.11 | | Generic NMS components | 1.21.3 | | All other components | 1.20.6+ | Components that require a newer version than the running server are silently skipped with a warning in the console. # Configuration (/en/docs/configuration) ItemsAdderAdditions uses `config.yml` for plugin-level feature toggles. ItemsAdder content YAML still defines the actual actions, behaviours, recipes, advancements, paintings, tags, and world generation entries. ## Default config [#default-config] ```yaml features: creative_inventory_integration: true custom_paintings: true item_model_definitions: true behaviours: bed: true connectable: true contact_effect: true stackable: true storage: true text_display: true worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true actions: actionbar: true clear_item: true ignite: true message: true mythic_mobs_skill: true open_inventory: true open_trade_machine: true play_animation: true play_emote: true replace_biome: true replace_item: true shoot_fireball: true swing_hand: true teleport: true title: true toast: true veinminer: true update-checker: enabled: true on-join: true ``` ## Toggle behavior [#toggle-behavior] Missing toggle keys default to enabled. This also applies to optional sections that are not present in the default config. WorldGuard region checks can be configured under `worldguard`; see [WorldGuard compatibility](/en/docs/compatibility/worldguard). Components can be disabled the same way: ```yaml components: rarity: false ``` ## Reload behavior [#reload-behavior] Run: ```text /itemsadderadditions reload ``` or: ```text /iaa reload ``` This command reloads `config.yml` and reapplies plugin-level feature, action, behaviour, and component toggles. It does **not** reload ItemsAdder content YAML files. Use `/iareload` after changing ItemsAdderAdditions content YAML sections such as actions, behaviours, custom tags, recipes, advancements, custom paintings, Valhalla metadata, or world generation entries. Use `/iazip` after changing `components` sections or resource-pack assets. `/iareload` reloads ItemsAdderAdditions content except components. ## Common mistakes [#common-mistakes] * Setting a toggle to `false` and expecting existing content to keep working after reload. * Adding a typo under `actions`, `behaviours`, `features`, or `components`; unknown toggle keys do not disable the intended feature. * Expecting `/itemsadderadditions reload` to reload ItemsAdder content YAML or rebuild the resource pack. Use `/iareload` for content YAML and `/iazip` for components or assets. # Creative Inventory Integration (/en/docs/creative-inventory-integration) **Credits:** This feature was originally coded by **Misieur** ([GitHub](https://github.com/Misieur)). **Version Requirement:** Requires **Paper 1.21.5 or higher**. The feature is disabled on older versions. Injects every custom item registered by ItemsAdder into the vanilla creative menu. No per-item configuration needed. **Important**: You need operator permissions and the **Operator Items Tab** enabled to see ItemsAdder items in the creative inventory. ## Setup [#setup] Run `/iazip` to regenerate the resource pack. Your creative inventory will contain all custom items after rejoining. Every time you add or remove custom items via ItemsAdder, you must rejoin the server and run `/iazip` again to see the updates reflected in your creative inventory. ## Enabling / Disabling [#enabling--disabling] You can toggle this feature in the plugin's `config.yml`: ```yaml features: creative_inventory_integration: true ``` Set to `false` to disable the feature entirely. The plugin will not generate any resource pack files or inject any registry entries when disabled. ## ItemsAdder Config [#itemsadder-config] During the first setup, the plugin automatically adds itself to ItemsAdder's resource pack merge list: ```yaml # In ItemsAdder/config.yml (managed automatically) resource-pack: zip: merge_other_plugins_resourcepacks_folders: - ItemsAdderAdditions/resourcepack ``` If for any reason this entry is missing (e.g., the file wasn't writable), you can safely add it manually. The plugin will log a warning if it couldn't apply the change automatically. ## Notes [#notes] * **Template items** are excluded. Items marked with `template: true` in their ItemsAdder configuration won't appear in the creative menu. * **Directional variants** are excluded. Items whose namespaced ID ends in `_north`, `_south`, `_east`, `_west`, `_up`, or `_down` are skipped when the base item (without the direction suffix) exists in the registry. * Items with `hide_from_inventory: true` in their ItemsAdder config are excluded. * Items using `graphics.icon` or `resource.icon` will display their flat GUI icon. All other items will use the 3D model they normally show when held in-hand. * Vanilla paintings are unaffected; regular painting items will continue to function normally. # Custom Paintings (/en/docs/custom-paintings) **Version Requirement:** Requires **Paper 1.21.5 or higher**. The feature is disabled on older versions. Custom paintings are defined directly in ItemsAdder content YML files using a top-level `paintings` section. Each entry registers a real Minecraft painting variant that players can encounter in-game. ## Configuration [#configuration] ```yaml info: namespace: mynamespace paintings: sunset: enabled: true width: 2 height: 1 asset: mynamespace:sunset title: "Sunset" author: "Toutou" item: mynamespace:sunset_painting include_in_random: true ``` ## Options [#options] | Key | Type | Default | Description | | ------------------- | ------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | `enabled` | boolean | `true` | Set to `false` to skip this painting without removing the entry. | | `width` | integer | *(required)* | Width of the painting in blocks. | | `height` | integer | *(required)* | Height of the painting in blocks. | | `asset` | `namespace:key` | *(required)* | Texture asset key. See [Texture path](#texture-path) below. | | `title` | string | *(none)* | Optional display title shown in tooltips. Supports MiniMessage. | | `author` | string | *(none)* | Optional author name shown in tooltips. | | `item` | `namespace:item_id` | *(none)* | Optional linked ItemsAdder item. When right-clicked on a valid wall face, this item places the custom painting. See [IDs](/en/docs/compatibility/ids). | | `include_in_random` | boolean | `false` | When `true`, vanilla painting items can randomly select this custom painting when the wall space fits. | ## Texture path [#texture-path] The `asset` value maps to a texture file inside your ItemsAdder content folder. For `asset: mynamespace:sunset`, the plugin expects: ``` contents/mynamespace/textures/painting/sunset.png ``` No datapack files are needed. The plugin injects the painting variants at runtime and updates the vanilla `minecraft:placeable` painting tag automatically. ## Placing paintings in-game [#placing-paintings-in-game] If you set an `item`, that ItemsAdder item behaves like a custom painting item: * Right-clicking a valid wall face places the custom painting. * WorldGuard painting placement flags are respected when WorldGuard integration is enabled. * The off-hand duplicate-placement issue is handled automatically. If `include_in_random` is `false` (the default), the painting can only be placed through its linked item. Set it to `true` to also allow vanilla painting items to pick it randomly. ## Enabling / Disabling [#enabling--disabling] You can toggle this feature in the plugin's `config.yml`: ```yaml features: custom_paintings: true ``` ## Notes [#notes] * This feature is only available on Minecraft **1.21.5** and newer. On older supported versions, the plugin logs a warning and skips the `paintings` section. * No `/iazip` or manual resource pack step is needed for the painting variants themselves, but your texture file must be included in your resource pack as usual. * The linked `item` must be an existing ItemsAdder item. If it is missing, the painting variant is still registered, but no placement item will work. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # Custom Tags (/en/docs/custom-tags) Custom tags let you group content IDs once and reuse the group in supported ItemsAdderAdditions features. They are loaded from a top-level `tags` section in any ItemsAdder content YAML file. ## Basic structure [#basic-structure] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer decorative_blocks: type: block values: - ruby_lamp - minecraft:amethyst_block trading_stations: type: furniture values: - alchemy_table - forge_table ruby_recipes: type: recipe values: - ruby_sword - ruby_pickaxe ``` Reference a tag with `#tag_id` in the same namespace or `#namespace:tag_id` across namespaces. See [IDs](/en/docs/compatibility/ids) for tag reference rules. ## Tag types [#tag-types] | Type | Aliases | Values can contain | | ----------- | ------------ | ---------------------------------------------------------------------- | | `item` | `items` | ItemsAdder items, vanilla items, MMOItems items, and nested item tags. | | `block` | `blocks` | ItemsAdder blocks, vanilla blocks, and nested block tags. | | `furniture` | `furnitures` | ItemsAdder furniture IDs and nested furniture tags. | | `recipe` | `recipes` | Recipe IDs and nested recipe tags. | If `type` is omitted, the tag is treated as an item tag. ## Nested tags [#nested-tags] Tags can include other tags of the same type. ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe mining_tools: type: item values: - "#ruby_tools" - minecraft:iron_pickaxe - minecraft:diamond_pickaxe ``` Nested tags are resolved during reload. Circular references are detected and ignored instead of hanging the server. ## Where custom tags work [#where-custom-tags-work] Custom tags are supported by runtime ID matching paths, including: * advancement item, block, furniture, and recipe conditions * player predicate item, equipment, slot, and block checks * stackable behaviour `items` * crafting recipe ingredients (`iaa_crafting_table`) ## Complete example [#complete-example] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe items: charged_ruby: display_name: "Charged Ruby" behaviours: stackable: blocks: - charged_ruby_block items: - "#my_pack:ruby_tools" ``` ```yaml advancements: collect_any_ruby_tool: display: title: "Ruby Tools" description: "Obtain any ruby tool." icon: my_pack:ruby_pickaxe criteria: collect: trigger: obtain_item conditions: items: - "#my_pack:ruby_tools" ``` ## Reload behavior [#reload-behavior] Custom tags are prepared before actions, behaviours, recipes, advancements, and world generation are reloaded. Run `/iareload` after changing tags. ## Common mistakes [#common-mistakes] * Mixing tag types. A furniture tag cannot include an item tag. * Defining the same `type` and tag ID twice. The first declaration wins. * Expecting custom tags to create item stacks. Use concrete item IDs for outputs such as recipe results, `toast.icon`, `clear_item.item`, and `replace_item.item`. * Overriding a vanilla-looking tag such as `#minecraft:planks`. Custom tags are resolved first when a custom tag with that ID exists. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [Compatibility](/en/docs/compatibility) # Getting Started with ItemsAdderAdditions (/en/docs) **ItemsAdderAdditions** extends [ItemsAdder](https://itemsadder.com/) with extra actions, behaviours, recipes, tags, and features - configured directly inside your existing YML files. It resolves ItemsAdder content, MMOItems items, vanilla Minecraft items/blocks, vanilla tags, and ItemsAdderAdditions custom tags through the same compatibility layer. Most YAML-only ItemsAdderAdditions changes reload with `/iareload`; components need `/iazip`. ## Download [#download] ## Requirements [#requirements] * **ItemsAdder** (latest recommended) * **Paper** 1.20.6, 1.21.1, 1.21.3-1.21.8, 1.21.10-1.21.11, 26.1.2, or 26.2 * **MMOItems** *(optional, only required for `mmoitems:type:id` references)* ## Compatibility [#compatibility] See [Compatibility](/en/docs/compatibility) for integration notes and [IDs](/en/docs/compatibility/ids) for ItemsAdder IDs, MMOItems IDs, vanilla item/block IDs, recipe IDs, vanilla tags, and custom tags. ## Optional example pack [#optional-example-pack] A simple pack that shows some of the features of ItemsAdderAdditions. [Pack download link](https://www.spigotmc.org/resources/itemsadderadditions-example-pack.134800) # Item Model Definitions (/en/docs/item-model-definitions) Item model definitions are the vanilla resource-pack files (added in Minecraft 1.21.4) that map an item to a model and select between models based on item state. ItemsAdderAdditions generates these JSON files for you from a YAML section on your custom item, writes them into the resource pack, and (optionally) attaches the matching `minecraft:item_model` component to the item. Add an `item_model_definition` section under your item definition and run `/iazip` to write the files into the pack. ```yaml items: my_item: item_model_definition: model: type: model model: my_pack:item/my_item ``` **Minimum server version: 1.21.4.** On older versions every `item_model_definition` section is ignored with a console warning. Generated files are written to `assets//items/.json` inside the resource pack. After changing the YAML, run `/iazip` to regenerate the pack. The generated item model id is `:`. ## Enabling [#enabling] The feature is controlled by `item_model_definitions` in `config.yml` (enabled by default): ```yaml features: item_model_definitions: true ``` ## Section reference [#section-reference] | Key | Type | Default | Description | | ------------------------- | ------- | ------- | ---------------------------------------------------------------------------------------------- | | `enabled` | Boolean | `true` | Set to `false` to skip this item. | | `path` | String | item id | Output path / generated model id. Supports `namespace:path`. | | `model` | Object | - | Builder shorthand for the model tree (see below). | | `raw` | Object | - | Full item model definition root, passed through verbatim. | | `oversized_in_gui` | Boolean | `false` | Allow the model to render outside its slot bounds in GUIs. Requires Minecraft 1.21.6 or newer. | | `apply_component` | Boolean | `true` | Attach the `minecraft:item_model` component pointing at the generated id. | | `overwrite_existing_file` | Boolean | `true` | When `false`, an existing file at the target path is left untouched. | | `custom_model_data` | Object | - | Adds a `minecraft:custom_model_data` component (see below). | Exactly one of `model` or `raw` is required. If both are present, `raw` is used and a warning is logged. ### `path` [#path] If omitted, the path defaults to the item id and the namespace defaults to the item's namespace. A trailing `.json` is stripped automatically. ```yaml item_model_definition: path: my_pack:custom/sword # writes assets/my_pack/items/custom/sword.json model: type: model model: my_pack:item/sword ``` Rules: * Namespace: lowercase letters, digits, `_`, `-`, `.` * Path: lowercase letters, digits, `_`, `-`, `.`, `/` * No leading or trailing `/`, no `//` * Absolute paths, backslashes, and `..` are rejected ### `oversized_in_gui` [#oversized_in_gui] Set `oversized_in_gui: true` to allow the item model to render outside its slot bounds in inventory GUIs. Minecraft added this item model definition field in 1.21.6, so it only has an effect on 1.21.6 or newer. ```yaml item_model_definition: oversized_in_gui: true model: type: model model: my_pack:item/large_item ``` The value is written alongside `model` at the generated JSON root. If omitted, the vanilla default of `false` applies. When used with `raw`, this top-level setting overrides `raw.oversized_in_gui`. ## Builder model (`model`) [#builder-model-model] `model` is a shorthand: its object becomes the `model` field of the generated root. It must contain a `type`. In builder mode, the `type` and `property` values are automatically prefixed with `minecraft:` when you omit a namespace (`model` becomes `minecraft:model`). ```yaml item_model_definition: model: type: model # becomes minecraft:model model: my_pack:item/my_item ``` ### Supported types [#supported-types] The builder validates the following types. Any other `type` is passed through without validation. #### `minecraft:model` [#minecraftmodel] A single model. Requires `model` (a model resource path). ```yaml model: type: model model: my_pack:item/my_item ``` #### `minecraft:composite` [#minecraftcomposite] Renders several models on top of each other. Requires a non-empty `models` list of model objects. ```yaml model: type: composite models: - type: model model: my_pack:item/base - type: model model: my_pack:item/overlay ``` #### `minecraft:condition` [#minecraftcondition] Picks between two models based on a boolean property. Requires `property`, `on_true`, and `on_false`. ```yaml model: type: condition property: using_item on_true: type: model model: my_pack:item/drawing on_false: type: model model: my_pack:item/idle ``` #### `minecraft:select` [#minecraftselect] Picks a model from a list of cases based on a property value. Requires `property` and a non-empty `cases` list; each case needs `when` and `model`. An optional `fallback` model is used when no case matches. ```yaml model: type: select property: display_context cases: - when: gui model: type: model model: my_pack:item/gui - when: firstperson_righthand model: type: model model: my_pack:item/hand fallback: type: model model: my_pack:item/default ``` #### `minecraft:range_dispatch` [#minecraftrange_dispatch] Picks a model based on a numeric property and thresholds. Requires `property` and a non-empty `entries` list; each entry needs a numeric `threshold` and a `model`. An optional `fallback` is used below the lowest threshold. ```yaml model: type: range_dispatch property: damage entries: - threshold: 0.0 model: type: model model: my_pack:item/fresh - threshold: 0.5 model: type: model model: my_pack:item/worn fallback: type: model model: my_pack:item/broken ``` #### `minecraft:special` [#minecraftspecial] A special model with a renderer. Requires `base` and a `model` object with its own `type`. ```yaml model: type: special base: my_pack:item/shield_base model: type: minecraft:shield ``` #### `minecraft:empty` / `minecraft:bundle/selected_item` [#minecraftempty--minecraftbundleselected_item] Marker types with no additional fields. ```yaml model: type: empty ``` ## Raw model (`raw`) [#raw-model-raw] Use `raw` when you want full control. It is the complete item model definition root and is written to disk verbatim. It must contain a top-level `model` object. Unlike the builder, `raw` does not add any `minecraft:` prefixes, so write full namespaced ids. ```yaml item_model_definition: raw: model: type: minecraft:range_dispatch property: minecraft:custom_model_data entries: - threshold: 1.0 model: type: minecraft:model model: my_pack:item/variant_1 fallback: type: minecraft:model model: my_pack:item/default ``` ## Components [#components] ### `apply_component` [#apply_component] When `true` (default), IAA attaches a `minecraft:item_model` component to the item pointing at the generated model id, so the item actually uses the new definition without you setting the component by hand. If the item already defines `components.item_model` (or `minecraft:item_model`) and it differs from the generated id, IAA leaves the existing component untouched and logs a warning. Set `apply_component: false` to generate the file without touching components. ### `custom_model_data` [#custom_model_data] When `apply_component` is `true` and the item does not already define a `custom_model_data` component, you can attach one. It uses the vanilla `minecraft:custom_model_data` shape: lists of `floats`, `flags`, `strings`, and `colors`. ```yaml item_model_definition: model: type: range_dispatch property: custom_model_data entries: - threshold: 1.0 model: type: model model: my_pack:item/variant_1 custom_model_data: floats: - 1.0 flags: - true strings: - hello colors: - "#FF0000" ``` If `components.custom_model_data` already exists on the item, the section is skipped with a warning. ## Applying changes [#applying-changes] Item model definition files are written into the resource pack at reload time. Run `/iazip` afterwards to repackage and apply the pack. The console logs how many definitions were generated, how many files changed, and how many existing files were skipped. # Valhalla Metadata moved (/en/docs/valhalla) ValhallaMMO and ValhallaTrinkets documentation moved to [Compatibility: ValhallaMMO & Trinkets](/en/docs/compatibility/valhalla). Use the new page for current metadata syntax, examples, optional dependency behavior, and troubleshooting. # Actionbar (/en/docs/actions/actionbar) ```yaml actionbar: text: "My custom action bar sent to %player_name%" ``` ## Parameters [#parameters] ### `text` [#text] Required. The message to display. Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](/en/docs/compatibility/placeholderapi), and font images. # Clear Item (/en/docs/actions/clear-item) ```yaml clear_item: item: my_item amount: 2 # optional, default: 1 ``` ## Parameters [#parameters] ### `item` [#item] Required. The item to remove. Use a vanilla material, an ItemsAdder item with `namespace:id` or just `id`, or an MMOItems item with `mmoitems:type:id`. Tags are not supported for this parameter because the action needs one concrete item. See [IDs](/en/docs/compatibility/ids). ### `amount` [#amount] Optional. Defaults to `1`. The number of items to remove. # Ignite (/en/docs/actions/ignite) ```yaml ignite: duration: 200 # ticks ``` ## Parameters [#parameters] ### `duration` [#duration] Required. How long to set the target on fire, in ticks. 20 ticks = 1 second. # Message (/en/docs/actions/message) ```yaml message: text: "My custom message sent to %player_name%" ``` ## Parameters [#parameters] ### `text` [#text] Required. The message to send. Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](/en/docs/compatibility/placeholderapi), and font images. # Mythic Mobs Skill (/en/docs/actions/mythic-mobs-skill) ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 # optional, default: 1.0 ``` ## Parameters [#parameters] ### `skill` [#skill] Required. The name of the MythicMobs skill to cast. See [MythicMobs compatibility](/en/docs/compatibility/mythicmobs). ### `power` [#power] Optional. Defaults to `1.0`. The power multiplier passed to the skill. ## Related pages [#related-pages] * [MythicMobs compatibility](/en/docs/compatibility/mythicmobs) * [Action parameters](/en/docs/actions/parameters) # Open Inventory (/en/docs/actions/open-inventory) Requires Paper 1.21.4 or higher for the `title` parameter. ```yaml open_inventory: type: "anvil" title: "My awesome custom anvil" # Optional ``` Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) formatting, [PlaceholderAPI](/en/docs/compatibility/placeholderapi) placeholders, and [ItemsAdder](https://itemsadder.com/) font images. ## Supported types [#supported-types] * `anvil` * `cartography`, `cartography_table` * `crafting_table`, `workbench` * `enchanting`, `enchanting_table` * `ender_chest` * `grindstone` * `loom` * `smithing`, `smithing_table` * `stonecutter` # Open Trade Machine (/en/docs/actions/open-trade-machine) `open_trade_machine` opens the ItemsAdder trade machine GUI for the target player without requiring the machine block or furniture to be placed in the world. Use it for menu items, NPC interaction flows, custom stations, or any other action trigger that should open a specific ItemsAdder trade machine. ## Requirements [#requirements] * The target must be a player. Non-player targets are skipped. * The referenced ItemsAdder content must have a `trade_machine` or `block_trade_machine` behaviour. ## Configuration [#configuration] ```yaml info: namespace: stations items: alchemy_token: display_name: "Alchemy Station" events: interact: right: open_trade_machine: trade_machine: stations:alchemy_table ``` ## Options [#options] | Key | Type | Required | Description | | --------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `trade_machine` | string | yes | ItemsAdder item, block, or furniture ID that provides a trade machine GUI. Bare IDs are supported. See [IDs](/en/docs/compatibility/ids). | ## With targeting [#with-targeting] The action uses the shared action parameters. For example, this opens the GUI for the entity the player is looking at if that target is a player: ```yaml open_trade_machine: trade_machine: stations:alchemy_table target: in_sight target_in_sight_distance: 8 ``` ## Plugin config [#plugin-config] This action can be disabled in `config.yml`: ```yaml actions: open_trade_machine: false ``` The key is optional. Missing action toggle keys default to enabled. ## Reload behavior [#reload-behavior] Run `/iareload` after editing the ItemsAdder content YAML. The referenced trade machine must already be registered by ItemsAdder. ## Common mistakes [#common-mistakes] * Using an ID for a normal item that does not have a `trade_machine` or `block_trade_machine` behaviour. * Running the action against `target: other` when the event target is not a player. * Reusing the same bare ID for multiple trade machines in different packs. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [ItemsAdder compatibility](/en/docs/compatibility/itemsadder) # Action Parameters (/en/docs/actions/parameters) Every action supports a set of shared parameters. These let you gate actions behind permissions, add delays, and control who the action is applied to. You can mix and match any of them on the same action. ## Parameters [#parameters] ### `permission` [#permission] If set, the action only fires if the player has this permission node. Players without it are silently ignored. ```yaml actionbar: text: "Hello!" permission: "my_pack.greet" ``` ### `delay` [#delay] Wait this many ticks before executing the action. 20 ticks = 1 second. Defaults to `0` (instant). ```yaml message: text: "Loading..." delay: 40 # 2 seconds after the trigger ``` ### `target` [#target] Controls who the action is applied to. Defaults to `self`. | Value | Description | | ---------- | ------------------------------------------------------------------------------------------------------- | | `self` | The player who triggered the event *(default)* | | `other` | The entity the player is interacting with (e.g. the one being attacked) | | `all` | Both the triggering player **and** the target entity | | `radius` | All entities within the configured X/Y/Z radius around the interaction point - requires `target_radius` | | `in_sight` | The entity the player is currently looking at - requires `target_in_sight_distance` | ```yaml message: text: "You hit someone!" target: other ``` ### `target_radius` [#target_radius] Only used when `target: radius`. Defines the X/Y/Z radius in blocks around the event target, event block, or triggering player. ```yaml actionbar: text: "Area effect!" target: radius target_radius: 10 ``` ### `target_in_sight_distance` [#target_in_sight_distance] Only used when `target: in_sight`. The maximum number of blocks to ray-cast from the player's eye position when searching for an entity. If no entity is found within that range, the action is skipped entirely. ```yaml ignite: duration: 100 target: in_sight target_in_sight_distance: 10 ``` ## Trigger placement [#trigger-placement] Actions are declared inside ItemsAdder item, block, furniture, or complex furniture `events` sections. ```yaml info: namespace: my_pack items: ruby_staff: events: interact: right: message: text: "Right-clicked" ruby_lamp: events: placed_furniture: interact: message: text: "Furniture clicked" ``` `placed_block` actions can be nested under `events.placed_block`. Furniture and complex furniture actions are loaded from `events.placed_furniture`. ## Supported trigger names [#supported-trigger-names] Common item triggers include: ```text interact, interact_mainhand, interact_offhand, block_break, attack, kill, drop, pickup, held, held_offhand, unheld, unheld_offhand, item_break, eat, drink, bow_shot, gun_shot, gun_no_ammo, gun_reload, item_throw, item_hit_ground, item_hit_entity, book_write, book_read, fishing_start, fishing_caught, fishing_failed, fishing_cancel, fishing_bite, fishing_in_ground, bucket_empty, bucket_fill ``` Block triggers include `interact`, `break`, and nested `placed_block` triggers. Furniture triggers use the same item-style trigger names under `placed_furniture`. Complex furniture currently supports `placed_furniture.interact`. `interact`, `interact_mainhand`, and `interact_offhand` can use argument sections such as `right`, `left`, `right_shift`, and `left_shift`. Wildcard actions under the trigger are also executed after the exact argument match. ## Cooldowns and stat requirements [#cooldowns-and-stat-requirements] When an action is triggered from a held ItemsAdder item, ItemsAdderAdditions checks ItemsAdder's configured cooldowns and stat requirements for that item before executing the action. If the player does not meet those requirements, the action is skipped. ## Full example [#full-example] ```yaml my_item: events: interact: right: actionbar: text: "Right-clicked!" permission: "some.permission" # Only players with this permission will trigger this delay: 10 # Half a second delay target: self # Apply to the clicker only ``` # Play Animation (/en/docs/actions/play-animation) ```yaml play_animation: name: "spin" ``` ## Parameters [#parameters] ### `name` [#name] Required. The name of the animation to play, as defined in the furniture configuration. # Play Emote (/en/docs/actions/play-emote) ```yaml play_emote: name: "wave" ``` ## Parameters [#parameters] ### `name` [#name] Required. The name of the emote to play. # Replace Biome (/en/docs/actions/replace-biome) ```yaml replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` Change the biome in a selected area when an ItemsAdder event is triggered. ## Parameters [#parameters] ### `biome` [#biome] The biome to apply. Use a valid biome namespaced ID such as `minecraft:plains`, `minecraft:desert`, or `minecraft:cherry_grove`. You can also use custom plugins/datapacks biomes ```yaml replace_biome: biome: "minecraft:desert" ``` ### `shape` [#shape] The shape used for the biome replacement area. Supported shapes: * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` * `SHELL` * `TORUS` * `CONE` * `BEAM` * `PYRAMID` ```yaml replace_biome: biome: "minecraft:swamp" shape: CYLINDER ``` ### `radius` [#radius] Defines the size of the shape. There are two supported radius formats depending on the shape and how you want to configure it. #### Uniform radius [#uniform-radius] Useful for round shapes such as `SPHERE`. ```yaml replace_biome: biome: "minecraft:snowy_taiga" shape: SPHERE radius: blocks_from_center: 5 ``` #### Per-axis radius [#per-axis-radius] Useful for stretched or custom-sized shapes. ```yaml replace_biome: biome: "minecraft:jungle" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ## Shape notes [#shape-notes] Some shapes are rotation-based: * `PYRAMID` * `BEAM` * `CONE` These shapes are affected by the player's rotation when the action runs. For these shapes, `x`, `y`, and `z` still control the final shape dimensions, even though the shape is oriented using the player's facing direction. ## Important limitation [#important-limitation] Minecraft biome editing is not perfectly precise at small scales. The result may look slightly randomized or rough, especially with small radius values. This is a game limitation. * Small `SPHERE` shapes may not look perfectly spherical. * Directional shapes may appear slightly uneven. * Some edges may look rough. With a larger radius the shape will look much closer to what is expected. ## Examples [#examples] ### Sphere [#sphere] ```yaml replace_biome: biome: "minecraft:mushroom_fields" shape: SPHERE radius: blocks_from_center: 6 ``` ### Cuboid [#cuboid] ```yaml replace_biome: biome: "minecraft:badlands" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ### Beam based on player rotation [#beam-based-on-player-rotation] ```yaml replace_biome: biome: "minecraft:nether_wastes" shape: BEAM radius: x: 12 y: 2 z: 2 ``` ### Cone based on player rotation [#cone-based-on-player-rotation] ```yaml replace_biome: biome: "minecraft:soul_sand_valley" shape: CONE radius: x: 10 y: 4 z: 4 ``` ## Full example [#full-example] ```yaml my_item: events: interact: right: replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` ## Related pages [#related-pages] * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # Replace Item (/en/docs/actions/replace-item) ```yaml replace_item: item: my_pack:upgraded_sword copy_durability: true # optional, default: false copy_enchantments: true # optional, default: false copy_pdc: true # optional, default: false ``` Replaces the item held by the target player. Normal item triggers replace the main-hand item. Off-hand trigger variants, such as `ITEM_INTERACT_OFFHAND`, replace the off-hand item instead. ## Parameters [#parameters] ### `item` [#item] Required. The replacement item to give to the player. Use a vanilla material, an ItemsAdder item with `namespace:id` or just `id`, or an MMOItems item with `mmoitems:type:id`. See [IDs](/en/docs/compatibility/ids). Tags such as `#minecraft:planks` are not supported because the action must create one concrete item stack. ```yaml replace_item: item: minecraft:diamond_sword ``` ```yaml replace_item: item: my_pack:ruby_sword ``` ```yaml replace_item: item: mmoitems:sword:flame_blade ``` ### `copy_durability` [#copy_durability] Optional. Defaults to `false`. If `true`, copies the current durability damage from the original item to the replacement item. This only applies when both items support durability. ### `copy_enchantments` [#copy_enchantments] Optional. Defaults to `false`. If `true`, copies all enchantments from the original item to the replacement item. ### `copy_pdc` [#copy_pdc] Optional. Defaults to `false`. If `true`, copies the original item's Persistent Data Container into the replacement item. Existing keys on the replacement item are overwritten when they use the same key. ## Full example [#full-example] ```yaml my_pack:ruby_sword: events: interact: right: replace_item: item: my_pack:charged_ruby_sword copy_durability: true copy_enchantments: true copy_pdc: true ``` ## Notes [#notes] * If the configured `item` cannot be resolved, the action does nothing. * If the action target is not a player, the action does nothing. * Universal action parameters such as `permission`, `delay`, and `target` are supported. See [Action Parameters](/en/docs/actions/parameters). # Replace Near Blocks (/en/docs/actions/replace-near-blocks) ```yaml iaa_replace_near_blocks: from: - minecraft:stone - my_pack:old_ore - "#minecraft:dirt" - "#my_pack:replaceable_blocks" to: minecraft:gold_block shape: SPHERE radius: blocks_from_center: 5 ``` Replaces matching blocks around the action target. The `iaa_` prefix is required; `replace_near_blocks` is not an alias because ItemsAdder already has an action with that name. Work is distributed across server ticks to reduce tick stalls. Existing action parameters such as `permission`, `delay`, and `target` are supported. See [Action Parameters](/en/docs/actions/parameters). ## Parameters [#parameters] ### `from` [#from] Required. A list containing 1 to 32 block IDs or block tags. A block is replaced when its actual ID matches any entry. Supported entries: * Vanilla block IDs, such as `minecraft:stone` * ItemsAdder custom-block IDs, such as `my_pack:old_ore` * Minecraft block tags, such as `#minecraft:dirt` * ItemsAdderAdditions custom tags declared with `type: block`, such as `#my_pack:replaceable_blocks` Item, furniture, recipe, unknown, and malformed tags are rejected when the configuration is loaded. Custom block rotation suffixes use the normal ItemsAdderAdditions matching rules. See [Custom Tags](/en/docs/custom-tags) and [IDs](/en/docs/compatibility/ids). ### `to` [#to] Required. One exact vanilla block ID. The target can be air or a stateless, full solid block such as stone, dirt, planks, ores, or metal blocks. Custom blocks, gravity blocks, non-solid blocks, and blocks with serialized state properties are rejected. Custom blocks can be used in `from`. They are removed through the ItemsAdder API before the vanilla target is placed so ItemsAdder can clear its stored custom-block state. If lookup or removal fails, the job stops without replacing the backing vanilla block. ### `shape` [#shape] Optional. Defaults to `SPHERE`. Supported shapes: * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` All four shapes are centered on the resolved action target. Directional shapes are not supported by this action. ### `radius` [#radius] Required. Use a uniform radius: ```yaml radius: blocks_from_center: 5 ``` Or configure each axis separately: ```yaml radius: x: 8 y: 2 z: 8 ``` When `blocks_from_center` is present, it overrides `x`, `y`, and `z`. Missing axis values default to 5. A `CYLINDER` with `y: 0` is one block high. Each radius must be an integer from 0 to 25. The inclusive bounding box `(2x + 1) × (2y + 1) × (2z + 1)` must contain at most 32,768 coordinates. This means a uniform radius can be at most 15. Configurations over either limit are rejected instead of being truncated. ## Protection and safety [#protection-and-safety] Before each replacement, the action asks AntiGriefLib for both `BREAK` and `PLACE` permission at that block. The action's WorldGuard flag is `iaa-action-iaa-replace-near-blocks`. The following sources are skipped: * Block entities and barriers * Custom blocks with an active ItemsAdderAdditions behaviour * Blocks carrying ItemsAdderAdditions persistent block data * Blocks whose state changes while protection checks are running The scanner checks chunk state before reading blocks and does not request unloaded chunks. A replacement also requires the surrounding 3×3 chunk area to be loaded. If it is not, that block is skipped. The action does not add chunk tickets. Normal block physics remains enabled so Paper handles neighbor updates, lighting, persistence, and client synchronization. Physics and callbacks from other plugins can perform additional work or load chunks indirectly; the loaded-chunk rule only covers direct access performed by this action. ## Performance limits [#performance-limits] All executions share one synchronous queue: * Maximum 4 active executions * Maximum 512 candidate coordinates per tick * Maximum 32 replacements per tick * Approximately 2 ms soft processing budget per tick If four jobs are already active, another execution is ignored. Pending work is cancelled when its player disconnects or on plugin reload or disable. Replacements already completed remain in the world; the action does not roll them back. ## Full example [#full-example] ```yaml my_pack:replacement_wand: events: interact: right: iaa_replace_near_blocks: from: - minecraft:stone - "#my_pack:replaceable_blocks" to: minecraft:deepslate shape: CYLINDER radius: x: 8 y: 1 z: 8 permission: myserver.replacement-wand ``` ## Related pages [#related-pages] * [Action Parameters](/en/docs/actions/parameters) * [Custom Tags](/en/docs/custom-tags) * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # Shoot Fireball (/en/docs/actions/shoot-fireball) ```yaml shoot_fireball: power: 1 speed: 2.0 # optional, default: 1.0 fire: false # optional, default: true ``` ## Parameters [#parameters] ### `power` [#power] Required. The explosion power of the fireball. ### `speed` [#speed] Optional. Defaults to `1.0`. The projectile speed multiplier. ### `fire` [#fire] Optional. Defaults to `true`. Whether the fireball leaves fire on impact. # Swing Hand (/en/docs/actions/swing-hand) ```yaml swing_hand: hand: "off_hand" ``` ## Parameters [#parameters] ### `hand` [#hand] Optional. Defaults to `hand`. Which hand to swing: `hand` or `off_hand`. # Teleport (/en/docs/actions/teleport) Teleport the action's targeted entity with absolute coordinates, coordinates relative to its current location, or a named destination. ## Coordinate destinations [#coordinate-destinations] All three coordinate axes are required. Numeric values are absolute and remain compatible with existing configurations. ```yaml teleport: x: 100 y: 64 z: -50 ``` Prefix a quoted coordinate with `~` to make it relative to the entity being teleported. `"~"` keeps the current coordinate, while `"~10"` adds 10 and `"~-2.5"` subtracts 2.5. ```yaml teleport: x: "~10" y: "~" z: "~-2.5" ``` Absolute and relative axes can be mixed: ```yaml teleport: x: 100 y: "~5" z: "~-2" ``` Relative coordinates always use the current location of the targeted entity, not the player who triggered the action. Blank, malformed, NaN, and infinite values are rejected. ## Named destinations [#named-destinations] Use `destination` instead of `x`, `y`, and `z`. Coordinates and a named destination cannot be combined. ### World spawn [#world-spawn] ```yaml teleport: destination: world_spawn ``` `world_spawn` uses the targeted entity's current world. Set `world` to use another loaded world's spawn: ```yaml teleport: destination: world_spawn world: "world_nether" ``` ### Player respawn [#player-respawn] ```yaml teleport: destination: respawn ``` `respawn` uses the triggering player's respawn location, including beds and respawn anchors. If the player has no valid respawn location, it falls back to the configured world's spawn, or the player's current-world spawn when `world` is omitted. The action still teleports the targeted entity. The triggering player is used only to find the respawn location. ## Optional parameters [#optional-parameters] ### `yaw` and `pitch` [#yaw-and-pitch] Absolute rotation values. With coordinates, omitted values preserve the targeted entity's current rotation. With a named destination, omitted values preserve that destination's rotation. ```yaml teleport: destination: respawn yaw: 90.0 pitch: 0.0 ``` ### `world` [#world] With coordinates or `world_spawn`, defaults to the targeted entity's current world. With `respawn`, it is used only as the fallback world when the player has no respawn location. A configured world must be loaded and exist. # Title (/en/docs/actions/title) ```yaml title: title: "Welcome!" subtitle: "Enjoy your stay" # optional fade_in: 5 # optional, default: 10 ticks stay: 40 # optional, default: 70 ticks fade_out: 30 # optional, default: 20 ticks ``` ## Parameters [#parameters] ### `title` [#title] Required. The large title text. Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](/en/docs/compatibility/placeholderapi), and font images. ### `subtitle` [#subtitle] Optional. The smaller text shown below the title. Supports MiniMessage, PlaceholderAPI, and font images. ### `fade_in` [#fade_in] Optional. Defaults to `10` ticks. Fade-in duration. ### `stay` [#stay] Optional. Defaults to `70` ticks. How long the title stays on screen. ### `fade_out` [#fade_out] Optional. Defaults to `20` ticks. Fade-out duration. # Toast (/en/docs/actions/toast) ```yaml toast: icon: my_item text: - "My ItemsAdderAdditions" - "<#E6FBFE>Custom Toast" frame: "task" # optional, default: goal ``` ## Parameters [#parameters] ### `icon` [#icon] Required. The item shown as the toast icon. Use a vanilla material, an ItemsAdder item with `namespace:id` or just `id`, or an MMOItems item with `mmoitems:type:id`. Tags are not supported for toast icons because the icon must be one concrete item. See [IDs](/en/docs/compatibility/ids). ### `text` [#text] Required. The toast message. Can be a single string or a list (one entry per line). Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](/en/docs/compatibility/placeholderapi), and font images. ### `frame` [#frame] Optional. Defaults to `goal`. The toast style: `task`, `goal`, or `challenge`. # Veinminer (/en/docs/actions/veinminer) ```yaml veinminer: max_blocks: 16 ``` ## Parameters [#parameters] ### `max_blocks` [#max_blocks] Required. The maximum number of blocks to break in one vein-mining action. # Completion Actions (/en/docs/advancements/completion-actions) The `on_complete` section defines what happens when the player earns an advancement. Four action types are supported: sound, title, action bar, and commands. All four can be combined in a single advancement. ```yaml on_complete: sound: ... title: ... actionbar: ... commands: ... ``` Actions fire immediately after the advancement is awarded. For advancements with multiple criteria, `on_complete` runs once when the last criterion is completed. *** ## sound [#sound] Plays a sound at the player's location. ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.0 source: master ``` | Key | Type | Default | Description | | -------- | ------ | ------------ | --------------------------------------------------------------------------------------------------------------------------- | | `name` | string | *(required)* | Sound key (e.g. `minecraft:entity.player.levelup`). | | `volume` | float | `1.0` | Volume multiplier. | | `pitch` | float | `1.0` | Pitch multiplier. | | `source` | string | `master` | Audio source category: `master`, `music`, `record`, `weather`, `block`, `hostile`, `neutral`, `player`, `ambient`, `voice`. | *** ## title [#title] Shows a title and optional subtitle on screen. ```yaml on_complete: title: title: "Achievement!" subtitle: "First Ruby Sword obtained." fade_in: 10 stay: 70 fade_out: 20 ``` | Key | Type | Default | Description | | ---------- | ------- | ------------ | ------------------------------------------------------------------------------------------------------------------- | | `title` | string | *(required)* | Large title text. Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) and PlaceholderAPI. | | `subtitle` | string | `""` | Smaller text below the title. Supports MiniMessage and PlaceholderAPI. | | `fade_in` | integer | `10` | Fade-in duration in ticks (20 ticks = 1 second). | | `stay` | integer | `70` | How long the title stays on screen, in ticks. | | `fade_out` | integer | `20` | Fade-out duration in ticks. | *** ## actionbar [#actionbar] Sends a message to the player's action bar. ```yaml on_complete: actionbar: text: "Ruby sword obtained!" ``` | Key | Type | Required | Description | | ------ | ------ | -------- | --------------------------------------------------------- | | `text` | string | yes | Action bar text. Supports MiniMessage and PlaceholderAPI. | *** ## commands [#commands] Runs one or more commands. Each entry is a named sub-section; the name is arbitrary and is only used to distinguish entries. ```yaml on_complete: commands: give_reward: command: "give {player} gold_ingot 4" as_console: true notify: command: "broadcast {player} earned the Ruby Sword achievement!" as_console: true ``` | Key | Type | Default | Description | | ------------ | ------- | ------------ | ------------------------------------------------------------------------------------------------ | | `command` | string | *(required)* | The command to run. `{player}` is replaced with the player's name. | | `as_console` | boolean | `false` | Run as the console sender. When `false`, the player runs the command with their own permissions. | *** ## Full example [#full-example] ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.2 title: title: "Achievement!" subtitle: "First Ruby Sword obtained." fade_in: 10 stay: 70 fade_out: 20 actionbar: text: "You got the ruby sword!" commands: reward_gold: command: "give {player} gold_ingot 4" as_console: true log: command: "say {player} completed First Ruby Sword" as_console: true ``` # Configuration Reference (/en/docs/advancements/configuration) Every advancement entry lives under the top-level `advancements` key in any ItemsAdder content file. IAA picks up files that contain this key automatically. ```yaml info: namespace: my_pack advancements: : # ... options below ``` ## Top-level options [#top-level-options] | Key | Type | Default | Description | | ------------- | ------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Set to `false` to skip this advancement without removing it from the file. | | `parent` | string | *(none)* | Parent advancement ID. Omit to make this a root (tab) advancement. See [Parent](#parent). | | `display` | section | *(required)* | Visual settings. See [Display](#display). | | `criteria` | section | *(none)* | Conditions that must be met to complete the advancement. Each criterion has one trigger, trigger-specific conditions, and an optional `conditions.player` predicate. See [Triggers](/en/docs/advancements/triggers) and [Player predicates](/en/docs/advancements/player-predicates). | | `rewards` | section | *(none)* | Experience, loot tables, and recipe unlocks. See [Rewards](#rewards). | | `on_complete` | section | *(none)* | Actions run when the advancement is fully completed. See [Completion actions](/en/docs/advancements/completion-actions). | ## Parent [#parent] ```yaml parent: root # same namespace as this file, resolves to my_pack:root parent: otherns:someroot # explicit namespace ``` If `parent` contains no colon, the file's namespace is prepended. If `parent` is omitted entirely, this advancement becomes a root and creates a new tab in the advancements screen. ## Display [#display] ```yaml display: title: "First Ruby Sword" description: "Obtain your first custom sword." icon: my_pack:ruby_sword frame: task background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: true announce_to_chat: true hidden: false ``` | Key | Type | Default | Description | | ------------------ | -------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `title` | string | *(required)* | Advancement title. Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/). | | `description` | string | `""` | Tooltip description. Supports MiniMessage. | | `icon` | `namespace:id` | `minecraft:barrier` | Item shown as the icon. Accepts ItemsAdder item IDs, MMOItems IDs, or vanilla material IDs. Tags are not supported because the icon must resolve to one concrete item. See [IDs](/en/docs/compatibility/ids). | | `frame` | string | `task` | Shape of the icon border: `task`, `goal`, or `challenge`. | | `background` | string | *(none)* | **Root advancements only.** Texture path for the tab background (e.g. `minecraft:gui/advancements/backgrounds/adventure`). | | `show_toast` | boolean | `true` | Show a toast notification when completed. | | `announce_to_chat` | boolean | `true` | Broadcast completion to all players in chat. | | `hidden` | boolean | `false` | Hide this advancement until it is completed. | `background` is what makes an advancement create a new tab. It is only used on root advancements (no `parent`). ## Criteria [#criteria] Each criterion has a `trigger` and an optional `conditions` section. Trigger-specific options live directly under `conditions`. You can also add a `player` predicate to any runtime trigger to require an extra player state check before the criterion is awarded. ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true high_fall: trigger: fall_from_height conditions: distance: y: min: 30 ``` | Key | Type | Default | Description | | ------------------- | --------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `trigger` | string | `impossible` | Trigger type for this criterion. See the full [trigger reference](/en/docs/advancements/triggers). | | `conditions` | section | *(none)* | Trigger-specific options, plus optional `player` predicates. | | `conditions.player` | section or list | *(any player)* | Extra player predicate checked when the criterion is about to be awarded. Ignored by the `impossible` trigger. See [Player predicates](/en/docs/advancements/player-predicates). | Child advancements need at least one valid criterion. Root advancements can omit `criteria`; IAA creates an internal root criterion and grants it automatically so the advancement tab appears. ## Rewards [#rewards] ```yaml rewards: experience: 50 loot: - minecraft:chests/simple_dungeon recipes: - my_pack:ruby_sword_recipe - minecraft:golden_apple ``` | Key | Type | Default | Description | | ------------ | --------------- | ------- | --------------------------------------------------------------------------------------- | | `experience` | integer | `0` | Experience points awarded on completion. | | `loot` | list of strings | `[]` | Loot table keys to roll on completion. | | `recipes` | list of strings | `[]` | Recipe keys to unlock. Accepts `namespace:id` or a bare `id` (uses the file namespace). | ## Full example [#full-example] ```yaml info: namespace: my_pack advancements: root: display: title: "My Server" description: "Custom achievements for My Server." icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false frame: task first_ruby_sword: parent: root display: title: "First Ruby Sword" description: "Obtain your first custom sword." icon: my_pack:ruby_sword frame: task show_toast: true announce_to_chat: true criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword amount: 1 on_complete: sound: name: minecraft:entity.player.levelup title: title: "Achievement!" subtitle: "First Ruby Sword obtained." commands: reward: command: "give {player} gold_ingot 4" as_console: true master_crafter: parent: my_pack:root display: title: "Master Crafter" description: "Craft the sword, the shield, and the potion." icon: minecraft:crafting_table frame: goal criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe craft_shield: trigger: craft_recipe conditions: recipe: my_pack:ruby_shield_recipe craft_potion: trigger: craft_recipe conditions: recipe: my_pack:ruby_potion_recipe rewards: experience: 100 loot: - minecraft:chests/simple_dungeon ``` Multi-criteria advancements (like `master_crafter` above) require all criteria to be completed. Each criterion is tracked independently; progress is saved by vanilla. Since ItemsAdderAdditions 1.0.12, `/iareload` keeps existing registrations and player progress when the advancement definitions are unchanged. Changing a definition can require that advancement to be re-registered. # Custom Advancements (/en/docs/advancements) Define custom Minecraft advancement trees directly in your ItemsAdder content YAML files. No datapacks, no restarts. Add an `advancements` section and run `/iareload`. ## Features [#features] * Create **new advancement tabs** with a custom background texture * Build **tree structures** by parenting advancements to each other * Use **49 built-in trigger types** (obtain item, craft recipe, kill entity, enter biome, join checks, furniture checks, player state checks, and more) * Run **completion actions** when an advancement finishes (title, sound, commands, action bar) * Add optional **player predicates** to any criterion, such as sneaking, gamemode, level, inventory slots, potion effects, location, and more * Grant **experience, loot tables, and recipe unlocks** as rewards * Player progress persists across reloads ## Basic structure [#basic-structure] ```yaml info: namespace: my_pack advancements: root: display: title: "My Server" description: "Achievements for My Server." icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false first_sword: parent: root display: title: "First Ruby Sword" description: "Obtain your first custom sword." icon: my_pack:ruby_sword frame: task criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword on_complete: sound: name: minecraft:entity.player.levelup title: title: "Achievement!" subtitle: "First Ruby Sword obtained." ``` ## How it works [#how-it-works] IAA loads every content file that contains an `advancements` section. Each entry becomes one Minecraft advancement injected at runtime via NMS. Player progress is stored by vanilla in the world save files and persists across reloads. Root advancements without criteria are automatically granted so their tab is visible to players after join or reload. Root advancements (no `parent`) create a new tab in the advancements screen. Children connect visually to their parent in the tree. All advancements in a file share the same `info.namespace`. Cross-namespace parents are supported using the `namespace:id` format. # Player Predicates (/en/docs/advancements/player-predicates) Player predicates let you add extra requirements to a criterion beyond the trigger itself. Put them under `conditions.player`. The trigger must fire first, then the player predicate is checked immediately before the criterion is awarded. ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true ``` `conditions.player` works with runtime triggers. The `impossible` trigger ignores player predicates because it can only be awarded manually. ## Object and list formats [#object-and-list-formats] Use a single object when you only need one predicate. All keys inside the object must match. ```yaml conditions: player: type: minecraft:player flags: is_sneaking: true type_specific: type: minecraft:player gamemode: survival ``` You can also use a list. Every entry in the list must match. This is useful if you prefer vanilla-style predicate wrappers. ```yaml conditions: player: - condition: minecraft:entity_properties predicate: flags: is_sneaking: true - condition: minecraft:entity_properties predicate: type_specific: type: minecraft:player gamemode: survival ``` ## Range syntax [#range-syntax] Numeric values accept either an exact number or a `min`/`max` object. ```yaml level: 10 level: min: 10 max: 30 ``` This syntax is used by player level, food level, movement speed, potion duration, enchantment level, item count, durability, light level, and other numeric checks. ## Common player checks [#common-player-checks] ```yaml conditions: player: flags: is_sneaking: true is_sprinting: false type_specific: type: minecraft:player gamemode: adventure level: min: 10 food: level: min: 16 saturation: min: 4.0 ``` | Key | Type | Description | | ------------------------------- | --------------- | --------------------------------------------------------------------------------- | | `flags.is_baby` | boolean | Match baby/adult state when the entity supports it. | | `flags.is_on_fire` | boolean | Require the player to be on fire or not on fire. | | `flags.is_sneaking` | boolean | Require sneaking state. | | `flags.is_sprinting` | boolean | Require sprinting state. | | `flags.is_swimming` | boolean | Require swimming state. | | `flags.is_on_ground` | boolean | Require on-ground state. | | `flags.is_flying` | boolean | Matches creative flight or gliding. | | `flags.is_fall_flying` | boolean | Require elytra gliding state. | | `type_specific.gamemode` | string or list | Match one or more gamemodes: `survival`, `creative`, `adventure`, or `spectator`. | | `type_specific.level` | number or range | Match the player's XP level. | | `type_specific.food.level` | number or range | Match food level. | | `type_specific.food.saturation` | number or range | Match saturation. | `gamemode`, `level`, `food`, `advancements`, `recipes`, `stats`, `input`, and `looking_at` can also be placed directly inside `player`, but `type_specific` is clearer and closer to vanilla predicate structure. ## Input checks [#input-checks] Input predicates can check the player's current movement inputs when the server exposes that information. `sneak` and `sprint` fall back to Bukkit's player state when direct input data is unavailable. ```yaml conditions: player: type_specific: type: minecraft:player input: forward: true jump: true sneak: false sprint: true ``` | Key | Type | Description | | ---------------- | ------- | ---------------------------------------- | | `input.forward` | boolean | Require the forward key state. | | `input.backward` | boolean | Require the backward key state. | | `input.left` | boolean | Require the left key state. | | `input.right` | boolean | Require the right key state. | | `input.jump` | boolean | Require the jump key state. | | `input.sneak` | boolean | Require sneak input or sneaking state. | | `input.sprint` | boolean | Require sprint input or sprinting state. | ## Location checks [#location-checks] ```yaml conditions: player: location: dimension: minecraft:overworld world: world biomes: - minecraft:plains - minecraft:forest position: x: min: 100 max: 200 y: min: 60 z: 0 block: blocks: minecraft:grass_block light: min: 8 can_see_sky: true structures: - minecraft:village_plains - customstructures:ancient_temple ``` | Key | Type | Description | | ----------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------- | | `location.dimension` / `dimensions` | string or list | Match the world environment, such as `minecraft:overworld`, `minecraft:the_nether`, or `minecraft:the_end`. | | `location.world` | string | Match the Bukkit world name. | | `location.biome` / `biomes` | string or list | Match biome keys. | | `location.position.x` | number or range | Match X coordinate. | | `location.position.y` | number or range | Match Y coordinate. | | `location.position.z` | number or range | Match Z coordinate. | | `location.block` | block predicate | Match the block at the location. | | `location.light` | number or range | Match block light level. | | `location.can_see_sky` | boolean | Require sky visibility. | | `location.structure` / `structures` | string or list | Match a vanilla structure key or a Custom Structures structure. Any listed structure can match. | Vanilla structures use registry keys such as `minecraft:village_plains`. Custom Structures entries use `customstructures:` (the alias `custom_structures:` is also accepted) and require ItemsAdderAdditions 1.0.12 or higher with the Custom Structures plugin installed. See [Custom Structures compatibility](/en/docs/compatibility/customstructures). ## Block predicates [#block-predicates] Block predicates are used by `location.block`, `stepping_on`, and `movement_affected_by`. ```yaml conditions: player: stepping_on: block: blocks: minecraft:stone state: axis: y ``` | Key | Type | Description | | --------------- | ----------------- | ---------------------------------------------------------------- | | `block` | string or section | Shorthand for a single block, or a full block predicate section. | | `blocks` / `id` | string or list | Block IDs to match. | | `state.` | string or range | Match a block-state value exactly, or with `min`/`max`. | ItemsAdderAdditions custom block tags are resolved first. If no custom tag exists, block tag syntax such as `#minecraft:logs` is resolved against vanilla block tags. Vanilla tags match vanilla blocks only. ## Item and equipment predicates [#item-and-equipment-predicates] Item predicates can be used in `equipment`, `slots`, and nested entity predicates. They accept ItemsAdder IDs, MMOItems IDs, vanilla item IDs, and vanilla item tags such as `#minecraft:planks`. See [IDs](/en/docs/compatibility/ids). ```yaml conditions: player: equipment: mainhand: items: my_pack:ruby_sword count: 1 durability: min: 100 components: minecraft:custom_model_data: 123 enchantments: - enchantment: minecraft:sharpness levels: min: 3 ``` | Key | Type | Description | | ---------------------------------------- | --------------- | ------------------------------------------------------------------------ | | `item` / `items` | string or list | Item IDs to match. A plain string can be used as shorthand for one item. | | `count` | number or range | Match stack amount. | | `durability` | number or range | Match remaining durability. | | `components.minecraft:custom_model_data` | integer | Match custom model data. | | `components.minecraft:custom_name` | string | Match the item's display name. | | `components.minecraft:damage` | integer | Match item damage. | | `enchantments[].enchantment` / `id` | string | Enchantment key. | | `enchantments[].levels` | number or range | Required enchantment level. | ItemsAdderAdditions custom item tags are resolved first. If no custom tag exists, vanilla item tags are resolved against the vanilla item registry. Item `predicates` sections are still unsupported and make the item predicate fail closed instead of matching accidentally. ## Slots [#slots] Use `slots` when you need to check the player's inventory instead of only equipped items. ```yaml conditions: player: slots: weapon.mainhand: items: minecraft:diamond_sword inventory.0: items: minecraft:apple count: 2 hotbar.2: items: my_pack:ruby_staff ``` | Slot key | Description | | ----------------------------------------------- | ---------------------------------------------- | | `mainhand` or `weapon.mainhand` | Main hand item. | | `offhand` or `weapon.offhand` | Off-hand item. | | `head` or `armor.head` | Helmet slot. | | `chest` or `armor.chest` | Chestplate slot. | | `legs` or `armor.legs` | Leggings slot. | | `feet` or `armor.feet` | Boots slot. | | `*`, `inventory.*`, `container.*` | Any player inventory slot. | | `hotbar.` | Hotbar slot, from `0` to `8`. | | `inventory.` or `inventory.-` | Main inventory slots, offset after the hotbar. | | `container.` or `container.-` | Raw container slot numbers. | ## Potion effects [#potion-effects] ```yaml conditions: player: effects: minecraft:speed: amplifier: min: 1 duration: min: 100 ambient: false visible: true ``` | Key | Type | Description | | ---------------------------- | --------------- | ---------------------------------- | | `effects..amplifier` | number or range | Match potion amplifier. | | `effects..duration` | number or range | Match remaining duration in ticks. | | `effects..ambient` | boolean | Match ambient flag. | | `effects..visible` | boolean | Match particle visibility. | ## Progress, recipes, and statistics [#progress-recipes-and-statistics] ```yaml conditions: player: type_specific: type: minecraft:player advancements: minecraft:story/mine_stone: true my_pack:custom_root: root_trigger: true recipes: minecraft:diamond_sword: true stats: - type: minecraft:custom stat: minecraft:jump value: min: 50 ``` | Key | Type | Description | | ------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------- | | `advancements.` | boolean or section | Require another advancement to be done or not done. A section checks named criteria. | | `recipes.` | boolean | Require a recipe to be discovered or undiscovered. | | `stats[].type` | string | Statistic group, such as `minecraft:custom`, `minecraft:mined`, `minecraft:used`, `minecraft:killed`, or `minecraft:killed_by`. | | `stats[].stat` | string | Statistic key, material key, or entity key depending on the statistic type. | | `stats[].value` | number or range | Required statistic value. | ## Nested entity checks [#nested-entity-checks] The same entity predicate system can be used for related entities. ```yaml conditions: player: type_specific: type: minecraft:player looking_at: type: minecraft:zombie distance: absolute: max: 12 vehicle: type: minecraft:horse ``` | Key | Type | Description | | -------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------- | | `passenger` | entity predicate | Match one of the player's passengers. | | `vehicle` | entity predicate | Match the entity the player is riding. | | `targeted_entity` | entity predicate | For mobs, match their current target. | | `type_specific.looking_at` | entity predicate | For players, match the entity they are looking at within 100 blocks. | | `distance` | section | Match distance from the player to the related entity. Supports `absolute`, `horizontal`, `x`, `y`, and `z`. | ## Other type-specific predicates [#other-type-specific-predicates] Nested entity predicates can also use a few entity-specific checks. | Type | Keys | Description | | --------------------------------------------------------------- | ------------------------ | ---------------------------------------------------------- | | `minecraft:sheep` | `sheared` | Match whether the sheep is sheared. | | `minecraft:slime`, `minecraft:magma_cube`, `minecraft:cube_mob` | `size` | Match slime size with a number or range. | | `minecraft:raider` | `is_captain`, `has_raid` | Match raider patrol captain and raid state when available. | | `minecraft:fishing_hook` | `in_open_water` | Match fishing-hook open-water state when available. | ## Limitations [#limitations] * Entity type tags are accepted syntactically but are not resolved. Vanilla item and block tags are resolved where item/block predicates are supported. * Entity-level `components` and `predicates` sections are not supported and will make the predicate fail closed. * NBT matching is intentionally limited; it only supports simple scoreboard tag checks inside an `nbt` string. # Triggers (/en/docs/advancements/triggers) Triggers define what the player must do to complete a criterion. Each criterion has one trigger and an optional `conditions` block. ```yaml criteria: : trigger: conditions: # trigger-specific options ``` An advancement can have multiple criteria. All of them must be completed before the advancement is awarded. Every runtime trigger also supports an optional `conditions.player` predicate for extra player-state requirements; see [Player predicates](/en/docs/advancements/player-predicates). Item conditions support ItemsAdder IDs, MMOItems IDs, vanilla item IDs, vanilla item tags, and supported ItemsAdderAdditions custom item tags. Block, furniture, and recipe conditions support custom tags where the matching path accepts tags. See [IDs](/en/docs/compatibility/ids) for the shared syntax. *** ## obtain\_item [#obtain_item] Fires when the player picks up an item from the ground. ```yaml criteria: get_sword: trigger: obtain_item conditions: items: - my_pack:ruby_sword - my_pack:iron_sword amount: 1 ``` | Key | Type | Default | Description | | ---------------- | ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | | `item` / `items` | string or list of strings | `[]` | Item IDs or supported item tags (IA, MMOItems, vanilla, `#minecraft:tag`, or custom tags). Any match triggers the criterion. | | `amount` | integer | `1` | Minimum stack size the player must pick up at once. | *** ## consume\_item [#consume_item] Fires when the player finishes eating or drinking an item. ```yaml criteria: eat_ruby_apple: trigger: consume_item conditions: item: my_pack:ruby_apple ``` | Key | Type | Required | Description | | ------ | ------ | -------- | ---------------------------------------------------------------------------------------- | | `item` | string | yes | Item ID or supported item tag (IA, MMOItems, vanilla, `#minecraft:tag`, or custom tags). | *** ## using\_item [#using_item] Fires when the player right-clicks (in air or on a block) while holding an item in their main hand. ```yaml criteria: use_staff: trigger: using_item conditions: item: my_pack:ruby_staff ``` | Key | Type | Required | Description | | ------ | ------ | -------- | ---------------------------------------------------------------------------------------- | | `item` | string | yes | Item ID or supported item tag (IA, MMOItems, vanilla, `#minecraft:tag`, or custom tags). | *** ## place\_block [#place_block] Fires when the player places an ItemsAdder custom block or a vanilla block. ```yaml criteria: place_ruby_ore: trigger: place_block conditions: block: my_pack:ruby_ore ``` | Key | Type | Required | Description | | ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------ | | `block` | string | yes | ItemsAdder block ID, vanilla block ID, vanilla block tag such as `#minecraft:logs`, or supported custom block tag. | *** ## break\_block [#break_block] Fires when the player breaks an ItemsAdder custom block or a vanilla block. ```yaml criteria: mine_ruby_ore: trigger: break_block conditions: block: my_pack:ruby_ore ``` | Key | Type | Required | Description | | ------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------ | | `block` | string | yes | ItemsAdder block ID, vanilla block ID, vanilla block tag such as `#minecraft:logs`, or supported custom block tag. | *** ## place\_furniture [#place_furniture] Fires when the player places a custom furniture item. ```yaml criteria: place_lamp: trigger: place_furniture conditions: furniture: my_pack:ruby_lamp ``` | Key | Type | Required | Description | | ----------- | ------ | -------- | --------------------------------------------------------------------------- | | `furniture` | string | yes | ItemsAdder furniture ID (`namespace:id`) or supported custom furniture tag. | *** ## break\_furniture [#break_furniture] Fires when the player breaks a custom furniture item. ```yaml criteria: break_lamp: trigger: break_furniture conditions: furniture: my_pack:ruby_lamp ``` | Key | Type | Required | Description | | ----------- | ------ | -------- | --------------------------------------------------------------------------- | | `furniture` | string | yes | ItemsAdder furniture ID (`namespace:id`) or supported custom furniture tag. | *** ## interact\_furniture [#interact_furniture] Fires when the player right-clicks a custom furniture item. ```yaml criteria: use_workbench: trigger: interact_furniture conditions: furniture: my_pack:ruby_workbench ``` | Key | Type | Required | Description | | ----------- | ------ | -------- | --------------------------------------------------------------------------- | | `furniture` | string | yes | ItemsAdder furniture ID (`namespace:id`) or supported custom furniture tag. | *** ## craft\_recipe [#craft_recipe] Fires when the player crafts an item using a specific IAA recipe. ```yaml criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe ``` | Key | Type | Required | Description | | -------- | ------ | -------- | ----------------------------------------------------------------------------------------------------- | | `recipe` | string | yes | Recipe key as `namespace:id`, a bare `id` using the file namespace, or a supported custom recipe tag. | *** ## kill\_entity\_with\_item [#kill_entity_with_item] Fires when the player kills an entity while holding a specific item in their main hand. ```yaml criteria: slay_zombie: trigger: kill_entity_with_item conditions: item: my_pack:ruby_sword entity_type: minecraft:zombie # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------------ | ---------------------------------------------------------------------------------- | | `item` | string | *(required)* | Item ID or supported item tag the player must be holding. | | `entity_type` | string | *(any)* | Vanilla entity type key (e.g. `minecraft:zombie`). If omitted, any entity matches. | *** ## player\_hurt\_entity [#player_hurt_entity] Fires when the player deals damage to an entity. Unlike `kill_entity_with_item`, this fires on every hit, not just the killing blow. ```yaml criteria: hit_zombie: trigger: player_hurt_entity conditions: item: my_pack:ruby_sword # optional entity_type: minecraft:zombie # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag the player must be holding. If omitted, any item (or bare hands) matches. | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any entity matches. | *** ## entity\_hurt\_player [#entity_hurt_player] Fires when an entity deals damage to the player. ```yaml criteria: hurt_by_zombie: trigger: entity_hurt_player conditions: entity_type: minecraft:zombie # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ---------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any attacker matches. | *** ## player\_killed\_entity [#player_killed_entity] Fires when the player kills an entity (regardless of the weapon used). ```yaml criteria: kill_creeper: trigger: player_killed_entity conditions: entity_type: minecraft:creeper # optional item: my_pack:ruby_sword # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | --------------------------------------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any entity matches. | | `item` | string | *(any)* | Item ID or supported item tag the player must be holding. If omitted, any item matches. | *** ## entity\_killed\_player [#entity_killed_player] Fires when the player is killed by a non-player entity (projectile kills resolve to the shooter). ```yaml criteria: killed_by_skeleton: trigger: entity_killed_player conditions: entity_type: minecraft:skeleton # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ---------------------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key of the killer. If omitted, any entity matches. | *** ## killed\_by\_arrow [#killed_by_arrow] Fires when the player is killed by an arrow. The entity type matches the arrow's shooter, or the arrow itself if it had no shooter. ```yaml criteria: shot_by_skeleton: trigger: killed_by_arrow conditions: entity_type: minecraft:skeleton # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ----------------------------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key of the shooter. If omitted, any arrow source matches. | *** ## tame\_animal [#tame_animal] Fires when the player tames an animal. ```yaml criteria: tame_wolf: trigger: tame_animal conditions: entity_type: minecraft:wolf # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ----------------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any tameable animal matches. | *** ## bred\_animals [#bred_animals] Fires when the player breeds two animals. ```yaml criteria: breed_cows: trigger: bred_animals conditions: entity_type: minecraft:cow # optional, type of the offspring parent_type: minecraft:cow # optional partner_type: minecraft:cow # optional ``` | Key | Type | Default | Description | | -------------- | ------ | ------- | ----------------------------- | | `entity_type` | string | *(any)* | Entity type of the offspring. | | `parent_type` | string | *(any)* | Entity type of the mother. | | `partner_type` | string | *(any)* | Entity type of the father. | *** ## villager\_trade [#villager_trade] Fires when the player completes a trade with a villager. ```yaml criteria: buy_diamond: trigger: villager_trade conditions: item: minecraft:diamond # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | --------------------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag of the trade result. If omitted, any trade matches. | *** ## enchanted\_item [#enchanted_item] Fires when the player enchants an item at an enchanting table. ```yaml criteria: enchant_ruby_sword: trigger: enchanted_item conditions: item: my_pack:ruby_sword # optional min_levels: 10 # optional max_levels: 30 # optional ``` | Key | Type | Default | Description | | ------------ | ------- | ------------- | ---------------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag. If omitted, any item being enchanted matches. | | `min_levels` | integer | `0` | Minimum XP level cost of the enchantment. | | `max_levels` | integer | *(unlimited)* | Maximum XP level cost of the enchantment. | *** ## shoot\_bow [#shoot_bow] Fires when the player shoots a projectile from a bow. ```yaml criteria: shoot_ruby_bow: trigger: shoot_bow conditions: item: my_pack:ruby_bow # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | ---------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag of the bow. If omitted, any bow matches. | *** ## shot\_crossbow [#shot_crossbow] Fires when the player shoots a projectile from a crossbow. ```yaml criteria: shoot_crossbow: trigger: shot_crossbow conditions: item: my_pack:ruby_crossbow # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag of the crossbow. If omitted, any crossbow matches. | *** ## fishing\_rod\_hooked [#fishing_rod_hooked] Fires when the player reels in a fish or hooks an entity. ```yaml criteria: hook_fish: trigger: fishing_rod_hooked conditions: rod: my_pack:ruby_rod # optional caught_entity_type: minecraft:cod # optional ``` | Key | Type | Default | Description | | -------------------- | ------ | ------- | ------------------------------------------------------------------------------ | | `rod` | string | *(any)* | Item ID or supported item tag of the fishing rod. If omitted, any rod matches. | | `caught_entity_type` | string | *(any)* | Entity type of what was hooked. If omitted, any catch matches. | *** ## filled\_bucket [#filled_bucket] Fires when the player fills a bucket with a liquid. ```yaml criteria: fill_lava: trigger: filled_bucket conditions: item: minecraft:lava_bucket # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | --------------------------------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag of the resulting bucket. If omitted, any filled bucket matches. | *** ## item\_durability\_changed [#item_durability_changed] Fires when an item in the player's hand takes durability damage. ```yaml criteria: damage_ruby_sword: trigger: item_durability_changed conditions: item: my_pack:ruby_sword # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | -------------------------------------------------------------------------------- | | `item` | string | *(any)* | Item ID or supported item tag of the damaged item. If omitted, any item matches. | *** ## item\_used\_on\_block [#item_used_on_block] Fires when the player right-clicks a block with an item in their main hand. ```yaml criteria: use_on_crafting_table: trigger: item_used_on_block conditions: item: my_pack:ruby_wand # optional block: minecraft:crafting_table # optional ``` | Key | Type | Default | Description | | ------- | ------ | ------- | ------------------------------------------------------------ | | `item` | string | *(any)* | Item ID or supported item tag the player must be holding. | | `block` | string | *(any)* | ItemsAdder block ID, vanilla block ID, or vanilla block tag. | *** ## recipe\_crafted [#recipe_crafted] Fires when the player crafts any item using the vanilla crafting system. ```yaml criteria: craft_diamond_sword: trigger: recipe_crafted conditions: recipe: minecraft:diamond_sword # optional ``` | Key | Type | Default | Description | | -------- | ------ | ------- | ------------------------------------------------------------------------------------------------------- | | `recipe` | string | *(any)* | Recipe key as `namespace:id` or a supported custom recipe tag. If omitted, any crafting action matches. | *** ## recipe\_unlocked [#recipe_unlocked] Fires when the player discovers a new recipe. ```yaml criteria: unlock_diamond_sword: trigger: recipe_unlocked conditions: recipe: minecraft:diamond_sword # optional ``` | Key | Type | Default | Description | | -------- | ------ | ------- | --------------------------------------------------------------------------------------------------------- | | `recipe` | string | *(any)* | Recipe key as `namespace:id` or a supported custom recipe tag. If omitted, any discovered recipe matches. | *** ## player\_interacted\_with\_entity [#player_interacted_with_entity] Fires when the player right-clicks an entity with their main hand. ```yaml criteria: name_a_villager: trigger: player_interacted_with_entity conditions: entity_type: minecraft:villager # optional item: minecraft:name_tag # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ------------------------------------------------------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any entity matches. | | `item` | string | *(any)* | Item ID or supported item tag the player must be holding. If omitted, any item (or empty hand) matches. | *** ## player\_sheared\_equipment [#player_sheared_equipment] Fires when the player shears an entity. ```yaml criteria: shear_sheep: trigger: player_sheared_equipment conditions: entity_type: minecraft:sheep # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ------------------------------------------------------------------ | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any shearable entity matches. | *** ## bee\_nest\_destroyed [#bee_nest_destroyed] Fires when the player breaks a beehive or bee nest. ```yaml criteria: break_beehive: trigger: bee_nest_destroyed conditions: block: minecraft:beehive # optional ``` | Key | Type | Default | Description | | ------- | ------ | ------- | ----------------------------------------------------------------------------------------------------------------------------- | | `block` | string | *(any)* | Block ID or supported block tag (`minecraft:beehive`, `minecraft:bee_nest`, or a tag). If omitted, either hive block matches. | *** ## started\_riding [#started_riding] Fires when the player mounts an entity. ```yaml criteria: ride_horse: trigger: started_riding conditions: entity_type: minecraft:horse # optional ``` | Key | Type | Default | Description | | ------------- | ------ | ------- | ------------------------------------------------------- | | `entity_type` | string | *(any)* | Vanilla entity type key. If omitted, any mount matches. | *** ## effects\_changed [#effects_changed] Fires when the player gains or has a potion effect changed. ```yaml criteria: get_speed: trigger: effects_changed conditions: effect: minecraft:speed # optional ``` | Key | Type | Default | Description | | -------- | ------ | ------- | ---------------------------------------------------------------------------------------------- | | `effect` | string | *(any)* | Potion effect key (e.g. `minecraft:speed`). If omitted, any effect addition or change matches. | *** ## changed\_dimension [#changed_dimension] Fires when the player changes world environment. ```yaml criteria: enter_nether: trigger: changed_dimension conditions: to: nether # optional from: normal # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | ------------------------------------------------------------ | | `to` | string | *(any)* | Target Bukkit environment: `normal`, `nether`, or `the_end`. | | `from` | string | *(any)* | Source Bukkit environment: `normal`, `nether`, or `the_end`. | *** ## slept\_in\_bed [#slept_in_bed] Fires when the player successfully enters a bed. No conditions. ```yaml criteria: first_sleep: trigger: slept_in_bed ``` *** ## used\_totem [#used_totem] Fires when the player is saved from death by a totem of undying. No conditions. ```yaml criteria: totem_pop: trigger: used_totem ``` *** ## fall\_from\_height [#fall_from_height] Fires when the player takes fall damage. ```yaml criteria: survived_fall: trigger: fall_from_height conditions: distance: y: min: 30 max: 320 ``` You can also use a single number as the minimum fall distance: ```yaml criteria: small_fall: trigger: fall_from_height conditions: distance: 8 ``` | Key | Type | Default | Description | | --------------------- | ----------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | `distance` | number or section | `0` to unlimited | Fall distance range. A number means minimum distance. A section can use `min`/`max`, or a nested `y`, `absolute`, or `horizontal` range. | | `distance.min` | number | `0` | Minimum fall distance. | | `distance.max` | number | *(unlimited)* | Maximum fall distance. | | `distance.y` | section | *(none)* | Preferred range form for vertical fall distance. Supports `min` and `max`. | | `distance.absolute` | section | *(none)* | Alternative range form. Supports `min` and `max`. | | `distance.horizontal` | section | *(none)* | Alternative range form. Supports `min` and `max`. | *** ## used\_ender\_eye [#used_ender_eye] Fires when the player throws an eye of ender. No conditions. ```yaml criteria: use_ender_eye: trigger: used_ender_eye ``` *** ## held\_item [#held_item] IAA custom trigger. Fires when the player scrolls to a hotbar slot that contains an item. ```yaml criteria: equip_ruby_sword: trigger: held_item conditions: item: my_pack:ruby_sword # optional ``` | Key | Type | Default | Description | | ------ | ------ | ------- | ------------------------------------------------------------------------ | | `item` | string | *(any)* | Item ID or supported item tag. If omitted, any item scrolled to matches. | *** ## permission [#permission] Fires when the player joins while holding the specified permission node. ```yaml criteria: has_vip: trigger: permission conditions: permission: "myserver.rank.vip" ``` | Key | Type | Required | Description | | ------------ | ------ | -------- | --------------------------------------------------------------------------- | | `permission` | string | yes | Permission node. Checked on every join; fires as soon as the player has it. | *** ## in\_biome [#in_biome] Fires when the player crosses into a specific biome. ```yaml criteria: visit_jungle: trigger: in_biome conditions: biome: minecraft:jungle world: world # optional ``` | Key | Type | Default | Description | | ------- | ------ | ------------ | --------------------------------------------------------- | | `biome` | string | *(required)* | Biome key as `namespace:id` (e.g. `minecraft:deep_dark`). | | `world` | string | *(any)* | World name to restrict the check to a single world. | *** ## enter\_region [#enter_region] Fires when the player moves or teleports from outside to inside a WorldGuard region. **Version requirements:** Requires **ItemsAdderAdditions 1.0.12 or higher** and WorldGuard. ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # optional ``` | Key | Type | Default | Description | | -------- | ------ | ------------ | ---------------------------------------------------------- | | `region` | string | *(required)* | WorldGuard region ID. Matching is case-insensitive. | | `world` | string | *(any)* | Bukkit world name to restrict the check to a single world. | The criterion only fires when the player crosses the region boundary. Moving between blocks while already inside the region does not fire it again. This trigger is independent of the ItemsAdderAdditions WorldGuard flag toggles. See [WorldGuard compatibility](/en/docs/compatibility/worldguard) for setup and troubleshooting. *** ## sit\_furniture [#sit_furniture] Fires when the player sits on an ItemsAdder furniture item. **Version Requirement:** Requires **ItemsAdder 4.0.17 or higher**. ```yaml criteria: sit_on_chair: trigger: sit_furniture conditions: furniture: my_pack:ruby_chair ``` | Key | Type | Required | Description | | ----------- | ------ | -------- | ---------------------------------------------------------- | | `furniture` | string | yes | ItemsAdder furniture ID or supported custom furniture tag. | *** ## unsit\_furniture [#unsit_furniture] Fires when the player stops sitting on an ItemsAdder furniture item. **Version Requirement:** Requires **ItemsAdder 4.0.17 or higher**. ```yaml criteria: leave_chair: trigger: unsit_furniture conditions: furniture: my_pack:ruby_chair ``` | Key | Type | Required | Description | | ----------- | ------ | -------- | ---------------------------------------------------------- | | `furniture` | string | yes | ItemsAdder furniture ID or supported custom furniture tag. | *** ## open\_trade\_machine [#open_trade_machine] Fires when the player opens an ItemsAdder `trade_machine` or `block_trade_machine` GUI. ```yaml criteria: open_alchemy_station: trigger: open_trade_machine conditions: trade_machine: stations:alchemy_table ``` | Key | Type | Required | Description | | --------------- | ------ | -------- | ----------------------------------------------------------- | | `trade_machine` | string | yes | Trade machine content ID or supported custom furniture tag. | *** ## start\_emote [#start_emote] Fires when the player starts an ItemsAdder emote. ```yaml criteria: start_wave: trigger: start_emote conditions: emote: my_pack:wave ``` | Key | Type | Default | Description | | ------- | ------ | ------- | ---------------------------------------------- | | `emote` | string | *(any)* | Emote ID. If omitted, any emote start matches. | *** ## stop\_emote [#stop_emote] Fires when the player stops an ItemsAdder emote. ```yaml criteria: stop_wave: trigger: stop_emote conditions: emote: my_pack:wave ``` | Key | Type | Default | Description | | ------- | ------ | ------- | --------------------------------------------- | | `emote` | string | *(any)* | Emote ID. If omitted, any emote stop matches. | *** ## join\_server [#join_server] Fires whenever the player joins the server. No conditions. ```yaml criteria: joined: trigger: join_server ``` *** ## first\_join [#first_join] Fires when the player joins for the first time according to Bukkit's `hasPlayedBefore` check. No conditions. ```yaml criteria: first_join: trigger: first_join ``` *** ## tick [#tick] Fires once per server tick for every online player. Use `conditions.player` to keep tick criteria narrow. ```yaml criteria: sneaking_tick: trigger: tick conditions: player: flags: is_sneaking: true ``` *** ## impossible [#impossible] Never fires on its own. ```yaml criteria: manual: trigger: impossible ``` No `conditions` options. # Bed (/en/docs/behaviours/bed) Turns any custom furniture into a functional bed. Supports multiple sleeping slots on a single piece, so one double bed can host two players at the same time. Works with **custom furniture** and **complex furniture**. ## Configuration [#configuration] ```yaml behaviours: bed: slots: - "0,0,0" # required - at least one slot - "1,0,0" # second slot, e.g. for a double bed ``` Each entry in `slots` is a `"dx,dy,dz"` integer offset relative to the furniture's base block. The offset axes follow the **furniture's own facing direction**, not world axes: | Axis | Meaning | | ---- | ----------------------------------------------- | | `dx` | Forward / backward along the furniture's facing | | `dy` | Up / down | | `dz` | Left / right (perpendicular to facing) | `"1,0,0"` is always one block in front of the base, regardless of which direction the furniture was placed. ### Single slot (default) [#single-slot-default] ```yaml behaviours: bed: slots: - "0,0,0" ``` Omitting `slots` entirely also defaults to a single slot at `0,0,0`. ### Double bed (two slots side by side) [#double-bed-two-slots-side-by-side] ```yaml behaviours: bed: slots: - "0,0,0" - "0,0,1" ``` `dz: 1` places the second slot one block to the right of the base when facing the furniture. ### Double bed (two slots front to back) [#double-bed-two-slots-front-to-back] ```yaml behaviours: bed: slots: - "0,0,0" - "1,0,0" ``` `dx: 1` places the second slot one block in front of the base. ## Behaviour [#behaviour] * Right-clicking the furniture (or its barrier blocks) tries to put the player to sleep in the next available slot. * If all slots are occupied, the player sees the **"This bed is occupied"** action-bar message. * A temporary vanilla bed block is placed at the slot so the Minecraft sleep mechanic works. It is removed when the player wakes up, disconnects, or the furniture is broken. * Breaking the furniture wakes any sleeping players. * Sneaking while right-clicking is ignored so players can interact normally while crouching. Bed Example ## Related pages [#related-pages] * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # Connectable (/en/docs/behaviours/connectable) ```yaml behaviours: connectable: type: stair # Optional (Default value: stair) ``` ```yaml behaviours: connectable: type: stair # Optional (Default value: stair) default: connectable_furniture straight: connectable_furniture_straight left: connectable_furniture_left right: connectable_furniture_right outer: connectable_furniture_outer inner: connectable_furniture_inner ``` Connectable Stair type Example ```yaml behaviours: connectable: type: table ``` ```yaml behaviours: connectable: type: table default: connectable_furniture straight: connectable_furniture_straight middle: connectable_furniture_middle border: connectable_furniture_border corner: connectable_furniture_corner end: connectable_furniture_end ``` Connectable Table type Example The IDs must be custom furniture IDs. See [IDs](/en/docs/compatibility/ids). ## Default ID resolution [#default-id-resolution] All furniture type IDs are optional. If not specified, the plugin automatically looks for matching furniture IDs: * `default` inherits the furniture ID the behaviour is configured on. * Every other type uses `_`. For example, if the behaviour is configured on a furniture named `connectable_furniture`: ### Stair type automatic lookup [#stair-type-automatic-lookup] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `left` → `connectable_furniture_left` * `right` → `connectable_furniture_right` * `outer` → `connectable_furniture_outer` * `inner` → `connectable_furniture_inner` ### Table type automatic lookup [#table-type-automatic-lookup] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `middle` → `connectable_furniture_middle` * `border` → `connectable_furniture_border` * `corner` → `connectable_furniture_corner` * `end` → `connectable_furniture_end` ## Minimal config [#minimal-config] ```yaml behaviours: connectable: type: stair # or table ``` In most cases you only need to set the type; automatic ID resolution handles the rest. # Contact Effect (/en/docs/behaviours/contact-effect) Applies effects to players while they touch or stand on a custom block, furniture, or complex furniture. Four effect groups are available, all optional. Combine any of them on the same item. | Group | Effect | | ---------------- | ------------------------------------------------------ | | `damage` | Hurt the player on an interval (negative amount heals) | | `heal` | Heal the player on an interval (negative amount hurts) | | `potion_effects` | Re-apply a list of potion effects while in contact | | `attributes` | Apply temporary attribute modifiers while in contact | ## Configuration [#configuration] ```yaml behaviours: contact_effect: damage: amount: 1.0 interval: 20 # optional, default: 20 ticks cause: CACTUS # optional, default: CACTUS fire_duration: 0 # optional, default: 0 ticks ``` ```yaml behaviours: contact_effect: heal: amount: 1.0 interval: 20 # optional, default: 20 ticks ``` ```yaml behaviours: contact_effect: potion_effects: - type: POISON duration: 80 # optional, default: 40 ticks amplifier: 0 # optional, default: 0 (0 = level 1) ambient: false # optional, default: false particles: true # optional, default: true icon: true # optional, default: true interval: 20 # optional, default: 20 ticks - type: SLOWNESS duration: 80 ``` ```yaml behaviours: contact_effect: attributes: - attribute: MOVEMENT_SPEED amount: 0.05 operation: ADD_NUMBER # optional, default: ADD_NUMBER - attribute: STEP_HEIGHT amount: 0.5 ``` ```yaml behaviours: contact_effect: apply_when_sneaking: true # optional, default: true block_faces: # optional top: true # optional, default: true north: true # optional, default: true south: true # optional, default: true west: true # optional, default: true east: true # optional, default: true damage: amount: 1.0 interval: 40 cause: CACTUS heal: amount: 0.5 interval: 20 potion_effects: - type: SPEED amplifier: 1 duration: 60 interval: 10 attributes: - attribute: STEP_HEIGHT amount: 0.5 operation: ADD_NUMBER ``` ## Damage [#damage] | Key | Type | Default | Description | | --------------- | ------ | -------- | -------------------------------------------------------- | | `amount` | Double | - | Half-hearts of damage. Negative values heal instead. | | `interval` | Int | `20` | Ticks between each application. | | `cause` | String | `CACTUS` | The damage type, so other plugins can detect the reason. | | `fire_duration` | Int | `0` | Ticks the player is set on fire when damaged. | For `cause`, use a value from [DamageType](https://jd.papermc.io/paper/org/bukkit/damage/DamageType.html#field-summary) (case-insensitive, for example `CACTUS`, `LAVA`, `MAGIC`). An unknown value logs a warning and falls back to `CACTUS`. A negative `amount` heals the player instead of hurting them, clamped to the player's maximum health. ## Heal [#heal] | Key | Type | Default | Description | | ---------- | ------ | ------- | ------------------------------------------------- | | `amount` | Double | - | Half-hearts to heal. Negative values deal damage. | | `interval` | Int | `20` | Ticks between each application. | Healing never exceeds the player's maximum health. A negative `amount` deals damage using the `CACTUS` damage type. ## Potion effects [#potion-effects] `potion_effects` is a list. Each entry is re-applied while the player stays in contact. | Key | Type | Default | Description | | ----------- | ------- | ------- | ---------------------------------- | | `type` | String | - | Required. The potion effect type. | | `duration` | Int | `40` | Effect duration in ticks. | | `amplifier` | Int | `0` | Effect level (0 = level 1). | | `ambient` | Boolean | `false` | Whether the effect is ambient. | | `particles` | Boolean | `true` | Whether particles are shown. | | `icon` | Boolean | `true` | Whether the HUD icon is shown. | | `interval` | Int | `20` | Ticks between each re-application. | For `type`, use a value from [PotionEffectType](https://jd.papermc.io/paper/org/bukkit/potion/PotionEffectType.html#field-summary). An unknown type logs a warning and only that entry is skipped. ## Attributes [#attributes] `attributes` is a list of temporary attribute modifiers applied while the player is in contact and removed the moment they leave. | Key | Type | Default | Description | | ----------- | ------ | ------------ | ---------------------------------- | | `attribute` | String | - | Required. The attribute to modify. | | `amount` | Double | - | Required. The modifier amount. | | `operation` | String | `ADD_NUMBER` | How the amount is applied. | For `attribute`, use a value from [Attribute](https://jd.papermc.io/paper/org/bukkit/attribute/Attribute.html#field-summary). The old `GENERIC_` and `PLAYER_` prefixes are accepted too (for example `GENERIC_MOVEMENT_SPEED` resolves to `MOVEMENT_SPEED`). Valid `operation` values from [AttributeModifier.Operation](https://jd.papermc.io/paper/org/bukkit/attribute/AttributeModifier.Operation.html): `ADD_NUMBER`, `ADD_SCALAR`, `MULTIPLY_SCALAR_1`. Attribute modifiers are temporary. They are removed automatically when the player leaves the block, quits, or when the plugin reloads or shuts down. Unknown attributes, amounts, or operations log a warning and skip only that entry. ## Contact checking [#contact-checking] Contact is checked at the lowest interval needed by any interval-based effect (`damage`, `heal`, and each `potion_effects` entry). Each effect keeps its own cooldown, so different intervals stay independent. If any `attributes` are configured, contact is checked every tick so modifiers are removed promptly when the player steps off the block. ## Shared options [#shared-options] | Key | Type | Default | Description | | --------------------- | ------- | ------- | ----------------------------------------------------------------------- | | `apply_when_sneaking` | Boolean | `true` | Whether effects apply while the player is sneaking. | | `block_faces` | Section | all on | Which faces count as contact (`top`, `north`, `south`, `west`, `east`). | ## Related pages [#related-pages] * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # Stackable (/en/docs/behaviours/stackable) ```yaml behaviours: stackable: - my_block_2 - my_block_3 - my_block_4 ``` ```yaml behaviours: stackable: blocks: - my_block_2 - my_block_3 - my_block_4 items: # optional, defaults to the item this behaviour is on - my_item - BONE_MEAL sound: # optional name: entity.villager.ambient # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master decrement_amount: 2 # optional, default: 1 ``` For `name`, use a value from [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) or a custom sound with `namespace:value`. ```yaml behaviours: stackable: first_step: block: my_block_2 items: # optional, defaults to the item this behaviour is on - my_item - BONE_MEAL sound: # optional name: entity.villager.ambient # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master decrement_amount: 2 # optional, default: 1 another_step: ... ``` For `name`, use a value from [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) or a custom sound with `namespace:value`. The block IDs must be custom blocks. Supported types: `REAL`, `REAL_NOTE`, `REAL_TRANSPARENT`, and `REAL_WIRE`. `items` can contain concrete item IDs or supported item tags. See [IDs](/en/docs/compatibility/ids). You can add as many steps as needed. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # Storage (/en/docs/behaviours/storage) Turns any custom block or furniture into a storage container. Three modes are available. | Type | Behaviour | | ---------- | ------------------------------------------------------------------------ | | `STORAGE` | Shared container - all players see the same inventory | | `SHULKER` | Contents travel inside the item when broken and are restored on re-place | | `DISPOSAL` | Trash can - contents are silently deleted when the GUI is closed | ## Configuration [#configuration] ```yaml behaviours: storage: type: STORAGE rows: 3 # optional, default: 3 inventory_type: furnace # optional, replaces rows when set title: "Community Chest" # optional, defaults to the block/furniture's name open_variant: my_open_storage # optional open_sound: # optional name: entity.villager.celebrate # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master close_sound: # optional name: entity.villager.ambient # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master ``` ```yaml behaviours: storage: type: SHULKER rows: 3 # optional, default: 3 inventory_type: furnace # optional, replaces rows when set title: "Portable Storage" # optional, defaults to the block/furniture's name open_variant: my_open_storage # optional open_sound: # optional name: entity.villager.celebrate # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master close_sound: # optional name: entity.villager.ambient # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master ``` ```yaml behaviours: storage: type: DISPOSAL rows: 1 # optional, default: 3 title: "Trash Can" # optional, defaults to the block/furniture's name open_variant: my_open_storage # optional open_sound: # optional name: entity.villager.celebrate # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master close_sound: # optional name: entity.villager.ambient # or a custom sound volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 source: master # optional, default: master ``` For `name`, use a value from [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) or a custom sound with `namespace:value`. Supports [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) formatting, [PlaceholderAPI](/en/docs/compatibility/placeholderapi) placeholders, and [ItemsAdder](https://itemsadder.com/) font images. ## Inventory type [#inventory-type] By default, storage opens a chest-style inventory whose height is controlled by `rows` (1-6, default: 3). Set `inventory_type` to open a typed inventory instead - `rows` is ignored when this is set. | Value | GUI shape | | --------------- | ----------------------------------- | | `furnace` | Furnace (input + fuel + output) | | `blast_furnace` | Blast furnace | | `smoker` | Smoker | | `brewing_stand` | Brewing stand (3 bottles + 2 slots) | | `dispenser` | Dispenser (3×3) | | `dropper` | Dropper (3×3) | | `hopper` | Hopper (1×5) | ```yaml behaviours: storage: type: STORAGE inventory_type: furnace title: "Custom Furnace" ``` ## Item restrictions [#item-restrictions] Since 1.0.14, storage can restrict which items players may insert. Use `allowed_items` to allow only matching items: ```yaml behaviours: storage: type: STORAGE allowed_items: - minecraft:book - "#minecraft:logs" - "#my_pack:building_materials" ``` Or use `denied_items` to reject matching items while allowing everything else: ```yaml behaviours: storage: type: STORAGE denied_items: - minecraft:tnt - "#my_pack:portable_storage" ``` Entries may be vanilla or ItemsAdder item IDs, Minecraft item tags, or IAA custom item tags. `allowed_items` and `denied_items` are mutually exclusive. Configuring both rejects the storage behaviour. An empty `allowed_items` list allows nothing. An empty `denied_items` list denies nothing. Omitting both keeps the storage unrestricted. Restrictions apply only to new player insertions; previously saved contents are not removed. ## Open variant [#open-variant] You can optionally set `open_variant` to make the custom block, furniture, or complex furniture change into another variant while at least one player has the storage open. Examples: * chests that visually open * barrels with an opened model * containers with a different active state ```yaml behaviours: storage: type: STORAGE open_variant: my_open_storage ``` `open_variant` should be the ID of another custom block, furniture, or complex furniture, using either: * `id` * `namespace:id` See [IDs](/en/docs/compatibility/ids) for ID syntax. When the inventory is closed by all players, the storage returns to its normal variant. Complex-furniture `open_variant` values are supported in ItemsAdderAdditions 1.0.12 and newer. Block storage holders must use a block variant; furniture and complex-furniture holders can use furniture, complex furniture, or an item display model. ## Content variants [#content-variants] Since 1.0.13, a storage holder can change its closed appearance based on how full it is. ```yaml behaviours: storage: type: STORAGE empty_variant: my_empty_storage # optional; empty inventory filled_variant: my_filled_storage # optional; any non-empty inventory half_variant: my_half_storage # optional; partially filled inventory full_variant: my_full_storage # optional; every slot filled to its stack limit ``` `filled_variant` is the simple two-state option: it is used for every non-empty inventory unless a more specific `half_variant` or `full_variant` is configured. Missing variants fall back to `filled_variant` and then to the holder's original appearance. `open_variant` takes priority while the inventory has viewers. The appropriate content variant is restored after the last viewer closes it. IDs and block/furniture compatibility follow the same rules as `open_variant`, and directional block rotation is preserved when variants change. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [WorldGuard compatibility](/en/docs/compatibility/worldguard) * [CoreProtect compatibility](/en/docs/compatibility/coreprotect) * [PlaceholderAPI compatibility](/en/docs/compatibility/placeholderapi) # Text Display (/en/docs/behaviours/text-display) Attaches one or more floating text displays to a custom block or furniture. Supports MiniMessage formatting, [PlaceholderAPI](/en/docs/compatibility/placeholderapi) placeholders, and ItemsAdder font images. Works on **blocks**, **furniture**, and **complex furniture**. ## Basic configuration [#basic-configuration] ```yaml behaviours: text_display: text: "Hello!" ``` Multi-line text (one line per list entry): ```yaml behaviours: text_display: text: - "Storage" - "Right-click to open" ``` ## Multiple displays [#multiple-displays] Use the `displays` section to attach more than one text display to the same item. Each entry is independently positioned and styled. ```yaml behaviours: text_display: displays: label: text: "My Chest" offset: "0, 0.5, 0" hint: text: "Right-click to open" offset: "0, 0.25, 0" ``` ## Options [#options] | Key | Type | Default | Description | | ------------------ | ------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | string or list | *(required)* | The text to display. Supports MiniMessage, PlaceholderAPI, and `:icon:` font images. | | `offset` | `"x, y, z"` or list | `"0, 0.25, 0"` | Position offset relative to the block or furniture center. | | `billboard` | `FIXED` \| `VERTICAL` \| `HORIZONTAL` \| `CENTER` | `VERTICAL` | How the display rotates to face players. | | `alignment` | `LEFT` \| `CENTER` \| `RIGHT` | `CENTER` | Text alignment within the display. | | `text_shadow` | boolean | `true` | Whether text has a drop shadow. | | `see_through` | boolean | `false` | Whether text is visible through blocks. | | `line_width` | integer ≥ 1 | `1403` | Maximum line width in pixels before wrapping. | | `background` | `#RRGGBB`, `#RRGGBBAA`, `false`, or `null` | `null` | Background color. `null` or `false` uses the vanilla default dark background. | | `text_opacity` | float 0.0-1.0 | *(omit for default)* | Text opacity. `0.0` is fully transparent, `1.0` is fully opaque. Omit the key entirely for the vanilla default (fully opaque). | | `scale` | float > 0, `"x, y, z"`, or list | `1.0` | Text size multiplier. A single value applies uniformly; use `"x, y, z"` or a 3-element list for non-uniform scaling. | | `view_range` | float > 0 | `16.0` | Distance in blocks at which the display becomes visible. | | `refresh_interval` | integer ≥ 0 | `0` | How often (in ticks) the text is refreshed per player. `0` disables auto-refresh. Set to a positive value when using PlaceholderAPI placeholders that change over time. | | `brightness` | integer 0-15, `[block, sky]`, or section | *(omit for world lighting)* | Override the light level. A single integer sets both block and sky light equally. Use a two-element list `[block, sky]` or a section with `block:` and `sky:` keys to set them separately. Omit to inherit from world lighting. | | `shadow_radius` | float ≥ 0 | `0.0` | Radius of the drop shadow behind the text. | | `shadow_strength` | float ≥ 0 | `1.0` | Strength (opacity) of the drop shadow. | | `yaw` | float | `0.0` | Horizontal rotation of the display in degrees. Only meaningful when `billboard` is `FIXED`. | | `pitch` | float | `0.0` | Vertical rotation of the display in degrees. Only meaningful when `billboard` is `FIXED`. | ## Full example [#full-example] ```yaml behaviours: text_display: text: - "" - "Score: %vault_eco_balance%" offset: "0, 0.6, 0" billboard: VERTICAL alignment: CENTER text_shadow: true see_through: false line_width: 1403 background: "#00000080" scale: 1.0 view_range: 16.0 refresh_interval: 20 ``` ## Notes [#notes] * Text supports [MiniMessage](https://docs.advntr.dev/minimessage/format.html) formatting tags. * PlaceholderAPI placeholders are resolved per-player if PlaceholderAPI is installed. * ItemsAdder font images (`:my_icon:`) are supported. * When using placeholders that update over time, set `refresh_interval` to a positive value (e.g. `20` for once per second). ## Related pages [#related-pages] * [PlaceholderAPI compatibility](/en/docs/compatibility/placeholderapi) * [WorldGuard compatibility](/en/docs/compatibility/worldguard) # /iatrademachine (/en/docs/commands/iatrademachine) ## `/iatrademachine` [#iatrademachine] Open an ItemsAdder `trade_machine` or `block_trade_machine` GUI for a player without requiring the physical block or furniture to be placed in the world. Useful for opening trade machine GUIs from menu plugins, NPCs, or custom command flows. ## Syntax [#syntax] ```text /iatrademachine [-silent] ``` ## Parameters [#parameters] ### `` [#player] The online player to open the trade machine for. ### `` [#namespaceid] The ID of the custom block or furniture that has a `trade_machine` or `block_trade_machine` behaviour. See [IDs](/en/docs/compatibility/ids). Example: ```text stations:alchemy_table ``` ### `-silent` [#-silent] Optional flag. If added, the command suppresses the confirmation message normally sent to the command executor. ## Examples [#examples] ```text /iatrademachine twinkycome stations:alchemy_table ``` ```text /iatrademachine twinkycome stations:alchemy_table -silent ``` ## Permission [#permission] ```text ia.admin.iatrademachine ``` ## Notes [#notes] * Works from both players and the console. * Requires the target ID to have a `trade_machine` or `block_trade_machine` behaviour. * The full namespaced ID must be used. * Command suggestions are populated from registered ItemsAdder custom stack IDs. * If the ID does not have a supported trade machine behaviour, the command fails. ## Use case example [#use-case-example] Combine this command with a GUI plugin such as DeluxeMenus to create a category selection menu that opens different trade machines directly, instead of having players scroll through one large trade machine GUI. # /itemsadderadditions (/en/docs/commands/itemsadderadditions) ## `/itemsadderadditions` [#itemsadderadditions] Main administrative command for ItemsAdderAdditions. Aliases: ```text /iaadditions /iaa ``` ## Permissions [#permissions] Base permission: ```text itemsadderadditions.command.itemsadderadditions ``` ## Subcommands [#subcommands] ### `/itemsadderadditions reload` [#itemsadderadditions-reload] Reloads ItemsAdderAdditions `config.yml` and refreshes plugin-level feature, action, behaviour, and component toggles. ```text /itemsadderadditions reload ``` Permission: ```text itemsadderadditions.command.itemsadderadditions.reload ``` This command does **not** reload ItemsAdder content YAML files. Use `/iareload` after changing ItemsAdderAdditions content YAML sections such as actions, behaviours, custom tags, recipes, advancements, custom paintings, Valhalla metadata, or world generation entries. Use `/iazip` after changing `components` sections or resource-pack assets. ### `/itemsadderadditions debug` [#itemsadderadditions-debug] Toggles debug mode on or off. ```text /itemsadderadditions debug ``` Permission: ```text itemsadderadditions.command.itemsadderadditions.debug ``` # CoreProtect (/en/docs/compatibility/coreprotect) CoreProtect support is optional. ItemsAdderAdditions currently uses CoreProtect only to log storage behaviour openings as interactions. ## Requirements [#requirements] * CoreProtect installed and enabled. * CoreProtect API enabled. * ItemsAdderAdditions storage behaviour in use. ## What is logged [#what-is-logged] When a player opens an ItemsAdderAdditions storage container, ItemsAdderAdditions calls CoreProtect's interaction logger with: * the player's name * the storage location This makes storage opens visible as CoreProtect interactions when CoreProtect is available. ## What is not logged [#what-is-not-logged] ItemsAdderAdditions does not currently log these through CoreProtect: * item movement inside the storage inventory * action execution * custom painting placement * stackable placement * contact effect damage * recipe crafting * advancement completion * world generation ## Optional dependency behavior [#optional-dependency-behavior] If CoreProtect is not installed, disabled, or its API is unavailable, ItemsAdderAdditions skips the log call. Storage still works normally. ## Supported features [#supported-features] | Feature | CoreProtect behavior | | ------------------------------------------------ | ------------------------------------------- | | [Storage behaviour](/en/docs/behaviours/storage) | Logs an interaction when storage is opened. | ## Limitations [#limitations] CoreProtect support is intentionally narrow. It records that storage was opened; it does not provide a full audit log of inventory contents or item transfers. ## Troubleshooting [#troubleshooting] * Confirm CoreProtect is installed and enabled. * Confirm the CoreProtect API is enabled and working. * Test with a storage behaviour block or furniture, not an unrelated action or recipe. * If no interaction appears, check that the player actually opened the storage successfully. ## Related pages [#related-pages] * [Storage behaviour](/en/docs/behaviours/storage) * [WorldGuard](/en/docs/compatibility/worldguard) # Custom Structures (/en/docs/compatibility/customstructures) Custom Structures support is optional and is available in ItemsAdderAdditions 1.0.12 and newer. It lets advancement player predicates require the player to be inside a structure spawned by the Custom Structures plugin. ## Configuration [#configuration] Use the structure name with the `customstructures:` namespace under `conditions.player.location.structure` or `structures`. ```yaml criteria: find_temple: trigger: tick conditions: player: location: structures: - customstructures:ancient_temple ``` The alias `custom_structures:` is also accepted. Structure-name matching is case-insensitive. ## How detection works [#how-detection-works] ItemsAdderAdditions uses the Custom Structures integration to match structure bounds. Existing and newly generated structures are supported; structures do not need to be regenerated after installing ItemsAdderAdditions. ## Vanilla structures [#vanilla-structures] Vanilla structures do not require Custom Structures. Use their normal registry keys, for example: ```yaml location: structure: minecraft:village_plains ``` ## Troubleshooting [#troubleshooting] * Confirm Custom Structures is enabled before ItemsAdderAdditions. * Use the structure's configured name, not its schematic filename unless both are identical. * Check the server log for `Enabled advancement structure predicate integration.` ## Related pages [#related-pages] * [Player predicates](/en/docs/advancements/player-predicates#location-checks) * [Advancement configuration](/en/docs/advancements/configuration) # IDs (/en/docs/compatibility/ids) ItemsAdderAdditions normalizes IDs to lowercase before matching them. Prefer explicit IDs such as `minecraft:diamond` and `my_pack:ruby_sword` in examples and shared configs. Most fields are either **concrete outputs** or **runtime matches**: * Concrete outputs must resolve to one item stack. Tags are not valid there. * Runtime matches may accept tags because the plugin only needs to compare existing content. ## Quick reference [#quick-reference] | Content | Supported format | Example | | ------------------------------ | --------------------------------------------------------------- | ------------------------------------------ | | Vanilla item | `minecraft:id`, bare Minecraft key, or Bukkit material name | `minecraft:diamond`, `diamond`, `DIAMOND` | | Vanilla block | `minecraft:id`, bare Minecraft key, or Bukkit material name | `minecraft:oak_log`, `oak_log`, `OAK_LOG` | | ItemsAdder item | `namespace:id` or bare `id` | `my_pack:ruby_sword`, `ruby_sword` | | ItemsAdder block | `namespace:id` or bare `id` | `my_pack:ruby_ore`, `ruby_ore` | | ItemsAdder furniture | `namespace:id` or bare `id` | `my_pack:ruby_lamp`, `ruby_lamp` | | MMOItems item | `mmoitems:type:id` | `mmoitems:sword:flame_blade` | | Recipe ID | `namespace:id`, bare `id`, or custom recipe tag where supported | `my_pack:ruby_sword`, `ruby_sword` | | Vanilla item/block tag | `#minecraft:tag` or bare `#tag` where vanilla tags are accepted | `#minecraft:planks`, `#logs` | | ItemsAdderAdditions custom tag | `#namespace:tag`, or bare `#tag` inside the current namespace | `#my_pack:ruby_tools`, `#ruby_tools` | | Namespaced key | `namespace:path` | `minecraft:strength`, `custom_pack:my_key` | ## Vanilla items and blocks [#vanilla-items-and-blocks] Vanilla items and blocks can be written as namespaced IDs, bare Minecraft keys, or Bukkit material names. ```yaml item: minecraft:diamond_sword item: diamond_sword item: DIAMOND_SWORD block: minecraft:oak_log block: oak_log block: OAK_LOG ``` For concrete item fields, a bare ID is checked against ItemsAdder content first, then vanilla Minecraft items. ## ItemsAdder items, blocks, and furniture [#itemsadder-items-blocks-and-furniture] ItemsAdder content can use either `namespace:id` or the bare content ID. ```yaml item: my_pack:ruby_sword block: my_pack:ruby_ore furniture: my_pack:ruby_lamp ``` Bare paths also work in many fields: ```yaml info: namespace: my_pack items: ruby_wand: events: interact: right: replace_item: item: ruby_sword ``` Bare IDs work, but `namespace:id` is clearer when two packs use the same content ID. ## MMOItems items [#mmoitems-items] MMOItems references use this exact shape: ```yaml item: mmoitems:type:id ``` Example: ```yaml item: mmoitems:sword:flame_blade ``` The type and ID are matched through MMOItems metadata. If MMOItems is not installed or enabled, these references do not resolve and do not match. ## Recipes [#recipes] Recipe IDs can be namespaced or bare depending on the feature. ```yaml recipe: my_pack:ruby_sword recipe: ruby_sword ``` For recipe matching, a bare recipe ID can match the path part of a namespaced recipe ID. Custom recipe tags are supported only in fields that explicitly accept custom tags. ## Custom tags [#custom-tags] Custom tags are defined in a top-level `tags` section. ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer ``` Reference the tag with `#tag` in the same namespace or `#namespace:tag` from another namespace. ```yaml items: - "#ruby_tools" - "#my_pack:ruby_tools" ``` Custom tag types are `item`, `block`, `furniture`, and `recipe`. See [Custom Tags](/en/docs/custom-tags) for nesting rules and feature support. ## Vanilla tags [#vanilla-tags] Vanilla tags are supported where the matching path accepts Bukkit item or block tags. ```yaml item: "#minecraft:planks" block: "#minecraft:logs" ``` For item and block tag matching, a bare vanilla tag such as `#logs` is normalized to `#minecraft:logs` unless a custom tag with that same ID exists in the current tag registry. Vanilla tags only match vanilla registry entries. They do not match ItemsAdder content or MMOItems content. ## Concrete item outputs [#concrete-item-outputs] Use concrete IDs for fields that must create one item stack, including: * recipe results * campfire, stonecutter, and brewing results * `toast.icon` * `clear_item.item` * `replace_item.item` * component fields that create stored item stacks, such as `bundle_contents` and `charged_projectiles` Tags are invalid in these fields because a tag can contain more than one value. ## Rotated ItemsAdder blocks and furniture [#rotated-itemsadder-blocks-and-furniture] Runtime block and furniture matching treats directional suffixes as the same base content: ```text my_pack:chair_north -> my_pack:chair my_pack:chair_south -> my_pack:chair my_pack:chair_east -> my_pack:chair my_pack:chair_west -> my_pack:chair my_pack:chair_up -> my_pack:chair my_pack:chair_down -> my_pack:chair ``` This applies to matching checks such as advancement triggers and custom tag membership. You do not need to list every rotated variant. ## Common mistakes [#common-mistakes] * Using tags in output fields such as `result.item`, `toast.icon`, `clear_item.item`, or `replace_item.item`. * Expecting vanilla tags to match ItemsAdder or MMOItems items. * Using `mmoitems:type:id` without MMOItems installed. * Forgetting the `#` prefix for tag references. * Writing an invalid namespaced ID with more than one colon, such as `namespace:path:extra`. * Reusing the same bare ID in multiple packs and not knowing which content will be matched. ## Related pages [#related-pages] * [Compatibility overview](/en/docs/compatibility) * [ItemsAdder](/en/docs/compatibility/itemsadder) * [MMOItems](/en/docs/compatibility/mmoitems) * [Custom Tags](/en/docs/custom-tags) * [Crafting recipes](/en/docs/recipes/crafting) * [Advancement triggers](/en/docs/advancements/triggers) # Compatibility (/en/docs/compatibility) Compatibility pages explain how ItemsAdderAdditions talks to ItemsAdder and optional plugins. Use this section when you need to know whether an integration is required, how an external plugin affects a feature, or which ID syntax a field accepts. ## Supported integrations [#supported-integrations] **Required:** * [ItemsAdder](/en/docs/compatibility/itemsadder) - content loading, custom stacks, custom blocks/furniture, item modifier hooks, and reload events. **Optional:** * [MMOItems](/en/docs/compatibility/mmoitems) - `mmoitems:type:id` item references and runtime item matching. * [ValhallaMMO & ValhallaTrinkets](/en/docs/compatibility/valhalla) - Valhalla metadata written to ItemsAdder item stacks. * [WorldGuard](/en/docs/compatibility/worldguard) - region flags for supported behaviours, custom paintings, and actions. * [Custom Structures](/en/docs/compatibility/customstructures) - custom structure bounds in advancement location predicates. * [CoreProtect](/en/docs/compatibility/coreprotect) - storage open interaction logging. * [PlaceholderAPI](/en/docs/compatibility/placeholderapi) - placeholder parsing in supported text fields. * [MythicMobs](/en/docs/compatibility/mythicmobs) - the `mythic_mobs_skill` action. ## ID syntax [#id-syntax] For item, block, furniture, recipe, tag, and namespaced ID formats, see [IDs](/en/docs/compatibility/ids). ## Related pages [#related-pages] * [Configuration](/en/docs/configuration) * [Custom Tags](/en/docs/custom-tags) * [Action parameters](/en/docs/actions/parameters) * [Storage behaviour](/en/docs/behaviours/storage) * [Crafting recipes](/en/docs/recipes/crafting) * [Advancements](/en/docs/advancements) # ItemsAdder (/en/docs/compatibility/itemsadder) ItemsAdder is required. ItemsAdderAdditions loads configuration from ItemsAdder content YAML files and uses ItemsAdder APIs to resolve custom stacks, custom blocks, furniture, font images, and reload events. ## Requirements [#requirements] * ItemsAdder v4 is supported; the latest version is recommended. * A supported Paper server version with a matching ItemsAdderAdditions NMS adapter. ItemsAdder 4.0.18 support was added in ItemsAdderAdditions 1.0.13, including updated runtime patch mappings. ## Supported features [#supported-features] ItemsAdderAdditions uses ItemsAdder for: * reading item, block, furniture, recipe, behaviour, action, component, custom tag, advancement, painting, and world-generation sections from content YAML * resolving ItemsAdder item IDs to `ItemStack`s * matching already placed custom blocks and furniture * applying item modifier hooks for components and Valhalla metadata * listening for ItemsAdder load/reload events * handling ItemsAdder font images in rendered text * runtime patches for ItemsAdder cooldowns, stat requirements, stonecutter behavior, trade machines, and crafting behavior where needed ## Reload behavior [#reload-behavior] Most YAML-only ItemsAdderAdditions sections reload through ItemsAdder reloads and `/iareload`. Components mutate generated item stacks through ItemsAdder's item modifier pipeline. After changing components, run `/iazip` so ItemsAdder regenerates the pack and item data. ## ID syntax [#id-syntax] ItemsAdder content can usually be referenced as either `namespace:id` or bare `id`. See [IDs](/en/docs/compatibility/ids) for exact formats and common mistakes. ## Troubleshooting [#troubleshooting] * If a custom ID does not resolve, check that the content is loaded by ItemsAdder and that the namespace is correct. * Prefer `namespace:id` when different packs may use the same bare ID. * After changing generated item data, run `/iazip`; after changing runtime YAML sections, run `/iareload`. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [Configuration](/en/docs/configuration) * [Components](/en/docs/components) * [Custom Tags](/en/docs/custom-tags) # MMOItems (/en/docs/compatibility/mmoitems) MMOItems support is optional. If MMOItems is installed and enabled, ItemsAdderAdditions can create and match MMOItems stacks with `mmoitems:type:id` references. ## Requirements [#requirements] * MMOItems installed and enabled only on servers that use `mmoitems:type:id` references. * The MMOItems type and item ID must exist in MMOItems. ## Supported features [#supported-features] MMOItems item references are supported by shared item-resolution paths, including: * recipe ingredients and concrete recipe outputs where item stacks are created * item actions such as `clear_item`, `replace_item`, and `toast.icon` * advancement item predicates and supported item conditions * custom item tags * component fields that create item stacks, such as `bundle_contents` and `charged_projectiles` ## Syntax [#syntax] ```yaml item: mmoitems:sword:flame_blade ``` The format is: ```text mmoitems:type:id ``` ItemsAdderAdditions reads MMOItems metadata keys `MMOITEMS_ITEM_TYPE` and `MMOITEMS_ITEM_ID` when matching existing item stacks. ## Optional dependency behavior [#optional-dependency-behavior] If MMOItems is not installed or not enabled: * `mmoitems:type:id` references cannot create item stacks. * `mmoitems:type:id` references do not match existing items. * Other vanilla and ItemsAdder references continue to work. ## Limitations [#limitations] * MMOItems references are item references only. They are not block, furniture, or recipe IDs. * Vanilla tags do not match MMOItems items. * Tags are still invalid in concrete output fields even if a custom tag contains MMOItems values. ## Troubleshooting [#troubleshooting] * Check the MMOItems type and ID spelling. * Use exactly two separators after the prefix: `mmoitems:type:id`. * Install and enable MMOItems before testing MMOItems references. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [Crafting recipes](/en/docs/recipes/crafting) * [Custom Tags](/en/docs/custom-tags) * [Clear Item](/en/docs/actions/clear-item) * [Replace Item](/en/docs/actions/replace-item) # MythicMobs (/en/docs/compatibility/mythicmobs) MythicMobs support is optional. ItemsAdderAdditions uses MythicMobs only for the `mythic_mobs_skill` action. ## Requirements [#requirements] * MythicMobs installed and enabled. * A valid MythicMobs skill name. * The `mythic_mobs_skill` action enabled in ItemsAdderAdditions config. ## Supported features [#supported-features] | Feature | MythicMobs behavior | | -------------------------------------------------------------- | ----------------------------------------------------------------- | | [Mythic Mobs Skill action](/en/docs/actions/mythic-mobs-skill) | Casts a MythicMobs skill from the player with configurable power. | ## Example [#example] ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 ``` The action asks MythicMobs to cast the skill from the player, using the player's location and MythicMobs' targeted entity helper. ## Optional dependency behavior [#optional-dependency-behavior] If MythicMobs is not installed or not enabled, the action returns without casting a skill. Other actions continue to work. ## Limitations [#limitations] * This integration does not add new MythicMobs mechanics. * It is action-only; MMO-style item references are handled by [MMOItems](/en/docs/compatibility/mmoitems), not MythicMobs. ## Troubleshooting [#troubleshooting] * Verify the skill name exists in MythicMobs. * Confirm the action key is `mythic_mobs_skill`. * Check that the action is enabled in `config.yml`. * Confirm MythicMobs is installed and enabled before testing. ## Related pages [#related-pages] * [Mythic Mobs Skill action](/en/docs/actions/mythic-mobs-skill) * [Action parameters](/en/docs/actions/parameters) * [Configuration](/en/docs/configuration) # PlaceholderAPI (/en/docs/compatibility/placeholderapi) PlaceholderAPI support is optional. When PlaceholderAPI is installed, ItemsAdderAdditions parses placeholders in supported text fields. When it is not installed, the original text is kept unchanged. ## Supported features [#supported-features] PlaceholderAPI is used by text rendering paths documented on feature pages, including: * message, actionbar, title, toast, and open inventory actions * advancement completion text actions * storage inventory titles * text display behaviour text ## Examples [#examples] ```yaml message: text: "Hello %player_name%!" ``` ```yaml behaviours: text_display: text: "Coins: %vault_eco_balance%" refresh_interval: 20 ``` For text displays, set `refresh_interval` to a positive value when placeholders should update over time. ## Optional dependency behavior [#optional-dependency-behavior] If PlaceholderAPI is missing, placeholders are not resolved and remain in the rendered text. ## Limitations [#limitations] * ItemsAdderAdditions does not provide PlaceholderAPI expansions by itself. * Placeholder support only applies to fields that use the shared text renderer or explicitly document PlaceholderAPI support. ## Troubleshooting [#troubleshooting] * Install the PlaceholderAPI expansion that provides the placeholder you use. * Use a positive refresh interval for changing text display placeholders. * If text appears literally as `%placeholder%`, verify PlaceholderAPI is installed and enabled. ## Related pages [#related-pages] * [Message action](/en/docs/actions/message) * [Actionbar action](/en/docs/actions/actionbar) * [Title action](/en/docs/actions/title) * [Toast action](/en/docs/actions/toast) * [Open Inventory action](/en/docs/actions/open-inventory) * [Text Display behaviour](/en/docs/behaviours/text-display) * [Storage behaviour](/en/docs/behaviours/storage) # ValhallaMMO & Trinkets (/en/docs/compatibility/valhalla) ItemsAdderAdditions can write ValhallaMMO and ValhallaTrinkets persistent data to ItemsAdder item stacks when they are created. Configure the data under an ItemsAdder item's `valhalla` section. The metadata is written directly to the item stack. Gameplay effects require the matching Valhalla plugin to be installed on the server. ## Requirements [#requirements] * ItemsAdder item content loaded by ItemsAdder. * ValhallaMMO for ValhallaMMO stats, equipment class, item flags, and permanent effects. * ValhallaTrinkets for trinket metadata. ## Optional dependency behavior [#optional-dependency-behavior] ItemsAdderAdditions writes the persistent data keys even if ValhallaMMO or ValhallaTrinkets is not installed. Without the matching Valhalla plugin, the data remains on the item but has no gameplay effect. ## Basic structure [#basic-structure] ```yaml info: namespace: my_pack items: ruby_sword: display_name: "Ruby Sword" valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` ## Stats [#stats] Use `stats` when the same entries should be written to both Valhalla's actual stats and default stats. ```yaml valhalla: stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER hidden: false ``` You can also write the two stat containers separately: ```yaml valhalla: actual_stats: - stat: DAMAGE_BASE amount: 6.0 operation: ADD_NUMBER default_stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` | Key | Type | Default | Description | | ----------- | ------- | ------------ | --------------------------------------------------- | | `stat` | string | *(required)* | Valhalla stat key. Unknown stat keys are skipped. | | `amount` | number | *(required)* | Stat value. | | `operation` | string | *(required)* | `ADD_NUMBER`, `ADD_SCALAR`, or `MULTIPLY_SCALAR_1`. | | `hidden` | boolean | `false` | Whether Valhalla should hide the stat line. | ## Equipment class and flags [#equipment-class-and-flags] ```yaml valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES - HIDE_QUALITY ``` Common equipment classes include `SWORD`, `BOW`, `CROSSBOW`, `TRIDENT`, `MACE`, `HELMET`, `CHESTPLATE`, `LEGGINGS`, `BOOTS`, `PICKAXE`, `AXE`, `SHOVEL`, `HOE`, `SHIELD`, `TRINKET`, and `OTHER`. Supported item flags are: ```text HIDE_TAGS, HIDE_QUALITY, DISPLAY_ATTRIBUTES, HIDE_DURABILITY, ATTRIBUTE_FOR_BOTH_HANDS, ATTRIBUTE_FOR_HELMET, INFINITY_EXPLOITABLE, UNCRAFTABLE, TEMPORARY_POTION_DISPLAY, UNENCHANTABLE, UNMENDABLE ``` ## Permanent effects [#permanent-effects] ```yaml valhalla: permanent_effects: effects: - type: minecraft:strength amplifier: 1 duration: 200 condition: constant cooldown_properties: cooldown: 1200 cdr_affected: true ``` `effect` can be used instead of `type`. The legacy key `permanent_potion_effects` is also accepted for the effects list. `cooldown_properties` can also be placed at the top level as `permanent_effects_cooldown_properties`. `cdrAffected` is accepted as an alias for `cdr_affected`. ## ValhallaTrinkets [#valhallatrinkets] ```yaml valhalla: trinkets: trinket_id: 1001 trinket_unique_id: 1001 unique: true unstackable: true ``` | Key | Type | Default | Description | | ------------------- | ------- | -------- | ----------------------------------------------------------- | | `trinket_id` | integer | *(none)* | ValhallaTrinkets ID. Must be a non-negative 32-bit integer. | | `trinket_unique_id` | integer | *(none)* | Unique trinket ID. Must be a non-negative 32-bit integer. | | `unique` | boolean | *(none)* | Writes or removes the ValhallaTrinkets unique flag. | | `unstackable` | boolean | *(none)* | When `true`, each generated item stack gets a random UUID. | ## Reload behavior [#reload-behavior] Run `/iareload` after editing `valhalla` sections. The data is applied to item stacks created after the reload; existing stacks are not rewritten automatically. ## Troubleshooting [#troubleshooting] * Unknown Valhalla stat names are skipped. * Enum values for `operation`, `equipment_class`, and `item_flags` should use the Valhalla-style uppercase names shown above. * Existing items in player inventories are not rewritten automatically. * If gameplay effects do not apply, verify that ValhallaMMO or ValhallaTrinkets is installed and supports the metadata being written. ## Related pages [#related-pages] * [ItemsAdder](/en/docs/compatibility/itemsadder) * [IDs](/en/docs/compatibility/ids) * [Configuration](/en/docs/configuration) # WorldGuard (/en/docs/compatibility/worldguard) WorldGuard support is optional. When WorldGuard is installed, ItemsAdderAdditions registers region flags that can allow or deny supported behaviours, custom painting placement, and built-in actions. If WorldGuard is not installed, or if a WorldGuard check is disabled in ItemsAdderAdditions config, the protected feature is allowed by ItemsAdderAdditions. ## Requirements [#requirements] * WorldGuard installed before ItemsAdderAdditions registers flags. * Restart the server after adding WorldGuard or changing plugins that define conflicting flags. ## Configuration [#configuration] WorldGuard checks are enabled by default. ```yaml worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true ``` Set `worldguard.enabled: false` to disable all ItemsAdderAdditions WorldGuard checks. Set an individual flag option to `false` to stop checking that flag while leaving other checks enabled. ## Flags [#flags] ItemsAdderAdditions registers WorldGuard `StateFlag`s with default value `allow`. | Flag | Controlled behavior | | --------------------------- | ----------------------------------------------- | | `iaa-storage-open` | Opening storage behaviour inventories. | | `iaa-contact-damage` | Damage applied by the contact effect behaviour. | | `iaa-stackable-place` | Placement handled by the stackable behaviour. | | `iaa-bed-use` | Using the bed behaviour. | | `iaa-custom-painting-place` | Placing custom paintings. | ## Action flags [#action-flags] ItemsAdderAdditions also registers one flag per built-in action. The flag name is: ```text iaa-action- ``` Examples: | Action key | WorldGuard flag | | ------------------------- | ------------------------------------ | | `replace_biome` | `iaa-action-replace-biome` | | `iaa_replace_near_blocks` | `iaa-action-iaa-replace-near-blocks` | | `open_trade_machine` | `iaa-action-open-trade-machine` | | `mythic_mobs_skill` | `iaa-action-mythic-mobs-skill` | Current built-in action flags: ```text iaa-action-actionbar iaa-action-clear-item iaa-action-ignite iaa-action-message iaa-action-mythic-mobs-skill iaa-action-open-inventory iaa-action-open-trade-machine iaa-action-play-animation iaa-action-play-emote iaa-action-replace-biome iaa-action-iaa-replace-near-blocks iaa-action-replace-item iaa-action-shoot-fireball iaa-action-swing-hand iaa-action-teleport iaa-action-title iaa-action-toast iaa-action-veinminer ``` All action executors check their action flag before running. The checked location is chosen from the action context: target entity, block, furniture entity, or the player's location as a fallback. ## Advancement region trigger [#advancement-region-trigger] ItemsAdderAdditions 1.0.12 adds the `enter_region` advancement trigger. It awards a criterion when a player moves or teleports from outside to inside the configured WorldGuard region. ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # optional ``` Region IDs are matched case-insensitively. The optional `world` value is the Bukkit world name. This trigger only needs WorldGuard to be installed; `worldguard.enabled` and `worldguard.flags.*` control protection checks, not region detection for advancements. See the full [`enter_region` trigger reference](/en/docs/advancements/triggers#enter_region). ## Region examples [#region-examples] Deny storage openings in a region: ```text /rg flag spawn iaa-storage-open deny ``` Deny contact effect damage in a region: ```text /rg flag spawn iaa-contact-damage deny ``` Deny only the `replace_biome` action in a region: ```text /rg flag spawn iaa-action-replace-biome deny ``` Allow custom painting placement explicitly: ```text /rg flag gallery iaa-custom-painting-place allow ``` ## Default behavior [#default-behavior] * Flags default to `allow`. * Missing WorldGuard means ItemsAdderAdditions allows the feature. * Disabled ItemsAdderAdditions WorldGuard config means ItemsAdderAdditions allows the feature. * If a flag name conflicts with a non-`StateFlag`, that flag is disabled and a warning is logged. ## Troubleshooting [#troubleshooting] * If a flag command says the flag does not exist, restart with WorldGuard installed so ItemsAdderAdditions can register flags during startup. * If a feature still runs, check `config.yml` and confirm the related `worldguard.flags.*` option is `true`. * For actions, use the action flag name with dashes, not underscores. * Check server logs for flag conflict warnings. ## Related pages [#related-pages] * [Configuration](/en/docs/configuration) * [Storage behaviour](/en/docs/behaviours/storage) * [Contact effect behaviour](/en/docs/behaviours/contact-effect) * [Stackable behaviour](/en/docs/behaviours/stackable) * [Bed behaviour](/en/docs/behaviours/bed) * [Custom Paintings](/en/docs/custom-paintings) * [Action parameters](/en/docs/actions/parameters) * [Advancement triggers](/en/docs/advancements/triggers) # Brewing (/en/docs/recipes/brewing) ItemsAdderAdditions adds a `brewing` recipe type for brewing stands. It registers a Paper potion mix and adds support for exact ItemsAdder, MMOItems, and vanilla item matching. ## Basic recipe [#basic-recipe] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 1 result: item: my_pack:ruby_elixir brew_time: 400 fuel_cost: 1 ``` `base` is the preferred key for the input bottle. The legacy key `input` is still accepted. ## Options [#options] | Key | Type | Default | Description | | -------------------- | ------- | ------------ | -------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Set to `false` to skip this recipe. | | `base.item` | string | *(required)* | Required input bottle/item. The legacy path `input.item` is also accepted. | | `ingredient.item` | string | *(required)* | Required brewing ingredient. | | `ingredient.consume` | integer | `1` | How many ingredient items to consume. Must be greater than `0`. | | `result.item` | string | *(required)* | Output item. | | `result.amount` | integer | `1` | Brewing outputs are clamped to one item per bottle slot. | | `brew_time` | integer | `400` | Brewing time in ticks. Must be greater than `0`. | | `fuel_cost` | integer | `1` | Blaze-powder fuel units to consume. Must be greater than `0`. | | `on_complete` | section | *(none)* | Optional sound and command actions after brewing completes. | ## Item references [#item-references] `base.item`, `ingredient.item`, and `result.item` can use: * vanilla materials like `POTION` or `minecraft:awkward_potion` * ItemsAdder items like `my_pack:ruby_dust` * MMOItems items like `mmoitems:material:ruby_dust` Tags are not valid here because brewing must compare concrete item stacks. See [IDs](/en/docs/compatibility/ids) for supported item formats. ## Completion actions [#completion-actions] `on_complete` runs when the brewing stand finishes and at least one player is viewing the stand. ```yaml on_complete: sound: name: minecraft:block.brewing_stand.brew source: master volume: 1.0 pitch: 1.0 commands: reward: command: "say {player} brewed a ruby elixir" as_console: true ``` `{player}` is replaced with the viewer player's name. Commands run as the player unless `as_console: true` is set. ## Complete example [#complete-example] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: enabled: true base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 2 result: item: my_pack:ruby_elixir amount: 1 brew_time: 600 fuel_cost: 2 on_complete: sound: name: minecraft:entity.player.levelup source: master ``` ## Common mistakes [#common-mistakes] * Setting `result.amount` above `1`. Brewing stands only hold one result item per bottle slot, so the amount is clamped to `1`. * Using `#minecraft:*` tags. Brewing recipes match exact item stacks, not tags. * Setting `fuel_cost` higher than the fuel currently in the stand. The recipe will not finish until enough fuel is available. ## Reload behavior [#reload-behavior] Run `/iareload` after editing brewing recipes. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [MMOItems compatibility](/en/docs/compatibility/mmoitems) # Campfire Cooking (/en/docs/recipes/campfire-cooking) Add campfire cooking recipes without creating extra recipe files. ## Parameters [#parameters] ### `enabled` [#enabled] Optional. Defaults to `true`. Set to `false` to skip registering the recipe. ### `ingredient.item` [#ingredientitem] Required. The input item for the recipe. Use a vanilla material, an ItemsAdder item, or an MMOItems item. See [IDs](/en/docs/compatibility/ids). ```yaml ingredient: item: BEEF ``` ```yaml ingredient: item: my_pack:raw_fish_fillet ``` ```yaml ingredient: item: mmoitems:consumable:raw_fish ``` ### `result.item` [#resultitem] Required. The cooked output item. ```yaml result: item: COOKED_BEEF ``` ### `result.amount` [#resultamount] Optional. Defaults to `1`. The number of items produced. ### `cook_time` [#cook_time] Optional. Defaults to `600` ticks. Cooking time. 20 ticks = 1 second. ### `exp` [#exp] Optional. Defaults to `0.0`. Experience granted when taking the cooked result. ## Full example [#full-example] ```yaml info: namespace: my_pack recipes: campfire_cooking: roasted_berry_skewer: ingredient: item: my_pack:berry_skewer_raw result: item: my_pack:berry_skewer_roasted amount: 1 cook_time: 160 exp: 0.25 ``` ## Notes [#notes] * Supports vanilla, ItemsAdder, and MMOItems items. * Tags such as `#minecraft:fishes` are not supported here because campfire recipes require one concrete input stack. * Recipe IDs such as `roasted_berry_skewer` are internal identifiers. * The namespace comes from `info.namespace`. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [MMOItems compatibility](/en/docs/compatibility/mmoitems) # Crafting (/en/docs/recipes/crafting) ItemsAdderAdditions adds an advanced crafting recipe type called `iaa_crafting_table`. It works for both 3x3 crafting-table recipes and 2x2 player-crafting-grid recipes. `iaa_crafting` is accepted as an alias. Use it when you need extra ingredient validation features not available in the standard `crafting_table` type: * vanilla item/block tags * ItemsAdder, MMOItems, and vanilla item ingredients * ingredient amounts * durability damage on ingredients * replacement items * ignore durability matching * potion type filtering * shapeless ingredient lists ## Important [#important] Recipes using these extra features should be placed under: ```yaml recipes: iaa_crafting_table: ``` ```yaml recipes: iaa_crafting: ``` Prefer `iaa_crafting_table` in new files. `iaa_crafting` behaves the same way and exists as an alias. If you only need normal ItemsAdder crafting features, you can keep using the regular `crafting_table` recipe type. ## Basic shaped recipe [#basic-shaped-recipe] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: wooden_scythe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ## Basic shapeless recipe [#basic-shapeless-recipe] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: mega_diamond: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 - item: COPPER_INGOT amount: 2 result: item: DIAMOND amount: 3 ``` ## Structure [#structure] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: my_recipe: enabled: true permission: "my_pack.recipe.use" pattern: - "ABC" - "DEF" - "GHI" ingredients: A: STICK result: item: DIAMOND amount: 1 ``` ## Supported standard recipe features [#supported-standard-recipe-features] `iaa_crafting_table` also supports common crafting features you may already know from ItemsAdder, such as: * `enabled` * `permission` * shaped recipes with `pattern` * shapeless recipes * multiple `pattern...` variants * `potion_type` ingredient filtering ## Extra ItemsAdderAdditions features [#extra-itemsadderadditions-features] The main reason to use these recipe types is their additional ingredient predicate support: * vanilla tags with `#minecraft:tag` * MMOItems ingredients with `mmoitems:type:id` * per-ingredient `amount` * per-ingredient `damage` * per-ingredient `replacement` * `ignore_durability` * shapeless list-style ingredient format ## Parameters [#parameters] ### `enabled` [#enabled] Optional. Defaults to `true`. If set to `false`, the recipe is not registered. ### `permission` [#permission] Optional. If set, players must have this permission for the recipe result to appear and be craftable. ```yaml permission: "my_pack.recipe.use" ``` ### `shapeless` [#shapeless] Optional. Defaults to `false`. If `true`, the recipe is treated as shapeless. ## Completion actions [#completion-actions] Use `on_complete` to play a sound and/or run commands when the recipe is crafted. ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # optional, default: master volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # optional, default: false ``` `{player}` is replaced with the crafting player's name. Commands run as the player by default; set `as_console: true` to run them from console. ## Result [#result] ### `result.item` [#resultitem] Required. The output item. Supports vanilla materials, ItemsAdder items, and MMOItems items. Tags are only valid for ingredients, not for results. ```yaml result: item: "my_pack:custom_sword" ``` ### `result.amount` [#resultamount] Optional. Defaults to `1`. ```yaml result: item: DIAMOND amount: 3 ``` ### `result.durability` [#resultdurability] Optional. Available since 1.0.13 for damageable result items. Sets the result's **remaining durability**, not its damage value. It must be between `0` and the item's maximum durability. This also respects a custom maximum durability applied through result components. ```yaml result: item: DIAMOND_PICKAXE durability: 250 ``` ## Shaped recipes [#shaped-recipes] Shaped recipes use a `pattern` and a char-keyed `ingredients` section. ```yaml my_recipe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ### Pattern notes [#pattern-notes] * Ingredient keys must be a single character. * `X` marks empty slots. Do not define `X` as an ingredient. * Any other character not defined in `ingredients` is also treated as empty. * Multiple patterns are supported using keys such as `pattern_1`, `pattern_2`, and so on. ## Shapeless recipes [#shapeless-recipes] Shapeless recipes use: ```yaml shapeless: true ``` and can use a list of ingredients: ```yaml my_recipe: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 result: item: DIAMOND ``` ## Ingredient formats [#ingredient-formats] Ingredients support multiple formats. ### Simple string [#simple-string] ```yaml ingredients: S: STICK P: "#minecraft:planks" C: "my_pack:custom_part" M: "mmoitems:material:ruby_shard" ``` ### Detailed object [#detailed-object] ```yaml ingredients: S: item: STICK amount: 2 damage: 5 replacement: STICK ignore_durability: true potion_type: minecraft:water ``` ### Shapeless list style [#shapeless-list-style] ```yaml ingredients: - SNOWBALL - item: WATER_BUCKET replacement: BUCKET ``` ## Advanced ingredient features [#advanced-ingredient-features] ### Tags [#tags] Use vanilla Minecraft item or block tags by prefixing the value with `#`. Tags match vanilla registry entries only; they do not match ItemsAdder or MMOItems content. ```yaml ingredients: P: "#minecraft:planks" ``` Any item in that tag will match. ### `amount` [#amount] Require more than one of the same ingredient. ```yaml ingredients: I: item: IRON_INGOT amount: 3 ``` ### `damage` [#damage] Instead of consuming the ingredient, damage it by the configured amount. Useful for tools used in crafting. ```yaml ingredients: H: item: IRON_PICKAXE damage: 10 ``` ### `replacement` [#replacement] Replace the ingredient with another item after crafting. Useful for buckets, bottles, molds, and similar containers. ```yaml ingredients: W: item: WATER_BUCKET replacement: BUCKET ``` ### `ignore_durability` [#ignore_durability] Ignore the current durability value when matching an item. ```yaml ingredients: T: item: IRON_PICKAXE ignore_durability: true ``` ### `potion_type` [#potion_type] Restrict a potion ingredient to a specific base potion type. ```yaml ingredients: P: item: POTION potion_type: minecraft:jump_boost ``` ## Full shaped example [#full-shaped-example] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: reinforced_blade: enabled: true permission: "my_pack.recipes.reinforced_blade" pattern: - "XIT" - "XSI" - "SXX" ingredients: I: item: IRON_INGOT amount: 2 S: STICK T: item: IRON_PICKAXE damage: 8 ignore_durability: true result: item: "my_pack:reinforced_blade" amount: 1 ``` ## Full shapeless example [#full-shapeless-example] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: purified_bottle: shapeless: true ingredients: - item: POTION potion_type: minecraft:water - item: DIAMOND amount: 2 result: item: "my_pack:purified_bottle" ``` ## Supported item references [#supported-item-references] See [IDs](/en/docs/compatibility/ids) for the shared ID reference. Ingredient and result items can use: * vanilla material names like `STICK` or `DIAMOND` * vanilla namespaced IDs like `minecraft:stick` * ItemsAdder IDs like `namespace:item` * MMOItems IDs like `mmoitems:type:id` Ingredients can additionally use vanilla tags like `#minecraft:planks` and ItemsAdderAdditions custom item tags. Tags are not valid as results or replacement items. ## Notes [#notes] * `replacement` and `damage` are applied during crafting. * Shapeless recipes with advanced predicates should use the list format. * `iaa_crafting_table` is an additional advanced recipe type, not a replacement for ItemsAdder `crafting_table`. * `iaa_crafting` is an alias for `iaa_crafting_table`. * Every `pattern...` key is loaded as a shaped pattern variant. Examples: `pattern`, `pattern_2`, `pattern_alt`. * Anonymous shapeless ingredient lists support up to 26 entries. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [MMOItems compatibility](/en/docs/compatibility/mmoitems) * [Custom Tags](/en/docs/custom-tags) # Stonecutter (/en/docs/recipes/stonecutter) Add stonecutter recipes without creating extra recipe files. ## Parameters [#parameters] ### `enabled` [#enabled] Optional. Defaults to `true`. Set to `false` to skip registering the recipe. ### `ingredient.item` [#ingredientitem] Required. The input item shown in the stonecutter. Use a vanilla material, an ItemsAdder item, or an MMOItems item. See [IDs](/en/docs/compatibility/ids). ```yaml ingredient: item: STONE ``` ```yaml ingredient: item: my_pack:rough_marble ``` ```yaml ingredient: item: mmoitems:material:rough_marble ``` ### `result.item` [#resultitem] Required. The output item. ```yaml result: item: STONE_BRICKS ``` ### `result.amount` [#resultamount] Optional. Defaults to `1`. The number of items produced. ## Completion actions [#completion-actions] Use `on_complete` to play a sound and/or run commands when the recipe is crafted. ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # optional, default: master volume: 1.0 # optional, default: 1.0 pitch: 1.0 # optional, default: 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # optional, default: false ``` `{player}` is replaced with the crafting player's name. Commands run as the player by default; set `as_console: true` to run them from console. ## Full example [#full-example] ```yaml info: namespace: my_pack recipes: stonecutter: marble_tiles: ingredient: item: my_pack:rough_marble result: item: my_pack:marble_tiles amount: 2 on_complete: sound: name: "minecraft:block.stonecutter.use" commands: reward: command: "give {player} diamond 1" as_console: true ``` ## Notes [#notes] * Supports vanilla, ItemsAdder, and MMOItems items. * Tags such as `#minecraft:stone_tool_materials` are not supported here because the stonecutter requires one concrete input stack. * Recipe IDs such as `marble_tiles` are internal identifiers. * The namespace comes from `info.namespace`. ## Related pages [#related-pages] * [IDs](/en/docs/compatibility/ids) * [MMOItems compatibility](/en/docs/compatibility/mmoitems) # World Generation (/en/docs/worldgen/world-generation) Two world generation modes let you spawn custom furniture in newly generated chunks. Both are defined directly in your ItemsAdder content YML files. | | World Populator | Surface Decorator | | ------------------ | ----------------------------- | -------------------- | | YAML key | `blocks_populators` | `surface_decorators` | | Placement style | Vein-based (clustered) | Surface scatter | | Density control | `vein_blocks` + `chunk_veins` | `amount` | | Surface config key | `replaceable_blocks` | `bottom_blocks` | Use the **World Populator** for clustered spawns (mushrooms, ore-like groups). Use the **Surface Decorator** for evenly scattered surface objects (flowers, small rocks). ## World Populator [#world-populator] Spawns furniture in vein-style clusters during chunk generation. Uses the `blocks_populators` key (the legacy key `worlds_populators` is also accepted). ```yaml info: namespace: my_pack blocks_populators: big_mushroom: enabled: true furniture: "my_pack:big_mushroom" worlds: - world biomes: - minecraft:dark_forest replaceable_blocks: - GRASS_BLOCK - DIRT vein_blocks: 1 chunk_veins: 3 chunk_chance: 25.0 min_height: 60 max_height: 100 ``` | Key | Type | Default | Description | | ------------------------ | -------------- | ------------ | ------------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Set to `false` to skip without removing. | | `furniture` | `namespace:id` | *(required)* | The ItemsAdder furniture to spawn. See [IDs](/en/docs/compatibility/ids). | | `worlds` | list | *(all)* | World names to restrict to. Supports wildcard patterns such as `world_*`. | | `biomes` | list | *(all)* | Biome IDs (e.g. `minecraft:forest`). All must be valid or the entry is skipped. | | `replaceable_blocks` | list | *(any)* | Allowed materials for the block directly below the spawn point. | | `vein_blocks` | integer | `1` | Furniture pieces per vein attempt. | | `chunk_veins` | integer | `4` | Vein attempts per chunk. | | `chunk_chance` | double | `-1` | 0-100 chance per chunk. `-1` = always. | | `min_height` | integer | `60` | Minimum Y level. Must be less than `max_height`. | | `max_height` | integer | `80` | Maximum Y level. | | `allow_liquid_placement` | boolean | `false` | Allow spawning inside water or lava. | Legacy aliases are still accepted: `worlds_populators` for `blocks_populators`, `amount` for `vein_blocks`, `iterations` for `chunk_veins`, and `chance` for `chunk_chance`. ## Surface Decorator [#surface-decorator] Scatters furniture across the surface of newly generated terrain. Uses the `surface_decorators` key. ```yaml info: namespace: my_pack surface_decorators: small_flower: enabled: true furniture: "my_pack:small_flower" worlds: - world biomes: - minecraft:plains - minecraft:sunflower_plains bottom_blocks: - GRASS_BLOCK amount: 4 chunk_chance: 50.0 min_height: 60 max_height: 120 ``` | Key | Type | Default | Description | | ------------------------ | -------------- | ------------ | ------------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Set to `false` to skip without removing. | | `furniture` | `namespace:id` | *(required)* | The ItemsAdder furniture to spawn. See [IDs](/en/docs/compatibility/ids). | | `worlds` | list | *(all)* | World names to restrict to. Supports wildcard patterns such as `world_*`. | | `biomes` | list | *(all)* | Biome IDs (e.g. `minecraft:plains`). All must be valid or the entry is skipped. | | `bottom_blocks` | list | *(any)* | Allowed materials for the block directly below the spawn point. | | `amount` | integer | `4` | Placement attempts per chunk. | | `chunk_chance` | double | `-1` | 0-100 chance per chunk. `-1` = always. | | `min_height` | integer | `60` | Minimum Y level. Must be less than `max_height`. | | `max_height` | integer | `80` | Maximum Y level. | | `allow_liquid_surface` | boolean | `false` | Allow a liquid block below the spawn point as a valid surface. | | `allow_liquid_placement` | boolean | `false` | Allow spawning inside water or lava. | The legacy alias `chance` is accepted for `chunk_chance`. ## Notes [#notes] * Only newly generated chunks trigger spawning. Existing chunks are unaffected. * The furniture must be registered by ItemsAdder before the entry is loaded. * Invalid biome IDs cause the entire entry to be skipped. * Surface decorators in the Nether scan downward from `max_height` to `min_height`. * When `allow_liquid_placement` is enabled, normal-dimension surface decoration uses the ocean-floor heightmap so underwater surfaces can be found. # Constructeur (/fr/docs/builder) Choisissez une action, un comportement ou une recette, remplissez les champs, puis copiez le YAML généré directement dans votre configuration d’objet. * **Actions** : collez le résultat dans la section `events` de votre objet. Consultez la page [paramètres des actions](/fr/docs/actions/parameters) pour un exemple complet. * **Comportements** : collez le résultat directement sous la définition de votre objet. * **Recettes** : collez le résultat dans n’importe quel fichier YML de contenu ItemsAdder (le bloc complet `info` + `recipes` est inclus). # Composants (/fr/docs/components) ItemsAdderAdditions applique des composants de données Minecraft aux objets personnalisés lors de la génération du pack via le hook de modificateur d'objets d'ItemsAdder. Ajoutez une section `components` sous la définition de votre objet et exécutez `/iazip`. ```yaml items: my_item: components: rarity: RARE use_cooldown: cooldown: 1.5 tool: default_mining_speed: 2.0 rules: - blocks: "#minecraft:logs" speed: 4.0 correct_for_drops: true ``` Les composants sont appliqués quand ItemsAdder reconstruit les données du pack et des objets. Exécutez `/iazip` après avoir modifié le YAML des composants. `/iareload` recharge les autres contenus ItemsAdderAdditions, mais pas les composants. ## Légende des statuts [#légende-des-statuts] | Statut | Signification | | ---------------------- | --------------------------------------------------------------------- | | **Spécialisé** | Handler IAA dédié avec une syntaxe YAML spécifique à IAA | | **Générique** | Aucun handler dédié ; bascule vers le pipeline générique du codec NMS | | **Géré par IA** | Défini par ItemsAdder lui-même ; IAA l'ignore | | **Non pris en charge** | Aucune API Paper/NMS ; ne peut pas être appliqué | ## Composants NMS génériques [#composants-nms-génériques] Pour les clés de composant qui n'ont pas de handler IAA spécialisé, IAA bascule vers un pipeline NMS générique. La clé est normalisée (`custom_data` devient `minecraft:custom_data`), l'arbre de valeurs est analysé depuis le YAML, et le résultat est appliqué via le système de codec Mojang de Minecraft via NMS. **Version serveur minimale pour les composants génériques : 1.21.3.** Sur 1.20.6 et 1.21.1, le pipeline NMS générique n'est pas disponible. Les handlers spécialisés fonctionnent toujours sur ces versions. ### Utilisation [#utilisation] Utilisez la clé complète avec espace de noms ou la forme courte (le préfixe `minecraft:` est ajouté automatiquement) : ```yaml items: my_item: components: minecraft:custom_data: my_plugin: id: my_item tier: 3 enabled: true ``` Forme courte (équivalente) : ```yaml items: my_item: components: custom_data: my_plugin: id: my_item ``` La structure YAML doit correspondre au codec vanilla de ce composant. IAA ne réinterprète pas la forme. Si le codec rejette la valeur, IAA enregistre un avertissement et ignore ce composant. **Note :** `minecraft:custom_data` est un véritable composant NBT compound vanilla. Ne le confondez pas avec le `PersistentDataContainer` (PDC) de Bukkit. Les deux systèmes sont indépendants. Les données PDC sont stockées en interne par Bukkit et ne sont pas du `custom_data`. ## Référence des composants [#référence-des-composants] ### `attack_range` [#attack_range] **Statut :** Spécialisé | **Version minimale :** 1.21.11 Remplace la portée d'attaque de l'objet pour les attaques de mêlée et de projectile. | Propriété | Type | Défaut | Plage | | -------------------- | ----- | ------ | ---------- | | `min_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_reach` | Float | `3.0` | 0.0 - 64.0 | | `min_creative_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_creative_reach` | Float | `5.0` | 0.0 - 64.0 | | `hitbox_margin` | Float | `0.3` | 0.0 - 1.0 | | `mob_factor` | Float | `1.0` | 0.0 - 2.0 | ```yaml components: attack_range: max_reach: 5.0 max_creative_reach: 7.0 hitbox_margin: 0.5 ``` ### `banner_patterns` [#banner_patterns] **Statut :** Spécialisé Définit les couches de motif de bannière sur un objet bannière. | Propriété | Type | Format | | --------- | ------ | ------------------------------------------------------------- | | `type` | String | Clé de type de motif (ex. `stripe_top`, `square_bottom_left`) | | `color` | String | Nom de couleur de teinture (`WHITE`, `RED`, `BLUE`, etc.) | ```yaml components: banner_patterns: - type: stripe_top color: RED - type: square_bottom_left color: BLUE ``` Couleurs de teinture valides : `WHITE`, `ORANGE`, `MAGENTA`, `LIGHT_BLUE`, `YELLOW`, `LIME`, `PINK`, `GRAY`, `LIGHT_GRAY`, `CYAN`, `PURPLE`, `BLUE`, `BROWN`, `GREEN`, `RED`, `BLACK`. Les clés de type de motif sont des clés de registre Minecraft. Le préfixe `minecraft:` est optionnel (ex. `stripe_top` et `minecraft:stripe_top` sont équivalents). ### `base_color` [#base_color] **Statut :** Spécialisé Définit la couleur de base d'un objet bouclier. | Propriété | Type | Valeurs | | --------- | ------ | -------------------------- | | (valeur) | String | Nom de couleur de teinture | ```yaml components: base_color: RED ``` ### `blocks_attacks` [#blocks_attacks] **Statut :** Spécialisé Fait que l'objet bloque les attaques entrantes comme un bouclier. | Propriété | Type | Défaut | | ------------------------ | ----------------- | ---------------------------------------------------------------- | | `block_delay_seconds` | Float | `0.0` | | `disable_cooldown_scale` | Float | `1.0` | | `bypassed_by` | String | `null` (tag de type de dégâts, ex. `#minecraft:bypasses_shield`) | | `block_sound` | String | `null` (clé de son) | | `disable_sound` | String | `null` (clé de son) | | `damage_reductions` | Liste de sections | `[]` | | `item_damage` | Section | `null` | Entrée `damage_reductions` : | Propriété | Type | Défaut | | --------------------------- | --------------- | ------------------------------------------------------------------- | | `type` | String ou Liste | `null` (tag de type de dégâts ou IDs ; omettre pour tous les types) | | `horizontal_blocking_angle` | Float | `90.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | Section `item_damage` : | Propriété | Type | Défaut | | ----------- | ----- | ------ | | `threshold` | Float | `0.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | ```yaml components: blocks_attacks: block_delay_seconds: 0.25 disable_cooldown_scale: 1.0 bypassed_by: "#minecraft:bypasses_shield" block_sound: minecraft:item.shield.block disable_sound: minecraft:item.shield.break damage_reductions: - type: "#minecraft:is_projectile" horizontal_blocking_angle: 90.0 base: 0.0 factor: 0.5 - type: minecraft:player_attack base: 1.0 factor: 1.0 item_damage: threshold: 3.0 base: 1.0 factor: 1.0 ``` Le champ `type` dans `damage_reductions` accepte une chaîne de tag (`#minecraft:is_fire`), une seule clé de type de dégâts (`minecraft:fire`), ou une liste de clés de type de dégâts. ### `bundle_contents` [#bundle_contents] **Statut :** Spécialisé Définit le contenu initial d'un objet bourse. Accepte les IDs vanilla, les IDs ItemsAdder et le format `mmoitems:TYPE:ID`. Voir [IDs](/fr/docs/compatibility/ids) pour les détails complets du format. ```yaml components: bundle_contents: - minecraft:arrow - my_pack:special_arrow ``` ### `can_break` [#can_break] **Statut :** Spécialisé Restreint les blocs que cet objet peut casser en mode Aventure. ```yaml components: can_break: - minecraft:stone - "#minecraft:logs" ``` Accepte les IDs de bloc (`minecraft:stone`) et les tags de bloc (`#minecraft:logs`). Le préfixe `minecraft:` est optionnel. ### `can_place_on` [#can_place_on] **Statut :** Spécialisé Restreint les blocs sur lesquels cet objet peut être placé en mode Aventure. ```yaml components: can_place_on: - minecraft:grass_block - "#minecraft:dirt" ``` Même format que `can_break`. ### `charged_projectiles` [#charged_projectiles] **Statut :** Spécialisé Définit les projectiles préchargés dans une arbalète. Accepte les IDs vanilla, les IDs ItemsAdder et le format `mmoitems:TYPE:ID`. Voir [IDs](/fr/docs/compatibility/ids). ```yaml components: charged_projectiles: - minecraft:arrow - my_pack:special_bolt ``` ### `damage_resistant` [#damage_resistant] **Statut :** Spécialisé Rend l'entité objet immunisée contre une catégorie de dégâts (comme la netherite qui ignore le feu). ```yaml components: damage_resistant: minecraft:is_fire ``` Accepte une clé de tag de type de dégâts. Le préfixe `#` et le préfixe `minecraft:` sont tous deux optionnels (`is_fire`, `#is_fire`, `minecraft:is_fire`, `#minecraft:is_fire` sont tous équivalents). ### `damage_type` [#damage_type] **Statut :** Spécialisé Définit le type de dégâts utilisé quand l'entité objet inflige des dégâts. ```yaml components: damage_type: minecraft:magic ``` Doit être une clé de registre de type de dégâts valide. ### `death_protection` [#death_protection] **Statut :** Spécialisé Empêche la mort et applique optionnellement des effets quand déclenché (comme un totem d'immortalité). | Propriété | Type | Défaut | | --------------- | ----------------- | -------------------------------------- | | `death_effects` | Liste de sections | `[]` (omettre pour une protection nue) | Types d'effets dans `death_effects` : | Type | Propriétés | | ------------------- | ----------------------------------------------------------------------- | | `apply_effects` | `effects` (liste d'effets de potion), `probability` (float, défaut 1.0) | | `remove_effects` | `effects` (liste de clés de type d'effet) | | `clear_all_effects` | *(aucune propriété)* | | `teleport_randomly` | `diameter` (float, défaut 16.0) | | `play_sound` | `sound` (clé de son avec espace de noms) | Entrée d'effet de potion (utilisée dans `apply_effects`) : | Propriété | Type | Défaut | | ----------- | ------- | ---------------------------------------- | | `type` | String | Clé de type d'effet (ex. `regeneration`) | | `duration` | Integer | Durée en ticks | | `amplifier` | Integer | Niveau - 1 (0 = niveau I) | ```yaml components: death_protection: death_effects: - type: apply_effects probability: 1.0 effects: - type: regeneration duration: 900 amplifier: 1 - type: absorption duration: 100 amplifier: 1 - type: remove_effects effects: - wither - poison - type: play_sound sound: minecraft:item.totem.use ``` Omettez entièrement `death_effects` pour un effet de totem nu (empêche la mort, sans effets supplémentaires) : ```yaml components: death_protection: {} ``` ### `dyed_color` [#dyed_color] **Statut :** Spécialisé Définit la couleur de teinture d'une armure en cuir ou d'autres objets teignables. ```yaml components: dyed_color: "#FF4400" ``` Accepte les chaînes de couleur hexadécimale `#RRGGBB`. ### `enchantable` [#enchantable] **Statut :** Spécialisé Définit la valeur d'enchantabilité de l'objet (affecte la qualité d'enchantement dans la table d'enchantement). ```yaml components: enchantable: 15 ``` Plage : 1 - 255. Des valeurs plus élevées améliorent la qualité d'enchantement. ### `firework_explosion` [#firework_explosion] **Statut :** Spécialisé Définit l'effet d'explosion de feu d'artifice sur un objet étoile de feu d'artifice. | Propriété | Type | Défaut | | ------------- | -------------------------- | ------- | | `type` | String | `BALL` | | `colors` | Liste de chaînes `#RRGGBB` | `[]` | | `fade_colors` | Liste de chaînes `#RRGGBB` | `[]` | | `trail` | Boolean | `false` | | `flicker` | Boolean | `false` | Types valides : `BALL`, `BALL_LARGE`, `STAR`, `BURST`, `CREEPER`. ```yaml components: firework_explosion: type: STAR colors: - "#FF0000" - "#0000FF" fade_colors: - "#FFFFFF" trail: true flicker: false ``` ### `fireworks` [#fireworks] **Statut :** Spécialisé Définit les propriétés de feu d'artifice sur un objet fusée de feu d'artifice. | Propriété | Type | Défaut | | ----------------- | ----------------- | ------------- | | `flight_duration` | Integer | `1` (0 - 255) | | `explosions` | Liste de sections | `[]` | Chaque entrée dans `explosions` utilise le même schéma que `firework_explosion`. ```yaml components: fireworks: flight_duration: 2 explosions: - type: BURST colors: - "#FFAA00" trail: true ``` ### `intangible_projectile` [#intangible_projectile] **Statut :** Spécialisé Marque cet objet comme un projectile intangible (ne peut pas être ramassé après avoir été tiré). ```yaml components: intangible_projectile: true ``` Mettez à `true` ou toute valeur non nulle pour activer. C'est un composant marqueur sans propriétés. ### `kinetic_weapon` [#kinetic_weapon] **Statut :** Spécialisé | **Version minimale :** 1.21.5 Fait que l'objet inflige des dégâts en fonction de la vitesse de déplacement du joueur (comme une masse). | Propriété | Type | Défaut | | ------------------------ | -------------------------------- | ------ | | `contact_cooldown_ticks` | Integer | `0` | | `delay_ticks` | Integer | `0` | | `forward_movement` | Float | `1.0` | | `damage_multiplier` | Float | `1.0` | | `sound` | String (clé avec espace de noms) | `null` | | `hit_sound` | String (clé avec espace de noms) | `null` | | `dismount_conditions` | Section | `null` | | `knockback_conditions` | Section | `null` | | `damage_conditions` | Section | `null` | Sections de condition (`dismount_conditions`, `knockback_conditions`, `damage_conditions`) : | Propriété | Type | Défaut | | -------------------- | ------- | ------ | | `max_duration_ticks` | Integer | `0` | | `min_speed` | Float | `0.0` | | `min_relative_speed` | Float | `0.0` | ```yaml components: kinetic_weapon: damage_multiplier: 2.0 forward_movement: 1.5 sound: minecraft:entity.player.attack.sweep damage_conditions: min_speed: 0.1 ``` ### `lodestone_tracker` [#lodestone_tracker] **Statut :** Spécialisé Fait qu'une boussole pointe vers un emplacement de magnétite. | Propriété | Type | Défaut | | --------- | ------- | -------------------------------------------------------- | | `tracked` | Boolean | `true` | | `world` | String | `null` (nom de monde ; omettre pour un traqueur non lié) | | `x` | Integer | `0` | | `y` | Integer | `0` | | `z` | Integer | `0` | ```yaml components: lodestone_tracker: world: world x: 100 y: 64 z: -200 tracked: true ``` Si `world` est omis, la boussole n'est pas liée (affiche une aiguille tournante). Si `world` est défini mais que le monde n'est pas chargé au moment du rechargement, IAA enregistre un avertissement et applique le composant sans emplacement. ### `map_color` [#map_color] **Statut :** Spécialisé Définit la couleur de bordure d'un objet carte remplie. ```yaml components: map_color: "#2A6DB5" ``` Accepte les chaînes de couleur hexadécimale `#RRGGBB`. ### `map_decorations` [#map_decorations] **Statut :** Spécialisé Définit des décorations fixes (marqueurs) sur une carte remplie. ```yaml components: map_decorations: my_marker: type: RED_MARKER x: 100.0 z: 200.0 rotation: 0.0 another_marker: type: player x: -50.0 z: 75.0 rotation: 90.0 ``` Chaque clé sous `map_decorations` est un ID de décoration unique. `type` est une clé `MapCursor.Type` (insensible à la casse ; préfixe `minecraft:` optionnel). `x` et `z` sont des coordonnées du monde. `rotation` est en degrés. ### `map_id` [#map_id] **Statut :** Spécialisé Lie l'objet à une carte spécifique par son ID entier. ```yaml components: map_id: 42 ``` ### `minimum_attack_charge` [#minimum_attack_charge] **Statut :** Spécialisé | **Version minimale :** 1.21.1 Définit la fraction de charge d'attaque minimale requise pour déclencher les effets de pleine charge. ```yaml components: minimum_attack_charge: 0.9 ``` Plage : 0.0 - 1.0. ### `ominous_bottle_amplifier` [#ominous_bottle_amplifier] **Statut :** Spécialisé Définit le niveau d'amplificateur d'une fiole inquiétante (affecte la force du Mauvais Présage quand consommée). ```yaml components: ominous_bottle_amplifier: 3 ``` Plage : 0 - 4. ### `piercing_weapon` [#piercing_weapon] **Statut :** Spécialisé | **Version minimale :** 1.21.5 Fait que l'objet transperce les entités (comme une flèche avec Perforation). | Propriété | Type | Défaut | | ----------------- | -------------------------------- | ------ | | `deals_knockback` | Boolean | `true` | | `dismounts` | Boolean | `true` | | `sound` | String (clé avec espace de noms) | `null` | | `hit_sound` | String (clé avec espace de noms) | `null` | ```yaml components: piercing_weapon: deals_knockback: true dismounts: false hit_sound: minecraft:entity.arrow.hit ``` ### `pot_decorations` [#pot_decorations] **Statut :** Spécialisé Définit les décorations d'éclats de poterie sur un pot décoré. | Propriété | Type | Défaut | | --------- | ------ | -------------------------------------------------------- | | `back` | String | `null` (ID d'objet vanilla, ex. `arms_up_pottery_sherd`) | | `left` | String | `null` | | `right` | String | `null` | | `front` | String | `null` | ```yaml components: pot_decorations: back: arms_up_pottery_sherd left: archer_pottery_sherd right: blade_pottery_sherd front: burn_pottery_sherd ``` Accepte les IDs d'objet vanilla. Le préfixe `minecraft:` est optionnel. ### `potion_contents` [#potion_contents] **Statut :** Spécialisé Définit les effets de potion d'un objet potion, potion jetable ou potion persistante. | Propriété | Type | Défaut | | ------------- | ----------------- | ------------------------------------------------- | | `potion` | String | `null` (clé PotionType, ex. `minecraft:strength`) | | `color` | String | `null` (override hexadécimal #RRGGBB) | | `custom_name` | String | `null` | | `effects` | Liste de sections | `[]` | Au moins un de `potion`, `color`, `custom_name`, ou `effects` doit être présent. ```yaml components: potion_contents: potion: minecraft:strength color: "#FF0000" custom_name: "Super Strength" effects: - type: strength duration: 600 amplifier: 2 ``` ### `potion_duration_scale` [#potion_duration_scale] **Statut :** Spécialisé Multiplie la durée de tous les effets de potion appliqués par cet objet. ```yaml components: potion_duration_scale: 2.0 ``` Plage : 0.0 - 255.0. ### `profile` [#profile] **Statut :** Spécialisé Définit le profil de skin de joueur sur un objet tête de joueur. Accepte un nom de joueur (résolu par le client) ou une section avec des données de profil explicites. Forme simple (nom de joueur) : ```yaml components: profile: Notch ``` Forme section (UUID, nom ou texture explicites) : ```yaml components: profile: name: Notch uuid: 069a79f4-44e9-4726-a5be-fca90e38aaf5 texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvLi4uIn19fQ== ``` Au moins un de `name`, `uuid`, ou `texture` est requis dans la forme section. ### `provides_banner_patterns` [#provides_banner_patterns] **Statut :** Spécialisé Marque l'objet comme un ingrédient qui débloque des motifs de bannière quand placé dans un métier à tisser. ```yaml components: provides_banner_patterns: minecraft:no_item_required ``` Accepte une clé de tag de motif de bannière. Le préfixe `#` est optionnel. ### `provides_trim_material` [#provides_trim_material] **Statut :** Spécialisé Marque l'objet comme un matériau de garniture de forge. ```yaml components: provides_trim_material: gold ``` Accepte une clé de registre de matériau de garniture. Le préfixe `minecraft:` est optionnel. ### `rarity` [#rarity] **Statut :** Spécialisé Définit la rareté de l'objet, qui affecte la couleur du nom de l'objet dans le pack de ressources par défaut. ```yaml components: rarity: RARE ``` Valeurs valides : `COMMON`, `UNCOMMON`, `RARE`, `EPIC`. ### `repairable` [#repairable] **Statut :** Spécialisé Définit les objets qui peuvent réparer cet objet dans une enclume. Accepte une chaîne de tag ou une liste d'IDs d'objet : ```yaml # Avec un tag components: repairable: "#minecraft:planks" ``` ```yaml # Avec une liste d'objets components: repairable: - minecraft:diamond - minecraft:netherite_ingot ``` ### `stored_enchantments` [#stored_enchantments] **Statut :** Spécialisé Définit les enchantements stockés dans un livre enchanté. Utilise une section de paires `clé_enchantement: niveau`. ```yaml components: stored_enchantments: sharpness: 5 looting: 3 minecraft:mending: 1 ``` Plage de niveau : 1 - 255. Le préfixe `minecraft:` est optionnel. ### `suspicious_stew_effects` [#suspicious_stew_effects] **Statut :** Spécialisé Définit les effets donnés par un objet ragoût suspect. ```yaml components: suspicious_stew_effects: - type: speed duration: 200 - type: minecraft:night_vision duration: 400 ``` `duration` est en ticks. La valeur par défaut est 160. Le préfixe `minecraft:` sur les types d'effet est optionnel. ### `swing_animation` [#swing_animation] **Statut :** Spécialisé | **Version minimale :** 1.21.5 Définit le type et la durée de l'animation de balancement pour les attaques de mêlée. | Propriété | Type | Valeurs | | ---------- | ------- | ----------------------- | | `type` | String | `NONE`, `WHACK`, `STAB` | | `duration` | Integer | >= 1 | ```yaml components: swing_animation: type: WHACK duration: 6 ``` ### `tool` [#tool] **Statut :** Spécialisé Configure l'objet comme un outil avec des règles de vitesse de minage. | Propriété | Type | Défaut | | ------------------------- | ----------------- | ------ | | `default_mining_speed` | Float | `1.0` | | `damage_per_block` | Integer | `1` | | `can_destroy_in_creative` | Boolean | `true` | | `rules` | Liste de sections | `[]` | Section de règle : | Propriété | Type | Défaut | | ------------------- | -------------------- | ----------------------- | | `blocks` | String, tag ou Liste | Requis | | `speed` | Float | `null` (aucun override) | | `correct_for_drops` | Boolean ou omis | `null` (NOT\_SET) | ```yaml components: tool: default_mining_speed: 1.0 damage_per_block: 1 can_destroy_in_creative: true rules: - blocks: "#minecraft:mineable/pickaxe" speed: 6.0 correct_for_drops: true - blocks: - minecraft:obsidian - minecraft:crying_obsidian speed: 12.0 correct_for_drops: true ``` `blocks` accepte une chaîne de tag (`#minecraft:logs`), un seul ID de bloc (`minecraft:stone`), ou une liste d'IDs de bloc. `correct_for_drops` : `true` signifie que cet outil produit les bons drops ; `false` signifie qu'il ne le fait pas ; omettre la clé signifie NOT\_SET (hérite des valeurs par défaut vanilla). ### `tooltip_display` [#tooltip_display] **Statut :** Spécialisé Contrôle quels composants sont affichés dans l'infobulle de l'objet. | Propriété | Type | Défaut | | ------------------- | -------------------------- | ------- | | `hide_tooltip` | Boolean | `false` | | `hidden_components` | Liste de clés de composant | `[]` | ```yaml components: tooltip_display: hide_tooltip: false hidden_components: - enchantments - attribute_modifiers - stored_enchantments ``` `hidden_components` accepte les noms de champ `DataComponentTypes` (insensible à la casse). Utilisez la clé de composant Minecraft sans le préfixe `minecraft:` et en UPPER\_SNAKE\_CASE (ex. `ATTRIBUTE_MODIFIERS`). La recherche est insensible à la casse. ### `use_cooldown` [#use_cooldown] **Statut :** Spécialisé Définit un temps de recharge d'utilisation sur l'objet. | Propriété | Type | Requis | | ---------- | -------------------------------- | ------ | | `cooldown` | Float (secondes) | Oui | | `group` | String (clé avec espace de noms) | Non | ```yaml components: use_cooldown: cooldown: 2.0 ``` Si `group` est omis, le groupe de temps de recharge prend par défaut `itemsadder:`, rendant le temps de recharge spécifique à l'objet. Définissez `group` pour partager un temps de recharge avec d'autres objets : ```yaml components: use_cooldown: cooldown: 5.0 group: my_pack:special_items ``` ### `use_remainder` [#use_remainder] **Statut :** Spécialisé Définit l'objet qui reste dans l'emplacement après que cet objet est entièrement consommé. ```yaml components: use_remainder: minecraft:glass_bottle ``` Accepte les IDs vanilla, les IDs ItemsAdder et le format `mmoitems:TYPE:ID`. Voir [IDs](/fr/docs/compatibility/ids). ### `weapon` [#weapon] **Statut :** Spécialisé | **Version minimale :** 1.21.5 Configure l'objet comme une arme avec des dégâts personnalisés et une interaction de blocage. | Propriété | Type | Défaut | | ------------------------------ | ------- | ------ | | `item_damage_per_attack` | Integer | `1` | | `disable_blocking_for_seconds` | Float | `0.0` | ```yaml components: weapon: item_damage_per_attack: 2 disable_blocking_for_seconds: 0.6 ``` `disable_blocking_for_seconds` : quand cette arme frappe une entité qui bloque, le blocage est désactivé pendant cette durée. ### `writable_book_content` [#writable_book_content] **Statut :** Spécialisé Définit les pages d'un livre inscriptible (livre et plume). ```yaml components: writable_book_content: - "Page 1 content here." - "Page 2 content here." ``` ## Récapitulatif des versions [#récapitulatif-des-versions] | Composant | Version minimale | | -------------------------- | ---------------- | | `minimum_attack_charge` | 1.21.1 | | `kinetic_weapon` | 1.21.5 | | `piercing_weapon` | 1.21.5 | | `swing_animation` | 1.21.5 | | `weapon` | 1.21.5 | | `attack_range` | 1.21.11 | | Composants NMS génériques | 1.21.3 | | Tous les autres composants | 1.20.6+ | Les composants qui nécessitent une version plus récente que le serveur en cours d'exécution sont silencieusement ignorés avec un avertissement dans la console. # Configuration (/fr/docs/configuration) ItemsAdderAdditions utilise `config.yml` pour les toggles de fonctionnalités au niveau du plugin. Le YAML de contenu ItemsAdder définit toujours les actions, comportements, recettes, progrès, peintures, tags et entrées de génération du monde réels. ## Configuration par défaut [#configuration-par-défaut] ```yaml features: creative_inventory_integration: true custom_paintings: true item_model_definitions: true behaviours: bed: true connectable: true contact_effect: true stackable: true storage: true text_display: true worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true actions: actionbar: true clear_item: true ignite: true message: true mythic_mobs_skill: true open_inventory: true open_trade_machine: true play_animation: true play_emote: true replace_biome: true replace_item: true shoot_fireball: true swing_hand: true teleport: true title: true toast: true veinminer: true update-checker: enabled: true on-join: true ``` ## Comportement des toggles [#comportement-des-toggles] Les clés de toggle manquantes sont activées par défaut. Cela s'applique aussi aux sections optionnelles qui ne sont pas présentes dans la configuration par défaut. Les vérifications de régions WorldGuard se configurent sous `worldguard` ; consultez la [compatibilité WorldGuard](/fr/docs/compatibility/worldguard). Les composants peuvent être désactivés de la même manière : ```yaml components: rarity: false ``` ## Comportement au rechargement [#comportement-au-rechargement] Exécutez : ```text /itemsadderadditions reload ``` ou : ```text /iaa reload ``` Cette commande recharge `config.yml` et réapplique les toggles de fonctionnalités, actions, comportements et composants au niveau du plugin. Elle ne recharge **pas** les fichiers YAML de contenu ItemsAdder. Utilisez `/iareload` après avoir modifié des sections YAML de contenu ItemsAdderAdditions comme les actions, comportements, tags personnalisés, recettes, progrès, peintures personnalisées, métadonnées Valhalla ou entrées de génération du monde. Utilisez `/iazip` après avoir modifié les sections `components` ou des assets du resource pack. `/iareload` recharge le contenu ItemsAdderAdditions sauf les composants. ## Erreurs courantes [#erreurs-courantes] * Mettre un toggle à `false` et s'attendre à ce que le contenu existant continue de fonctionner après rechargement. * Ajouter une faute de frappe sous `actions`, `behaviours`, `features` ou `components` ; les clés de toggle inconnues ne désactivent pas la fonctionnalité visée. * S'attendre à ce que `/itemsadderadditions reload` recharge le YAML de contenu ItemsAdder ou reconstruise le resource pack. Utilisez `/iareload` pour le YAML de contenu et `/iazip` pour les composants ou assets. # Intégration à l’inventaire créatif (/fr/docs/creative-inventory-integration) **Crédits :** Cette fonctionnalité a été initialement codée par **Misieur** ([GitHub](https://github.com/Misieur)). **Exigence de version :** Nécessite **Paper 1.21.5 ou supérieur**. La fonctionnalité est désactivée sur les versions antérieures. Cette fonctionnalité injecte automatiquement tous les objets personnalisés enregistrés par ItemsAdder dans le menu créatif vanilla. Aucune configuration manuelle par objet n’est nécessaire ; elle récupère tout ce qu’ItemsAdder charge. **Important** : vous avez besoin des permissions opérateur et de l’onglet **Operator Items Tab** activé pour voir les objets ItemsAdder dans l’inventaire créatif. ## Configuration [#configuration] Exécutez `/iazip` pour régénérer le pack de ressources. Votre inventaire créatif contiendra tous les items personnalisés après reconnexion. Chaque fois que vous ajoutez ou supprimez des objets personnalisés via ItemsAdder, vous devez vous reconnecter au serveur et relancer `/iazip` pour voir les mises à jour reflétées dans votre inventaire créatif. ## Activation / Désactivation [#activation--désactivation] Vous pouvez activer ou désactiver cette fonctionnalité dans le `config.yml` du plugin : ```yaml features: creative_inventory_integration: true ``` Définissez à `false` pour désactiver entièrement la fonctionnalité. Le plugin ne générera aucun fichier de pack de ressources ni n’injectera d'entrées de registre lorsqu’il est désactivé. ## Configuration ItemsAdder [#configuration-itemsadder] Lors de la première configuration, le plugin s’ajoute automatiquement à la liste de fusion du pack de ressources d’ItemsAdder : ```yaml # Dans ItemsAdder/config.yml (géré automatiquement) resource-pack: zip: merge_other_plugins_resourcepacks_folders: - ItemsAdderAdditions/resourcepack ``` Si cette entrée est manquante pour une raison quelconque (par ex., le fichier n’était pas accessible en écriture), vous pouvez l'ajouter manuellement sans problème. Le plugin affichera un avertissement s’il n'a pas pu appliquer la modification automatiquement. ## Notes [#notes] * Les **objets modèles** sont exclus. Les objets marqués avec `template: true` dans leur configuration ItemsAdder n’apparaîtront pas dans le menu créatif. * Les **variantes directionnelles** sont exclues. Les objets dont l’ID avec espace de noms se termine par `_north`, `_south`, `_east`, `_west`, `_up` ou `_down` sont ignorés si l’objet de base (sans le suffixe de direction) existe dans le registre. Cela évite les entrées en double pour les blocs pivotables. * Les objets avec `hide_from_inventory: true` dans leur configuration ItemsAdder sont exclus. * Les objets utilisant `graphics.icon` ou `resource.icon` afficheront leur icône GUI plate. Tous les autres objets utiliseront le modèle 3D qu’ils affichent normalement en main. * Les tableaux vanilla ne sont pas affectés ; les objets tableau classiques continueront à fonctionner normalement. # Tableaux personnalisés (/fr/docs/custom-paintings) **Exigence de version :** Nécessite **Paper 1.21.5 ou supérieur**. La fonctionnalité est désactivée sur les versions antérieures. Les tableaux personnalisés sont définis directement dans les fichiers YML de contenu ItemsAdder en utilisant une section `paintings` de niveau supérieur. Chaque entrée enregistre une véritable variante de tableau Minecraft que les joueurs peuvent rencontrer en jeu. ## Configuration [#configuration] ```yaml info: namespace: mynamespace paintings: sunset: enabled: true width: 2 height: 1 asset: mynamespace:sunset title: "Coucher de soleil" author: "Toutou" item: mynamespace:sunset_painting include_in_random: true ``` ## Options [#options] | Clé | Type | Défaut | Description | | ------------------- | ------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | booléen | `true` | Définir à `false` pour ignorer ce tableau sans supprimer l'entrée. | | `width` | entier | *(obligatoire)* | Largeur du tableau en blocs. | | `height` | entier | *(obligatoire)* | Hauteur du tableau en blocs. | | `asset` | `namespace:key` | *(obligatoire)* | Clé de la ressource de texture. Voir [Chemin de texture](#chemin-de-texture) ci-dessous. | | `title` | chaîne | *(aucun)* | Titre d’affichage optionnel affiché dans les infobulles. Prend en charge MiniMessage. | | `author` | chaîne | *(aucun)* | Nom d'auteur optionnel affiché dans les infobulles. | | `item` | `namespace:item_id` | *(aucun)* | Objet ItemsAdder lié optionnel. Quand on clique droit sur une face de mur valide, cet objet permet de placer le tableau personnalisé. Voir [IDs](/fr/docs/compatibility/ids). | | `include_in_random` | booléen | `false` | Quand `true`, les objets de tableau vanilla peuvent sélectionner aléatoirement ce tableau personnalisé si l’espace sur le mur convient. | ## Chemin de texture [#chemin-de-texture] La valeur `asset` correspond à un fichier de texture dans votre dossier de contenu ItemsAdder. Pour `asset: mynamespace:sunset`, le plugin attend : ``` contents/mynamespace/textures/painting/sunset.png ``` Aucun fichier datapack n'est nécessaire. Le plugin injecte les variantes de tableau à l'exécution et met à jour automatiquement le tag vanilla `minecraft:placeable`. ## Placer des tableaux en jeu [#placer-des-tableaux-en-jeu] Si vous définissez un `item`, cet objet ItemsAdder se comporte comme un objet tableau personnalisé : * Un clic droit sur une face de mur valide place le tableau personnalisé. * Les flags WorldGuard de pose de tableaux sont respectés lorsque l'intégration WorldGuard est activée. * Le problème de placement en double avec la main secondaire est géré automatiquement. Si `include_in_random` est `false` (par défaut), le tableau ne peut être placé que via son objet lié. Définissez-le à `true` pour permettre également aux objets de tableau vanilla de le choisir aléatoirement. ## Activation / Désactivation [#activation--désactivation] Vous pouvez activer ou désactiver cette fonctionnalité dans le `config.yml` du plugin : ```yaml features: custom_paintings: true ``` ## Notes [#notes] * Cette fonctionnalité n'est disponible que sur Minecraft **1.21.5** et ultérieur. Sur les versions antérieures prises en charge, le plugin journalise un avertissement et ignore la section `paintings`. * Aucun `/iazip` ni étape manuelle de pack de ressources n'est nécessaire pour les variantes de tableaux elles-mêmes, mais votre fichier de texture doit être inclus dans votre pack de ressources comme d'habitude. * L'`item` lié doit être un objet ItemsAdder existant. S'il est manquant, la variante de tableau est quand même enregistrée, mais aucun objet de placement ne fonctionnera. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # Tags personnalisés (/fr/docs/custom-tags) Les tags personnalisés vous permettent de regrouper des IDs de contenu une seule fois et de réutiliser ce groupe dans les fonctionnalités ItemsAdderAdditions prises en charge. Ils sont chargés depuis une section `tags` au niveau racine dans n'importe quel fichier YAML de contenu ItemsAdder. ## Structure de base [#structure-de-base] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer decorative_blocks: type: block values: - ruby_lamp - minecraft:amethyst_block trading_stations: type: furniture values: - alchemy_table - forge_table ruby_recipes: type: recipe values: - ruby_sword - ruby_pickaxe ``` Référencez un tag avec `#tag_id` dans le même namespace ou `#namespace:tag_id` depuis un autre namespace. Consultez [IDs](/fr/docs/compatibility/ids) pour les règles de référence de tags. ## Types de tags [#types-de-tags] | Type | Alias | Les valeurs peuvent contenir | | ----------- | ------------ | ------------------------------------------------------------------------------ | | `item` | `items` | Objets ItemsAdder, objets vanilla, objets MMOItems et tags d'objets imbriqués. | | `block` | `blocks` | Blocs ItemsAdder, blocs vanilla et tags de blocs imbriqués. | | `furniture` | `furnitures` | IDs de meubles ItemsAdder et tags de meubles imbriqués. | | `recipe` | `recipes` | IDs de recettes et tags de recettes imbriqués. | Si `type` est omis, le tag est traité comme un tag d'objets. ## Tags imbriqués [#tags-imbriqués] Les tags peuvent inclure d'autres tags du même type. ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe mining_tools: type: item values: - "#ruby_tools" - minecraft:iron_pickaxe - minecraft:diamond_pickaxe ``` Les tags imbriqués sont résolus pendant le rechargement. Les références circulaires sont détectées et ignorées au lieu de bloquer le serveur. ## Où fonctionnent les tags personnalisés [#où-fonctionnent-les-tags-personnalisés] Les tags personnalisés sont pris en charge par les chemins de correspondance d'IDs à l'exécution, notamment : * conditions de progrès pour objets, blocs, meubles et recettes * prédicats de joueur pour objets, équipement, slots et vérifications de blocs * `items` du comportement `stackable` * ingrédients de recettes de craft (`iaa_crafting_table`) ## Exemple complet [#exemple-complet] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe items: charged_ruby: display_name: "Charged Ruby" behaviours: stackable: blocks: - charged_ruby_block items: - "#my_pack:ruby_tools" ``` ```yaml advancements: collect_any_ruby_tool: display: title: "Ruby Tools" description: "Obtain any ruby tool." icon: my_pack:ruby_pickaxe criteria: collect: trigger: obtain_item conditions: items: - "#my_pack:ruby_tools" ``` ## Comportement au rechargement [#comportement-au-rechargement] Les tags personnalisés sont préparés avant le rechargement des actions, comportements, recettes, progrès et de la génération du monde. Exécutez `/iareload` après avoir modifié des tags. ## Erreurs courantes [#erreurs-courantes] * Mélanger les types de tags. Un tag de meubles ne peut pas contenir un tag d'objets. * Définir deux fois le même `type` et le même ID de tag. La première déclaration l'emporte. * S'attendre à ce que les tags personnalisés créent des piles d'objets. Utilisez des IDs d'objets concrets pour les sorties comme les résultats de recettes, `toast.icon`, `clear_item.item` et `replace_item.item`. * Remplacer un tag qui ressemble à un tag vanilla, comme `#minecraft:planks`. Les tags personnalisés sont résolus en premier lorsqu'un tag personnalisé avec cet ID existe. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité](/fr/docs/compatibility) # Premiers pas avec ItemsAdderAdditions (/fr/docs) **ItemsAdderAdditions** étend [ItemsAdder](https://itemsadder.com/) avec des actions, comportements, recettes, tags et fonctionnalités supplémentaires, configurés directement dans vos fichiers YML existants. Il résout le contenu ItemsAdder, les objets MMOItems, les objets/blocs Minecraft vanilla, les tags vanilla et les tags personnalisés ItemsAdderAdditions avec la même couche de compatibilité. La plupart des changements ItemsAdderAdditions uniquement en YAML se rechargent avec `/iareload` ; les composants nécessitent `/iazip`. ## Téléchargement [#téléchargement] ## Prérequis [#prérequis] * **ItemsAdder** (dernière version recommandée) * **Paper** 1.20.6, 1.21.1, 1.21.3-1.21.8, 1.21.10-1.21.11, 26.1.2 ou 26.2 * **MMOItems** *(optionnel, requis uniquement pour les références `mmoitems:type:id`)* ## Compatibilité [#compatibilité] Consultez [Compatibilité](/fr/docs/compatibility) pour les notes d'intégration et [IDs](/fr/docs/compatibility/ids) pour les IDs ItemsAdder, IDs MMOItems, IDs d'objets/blocs vanilla, IDs de recettes, tags vanilla et tags personnalisés. ## Pack d'exemple optionnel [#pack-dexemple-optionnel] Un pack simple qui illustre certaines fonctionnalités d’ItemsAdderAdditions. [Lien de téléchargement du pack](https://www.spigotmc.org/resources/itemsadderadditions-example-pack.134800) # Définitions de modèle d'objet (/fr/docs/item-model-definitions) Les définitions de modèle d'objet sont les fichiers de resource pack vanilla (ajoutés dans Minecraft 1.21.4) qui associent un objet à un modèle et choisissent entre plusieurs modèles selon l'état de l'objet. ItemsAdderAdditions génère ces fichiers JSON pour vous à partir d'une section YAML sur votre objet personnalisé, les écrit dans le resource pack et (en option) attache le composant `minecraft:item_model` correspondant à l'objet. Ajoutez une section `item_model_definition` sous la définition de votre objet et exécutez `/iazip` pour écrire les fichiers dans le pack. ```yaml items: my_item: item_model_definition: model: type: model model: my_pack:item/my_item ``` **Version minimale du serveur : 1.21.4.** Sur les versions antérieures, chaque section `item_model_definition` est ignorée avec un avertissement dans la console. Les fichiers générés sont écrits dans `assets//items/.json` à l'intérieur du resource pack. Après modification du YAML, exécutez `/iazip` pour régénérer le pack. L'id du modèle d'objet généré est `:`. ## Activation [#activation] La fonctionnalité est contrôlée par `item_model_definitions` dans `config.yml` (activée par défaut) : ```yaml features: item_model_definitions: true ``` ## Référence de la section [#référence-de-la-section] | Clé | Type | Défaut | Description | | ------------------------- | ------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `enabled` | Booléen | `true` | Mettez `false` pour ignorer cet objet. | | `path` | Chaîne | id de l'objet | Chemin de sortie / id du modèle généré. Supporte `namespace:path`. | | `model` | Objet | - | Raccourci builder pour l'arbre de modèle (voir ci-dessous). | | `raw` | Objet | - | Racine complète de la définition de modèle, écrite telle quelle. | | `oversized_in_gui` | Booléen | `false` | Autorise le modèle à dépasser les limites de son emplacement dans les interfaces. Nécessite Minecraft 1.21.6 ou plus récent. | | `apply_component` | Booléen | `true` | Attache le composant `minecraft:item_model` pointant vers l'id généré. | | `overwrite_existing_file` | Booléen | `true` | Avec `false`, un fichier existant au chemin cible n'est pas touché. | | `custom_model_data` | Objet | - | Ajoute un composant `minecraft:custom_model_data` (voir ci-dessous). | Exactement un de `model` ou `raw` est requis. Si les deux sont présents, `raw` est utilisé et un avertissement est journalisé. ### `path` [#path] Si omis, le chemin par défaut est l'id de l'objet et le namespace par défaut est le namespace de l'objet. Un suffixe `.json` est retiré automatiquement. ```yaml item_model_definition: path: my_pack:custom/sword # écrit assets/my_pack/items/custom/sword.json model: type: model model: my_pack:item/sword ``` Règles : * Namespace : lettres minuscules, chiffres, `_`, `-`, `.` * Chemin : lettres minuscules, chiffres, `_`, `-`, `.`, `/` * Pas de `/` au début ni à la fin, pas de `//` * Les chemins absolus, les antislashs et `..` sont rejetés ### `oversized_in_gui` [#oversized_in_gui] Définissez `oversized_in_gui: true` pour autoriser le modèle de l'objet à dépasser les limites de son emplacement dans les interfaces d'inventaire. Minecraft a ajouté ce champ de définition de modèle d'objet dans la version 1.21.6 ; il n'a donc d'effet qu'à partir de cette version. ```yaml item_model_definition: oversized_in_gui: true model: type: model model: my_pack:item/large_item ``` La valeur est écrite à côté de `model` à la racine du JSON généré. Si elle est omise, la valeur vanilla par défaut `false` s'applique. Avec `raw`, ce paramètre de premier niveau remplace `raw.oversized_in_gui`. ## Modèle builder (`model`) [#modèle-builder-model] `model` est un raccourci : son objet devient le champ `model` de la racine générée. Il doit contenir un `type`. En mode builder, les valeurs `type` et `property` reçoivent automatiquement le préfixe `minecraft:` quand vous omettez un namespace (`model` devient `minecraft:model`). ```yaml item_model_definition: model: type: model # devient minecraft:model model: my_pack:item/my_item ``` ### Types supportés [#types-supportés] Le builder valide les types suivants. Tout autre `type` est écrit sans validation. #### `minecraft:model` [#minecraftmodel] Un modèle unique. Requiert `model` (un chemin de ressource de modèle). ```yaml model: type: model model: my_pack:item/my_item ``` #### `minecraft:composite` [#minecraftcomposite] Affiche plusieurs modèles superposés. Requiert une liste `models` non vide d'objets modèle. ```yaml model: type: composite models: - type: model model: my_pack:item/base - type: model model: my_pack:item/overlay ``` #### `minecraft:condition` [#minecraftcondition] Choisit entre deux modèles selon une propriété booléenne. Requiert `property`, `on_true` et `on_false`. ```yaml model: type: condition property: using_item on_true: type: model model: my_pack:item/drawing on_false: type: model model: my_pack:item/idle ``` #### `minecraft:select` [#minecraftselect] Choisit un modèle dans une liste de cas selon la valeur d'une propriété. Requiert `property` et une liste `cases` non vide ; chaque cas a besoin de `when` et `model`. Un `fallback` optionnel est utilisé quand aucun cas ne correspond. ```yaml model: type: select property: display_context cases: - when: gui model: type: model model: my_pack:item/gui - when: firstperson_righthand model: type: model model: my_pack:item/hand fallback: type: model model: my_pack:item/default ``` #### `minecraft:range_dispatch` [#minecraftrange_dispatch] Choisit un modèle selon une propriété numérique et des seuils. Requiert `property` et une liste `entries` non vide ; chaque entrée a besoin d'un `threshold` numérique et d'un `model`. Un `fallback` optionnel est utilisé sous le seuil le plus bas. ```yaml model: type: range_dispatch property: damage entries: - threshold: 0.0 model: type: model model: my_pack:item/fresh - threshold: 0.5 model: type: model model: my_pack:item/worn fallback: type: model model: my_pack:item/broken ``` #### `minecraft:special` [#minecraftspecial] Un modèle spécial avec un renderer. Requiert `base` et un objet `model` avec son propre `type`. ```yaml model: type: special base: my_pack:item/shield_base model: type: minecraft:shield ``` #### `minecraft:empty` / `minecraft:bundle/selected_item` [#minecraftempty--minecraftbundleselected_item] Types marqueurs sans champs supplémentaires. ```yaml model: type: empty ``` ## Modèle brut (`raw`) [#modèle-brut-raw] Utilisez `raw` quand vous voulez un contrôle total. C'est la racine complète de la définition de modèle, écrite sur disque telle quelle. Elle doit contenir un objet `model` au niveau racine. Contrairement au builder, `raw` n'ajoute aucun préfixe `minecraft:`, écrivez donc des ids namespacés complets. ```yaml item_model_definition: raw: model: type: minecraft:range_dispatch property: minecraft:custom_model_data entries: - threshold: 1.0 model: type: minecraft:model model: my_pack:item/variant_1 fallback: type: minecraft:model model: my_pack:item/default ``` ## Composants [#composants] ### `apply_component` [#apply_component] Avec `true` (défaut), IAA attache un composant `minecraft:item_model` à l'objet pointant vers l'id du modèle généré, pour que l'objet utilise réellement la nouvelle définition sans que vous ayez à régler le composant à la main. Si l'objet définit déjà `components.item_model` (ou `minecraft:item_model`) et que la valeur diffère de l'id généré, IAA laisse le composant existant intact et journalise un avertissement. Mettez `apply_component: false` pour générer le fichier sans toucher aux composants. ### `custom_model_data` [#custom_model_data] Quand `apply_component` est `true` et que l'objet ne définit pas déjà de composant `custom_model_data`, vous pouvez en attacher un. Il utilise la forme vanilla `minecraft:custom_model_data` : des listes de `floats`, `flags`, `strings` et `colors`. ```yaml item_model_definition: model: type: range_dispatch property: custom_model_data entries: - threshold: 1.0 model: type: model model: my_pack:item/variant_1 custom_model_data: floats: - 1.0 flags: - true strings: - hello colors: - "#FF0000" ``` Si `components.custom_model_data` existe déjà sur l'objet, la section est ignorée avec un avertissement. ## Appliquer les modifications [#appliquer-les-modifications] Les fichiers de définition de modèle d'objet sont écrits dans le resource pack au moment du rechargement. Exécutez `/iazip` ensuite pour reconstruire et appliquer le pack. La console journalise combien de définitions ont été générées, combien de fichiers ont changé et combien de fichiers existants ont été ignorés. # Métadonnées Valhalla déplacées (/fr/docs/valhalla) La documentation de ValhallaMMO et ValhallaTrinkets a été déplacée vers [Compatibilité : ValhallaMMO & Trinkets](/fr/docs/compatibility/valhalla). Utilisez la nouvelle page pour la syntaxe actuelle des métadonnées, les exemples, le comportement des dépendances optionnelles et le dépannage. # Barre d’action (/fr/docs/actions/actionbar) ```yaml actionbar: text: "Ma barre d’action personnalisée envoyée à %player_name%" ``` ## Paramètres [#paramètres] ### `text` [#text] Obligatoire. Le message à afficher. Prend en charge [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) et les images de police. # Supprimer un objet (/fr/docs/actions/clear-item) ```yaml clear_item: item: my_item amount: 2 # optionnel, défaut : 1 ``` ## Paramètres [#paramètres] ### `item` [#item] Obligatoire. L'objet à retirer. Utilisez un matériau vanilla répertorié dans [cette liste](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary), un objet ItemsAdder personnalisé avec `namespace:id` ou simplement `id`, ou un objet MMOItems avec `mmoitems:type:id`. Les tags ne sont pas pris en charge pour ce paramètre. ### `amount` [#amount] Optionnel. Par défaut : `1`. Le nombre d’objets à retirer. # Enflammer (/fr/docs/actions/ignite) ```yaml ignite: duration: 200 # ticks ``` ## Paramètres [#paramètres] ### `duration` [#duration] Obligatoire. Durée pendant laquelle la cible est en feu, en ticks. 20 ticks = 1 seconde. # Message (/fr/docs/actions/message) ```yaml message: text: "Mon message personnalisé envoyé à %player_name%" ``` ## Paramètres [#paramètres] ### `text` [#text] Obligatoire. Le message à envoyer. Prend en charge [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) et les images de police. # Compétence MythicMobs (/fr/docs/actions/mythic-mobs-skill) ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 # optionnel, défaut : 1.0 ``` ## Paramètres [#paramètres] ### `skill` [#skill] Obligatoire. Le nom de la compétence MythicMobs à lancer. ### `power` [#power] Optionnel. Par défaut : `1.0`. Le multiplicateur de puissance transmis à la compétence. ## Pages associées [#pages-associées] * [Compatibilité MythicMobs](/fr/docs/compatibility/mythicmobs) * [Paramètres des actions](/fr/docs/actions/parameters) # Ouvrir un inventaire (/fr/docs/actions/open-inventory) Nécessite Paper 1.21.4 ou supérieur pour le paramètre `title`. ```yaml open_inventory: type: "anvil" title: "Mon super enclume personnalisée" # Optionnel ``` Prend en charge le formatage [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), les placeholders [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) et les images de police [ItemsAdder](https://itemsadder.com/). ## Types pris en charge [#types-pris-en-charge] * `anvil` * `cartography`, `cartography_table` * `crafting_table`, `workbench` * `enchanting`, `enchanting_table` * `ender_chest` * `grindstone` * `loom` * `smithing`, `smithing_table` * `stonecutter` # Ouvrir une machine d'échange (/fr/docs/actions/open-trade-machine) `open_trade_machine` ouvre l'interface de machine d'échange ItemsAdder pour le joueur ciblé sans que le bloc ou meuble soit placé dans le monde. Utilisez cette action pour des menus, PNJ, stations personnalisées ou tout autre déclencheur qui doit ouvrir une machine d'échange précise. ## Prérequis [#prérequis] * La cible doit être un joueur. Les cibles non-joueurs sont ignorées. * Le contenu ItemsAdder référencé doit avoir un comportement `trade_machine` ou `block_trade_machine`. ## Configuration [#configuration] ```yaml info: namespace: stations items: alchemy_token: display_name: "Station d'alchimie" events: interact: right: open_trade_machine: trade_machine: stations:alchemy_table ``` ## Options [#options] | Clé | Type | Requis | Description | | --------------- | ------ | ------ | --------------------------------------------------------------------------------------------------------------------------------- | | `trade_machine` | chaîne | oui | ID d'objet, bloc ou meuble ItemsAdder qui fournit l'interface d'échange. Un ID sans namespace utilise le `info.namespace` actuel. | ## Avec le ciblage [#avec-le-ciblage] L'action prend en charge les paramètres d'action communs : ```yaml open_trade_machine: trade_machine: stations:alchemy_table target: in_sight target_in_sight_distance: 8 ``` ## Config du plugin [#config-du-plugin] Cette action peut être désactivée dans `config.yml` : ```yaml actions: open_trade_machine: false ``` La clé est optionnelle. Les toggles d'action absents sont activés par défaut. ## Rechargement [#rechargement] Exécutez `/iareload` après avoir modifié le YAML de contenu ItemsAdder. La machine d'échange référencée doit déjà être enregistrée par ItemsAdder. ## Erreurs courantes [#erreurs-courantes] * Utiliser l'ID d'un objet normal sans comportement `trade_machine` ou `block_trade_machine`. * Utiliser `target: other` alors que la cible de l'événement n'est pas un joueur. * Omettre le namespace lorsque la machine d'échange est définie dans un autre `info.namespace`. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité ItemsAdder](/fr/docs/compatibility/itemsadder) # Paramètres des actions (/fr/docs/actions/parameters) Chaque action prend en charge un ensemble de paramètres partagés. Ils vous permettent de conditionner les actions à des permissions, d'ajouter des délais et de contrôler à qui l’action s'applique. Vous pouvez en combiner autant que vous voulez sur une même action. ## Paramètres [#paramètres] ### `permission` [#permission] Si défini, l’action ne se déclenche que si le joueur possède ce nœud de permission. Les joueurs sans la permission sont ignorés silencieusement. ```yaml actionbar: text: "Bonjour !" permission: "my_pack.greet" ``` ### `delay` [#delay] Attendre ce nombre de ticks avant d'exécuter l’action. 20 ticks = 1 seconde. Par défaut : `0` (immédiat). ```yaml message: text: "Chargement..." delay: 40 # 2 secondes après le déclencheur ``` ### `target` [#target] Contrôle à qui l’action s'applique. Par défaut : `self`. | Valeur | Description | | ---------- | ---------------------------------------------------------------------------------------------------------- | | `self` | Le joueur qui a déclenché l'événement *(par défaut)* | | `other` | L'entité avec laquelle le joueur interagit (ex. celle qui est attaquée) | | `all` | Le joueur déclencheur **et** l'entité cible | | `radius` | Toutes les entités dans le rayon X/Y/Z configuré autour du point d'interaction - nécessite `target_radius` | | `in_sight` | L'entité que le joueur regarde - nécessite `target_in_sight_distance` | ```yaml message: text: "Vous avez touché quelqu’un !" target: other ``` ### `target_radius` [#target_radius] Utilisé uniquement avec `target: radius`. Définit le rayon X/Y/Z en blocs autour de la cible, du bloc d'événement ou du joueur déclencheur. ```yaml actionbar: text: "Effet de zone !" target: radius target_radius: 10 ``` ### `target_in_sight_distance` [#target_in_sight_distance] Utilisé uniquement avec `target: in_sight`. Le nombre maximum de blocs à parcourir depuis les yeux du joueur lors de la recherche d’une entité. Si aucune entité n'est trouvée dans cette portée, l’action est entièrement ignorée. ```yaml ignite: duration: 100 target: in_sight target_in_sight_distance: 10 ``` ## Placement des déclencheurs [#placement-des-déclencheurs] Les actions se déclarent dans les sections `events` des objets, blocs, meubles ou meubles complexes ItemsAdder. ```yaml info: namespace: my_pack items: ruby_staff: events: interact: right: message: text: "Right-clicked" ruby_lamp: events: placed_furniture: interact: message: text: "Furniture clicked" ``` Les actions `placed_block` peuvent être imbriquées sous `events.placed_block`. Les actions de meubles et meubles complexes sont chargées depuis `events.placed_furniture`. ## Noms de déclencheurs pris en charge [#noms-de-déclencheurs-pris-en-charge] Les déclencheurs d'objets courants incluent : ```text interact, interact_mainhand, interact_offhand, block_break, attack, kill, drop, pickup, held, held_offhand, unheld, unheld_offhand, item_break, eat, drink, bow_shot, gun_shot, gun_no_ammo, gun_reload, item_throw, item_hit_ground, item_hit_entity, book_write, book_read, fishing_start, fishing_caught, fishing_failed, fishing_cancel, fishing_bite, fishing_in_ground, bucket_empty, bucket_fill ``` Les déclencheurs de blocs incluent `interact`, `break` et les déclencheurs `placed_block` imbriqués. Les déclencheurs de meubles utilisent les mêmes noms de style objet sous `placed_furniture`. Les meubles complexes prennent actuellement en charge `placed_furniture.interact`. `interact`, `interact_mainhand` et `interact_offhand` peuvent utiliser des sections d'arguments comme `right`, `left`, `right_shift` et `left_shift`. Les actions wildcard sous le déclencheur sont aussi exécutées après la correspondance exacte de l'argument. ## Cooldowns et exigences de stats [#cooldowns-et-exigences-de-stats] Lorsqu'une action est déclenchée depuis un objet ItemsAdder tenu en main, ItemsAdderAdditions vérifie les cooldowns et exigences de stats configurés par ItemsAdder pour cet objet avant d'exécuter l'action. Si le joueur ne remplit pas ces exigences, l'action est ignorée. ## Exemple complet [#exemple-complet] ```yaml my_item: events: interact: right: actionbar: text: "Clic droit !" permission: "some.permission" # Seuls les joueurs avec cette permission déclencheront ceci delay: 10 # Délai d’une demi-seconde target: self # Appliquer uniquement au cliqueur ``` # Jouer une animation (/fr/docs/actions/play-animation) ```yaml play_animation: name: "spin" ``` ## Paramètres [#paramètres] ### `name` [#name] Obligatoire. Le nom de l'animation à jouer, tel que défini dans la configuration du meuble. # Jouer une emote (/fr/docs/actions/play-emote) ```yaml play_emote: name: "wave" ``` ## Paramètres [#paramètres] ### `name` [#name] Obligatoire. Le nom de l'emote à jouer. # Remplacer le biome (/fr/docs/actions/replace-biome) ```yaml replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` Changer le biome dans une zone sélectionnée lorsqu’un événement ItemsAdder est déclenché. ## Paramètres [#paramètres] ### `biome` [#biome] Le biome à appliquer. Utilisez un identifiant de biome avec espace de noms valide tel que `minecraft:plains`, `minecraft:desert` ou `minecraft:cherry_grove`. Vous pouvez également utiliser des biomes de plugins ou datapacks personnalisés. ```yaml replace_biome: biome: "minecraft:desert" ``` ### `shape` [#shape] La forme utilisée pour la zone de remplacement de biome. Formes prises en charge : * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` * `SHELL` * `TORUS` * `CONE` * `BEAM` * `PYRAMID` ```yaml replace_biome: biome: "minecraft:swamp" shape: CYLINDER ``` ### `radius` [#radius] Définit la taille de la forme. Deux formats de rayon sont pris en charge selon la forme et la configuration souhaitée. #### Rayon uniforme [#rayon-uniforme] Utile pour les formes rondes comme `SPHERE`. ```yaml replace_biome: biome: "minecraft:snowy_taiga" shape: SPHERE radius: blocks_from_center: 5 ``` #### Rayon par axe [#rayon-par-axe] Utile pour les formes étirées ou de taille personnalisée. ```yaml replace_biome: biome: "minecraft:jungle" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ## Notes sur les formes [#notes-sur-les-formes] Certaines formes sont basées sur la rotation : * `PYRAMID` * `BEAM` * `CONE` Ces formes sont affectées par la rotation du joueur lorsque l’action s'exécute. Pour ces formes, `x`, `y` et `z` contrôlent toujours les dimensions finales de la forme, même si elle est orientée selon la direction du joueur. ## Limitation importante [#limitation-importante] L'édition de biome dans Minecraft n'est pas parfaitement précise à petite échelle. Le résultat peut sembler légèrement aléatoire ou irrégulier, surtout avec de petites valeurs de rayon. C'est une limitation du jeu. * Les petites formes `SPHERE` peuvent ne pas sembler parfaitement sphériques. * Les formes directionnelles peuvent apparaître légèrement inégales. * Certains bords peuvent sembler rugueux. Avec un rayon plus grand, la forme ressemblera beaucoup plus à ce qui est attendu. ## Exemples [#exemples] ### Sphère [#sphère] ```yaml replace_biome: biome: "minecraft:mushroom_fields" shape: SPHERE radius: blocks_from_center: 6 ``` ### Cuboïde [#cuboïde] ```yaml replace_biome: biome: "minecraft:badlands" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ### Faisceau basé sur la rotation du joueur [#faisceau-basé-sur-la-rotation-du-joueur] ```yaml replace_biome: biome: "minecraft:nether_wastes" shape: BEAM radius: x: 12 y: 2 z: 2 ``` ### Cône basé sur la rotation du joueur [#cône-basé-sur-la-rotation-du-joueur] ```yaml replace_biome: biome: "minecraft:soul_sand_valley" shape: CONE radius: x: 10 y: 4 z: 4 ``` ## Exemple complet [#exemple-complet] ```yaml my_item: events: interact: right: replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` ## Pages associées [#pages-associées] * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # Remplacer l'objet (/fr/docs/actions/replace-item) ```yaml replace_item: item: my_pack:upgraded_sword copy_durability: true # optionnel, par défaut : false copy_enchantments: true # optionnel, par défaut : false copy_pdc: true # optionnel, par défaut : false ``` Remplace l'objet tenu par le joueur ciblé. Les déclencheurs d'objet normaux remplacent l'objet dans la main principale. Les variantes de déclencheurs main secondaire, comme `ITEM_INTERACT_OFFHAND`, remplacent l'objet de la main secondaire. ## Paramètres [#paramètres] ### `item` [#item] Obligatoire. L'objet de remplacement à donner au joueur. Utilisez un matériau vanilla depuis [cette liste](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary), un objet ItemsAdder avec `namespace:id` ou seulement `id`, ou un objet MMOItems avec `mmoitems:type:id`. Les tags comme `#minecraft:planks` ne sont pas pris en charge, car l'action doit créer un seul objet concret. ```yaml replace_item: item: minecraft:diamond_sword ``` ```yaml replace_item: item: my_pack:ruby_sword ``` ```yaml replace_item: item: mmoitems:sword:flame_blade ``` ### `copy_durability` [#copy_durability] Optionnel. Par défaut : `false`. Si `true`, copie les dégâts de durabilité actuels depuis l'objet original vers l'objet de remplacement. Cela s'applique uniquement si les deux objets prennent en charge la durabilité. ### `copy_enchantments` [#copy_enchantments] Optionnel. Par défaut : `false`. Si `true`, copie tous les enchantements de l'objet original vers l'objet de remplacement. ### `copy_pdc` [#copy_pdc] Optionnel. Par défaut : `false`. Si `true`, copie le Persistent Data Container de l'objet original dans l'objet de remplacement. Les clés existantes sur l'objet de remplacement sont écrasées lorsqu'elles utilisent la même clé. ## Exemple complet [#exemple-complet] ```yaml my_pack:ruby_sword: events: interact: right: replace_item: item: my_pack:charged_ruby_sword copy_durability: true copy_enchantments: true copy_pdc: true ``` ## Notes [#notes] * Si l'`item` configuré ne peut pas être résolu, l'action ne fait rien. * Si la cible de l'action n'est pas un joueur, l'action ne fait rien. * Les paramètres universels d'action comme `permission`, `delay` et `target` sont pris en charge. Voir [Paramètres d'action](/fr/docs/actions/parameters). # Remplacer les blocs proches (/fr/docs/actions/replace-near-blocks) ```yaml iaa_replace_near_blocks: from: - minecraft:stone - my_pack:old_ore - "#minecraft:dirt" - "#my_pack:replaceable_blocks" to: minecraft:gold_block shape: SPHERE radius: blocks_from_center: 5 ``` Remplace les blocs correspondants autour de la cible de l'action. Le préfixe `iaa_` est obligatoire ; `replace_near_blocks` n'est pas un alias, car ItemsAdder possède déjà une action portant ce nom. Le travail est réparti sur plusieurs ticks afin de réduire les ralentissements. Les paramètres d'action existants comme `permission`, `delay` et `target` sont pris en charge. Consultez [Paramètres des actions](/fr/docs/actions/parameters). ## Paramètres [#paramètres] ### `from` [#from] Requis. Une liste contenant entre 1 et 32 identifiants ou tags de blocs. Un bloc est remplacé si son identifiant réel correspond à au moins une entrée. Entrées prises en charge : * Identifiants de blocs vanilla, comme `minecraft:stone` * Identifiants de blocs personnalisés ItemsAdder, comme `my_pack:old_ore` * Tags de blocs Minecraft, comme `#minecraft:dirt` * Tags personnalisés ItemsAdderAdditions déclarés avec `type: block`, comme `#my_pack:replaceable_blocks` Les tags d'objets, de meubles, de recettes, inconnus ou mal formés sont rejetés au chargement de la configuration. Les suffixes de rotation des blocs personnalisés suivent les règles habituelles d'ItemsAdderAdditions. Consultez [Tags personnalisés](/fr/docs/custom-tags) et [Identifiants](/fr/docs/compatibility/ids). ### `to` [#to] Requis. Un seul identifiant exact de bloc vanilla. La cible peut être l'air ou un bloc plein, solide et sans état, comme la pierre, la terre, les planches, les minerais ou les blocs de métal. Les blocs personnalisés, blocs soumis à la gravité, blocs non solides et blocs avec des propriétés d'état sérialisées sont rejetés. Les blocs personnalisés peuvent être utilisés dans `from`. Ils sont supprimés via l'API ItemsAdder avant le placement de la cible vanilla afin qu'ItemsAdder puisse effacer leur état enregistré. Si la recherche ou la suppression échoue, le traitement s'arrête sans remplacer le bloc vanilla sous-jacent. ### `shape` [#shape] Optionnel. La valeur par défaut est `SPHERE`. Formes prises en charge : * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` Les quatre formes sont centrées sur la cible résolue de l'action. Les formes directionnelles ne sont pas prises en charge par cette action. ### `radius` [#radius] Requis. Utilisez un rayon uniforme : ```yaml radius: blocks_from_center: 5 ``` Ou configurez chaque axe séparément : ```yaml radius: x: 8 y: 2 z: 8 ``` Lorsque `blocks_from_center` est présent, il remplace `x`, `y` et `z`. Les axes manquants valent 5 par défaut. Un `CYLINDER` avec `y: 0` mesure un bloc de hauteur. Chaque rayon doit être un entier compris entre 0 et 25. La boîte englobante inclusive `(2x + 1) × (2y + 1) × (2z + 1)` doit contenir au maximum 32 768 coordonnées. Un rayon uniforme ne peut donc pas dépasser 15. Les configurations dépassant une limite sont rejetées plutôt que tronquées. ## Protection et sécurité [#protection-et-sécurité] Avant chaque remplacement, l'action demande à AntiGriefLib les permissions `BREAK` et `PLACE` pour ce bloc. Le flag WorldGuard de l'action est `iaa-action-iaa-replace-near-blocks`. Les sources suivantes sont ignorées : * Entités de bloc et barrières * Blocs personnalisés avec un comportement ItemsAdderAdditions actif * Blocs contenant des données persistantes ItemsAdderAdditions * Blocs dont l'état change pendant les vérifications de protection Le scanner vérifie l'état du chunk avant de lire les blocs et ne demande pas le chargement des chunks déchargés. Un remplacement nécessite aussi que la zone de 3×3 chunks autour du bloc soit chargée. Sinon, ce bloc est ignoré. L'action n'ajoute aucun ticket de chunk. La physique normale des blocs reste activée afin que Paper gère les mises à jour des voisins, l'éclairage, la persistance et la synchronisation des clients. La physique et les callbacks d'autres plugins peuvent effectuer du travail supplémentaire ou charger indirectement des chunks ; la règle des chunks chargés ne couvre que les accès directs de cette action. ## Limites de performances [#limites-de-performances] Toutes les exécutions partagent une seule file synchrone : * Maximum de 4 exécutions actives * Maximum de 512 coordonnées candidates par tick * Maximum de 32 remplacements par tick * Budget souple d'environ 2 ms par tick Si quatre traitements sont déjà actifs, une nouvelle exécution est ignorée. Le travail en attente est annulé lorsque le joueur se déconnecte, ou lors du rechargement ou de la désactivation du plugin. Les remplacements déjà terminés restent dans le monde ; l'action ne les annule pas. ## Exemple complet [#exemple-complet] ```yaml my_pack:replacement_wand: events: interact: right: iaa_replace_near_blocks: from: - minecraft:stone - "#my_pack:replaceable_blocks" to: minecraft:deepslate shape: CYLINDER radius: x: 8 y: 1 z: 8 permission: myserver.replacement-wand ``` ## Pages associées [#pages-associées] * [Paramètres des actions](/fr/docs/actions/parameters) * [Tags personnalisés](/fr/docs/custom-tags) * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # Tirer une boule de feu (/fr/docs/actions/shoot-fireball) ```yaml shoot_fireball: power: 1 speed: 2.0 # optionnel, défaut : 1.0 fire: false # optionnel, défaut : true ``` ## Paramètres [#paramètres] ### `power` [#power] Obligatoire. La puissance d'explosion de la boule de feu. ### `speed` [#speed] Optionnel. Par défaut : `1.0`. Le multiplicateur de vitesse du projectile. ### `fire` [#fire] Optionnel. Par défaut : `true`. Si la boule de feu laisse du feu à l’impact. # Balancer la main (/fr/docs/actions/swing-hand) ```yaml swing_hand: hand: "off_hand" ``` ## Paramètres [#paramètres] ### `hand` [#hand] Optionnel. Par défaut : `hand`. La main à balancer : `hand` ou `off_hand`. # Téléportation (/fr/docs/actions/teleport) Téléportez l'entité ciblée par l'action vers des coordonnées absolues, des coordonnées relatives à sa position actuelle ou une destination nommée. ## Destinations par coordonnées [#destinations-par-coordonnées] Les trois axes sont obligatoires. Les valeurs numériques sont absolues et restent compatibles avec les configurations existantes. ```yaml teleport: x: 100 y: 64 z: -50 ``` Préfixez une coordonnée entre guillemets par `~` pour la rendre relative à l'entité téléportée. `"~"` conserve la coordonnée actuelle, `"~10"` ajoute 10 et `"~-2.5"` soustrait 2,5. ```yaml teleport: x: "~10" y: "~" z: "~-2.5" ``` Les axes absolus et relatifs peuvent être combinés : ```yaml teleport: x: 100 y: "~5" z: "~-2" ``` Les coordonnées relatives utilisent toujours la position actuelle de l'entité ciblée, et non celle du joueur ayant déclenché l'action. Les valeurs vides, incorrectes, NaN et infinies sont refusées. ## Destinations nommées [#destinations-nommées] Utilisez `destination` à la place de `x`, `y` et `z`. Les coordonnées et une destination nommée ne peuvent pas être combinées. ### Point d'apparition du monde [#point-dapparition-du-monde] ```yaml teleport: destination: world_spawn ``` `world_spawn` utilise le monde actuel de l'entité ciblée. Définissez `world` pour utiliser le point d'apparition d'un autre monde chargé : ```yaml teleport: destination: world_spawn world: "world_nether" ``` ### Réapparition du joueur [#réapparition-du-joueur] ```yaml teleport: destination: respawn ``` `respawn` utilise le point de réapparition du joueur ayant déclenché l'action, y compris les lits et les ancres de réapparition. Si aucun point valide n'existe, le point d'apparition du monde configuré est utilisé, ou celui du monde actuel du joueur si `world` est absent. L'action téléporte toujours l'entité ciblée. Le joueur déclencheur sert uniquement à trouver le point de réapparition. ## Paramètres optionnels [#paramètres-optionnels] ### `yaw` et `pitch` [#yaw-et-pitch] Valeurs de rotation absolues. Avec des coordonnées, leur absence conserve la rotation actuelle de l'entité ciblée. Avec une destination nommée, leur absence conserve la rotation de cette destination. ```yaml teleport: destination: respawn yaw: 90.0 pitch: 0.0 ``` ### `world` [#world] Avec des coordonnées ou `world_spawn`, le monde actuel de l'entité ciblée est utilisé par défaut. Avec `respawn`, ce monde sert uniquement de repli si le joueur n'a aucun point de réapparition. Un monde configuré doit exister et être chargé. # Titre (/fr/docs/actions/title) ```yaml title: title: "Bienvenue !" subtitle: "Bonne visite" # optionnel fade_in: 5 # optionnel, défaut : 10 ticks stay: 40 # optionnel, défaut : 70 ticks fade_out: 30 # optionnel, défaut : 20 ticks ``` ## Paramètres [#paramètres] ### `title` [#title] Obligatoire. Le grand texte du titre. Prend en charge [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) et les images de police. ### `subtitle` [#subtitle] Optionnel. Le texte plus petit affiché sous le titre. Prend en charge MiniMessage, PlaceholderAPI et les images de police. ### `fade_in` [#fade_in] Optionnel. Par défaut : `10` ticks. Durée de fondu à l'entrée. ### `stay` [#stay] Optionnel. Par défaut : `70` ticks. Durée d’affichage du titre à l’écran. ### `fade_out` [#fade_out] Optionnel. Par défaut : `20` ticks. Durée de fondu à la sortie. # Toast (/fr/docs/actions/toast) ```yaml toast: icon: my_item text: - "Mon ItemsAdderAdditions" - "<#E6FBFE>Toast personnalisé" frame: "task" # optionnel, défaut : goal ``` ## Paramètres [#paramètres] ### `icon` [#icon] Obligatoire. L'objet affiché comme icône du toast. Utilisez un matériau vanilla répertorié dans [cette liste](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary), un objet ItemsAdder personnalisé avec `namespace:id` ou simplement `id`, ou un objet MMOItems avec `mmoitems:type:id`. Les tags ne sont pas pris en charge pour les icônes de toast. ### `text` [#text] Obligatoire. Le message du toast. Peut être une chaîne unique ou une liste (une entrée par ligne). Prend en charge [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) et les images de police. ### `frame` [#frame] Optionnel. Par défaut : `goal`. Le style du toast : `task`, `goal` ou `challenge`. # VeinMiner (/fr/docs/actions/veinminer) ```yaml veinminer: max_blocks: 16 ``` ## Paramètres [#paramètres] ### `max_blocks` [#max_blocks] Obligatoire. Le nombre maximum de blocs à casser en une seule action de veinmining. # Actions d’achèvement (/fr/docs/advancements/completion-actions) La section `on_complete` définit ce qui se passe lorsque le joueur obtient un progrès. Quatre types d’actions sont pris en charge : son, titre, barre d’action et commandes. Les quatre peuvent être combinés dans un seul progrès. ```yaml on_complete: sound: ... title: ... actionbar: ... commands: ... ``` Les actions se déclenchent immédiatement après que le progrès soit accordé. Pour les progrès avec plusieurs critères, `on_complete` s'exécute une fois lorsque le dernier critère est terminé. *** ## sound [#sound] Joue un son à la position du joueur. ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.0 source: master ``` | Clé | Type | Par défaut | Description | | -------- | -------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- | | `name` | chaîne | *(requis)* | Clé sonore (par exemple `minecraft:entity.player.levelup`). | | `volume` | flottant | `1.0` | Multiplicateur de volume. | | `pitch` | flottant | `1.0` | Multiplicateur de hauteur. | | `source` | chaîne | `master` | Catégorie de source audio : `master`, `music`, `record`, `weather`, `block`, `hostile`, `neutral`, `player`, `ambient`, `voice`. | *** ## title [#title] Affiche un titre et un sous-titre optionnel à l’écran. ```yaml on_complete: title: title: "Progrès !" subtitle: "Première épée rubis obtenue." fade_in: 10 stay: 70 fade_out: 20 ``` | Clé | Type | Par défaut | Description | | ---------- | ------ | ---------- | ----------------------------------------------------------------------------------------------------------------------------- | | `title` | chaîne | *(requis)* | Grand texte du titre. Prend en charge [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) et PlaceholderAPI. | | `subtitle` | chaîne | `""` | Texte plus petit sous le titre. Prend en charge MiniMessage et PlaceholderAPI. | | `fade_in` | entier | `10` | Durée du fondu entrant en ticks (20 ticks = 1 seconde). | | `stay` | entier | `70` | Durée du titre à l’écran, en ticks. | | `fade_out` | entier | `20` | Durée du fondu sortant en ticks. | *** ## actionbar [#actionbar] Envoie un message à la barre d’action du joueur. ```yaml on_complete: actionbar: text: "Épée rubis obtenue !" ``` | Clé | Type | Requis | Description | | ------ | ------ | ------ | -------------------------------------------------------------------------- | | `text` | chaîne | oui | Texte de la barre d’action. Prend en charge MiniMessage et PlaceholderAPI. | *** ## commands [#commands] Exécute une ou plusieurs commandes. Chaque entrée est une sous-section nommée ; le nom est arbitraire et ne sert qu’à distinguer les entrées. ```yaml on_complete: commands: give_reward: command: "give {player} gold_ingot 4" as_console: true notify: command: "broadcast {player} earned the Ruby Sword achievement!" as_console: true ``` | Clé | Type | Par défaut | Description | | ------------ | ------- | ---------- | ---------------------------------------------------------------------------------------------------------- | | `command` | chaîne | *(requis)* | La commande à exécuter. `{player}` est remplacé par le nom du joueur. | | `as_console` | booléen | `false` | Exécuter en tant que console. Lorsque `false`, le joueur exécute la commande avec ses propres permissions. | *** ## Exemple complet [#exemple-complet] ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.2 title: title: "Progrès !" subtitle: "Première épée rubis obtenue." fade_in: 10 stay: 70 fade_out: 20 actionbar: text: "Tu as obtenu l'épée rubis !" commands: reward_gold: command: "give {player} gold_ingot 4" as_console: true log: command: "say {player} completed First Ruby Sword" as_console: true ``` # Référence de configuration (/fr/docs/advancements/configuration) Chaque entrée de progrès se trouve sous la clé de niveau supérieur `advancements` dans n’importe quel fichier de contenu ItemsAdder. IAA récupère automatiquement les fichiers qui contiennent cette clé. ```yaml info: namespace: my_pack advancements: : # ... options ci-dessous ``` ## Options de niveau supérieur [#options-de-niveau-supérieur] | Clé | Type | Par défaut | Description | | ------------- | ------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | booléen | `true` | Définissez cette option sur `false` pour ignorer ce progrès sans le supprimer du fichier. | | `parent` | chaîne | *(aucun)* | ID du progrès parent. Omettez pour créer un progrès racine (onglet). Voir [Parent](#parent). | | `display` | section | *(requis)* | Paramètres visuels. Voir [Affichage](#affichage). | | `criteria` | section | *(aucun)* | Conditions qui doivent être remplies pour terminer le progrès. Chaque critère possède un déclencheur, des conditions propres au déclencheur et un prédicat `conditions.player` optionnel. Voir [Déclencheurs](/fr/docs/advancements/triggers) et [Prédicats de joueur](/fr/docs/advancements/player-predicates). | | `rewards` | section | *(aucun)* | Expérience et déverrouillage de recettes. Voir [Récompenses](#récompenses). | | `on_complete` | section | *(aucun)* | Actions exécutées lorsque le progrès est entièrement terminé. Voir [Actions d’achèvement](/fr/docs/advancements/completion-actions). | ## Parent [#parent] ```yaml parent: root # même espace de noms que ce fichier, se résout en my_pack:root parent: otherns:someroot # espace de noms explicite ``` Si `parent` ne contient pas de deux-points, l’espace de noms du fichier est ajouté. Si `parent` est omis entièrement, ce progrès devient une racine et crée un nouvel onglet dans l’écran des progrès. ## Affichage [#affichage] ```yaml display: title: "Première Épée Rubis" description: "Obtenez votre première épée personnalisée." icon: my_pack:ruby_sword frame: task background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: true announce_to_chat: true hidden: false ``` | Clé | Type | Par défaut | Description | | ------------------ | -------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `title` | chaîne | *(requis)* | Titre du progrès. Prend en charge [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/). | | `description` | chaîne | `""` | Description de l’infobulle. Prend en charge MiniMessage. | | `icon` | `namespace:id` | `minecraft:barrier` | Objet affiché en tant qu’icône. Accepte les IDs d’objets ItemsAdder, les IDs MMOItems ou les IDs de matériaux vanilla. Les tags ne sont pas pris en charge, car l’icône doit résoudre un objet concret. | | `frame` | chaîne | `task` | Forme de la bordure de l'icône : `task`, `goal` ou `challenge`. | | `background` | chaîne | *(aucun)* | **Progrès racines uniquement.** Chemin de texture pour l’arrière-plan de l’onglet (par exemple `minecraft:gui/advancements/backgrounds/adventure`). | | `show_toast` | booléen | `true` | Affiche une notification toast une fois le progrès terminé. | | `announce_to_chat` | booléen | `true` | Diffuser l'achèvement à tous les joueurs dans le chat. | | `hidden` | booléen | `false` | Masque ce progrès jusqu’à ce qu’il soit terminé. | `background` est ce qui crée un nouvel onglet pour un progrès. Il n'est utilisé que sur les progrès racines (pas de `parent`). ## Critères [#critères] Chaque critère possède un `trigger` et une section `conditions` optionnelle. Les options propres au déclencheur se placent directement sous `conditions`. Vous pouvez aussi ajouter un prédicat `player` à n’importe quel déclencheur d’exécution afin d’exiger une vérification supplémentaire de l’état du joueur avant l’attribution du critère. ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true high_fall: trigger: fall_from_height conditions: distance: y: min: 30 ``` | Clé | Type | Par défaut | Description | | ------------------- | ---------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `trigger` | chaîne | `impossible` | Type de déclencheur pour ce critère. Voir la [référence complète des déclencheurs](/fr/docs/advancements/triggers). | | `conditions` | section | *(aucun)* | Options propres au déclencheur, plus les prédicats `player` optionnels. | | `conditions.player` | section ou liste | *(n’importe quel joueur)* | Prédicat de joueur supplémentaire vérifié au moment où le critère est sur le point d’être attribué. Ignoré par le déclencheur `impossible`. Voir [Prédicats de joueur](/fr/docs/advancements/player-predicates). | Les progrès enfants ont besoin d’au moins un critère valide. Les progrès racines peuvent omettre `criteria` ; IAA crée un critère racine interne et l’accorde automatiquement afin que l’onglet du progrès apparaisse. ## Récompenses [#récompenses] ```yaml rewards: experience: 50 recipes: - my_pack:ruby_sword_recipe - minecraft:golden_apple ``` | Clé | Type | Par défaut | Description | | ------------ | ---------------- | ---------- | ---------------------------------------------------------------------------------------------------------------- | | `experience` | entier | `0` | Points d’expérience accordés à l'achèvement. | | `loot` | liste de chaînes | `[]` | Clés de table de butin à utiliser à l'achèvement. | | `recipes` | liste de chaînes | `[]` | Clés de recette à déverrouiller. Accepte `namespace:id` ou un `id` simple (utilise l’espace de noms du fichier). | ## Exemple complet [#exemple-complet] ```yaml info: namespace: my_pack advancements: root: display: title: "Mon Serveur" description: "Progrès personnalisés pour Mon Serveur." icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false frame: task first_ruby_sword: parent: root display: title: "Première Épée Rubis" description: "Obtiens ta première épée personnalisée." icon: my_pack:ruby_sword frame: task show_toast: true announce_to_chat: true criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword amount: 1 on_complete: sound: name: minecraft:entity.player.levelup title: title: "Progrès !" subtitle: "Première épée rubis obtenue." commands: reward: command: "give {player} gold_ingot 4" as_console: true master_crafter: parent: my_pack:root display: title: "Maître Artisan" description: "Fabrique l'épée, le bouclier et la potion." icon: minecraft:crafting_table frame: goal criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe craft_shield: trigger: craft_recipe conditions: recipe: my_pack:ruby_shield_recipe craft_potion: trigger: craft_recipe conditions: recipe: my_pack:ruby_potion_recipe rewards: experience: 100 loot: - minecraft:chests/simple_dungeon ``` Les avancements à plusieurs critères (comme `master_crafter` ci-dessus) nécessitent que tous les critères soient terminés. Chaque critère est suivi indépendamment et la progression est sauvegardée par Minecraft. Depuis ItemsAdderAdditions 1.0.12, `/iareload` conserve les enregistrements et la progression si les définitions restent inchangées. Modifier une définition peut nécessiter de réenregistrer cet avancement. # Progrès personnalisés (/fr/docs/advancements) Définissez des arbres de progrès Minecraft personnalisés directement dans vos fichiers YAML de contenu ItemsAdder. Sans paquets de données, sans redémarrages. Ajoutez une section `advancements` et exécutez `/iareload`. ## Fonctionnalités [#fonctionnalités] * Créez des **onglets de progrès personnalisés** avec une texture d'arrière-plan personnalisée * Construisez des **structures arborescentes** en associant les progrès les uns aux autres * Utilisez **49 types de déclencheurs intégrés** (obtenir un objet, fabriquer une recette, tuer une entité, entrer dans un biome, rejoindre le serveur, vérifier des meubles, et plus) * Ajoutez des **prédicats de joueur** optionnels à n’importe quel critère, comme l’accroupissement, le mode de jeu, le niveau, les emplacements d’inventaire, les effets de potion, la position et plus * Exécutez des **actions d’achèvement** lorsqu’un progrès est terminé (titre, son, commandes, barre d’action) * Accordez de **l’expérience et déverrouillez des recettes** en tant que récompenses * La progression des joueurs persiste après les rechargements ## Structure de base [#structure-de-base] ```yaml info: namespace: my_pack advancements: root: display: title: "Mon Serveur" description: "Progrès pour Mon Serveur." icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false first_sword: parent: root display: title: "Première Épée Rubis" description: "Obtenez votre première épée personnalisée." icon: my_pack:ruby_sword frame: task criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword on_complete: sound: name: minecraft:entity.player.levelup title: title: "Progrès !" subtitle: "Première épée rubis obtenue." ``` ## Fonctionnement [#fonctionnement] IAA charge tous les fichiers de contenu qui contiennent une section `advancements`. Chaque entrée devient un progrès Minecraft injecté à l'exécution via NMS. La progression des joueurs est sauvegardée nativement par Minecraft dans les fichiers de sauvegarde du monde et persiste après les rechargements. Les progrès racines (sans `parent`) créent un nouvel onglet dans l’écran des progrès. Les enfants se connectent visuellement à leur parent dans l'arbre. Tous les progrès d’un fichier partagent le même `info.namespace`. Les parents entre espaces de noms sont pris en charge en utilisant le format `namespace:id`. # Prédicats de joueur (/fr/docs/advancements/player-predicates) Les prédicats de joueur permettent d’ajouter des exigences supplémentaires à un critère, en plus du déclencheur lui-même. Placez-les sous `conditions.player`. Le déclencheur doit d’abord se produire, puis le prédicat de joueur est vérifié juste avant l’attribution du critère. ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true ``` `conditions.player` fonctionne avec les déclencheurs d’exécution. Le déclencheur `impossible` ignore les prédicats de joueur, car il ne peut être accordé que manuellement. ## Formats objet et liste [#formats-objet-et-liste] Utilisez un objet unique lorsque vous n’avez besoin que d’un seul prédicat. Toutes les clés de l’objet doivent correspondre. ```yaml conditions: player: type: minecraft:player flags: is_sneaking: true type_specific: type: minecraft:player gamemode: survival ``` Vous pouvez aussi utiliser une liste. Chaque entrée de la liste doit correspondre. C’est utile si vous préférez les wrappers de prédicats au style vanilla. ```yaml conditions: player: - condition: minecraft:entity_properties predicate: flags: is_sneaking: true - condition: minecraft:entity_properties predicate: type_specific: type: minecraft:player gamemode: survival ``` ## Syntaxe des plages [#syntaxe-des-plages] Les valeurs numériques acceptent soit un nombre exact, soit un objet `min`/`max`. ```yaml level: 10 level: min: 10 max: 30 ``` Cette syntaxe est utilisée par le niveau du joueur, le niveau de nourriture, la vitesse de déplacement, la durée des potions, le niveau d’enchantement, la quantité d’objets, la durabilité, le niveau de lumière et d’autres vérifications numériques. ## Vérifications courantes du joueur [#vérifications-courantes-du-joueur] ```yaml conditions: player: flags: is_sneaking: true is_sprinting: false type_specific: type: minecraft:player gamemode: adventure level: min: 10 food: level: min: 16 saturation: min: 4.0 ``` | Clé | Type | Description | | ------------------------------- | --------------- | ----------------------------------------------------------------------------------------------- | | `flags.is_baby` | booléen | Correspond à l’état bébé/adulte lorsque l’entité le prend en charge. | | `flags.is_on_fire` | booléen | Exige que le joueur soit en feu ou ne soit pas en feu. | | `flags.is_sneaking` | booléen | Exige l’état accroupi. | | `flags.is_sprinting` | booléen | Exige l’état de sprint. | | `flags.is_swimming` | booléen | Exige l’état de nage. | | `flags.is_on_ground` | booléen | Exige l’état au sol. | | `flags.is_flying` | booléen | Correspond au vol créatif ou au vol plané. | | `flags.is_fall_flying` | booléen | Exige le vol plané avec des élytres. | | `type_specific.gamemode` | chaîne ou liste | Correspond à un ou plusieurs modes de jeu : `survival`, `creative`, `adventure` ou `spectator`. | | `type_specific.level` | nombre ou plage | Correspond au niveau d’XP du joueur. | | `type_specific.food.level` | nombre ou plage | Correspond au niveau de nourriture. | | `type_specific.food.saturation` | nombre ou plage | Correspond à la saturation. | `gamemode`, `level`, `food`, `advancements`, `recipes`, `stats`, `input` et `looking_at` peuvent aussi être placés directement dans `player`, mais `type_specific` est plus clair et plus proche de la structure des prédicats vanilla. ## Vérifications d’entrées [#vérifications-dentrées] Les prédicats d’entrée peuvent vérifier les entrées de déplacement actuelles du joueur lorsque le serveur expose ces informations. `sneak` et `sprint` utilisent l’état Bukkit du joueur comme fallback lorsque les données d’entrée directes ne sont pas disponibles. ```yaml conditions: player: type_specific: type: minecraft:player input: forward: true jump: true sneak: false sprint: true ``` | Clé | Type | Description | | ---------------- | ------- | -------------------------------------------------- | | `input.forward` | booléen | Exige l’état de la touche avancer. | | `input.backward` | booléen | Exige l’état de la touche reculer. | | `input.left` | booléen | Exige l’état de la touche gauche. | | `input.right` | booléen | Exige l’état de la touche droite. | | `input.jump` | booléen | Exige l’état de la touche saut. | | `input.sneak` | booléen | Exige l’entrée accroupissement ou l’état accroupi. | | `input.sprint` | booléen | Exige l’entrée sprint ou l’état de sprint. | ## Vérifications de position [#vérifications-de-position] ```yaml conditions: player: location: dimension: minecraft:overworld world: world biomes: - minecraft:plains - minecraft:forest position: x: min: 100 max: 200 y: min: 60 z: 0 block: blocks: minecraft:grass_block light: min: 8 can_see_sky: true structures: - minecraft:village_plains - customstructures:ancient_temple ``` | Clé | Type | Description | | ----------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------- | | `location.dimension` / `dimensions` | chaîne ou liste | Correspond à l’environnement du monde, comme `minecraft:overworld`, `minecraft:the_nether` ou `minecraft:the_end`. | | `location.world` | chaîne | Correspond au nom du monde Bukkit. | | `location.biome` / `biomes` | chaîne ou liste | Correspond aux clés de biomes. | | `location.position.x` | nombre ou plage | Correspond à la coordonnée X. | | `location.position.y` | nombre ou plage | Correspond à la coordonnée Y. | | `location.position.z` | nombre ou plage | Correspond à la coordonnée Z. | | `location.block` | prédicat de bloc | Correspond au bloc à la position. | | `location.light` | nombre ou plage | Correspond au niveau de lumière du bloc. | | `location.can_see_sky` | booléen | Exige une visibilité vers le ciel. | | `location.structure` / `structures` | chaîne ou liste | Correspond à une structure vanilla ou à une structure Custom Structures. N'importe quelle entrée peut correspondre. | Les structures vanilla utilisent des clés de registre comme `minecraft:village_plains`. Les structures personnalisées utilisent `customstructures:` (l'alias `custom_structures:` est aussi accepté) et nécessitent ItemsAdderAdditions 1.0.12 ou supérieur avec le plugin Custom Structures. Consultez la [compatibilité Custom Structures](/fr/docs/compatibility/customstructures). ## Prédicats de blocs [#prédicats-de-blocs] Les prédicats de blocs sont utilisés par `location.block`, `stepping_on` et `movement_affected_by`. ```yaml conditions: player: stepping_on: block: blocks: minecraft:stone state: axis: y ``` | Clé | Type | Description | | --------------- | ----------------- | ----------------------------------------------------------------------- | | `block` | chaîne ou section | Raccourci pour un seul bloc ou section complète de prédicat de bloc. | | `blocks` / `id` | chaîne ou liste | IDs de blocs à faire correspondre. | | `state.` | chaîne ou plage | Correspond exactement à une valeur d’état de bloc, ou avec `min`/`max`. | Les tags de blocs personnalisés ItemsAdderAdditions sont résolus en premier. Si aucun tag personnalisé ne correspond, la syntaxe comme `#minecraft:logs` est résolue avec les tags de blocs vanilla. Les tags vanilla correspondent uniquement aux blocs vanilla. ## Prédicats d’objets et d’équipement [#prédicats-dobjets-et-déquipement] Les prédicats d’objets peuvent être utilisés dans `equipment`, `slots` et les prédicats d’entité imbriqués. Ils acceptent les IDs ItemsAdder, les IDs MMOItems, les IDs d’objets vanilla, les tags d’objets vanilla comme `#minecraft:planks`, et les tags personnalisés pris en charge. ```yaml conditions: player: equipment: mainhand: items: my_pack:ruby_sword count: 1 durability: min: 100 components: minecraft:custom_model_data: 123 enchantments: - enchantment: minecraft:sharpness levels: min: 3 ``` | Clé | Type | Description | | ---------------------------------------- | --------------- | -------------------------------------------------------------------------------------------- | | `item` / `items` | chaîne ou liste | IDs d’objets à faire correspondre. Une chaîne simple peut servir de raccourci pour un objet. | | `count` | nombre ou plage | Correspond à la quantité de la pile. | | `durability` | nombre ou plage | Correspond à la durabilité restante. | | `components.minecraft:custom_model_data` | entier | Correspond au custom model data. | | `components.minecraft:custom_name` | chaîne | Correspond au nom d’affichage de l’objet. | | `components.minecraft:damage` | entier | Correspond aux dégâts de l’objet. | | `enchantments[].enchantment` / `id` | chaîne | Clé de l’enchantement. | | `enchantments[].levels` | nombre ou plage | Niveau d’enchantement requis. | Les tags d’objets personnalisés ItemsAdderAdditions sont résolus en premier. Si aucun tag personnalisé ne correspond, les tags d’objets vanilla sont résolus avec le registre d’objets vanilla. Les sections `predicates` des objets ne sont pas encore prises en charge et font échouer le prédicat d’objet de manière fermée au lieu de correspondre accidentellement. ## Emplacements [#emplacements] Utilisez `slots` lorsque vous devez vérifier l’inventaire du joueur au lieu des seuls objets équipés. ```yaml conditions: player: slots: weapon.mainhand: items: minecraft:diamond_sword inventory.0: items: minecraft:apple count: 2 hotbar.2: items: my_pack:ruby_staff ``` | Clé d’emplacement | Description | | ----------------------------------------------- | ------------------------------------------------------------------------- | | `mainhand` ou `weapon.mainhand` | Objet de la main principale. | | `offhand` ou `weapon.offhand` | Objet de la main secondaire. | | `head` ou `armor.head` | Emplacement du casque. | | `chest` ou `armor.chest` | Plastron. | | `legs` ou `armor.legs` | Jambières. | | `feet` ou `armor.feet` | Bottes. | | `*`, `inventory.*`, `container.*` | N’importe quel emplacement de l’inventaire du joueur. | | `hotbar.` | Emplacement de la hotbar, de `0` à `8`. | | `inventory.` ou `inventory.-` | Emplacements de l’inventaire principal, avec un décalage après la hotbar. | | `container.` ou `container.-` | Numéros d’emplacements bruts du conteneur. | ## Effets de potion [#effets-de-potion] ```yaml conditions: player: effects: minecraft:speed: amplifier: min: 1 duration: min: 100 ambient: false visible: true ``` | Clé | Type | Description | | ---------------------------- | --------------- | ------------------------------------------ | | `effects..amplifier` | nombre ou plage | Correspond à l’amplificateur de potion. | | `effects..duration` | nombre ou plage | Correspond à la durée restante en ticks. | | `effects..ambient` | booléen | Correspond au flag ambient. | | `effects..visible` | booléen | Correspond à la visibilité des particules. | ## Progression, recettes et statistiques [#progression-recettes-et-statistiques] ```yaml conditions: player: type_specific: type: minecraft:player advancements: minecraft:story/mine_stone: true my_pack:custom_root: root_trigger: true recipes: minecraft:diamond_sword: true stats: - type: minecraft:custom stat: minecraft:jump value: min: 50 ``` | Clé | Type | Description | | ------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | | `advancements.` | booléen ou section | Exige qu’un autre progrès soit terminé ou non. Une section vérifie des critères nommés. | | `recipes.` | booléen | Exige qu’une recette soit découverte ou non découverte. | | `stats[].type` | chaîne | Groupe de statistiques, comme `minecraft:custom`, `minecraft:mined`, `minecraft:used`, `minecraft:killed` ou `minecraft:killed_by`. | | `stats[].stat` | chaîne | Clé de statistique, clé de matériau ou clé d’entité selon le type de statistique. | | `stats[].value` | nombre ou plage | Valeur de statistique requise. | ## Vérifications d’entités imbriquées [#vérifications-dentités-imbriquées] Le même système de prédicats d’entités peut être utilisé pour les entités liées. ```yaml conditions: player: type_specific: type: minecraft:player looking_at: type: minecraft:zombie distance: absolute: max: 12 vehicle: type: minecraft:horse ``` | Clé | Type | Description | | -------------------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------- | | `passenger` | prédicat d’entité | Correspond à l’un des passagers du joueur. | | `vehicle` | prédicat d’entité | Correspond à l’entité que le joueur chevauche. | | `targeted_entity` | prédicat d’entité | Pour les mobs, correspond à leur cible actuelle. | | `type_specific.looking_at` | prédicat d’entité | Pour les joueurs, correspond à l’entité qu’ils regardent dans un rayon de 100 blocs. | | `distance` | section | Correspond à la distance entre le joueur et l’entité liée. Prend en charge `absolute`, `horizontal`, `x`, `y` et `z`. | ## Autres prédicats spécifiques au type [#autres-prédicats-spécifiques-au-type] Les prédicats d’entité imbriqués peuvent aussi utiliser quelques vérifications propres à certains types d’entités. | Type | Clés | Description | | --------------------------------------------------------------- | ------------------------ | -------------------------------------------------------------------------------------- | | `minecraft:sheep` | `sheared` | Correspond à l’état tondu ou non du mouton. | | `minecraft:slime`, `minecraft:magma_cube`, `minecraft:cube_mob` | `size` | Correspond à la taille du slime avec un nombre ou une plage. | | `minecraft:raider` | `is_captain`, `has_raid` | Correspond à l’état de capitaine de patrouille et à l’état de raid lorsque disponible. | | `minecraft:fishing_hook` | `in_open_water` | Correspond à l’état en eau libre de l’hameçon lorsque disponible. | ## Limitations [#limitations] * Les tags de types d’entités sont acceptés syntaxiquement, mais ne sont pas résolus. Les tags d’objets et de blocs vanilla sont résolus là où les prédicats d’objets/blocs sont pris en charge. * Les sections `components` et `predicates` au niveau de l’entité ne sont pas prises en charge et font échouer le prédicat de manière fermée. * La correspondance NBT est volontairement limitée ; elle ne prend en charge que les vérifications simples de scoreboard tags dans une chaîne `nbt`. # Déclencheurs (/fr/docs/advancements/triggers) Les déclencheurs définissent ce que le joueur doit faire pour terminer un critère. Chaque critère a un déclencheur et un bloc `conditions` optionnel. ```yaml criteria: : trigger: conditions: # options spécifiques au déclencheur ``` Un progrès peut avoir plusieurs critères. Tous doivent être terminés avant que le progrès soit accordé. Chaque déclencheur d’exécution prend aussi en charge un prédicat `conditions.player` optionnel pour ajouter des exigences liées à l’état du joueur ; voir [Prédicats de joueur](/fr/docs/advancements/player-predicates). Les conditions d’objets acceptent les IDs ItemsAdder, MMOItems, vanilla, les tags vanilla et les tags personnalisés pris en charge. Les conditions de blocs, meubles et recettes peuvent aussi utiliser les tags personnalisés lorsque le déclencheur les accepte. ## obtain\_item [#obtain_item] Se déclenche lorsque le joueur ramasse un objet du sol. ```yaml criteria: get_sword: trigger: obtain_item conditions: items: - my_pack:ruby_sword - my_pack:iron_sword amount: 1 ``` | Clé | Type | Par défaut | Description | | -------- | ---------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------- | | `items` | liste de chaînes | `[]` | IDs d’objets ou tags d’objets vanilla (IA, MMOItems, vanilla ou `#minecraft:tag`). Toute correspondance déclenche le critère. | | `amount` | entier | `1` | Taille minimale de pile que le joueur doit ramasser à la fois. | *** ## consume\_item [#consume_item] Se déclenche lorsque le joueur termine de manger ou de boire un objet. ```yaml criteria: eat_ruby_apple: trigger: consume_item conditions: item: my_pack:ruby_apple ``` | Clé | Type | Requis | Description | | ------ | ------ | ------ | ------------------------------------------------------------------------------ | | `item` | chaîne | Oui | ID d’objet ou tag d’objet vanilla (IA, MMOItems, vanilla ou `#minecraft:tag`). | *** ## using\_item [#using_item] Se déclenche lorsque le joueur fait un clic droit (dans l'air ou sur un bloc) en tenant un objet personnalisé dans sa main principale. ```yaml criteria: use_staff: trigger: using_item conditions: item: my_pack:ruby_staff ``` | Clé | Type | Requis | Description | | ------ | ------ | ------ | ------------------------------------------------------------------------------ | | `item` | chaîne | Oui | ID d’objet ou tag d’objet vanilla (IA, MMOItems, vanilla ou `#minecraft:tag`). | *** ## place\_block [#place_block] Se déclenche lorsque le joueur place un bloc ItemsAdder personnalisé ou un bloc vanilla. ```yaml criteria: place_ruby_ore: trigger: place_block conditions: block: my_pack:ruby_ore ``` | Clé | Type | Requis | Description | | ------- | ------ | ------ | ----------------------------------------------------------------------------------------- | | `block` | chaîne | oui | ID de bloc ItemsAdder, ID de bloc vanilla ou tag de bloc vanilla comme `#minecraft:logs`. | *** ## break\_block [#break_block] Se déclenche lorsque le joueur casse un bloc ItemsAdder personnalisé ou un bloc vanilla. ```yaml criteria: mine_ruby_ore: trigger: break_block conditions: block: my_pack:ruby_ore ``` | Clé | Type | Requis | Description | | ------- | ------ | ------ | ----------------------------------------------------------------------------------------- | | `block` | chaîne | oui | ID de bloc ItemsAdder, ID de bloc vanilla ou tag de bloc vanilla comme `#minecraft:logs`. | *** ## place\_furniture [#place_furniture] Se déclenche lorsque le joueur place un objet de meuble personnalisé. ```yaml criteria: place_lamp: trigger: place_furniture conditions: furniture: my_pack:ruby_lamp ``` | Clé | Type | Requis | Description | | ----------- | ------ | ------ | ----------------------------------------- | | `furniture` | chaîne | oui | ID de meuble ItemsAdder (`namespace:id`). | *** ## break\_furniture [#break_furniture] Se déclenche lorsque le joueur casse un objet de meuble personnalisé. ```yaml criteria: break_lamp: trigger: break_furniture conditions: furniture: my_pack:ruby_lamp ``` | Clé | Type | Requis | Description | | ----------- | ------ | ------ | ----------------------------------------- | | `furniture` | chaîne | oui | ID de meuble ItemsAdder (`namespace:id`). | *** ## interact\_furniture [#interact_furniture] Se déclenche lorsque le joueur fait un clic droit sur un objet de meuble personnalisé. ```yaml criteria: use_workbench: trigger: interact_furniture conditions: furniture: my_pack:ruby_workbench ``` | Clé | Type | Requis | Description | | ----------- | ------ | ------ | ----------------------------------------- | | `furniture` | chaîne | oui | ID de meuble ItemsAdder (`namespace:id`). | *** ## craft\_recipe [#craft_recipe] Se déclenche lorsque le joueur fabrique un objet à l'aide d’une recette IAA spécifique. ```yaml criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe ``` | Clé | Type | Requis | Description | | -------- | ------ | ------ | -------------------------------------------------------------------------------------------- | | `recipe` | chaîne | oui | Clé de recette comme `namespace:id` ou un `id` simple (utilise l’espace de noms du fichier). | *** ## kill\_entity\_with\_item [#kill_entity_with_item] Se déclenche lorsque le joueur tue une entité tout en tenant un objet spécifique dans sa main principale. ```yaml criteria: slay_zombie: trigger: kill_entity_with_item conditions: item: my_pack:ruby_sword entity_type: minecraft:zombie # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ---------------------------------------------------------------------------------------------- | | `item` | chaîne | *(requis)* | ID d’objet ou tag d’objet vanilla que le joueur doit tenir. | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille (par ex. `minecraft:zombie`). Si omis, toute entité correspondra. | *** ## player\_hurt\_entity [#player_hurt_entity] Se déclenche lorsque le joueur inflige des dégâts à une entité. Contrairement à `kill_entity_with_item`, cela se déclenche à chaque coup, pas seulement le coup fatal. ```yaml criteria: hit_zombie: trigger: player_hurt_entity conditions: item: my_pack:ruby_sword # optionnel entity_type: minecraft:zombie # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | -------------------------------------------------------------------------------------- | | `item` | chaîne | *(n’importe quel)* | ID d’objet que le joueur doit tenir. Si omis, tout objet (ou mains nues) correspondra. | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, toute entité correspondra. | *** ## entity\_hurt\_player [#entity_hurt_player] Se déclenche lorsqu’une entité inflige des dégâts au joueur. ```yaml criteria: hurt_by_zombie: trigger: entity_hurt_player conditions: entity_type: minecraft:zombie # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ------------------------------------------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, tout attaquant correspondra. | *** ## player\_killed\_entity [#player_killed_entity] Se déclenche lorsque le joueur tue une entité (indépendamment de l'arme utilisée). ```yaml criteria: kill_creeper: trigger: player_killed_entity conditions: entity_type: minecraft:creeper # optionnel item: my_pack:ruby_sword # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ---------------------------------------------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, toute entité correspondra. | | `item` | chaîne | *(n’importe quel)* | ID d’objet que le joueur doit tenir. Si omis, tout objet correspondra. | *** ## entity\_killed\_player [#entity_killed_player] Se déclenche lorsque le joueur est tué par une entité non-joueur (les morts par projectile se résolvent au tireur). ```yaml criteria: killed_by_skeleton: trigger: entity_killed_player conditions: entity_type: minecraft:skeleton # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | -------------------------------------------------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille du tueur. Si omis, toute entité correspondra. | *** ## killed\_by\_arrow [#killed_by_arrow] Se déclenche lorsque le joueur est tué par une flèche. Le type d'entité correspond au tireur de la flèche, ou à la flèche elle-même si elle n'avait pas de tireur. ```yaml criteria: shot_by_skeleton: trigger: killed_by_arrow conditions: entity_type: minecraft:skeleton # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ------------------------------------------------------------------------------------------------ | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille du tireur. Si omis, n’importe quelle source de flèche correspondra. | *** ## tame\_animal [#tame_animal] Se déclenche lorsque le joueur apprivoise un animal. ```yaml criteria: tame_wolf: trigger: tame_animal conditions: entity_type: minecraft:wolf # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ------------------------------------------------------------------------------ | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, tout animal apprivoisable correspondra. | *** ## bred\_animals [#bred_animals] Se déclenche lorsque le joueur élève deux animaux. ```yaml criteria: breed_cows: trigger: bred_animals conditions: entity_type: minecraft:cow # optionnel, type de la progéniture parent_type: minecraft:cow # optionnel partner_type: minecraft:cow # optionnel ``` | Clé | Type | Par défaut | Description | | -------------- | ------ | ------------------ | -------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Type d'entité de la progéniture. | | `parent_type` | chaîne | *(n’importe quel)* | Type d'entité de la mère. | | `partner_type` | chaîne | *(n’importe quel)* | Type d'entité du père. | *** ## villager\_trade [#villager_trade] Se déclenche lorsque le joueur complète un commerce avec un villageois. ```yaml criteria: buy_diamond: trigger: villager_trade conditions: item: minecraft:diamond # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | ------------------------------------------------------------------------ | | `item` | chaîne | *(n’importe quel)* | ID d’objet du résultat du commerce. Si omis, tout commerce correspondra. | *** ## enchanted\_item [#enchanted_item] Se déclenche lorsque le joueur enchante un objet à une table d'enchantement. ```yaml criteria: enchant_ruby_sword: trigger: enchanted_item conditions: item: my_pack:ruby_sword # optionnel min_levels: 10 # optionnel max_levels: 30 # optionnel ``` | Clé | Type | Par défaut | Description | | ------------ | ------ | ------------------ | ------------------------------------------------------------ | | `item` | chaîne | *(n’importe quel)* | ID d’objet. Si omis, tout objet étant enchanté correspondra. | | `min_levels` | entier | `0` | Coût minimum du niveau XP de l'enchantement. | | `max_levels` | entier | *(illimité)* | Coût maximum du niveau XP de l'enchantement. | *** ## shoot\_bow [#shoot_bow] Se déclenche lorsque le joueur tire un projectile d’un arc. ```yaml criteria: shoot_ruby_bow: trigger: shoot_bow conditions: item: my_pack:ruby_bow # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | -------------------------------------------------------------- | | `item` | chaîne | *(n’importe quel)* | ID d’objet de l'arc. Si omis, n’importe quel arc correspondra. | *** ## shot\_crossbow [#shot_crossbow] Se déclenche lorsque le joueur tire un projectile d’une arbalète. ```yaml criteria: shoot_crossbow: trigger: shot_crossbow conditions: item: my_pack:ruby_crossbow # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | -------------------------------------------------------------------------- | | `item` | chaîne | *(n’importe quel)* | ID d’objet de l'arbalète. Si omis, n’importe quelle arbalète correspondra. | *** ## fishing\_rod\_hooked [#fishing_rod_hooked] Se déclenche lorsque le joueur remonte un poisson ou accroche une entité. ```yaml criteria: hook_fish: trigger: fishing_rod_hooked conditions: rod: my_pack:ruby_rod # optionnel caught_entity_type: minecraft:cod # optionnel ``` | Clé | Type | Par défaut | Description | | -------------------- | ------ | ------------------ | ------------------------------------------------------------------------------------- | | `rod` | chaîne | *(n’importe quel)* | ID d’objet de la canne à pêche. Si omis, n’importe quelle canne correspondra. | | `caught_entity_type` | chaîne | *(n’importe quel)* | Type d'entité de ce qui a été accroché. Si omis, n’importe quel poisson correspondra. | *** ## filled\_bucket [#filled_bucket] Se déclenche lorsque le joueur remplit un seau avec un liquide. ```yaml criteria: fill_lava: trigger: filled_bucket conditions: item: minecraft:lava_bucket # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | ------------------------------------------------------------------------------- | | `item` | chaîne | *(n’importe quel)* | ID d’objet du seau résultant. Si omis, n’importe quel seau rempli correspondra. | *** ## item\_durability\_changed [#item_durability_changed] Se déclenche lorsqu’un objet dans la main du joueur subit des dégâts de durabilité. ```yaml criteria: damage_ruby_sword: trigger: item_durability_changed conditions: item: my_pack:ruby_sword # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | ---------------------------------------------------------------------------- | | `item` | chaîne | *(n’importe quel)* | ID d’objet de l’objet endommagé. Si omis, n’importe quel objet correspondra. | *** ## item\_used\_on\_block [#item_used_on_block] Se déclenche lorsque le joueur fait un clic droit sur un bloc avec un objet dans sa main principale. ```yaml criteria: use_on_crafting_table: trigger: item_used_on_block conditions: item: my_pack:ruby_wand # optionnel block: minecraft:crafting_table # optionnel ``` | Clé | Type | Par défaut | Description | | ------- | ------ | ------------------ | ------------------------------------ | | `item` | chaîne | *(n’importe quel)* | ID d’objet que le joueur doit tenir. | | `block` | chaîne | *(n’importe quel)* | Clé de type de bloc vanille. | *** ## recipe\_crafted [#recipe_crafted] Se déclenche lorsque le joueur fabrique un objet à l'aide du système de fabrication vanille. ```yaml criteria: craft_diamond_sword: trigger: recipe_crafted conditions: recipe: minecraft:diamond_sword # optionnel ``` | Clé | Type | Par défaut | Description | | -------- | ------ | ------------------ | -------------------------------------------------------------------------------------------------- | | `recipe` | chaîne | *(n’importe quel)* | Clé de recette comme `namespace:id`. Si omis, n’importe quelle action de fabrication correspondra. | *** ## recipe\_unlocked [#recipe_unlocked] Se déclenche lorsque le joueur découvre une nouvelle recette. ```yaml criteria: unlock_diamond_sword: trigger: recipe_unlocked conditions: recipe: minecraft:diamond_sword ``` | Clé | Type | Requis | Description | | -------- | ------ | ------ | ------------------------------------ | | `recipe` | chaîne | oui | Clé de recette comme `namespace:id`. | *** ## player\_interacted\_with\_entity [#player_interacted_with_entity] Se déclenche lorsque le joueur fait un clic droit sur une entité avec sa main principale. ```yaml criteria: name_a_villager: trigger: player_interacted_with_entity conditions: entity_type: minecraft:villager # optionnel item: minecraft:name_tag # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ------------------------------------------------------------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, toute entité correspondra. | | `item` | chaîne | *(n’importe quel)* | ID d’objet que le joueur doit tenir. Si omis, tout objet (ou main vide) correspondra. | *** ## player\_sheared\_equipment [#player_sheared_equipment] Se déclenche lorsque le joueur cisaille une entité. ```yaml criteria: shear_sheep: trigger: player_sheared_equipment conditions: entity_type: minecraft:sheep # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ----------------------------------------------------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, toute entité cisaillable correspondra. | *** ## bee\_nest\_destroyed [#bee_nest_destroyed] Se déclenche lorsque le joueur casse une ruche ou un nid d'abeilles. ```yaml criteria: break_beehive: trigger: bee_nest_destroyed conditions: block: minecraft:beehive # optionnel ``` | Clé | Type | Par défaut | Description | | ------- | ------ | ------------------ | ---------------------------------------------------------------------------------------------------------- | | `block` | chaîne | *(n’importe quel)* | Clé de type de bloc (`minecraft:beehive` ou `minecraft:bee_nest`). Si omis, l'une ou l'autre correspondra. | *** ## started\_riding [#started_riding] Se déclenche lorsque le joueur monte une entité. ```yaml criteria: ride_horse: trigger: started_riding conditions: entity_type: minecraft:horse # optionnel ``` | Clé | Type | Par défaut | Description | | ------------- | ------ | ------------------ | ----------------------------------------------------------------------------- | | `entity_type` | chaîne | *(n’importe quel)* | Clé de type d'entité vanille. Si omis, n’importe quelle monture correspondra. | *** ## effects\_changed [#effects_changed] Se déclenche lorsque le joueur gagne ou a un effet de potion modifié. ```yaml criteria: get_speed: trigger: effects_changed conditions: effect: minecraft:speed # optionnel ``` | Clé | Type | Par défaut | Description | | -------- | ------ | ------------------ | ---------------------------------------------------------------------------------------------------------------- | | `effect` | chaîne | *(n’importe quel)* | Clé d'effet de potion (par ex. `minecraft:speed`). Si omis, toute addition ou modification d'effet correspondra. | *** ## changed\_dimension [#changed_dimension] Se déclenche lorsque le joueur se déplace vers une dimension différente. ```yaml criteria: enter_nether: trigger: changed_dimension conditions: to: minecraft:the_nether # optionnel from: minecraft:overworld # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | ----------------------------------------------------------------------------------- | | `to` | chaîne | *(n’importe quel)* | Clé de dimension vers laquelle le joueur a voyagé (par ex. `minecraft:the_nether`). | | `from` | chaîne | *(n’importe quel)* | Clé de dimension d'où le joueur a voyagé. | *** ## slept\_in\_bed [#slept_in_bed] Se déclenche lorsque le joueur entre avec progrès dans un lit. Pas de conditions. ```yaml criteria: first_sleep: trigger: slept_in_bed ``` *** ## used\_totem [#used_totem] Se déclenche lorsque le joueur est sauvé de la mort par un totem d'immortalité. Pas de conditions. ```yaml criteria: totem_pop: trigger: used_totem ``` *** ## fall\_from\_height [#fall_from_height] Se déclenche lorsque le joueur subit des dégâts de chute. ```yaml criteria: survived_fall: trigger: fall_from_height conditions: distance: y: min: 30 max: 320 ``` Vous pouvez aussi utiliser un nombre unique comme distance de chute minimale : ```yaml criteria: small_fall: trigger: fall_from_height conditions: distance: 8 ``` | Clé | Type | Défaut | Description | | --------------------- | ----------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `distance` | number ou section | `0` à illimité | Plage de distance de chute. Un nombre indique une distance minimale. Une section peut utiliser `min`/`max`, ou une plage imbriquée `y`, `absolute` ou `horizontal`. | | `distance.min` | number | `0` | Distance de chute minimale. | | `distance.max` | number | *(illimité)* | Distance de chute maximale. | | `distance.y` | section | *(aucun)* | Forme recommandée pour la plage verticale de distance de chute. Prend en charge `min` et `max`. | | `distance.absolute` | section | *(aucun)* | Forme de plage alternative. Prend en charge `min` et `max`. | | `distance.horizontal` | section | *(aucun)* | Forme de plage alternative. Prend en charge `min` et `max`. | *** ## used\_ender\_eye [#used_ender_eye] Se déclenche lorsque le joueur lance un œil d'ender. Pas de conditions. ```yaml criteria: use_ender_eye: trigger: used_ender_eye ``` *** ## held\_item [#held_item] Déclencheur personnalisé IAA. Se déclenche lorsque le joueur fait défiler jusqu’à un emplacement de barre d'accès rapide qui contient un objet spécifique. ```yaml criteria: equip_ruby_sword: trigger: held_item conditions: item: my_pack:ruby_sword # optionnel ``` | Clé | Type | Par défaut | Description | | ------ | ------ | ------------------ | ----------------------------------------------------------------------------- | | `item` | chaîne | *(n’importe quel)* | ID d’objet. Si omis, n’importe quel objet vers lequel on défile correspondra. | *** ## permission [#permission] Se déclenche lorsque le joueur se connecte tout en ayant le nœud de permission spécifié. ```yaml criteria: has_vip: trigger: permission conditions: permission: "myserver.rank.vip" ``` | Clé | Type | Requis | Description | | ------------ | ------ | ------ | ------------------------------------------------------------------------------------ | | `permission` | chaîne | oui | Nœud de permission. Vérifié à chaque connexion ; se déclenche dès que le joueur l'a. | *** ## in\_biome [#in_biome] Se déclenche lorsque le joueur entre dans un biome spécifique. ```yaml criteria: visit_jungle: trigger: in_biome conditions: biome: minecraft:jungle world: world # optionnel ``` | Clé | Type | Par défaut | Description | | ------- | ------ | ------------------ | ------------------------------------------------------------------ | | `biome` | chaîne | *(requis)* | Clé de biome comme `namespace:id` (par ex. `minecraft:deep_dark`). | | `world` | chaîne | *(n’importe quel)* | Nom du monde pour limiter la vérification à un seul monde. | *** ## enter\_region [#enter_region] Se déclenche lorsqu'un joueur se déplace ou se téléporte de l'extérieur vers l'intérieur d'une région WorldGuard. **Versions requises :** Nécessite **ItemsAdderAdditions 1.0.12 ou supérieur** et WorldGuard. ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # optionnel ``` | Clé | Type | Par défaut | Description | | -------- | ------ | ------------------ | ----------------------------------------------------------------- | | `region` | chaîne | *(requis)* | ID de région WorldGuard. La casse est ignorée. | | `world` | chaîne | *(n'importe quel)* | Nom du monde Bukkit pour limiter la vérification à un seul monde. | Le critère ne se déclenche qu'au franchissement de la limite de la région. Se déplacer à l'intérieur de celle-ci ne le déclenche pas à nouveau. Ce déclencheur est indépendant des options de flags WorldGuard d'ItemsAdderAdditions. Consultez la [compatibilité WorldGuard](/fr/docs/compatibility/worldguard) pour l'installation et le dépannage. *** ## sit\_furniture [#sit_furniture] Se déclenche lorsque le joueur s'assoit sur un meuble ItemsAdder. **Version requise :** Nécessite **ItemsAdder 4.0.17 ou supérieur**. ```yaml criteria: sit_on_chair: trigger: sit_furniture conditions: furniture: my_pack:ruby_chair ``` | Clé | Type | Requis | Description | | ----------- | ------ | ------ | --------------------------------------------------------------------- | | `furniture` | chaîne | oui | ID de meuble ItemsAdder ou tag personnalisé de meuble pris en charge. | *** ## unsit\_furniture [#unsit_furniture] Se déclenche lorsque le joueur arrête d'être assis sur un meuble ItemsAdder. **Version requise :** Nécessite **ItemsAdder 4.0.17 ou supérieur**. ```yaml criteria: leave_chair: trigger: unsit_furniture conditions: furniture: my_pack:ruby_chair ``` | Clé | Type | Requis | Description | | ----------- | ------ | ------ | --------------------------------------------------------------------- | | `furniture` | chaîne | oui | ID de meuble ItemsAdder ou tag personnalisé de meuble pris en charge. | *** ## open\_trade\_machine [#open_trade_machine] Se déclenche lorsque le joueur ouvre une interface ItemsAdder `trade_machine` ou `block_trade_machine`. ```yaml criteria: open_alchemy_station: trigger: open_trade_machine conditions: trade_machine: stations:alchemy_table ``` | Clé | Type | Requis | Description | | --------------- | ------ | ------ | --------------------------------------------------------------------- | | `trade_machine` | chaîne | oui | ID de machine d'échange ou tag personnalisé de meuble pris en charge. | *** ## start\_emote [#start_emote] Se déclenche lorsque le joueur démarre une emote ItemsAdder. ```yaml criteria: start_wave: trigger: start_emote conditions: emote: my_pack:wave ``` | Clé | Type | Par défaut | Description | | ------- | ------ | ---------------------- | --------------------------------------------------------- | | `emote` | chaîne | *(n'importe laquelle)* | ID d'emote. Si absent, n'importe quelle emote correspond. | *** ## stop\_emote [#stop_emote] Se déclenche lorsque le joueur arrête une emote ItemsAdder. ```yaml criteria: stop_wave: trigger: stop_emote conditions: emote: my_pack:wave ``` | Clé | Type | Par défaut | Description | | ------- | ------ | ---------------------- | --------------------------------------------------------------- | | `emote` | chaîne | *(n'importe laquelle)* | ID d'emote. Si absent, n'importe quel arrêt d'emote correspond. | *** ## join\_server [#join_server] Se déclenche à chaque connexion du joueur. Aucune condition. ```yaml criteria: joined: trigger: join_server ``` *** ## first\_join [#first_join] Se déclenche à la première connexion du joueur selon le contrôle Bukkit `hasPlayedBefore`. Aucune condition. ```yaml criteria: first_join: trigger: first_join ``` *** ## tick [#tick] Se déclenche une fois par tick serveur pour chaque joueur connecté. Utilisez `conditions.player` pour limiter le critère. ```yaml criteria: sneaking_tick: trigger: tick conditions: player: flags: is_sneaking: true ``` *** ## impossible [#impossible] Ne se déclenche jamais d'elle-même. ```yaml criteria: manual: trigger: impossible ``` Pas d'options `conditions`. # Lit (/fr/docs/behaviours/bed) Transforme n’importe quel meuble personnalisé en lit fonctionnel. Prend en charge plusieurs emplacements de couchage sur une même pièce, permettant à un lit double d'accueillir deux joueurs simultanément. Fonctionne avec les **meubles personnalisés** et les **meubles complexes**. ## Configuration [#configuration] ```yaml behaviours: bed: slots: - "0,0,0" # obligatoire - au moins un emplacement - "1,0,0" # second emplacement, ex. pour un lit double ``` Chaque entrée dans `slots` est un décalage entier `"dx,dy,dz"` relatif au bloc de base du meuble. Les axes de décalage suivent la **direction propre du meuble**, pas les axes du monde : | Axe | Signification | | ---- | ------------------------------------------------ | | `dx` | Avant / arrière selon la direction du meuble | | `dy` | Haut / bas | | `dz` | Gauche / droite (perpendiculaire à la direction) | Cela signifie que `"1,0,0"` correspond toujours à un bloc devant la base, quelle que soit la direction dans laquelle le meuble a été placé. ### Emplacement unique (par défaut) [#emplacement-unique-par-défaut] ```yaml behaviours: bed: slots: - "0,0,0" ``` Omettre `slots` entièrement revient à utiliser un seul emplacement en `0,0,0`. ### Lit double (deux emplacements côte à côte) [#lit-double-deux-emplacements-côte-à-côte] ```yaml behaviours: bed: slots: - "0,0,0" - "0,0,1" ``` `dz: 1` place le second emplacement un bloc à droite de la base en faisant face au meuble. ### Lit double (deux emplacements l'un devant l'autre) [#lit-double-deux-emplacements-lun-devant-lautre] ```yaml behaviours: bed: slots: - "0,0,0" - "1,0,0" ``` `dx: 1` place le second emplacement un bloc devant la base. ## Comportement [#comportement] * Un clic droit sur le meuble (ou ses blocs barrière) tente de faire dormir le joueur dans le prochain emplacement disponible. * Si tous les emplacements sont occupés, le joueur voit le message **"Ce lit est occupé"** dans la barre d’action. * Un bloc de lit vanilla temporaire est placé à l'emplacement pour que le mécanisme de sommeil Minecraft fonctionne. Il est retiré lorsque le joueur se réveille, se déconnecte ou que le meuble est cassé. * Casser le meuble réveille les joueurs endormis. * S'accroupir en cliquant droit est ignoré pour que les joueurs puissent interagir normalement en se baissant. Exemple de lit ## Pages associées [#pages-associées] * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # Connectable (/fr/docs/behaviours/connectable) ```yaml behaviours: connectable: type: stair # Optionnel (valeur par défaut : stair) ``` ```yaml behaviours: connectable: type: stair # Optionnel (valeur par défaut : stair) default: connectable_furniture straight: connectable_furniture_straight left: connectable_furniture_left right: connectable_furniture_right outer: connectable_furniture_outer inner: connectable_furniture_inner ``` Exemple de type escalier connectable ```yaml behaviours: connectable: type: table ``` ```yaml behaviours: connectable: type: table default: connectable_furniture straight: connectable_furniture_straight middle: connectable_furniture_middle border: connectable_furniture_border corner: connectable_furniture_corner end: connectable_furniture_end ``` Exemple de type table connectable Les ID doivent être des meubles personnalisés. ## Résolution automatique des ID [#résolution-automatique-des-id] Tous les ID de type de meuble sont optionnels. Si non spécifiés, le plugin recherche automatiquement les ID de meubles correspondants : * `default` hérite de l’ID du meuble sur lequel le comportement est configuré. * Chaque autre type utilise `_`. Par exemple, si le comportement est configuré sur un meuble nommé `connectable_furniture` : ### Résolution automatique pour le type escalier [#résolution-automatique-pour-le-type-escalier] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `left` → `connectable_furniture_left` * `right` → `connectable_furniture_right` * `outer` → `connectable_furniture_outer` * `inner` → `connectable_furniture_inner` ### Résolution automatique pour le type table [#résolution-automatique-pour-le-type-table] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `middle` → `connectable_furniture_middle` * `border` → `connectable_furniture_border` * `corner` → `connectable_furniture_corner` * `end` → `connectable_furniture_end` ## Configuration minimale [#configuration-minimale] ```yaml behaviours: connectable: type: stair # ou table ``` Dans la plupart des cas, il suffit de définir le type ; la résolution automatique des ID s’occupe du reste. # Effet au contact (/fr/docs/behaviours/contact-effect) Applique des effets aux joueurs pendant qu'ils touchent ou se tiennent sur un bloc, un meuble ou un meuble complexe personnalisé. Quatre groupes d'effets sont disponibles, tous optionnels. Combinez-en autant que vous voulez sur le même objet. | Groupe | Effet | | ---------------- | --------------------------------------------------------------------- | | `damage` | Blesse le joueur sur un intervalle (un montant négatif soigne) | | `heal` | Soigne le joueur sur un intervalle (un montant négatif blesse) | | `potion_effects` | Réapplique une liste d'effets de potion pendant le contact | | `attributes` | Applique des modificateurs d'attributs temporaires pendant le contact | ## Configuration [#configuration] ```yaml behaviours: contact_effect: damage: amount: 1.0 interval: 20 # optionnel, défaut : 20 ticks cause: CACTUS # optionnel, défaut : CACTUS fire_duration: 0 # optionnel, défaut : 0 ticks ``` ```yaml behaviours: contact_effect: heal: amount: 1.0 interval: 20 # optionnel, défaut : 20 ticks ``` ```yaml behaviours: contact_effect: potion_effects: - type: POISON duration: 80 # optionnel, défaut : 40 ticks amplifier: 0 # optionnel, défaut : 0 (0 = niveau 1) ambient: false # optionnel, défaut : false particles: true # optionnel, défaut : true icon: true # optionnel, défaut : true interval: 20 # optionnel, défaut : 20 ticks - type: SLOWNESS duration: 80 ``` ```yaml behaviours: contact_effect: attributes: - attribute: MOVEMENT_SPEED amount: 0.05 operation: ADD_NUMBER # optionnel, défaut : ADD_NUMBER - attribute: STEP_HEIGHT amount: 0.5 ``` ```yaml behaviours: contact_effect: apply_when_sneaking: true # optionnel, défaut : true block_faces: # optionnel top: true # optionnel, défaut : true north: true # optionnel, défaut : true south: true # optionnel, défaut : true west: true # optionnel, défaut : true east: true # optionnel, défaut : true damage: amount: 1.0 interval: 40 cause: CACTUS heal: amount: 0.5 interval: 20 potion_effects: - type: SPEED amplifier: 1 duration: 60 interval: 10 attributes: - attribute: STEP_HEIGHT amount: 0.5 operation: ADD_NUMBER ``` ## Dégâts [#dégâts] | Clé | Type | Défaut | Description | | --------------- | ------ | -------- | ----------------------------------------------------------------- | | `amount` | Double | - | Demi-cœurs de dégâts. Une valeur négative soigne à la place. | | `interval` | Int | `20` | Ticks entre chaque application. | | `cause` | String | `CACTUS` | Le type de dégâts, pour que d'autres plugins détectent la raison. | | `fire_duration` | Int | `0` | Ticks pendant lesquels le joueur prend feu lorsqu'il est blessé. | Pour `cause`, utilisez une valeur depuis [DamageType](https://jd.papermc.io/paper/org/bukkit/damage/DamageType.html#field-summary) (insensible à la casse, par exemple `CACTUS`, `LAVA`, `MAGIC`). Une valeur inconnue affiche un avertissement et retombe sur `CACTUS`. Un `amount` négatif soigne le joueur au lieu de le blesser, sans dépasser sa santé maximale. ## Soin [#soin] | Clé | Type | Défaut | Description | | ---------- | ------ | ------ | ------------------------------------------------------------- | | `amount` | Double | - | Demi-cœurs à soigner. Une valeur négative inflige des dégâts. | | `interval` | Int | `20` | Ticks entre chaque application. | Le soin ne dépasse jamais la santé maximale du joueur. Un `amount` négatif inflige des dégâts via le type de dégâts `CACTUS`. ## Effets de potion [#effets-de-potion] `potion_effects` est une liste. Chaque entrée est réappliquée tant que le joueur reste en contact. | Clé | Type | Défaut | Description | | ----------- | ------- | ------- | ---------------------------------- | | `type` | String | - | Requis. Le type d'effet de potion. | | `duration` | Int | `40` | Durée de l'effet en ticks. | | `amplifier` | Int | `0` | Niveau de l'effet (0 = niveau 1). | | `ambient` | Boolean | `false` | Si l'effet est ambiant. | | `particles` | Boolean | `true` | Si les particules sont affichées. | | `icon` | Boolean | `true` | Si l'icône de l'ATH est affichée. | | `interval` | Int | `20` | Ticks entre chaque réapplication. | Pour `type`, utilisez une valeur depuis [PotionEffectType](https://jd.papermc.io/paper/org/bukkit/potion/PotionEffectType.html#field-summary). Un type inconnu affiche un avertissement et seule cette entrée est ignorée. ## Attributs [#attributs] `attributes` est une liste de modificateurs d'attributs temporaires appliqués pendant que le joueur est en contact et retirés dès qu'il s'en va. | Clé | Type | Défaut | Description | | ----------- | ------ | ------------ | ----------------------------------- | | `attribute` | String | - | Requis. L'attribut à modifier. | | `amount` | Double | - | Requis. Le montant du modificateur. | | `operation` | String | `ADD_NUMBER` | Comment le montant est appliqué. | Pour `attribute`, utilisez une valeur depuis [Attribute](https://jd.papermc.io/paper/org/bukkit/attribute/Attribute.html#field-summary). Les anciens préfixes `GENERIC_` et `PLAYER_` sont aussi acceptés (par exemple `GENERIC_MOVEMENT_SPEED` correspond à `MOVEMENT_SPEED`). Valeurs `operation` valides depuis [AttributeModifier.Operation](https://jd.papermc.io/paper/org/bukkit/attribute/AttributeModifier.Operation.html) : `ADD_NUMBER`, `ADD_SCALAR`, `MULTIPLY_SCALAR_1`. Les modificateurs d'attributs sont temporaires. Ils sont retirés automatiquement quand le joueur quitte le bloc, se déconnecte, ou quand le plugin se recharge ou s'arrête. Un attribut, un montant ou une opération inconnu affiche un avertissement et seule cette entrée est ignorée. ## Vérification du contact [#vérification-du-contact] Le contact est vérifié au plus petit intervalle requis par un effet basé sur un intervalle (`damage`, `heal`, et chaque entrée `potion_effects`). Chaque effet conserve son propre délai de recharge, donc les différents intervalles restent indépendants. Si des `attributes` sont configurés, le contact est vérifié à chaque tick afin que les modificateurs soient retirés rapidement lorsque le joueur quitte le bloc. ## Options partagées [#options-partagées] | Clé | Type | Défaut | Description | | --------------------- | ------- | --------- | ------------------------------------------------------------------------------- | | `apply_when_sneaking` | Boolean | `true` | Si les effets s'appliquent quand le joueur est accroupi. | | `block_faces` | Section | toutes on | Quelles faces comptent comme contact (`top`, `north`, `south`, `west`, `east`). | ## Pages associées [#pages-associées] * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # Empilable (/fr/docs/behaviours/stackable) ```yaml behaviours: stackable: - my_block_2 - my_block_3 - my_block_4 ``` ```yaml behaviours: stackable: blocks: - my_block_2 - my_block_3 - my_block_4 items: # optionnel, par défaut l’objet sur lequel ce comportement est défini - my_item - BONE_MEAL sound: # optionnel name: entity.villager.ambient # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master decrement_amount: 2 # optionnel, défaut : 1 ``` Pour `name`, utilisez une valeur dans [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) ou un son personnalisé avec `namespace:value`. ```yaml behaviours: stackable: first_step: block: my_block_2 items: # optionnel, par défaut l’objet sur lequel ce comportement est défini - my_item - BONE_MEAL sound: # optionnel name: entity.villager.ambient # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master decrement_amount: 2 # optionnel, défaut : 1 another_step: ... ``` Pour `name`, utilisez une valeur dans [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) ou un son personnalisé avec `namespace:value`. Les IDs de blocs doivent être des blocs personnalisés. Types pris en charge : `REAL`, `REAL_NOTE`, `REAL_TRANSPARENT` et `REAL_WIRE`. `items` peut contenir des IDs d'objets concrets ou des tags d'objets pris en charge. Voir [IDs](/fr/docs/compatibility/ids). Vous pouvez ajouter autant d'étapes que nécessaire. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # Stockage (/fr/docs/behaviours/storage) Transforme n’importe quel bloc ou meuble personnalisé en conteneur de stockage. Trois modes sont disponibles. | Type | Comportement | | ---------- | ----------------------------------------------------------------------------------- | | `STORAGE` | Conteneur partagé - tous les joueurs voient le même inventaire | | `SHULKER` | Le contenu voyage dans l’objet quand il est cassé et est restauré lors de la repose | | `DISPOSAL` | Poubelle - le contenu est supprimé silencieusement à la fermeture de l'interface | ## Configuration [#configuration] ```yaml behaviours: storage: type: STORAGE rows: 3 # optionnel, défaut : 3 inventory_type: furnace # optionnel, remplace rows si défini title: "Coffre Communautaire" # optionnel, par défaut le nom du bloc/meuble open_variant: my_open_storage # optionnel open_sound: # optionnel name: entity.villager.celebrate # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master close_sound: # optionnel name: entity.villager.ambient # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master ``` ```yaml behaviours: storage: type: SHULKER rows: 3 # optionnel, défaut : 3 inventory_type: furnace # optionnel, remplace rows si défini title: "Stockage Portable" # optionnel, par défaut le nom du bloc/meuble open_variant: my_open_storage # optionnel open_sound: # optionnel name: entity.villager.celebrate # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master close_sound: # optionnel name: entity.villager.ambient # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master ``` ```yaml behaviours: storage: type: DISPOSAL rows: 1 # optionnel, défaut : 3 title: "Poubelle" # optionnel, par défaut le nom du bloc/meuble open_variant: my_open_storage # optionnel open_sound: # optionnel name: entity.villager.celebrate # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master close_sound: # optionnel name: entity.villager.ambient # ou un son personnalisé volume: 1.0 # optionnel, défaut : 1.0 pitch: 1.0 # optionnel, défaut : 1.0 source: master # optionnel, défaut : master ``` Pour `name`, utilisez une valeur dans [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) ou un son personnalisé avec `namespace:value`. Prend en charge le formatage [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), les placeholders [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) et les images de police [ItemsAdder](https://itemsadder.com/). ## Type d’inventaire [#type-dinventaire] Par défaut, le stockage ouvre un inventaire de type coffre dont la hauteur est contrôlée par `rows` (1-6, défaut : 3). Définissez `inventory_type` pour ouvrir un inventaire typé à la place - `rows` est ignoré quand cette option est définie. | Valeur | Interface | | --------------- | ---------------------------------------- | | `furnace` | Fourneau (entrée + combustible + sortie) | | `blast_furnace` | Haut-fourneau | | `smoker` | Fumoir | | `brewing_stand` | Alambic (3 bouteilles + 2 cases) | | `dispenser` | Distributeur (3×3) | | `dropper` | Déposeur (3×3) | | `hopper` | Entonnoir (1×5) | ```yaml behaviours: storage: type: STORAGE inventory_type: furnace title: "Fourneau Personnalisé" ``` ## Restrictions d’objets [#restrictions-dobjets] Depuis la version 1.0.14, un stockage peut limiter les objets que les joueurs peuvent y insérer. Utilisez `allowed_items` pour n’autoriser que les objets correspondants : ```yaml behaviours: storage: type: STORAGE allowed_items: - minecraft:book - "#minecraft:logs" - "#my_pack:building_materials" ``` Ou utilisez `denied_items` pour refuser les objets correspondants tout en autorisant tous les autres : ```yaml behaviours: storage: type: STORAGE denied_items: - minecraft:tnt - "#my_pack:portable_storage" ``` Les entrées peuvent être des IDs d’objets vanilla ou ItemsAdder, des tags d’objets Minecraft ou des tags d’objets personnalisés IAA. `allowed_items` et `denied_items` sont mutuellement exclusifs. Configurer les deux invalide le comportement de stockage. Une liste `allowed_items` vide n’autorise aucun objet. Une liste `denied_items` vide n’en refuse aucun. Si les deux options sont omises, le stockage reste sans restriction. Ces restrictions concernent uniquement les nouvelles insertions des joueurs ; le contenu déjà enregistré n’est pas supprimé. ## Variante ouverte [#variante-ouverte] Vous pouvez optionnellement définir `open_variant` pour faire changer le bloc, meuble ou meuble complexe en une autre variante tant qu’au moins un joueur a le stockage ouvert. Utile pour des éléments comme : * les coffres qui s'ouvrent visuellement * les tonneaux avec un modèle ouvert * les conteneurs avec un état actif différent ```yaml behaviours: storage: type: STORAGE open_variant: my_open_storage ``` `open_variant` doit être l’ID d’un autre bloc, meuble ou meuble complexe personnalisé, en utilisant soit : * `id` * `namespace:id` Voir [IDs](/fr/docs/compatibility/ids) pour la syntaxe des IDs. Quand l'inventaire est fermé par tous les joueurs, le storage retourne à sa variante normale. Les `open_variant` de meubles complexes sont pris en charge depuis ItemsAdderAdditions 1.0.12. Un storage de type bloc doit utiliser une variante bloc ; les meubles et meubles complexes peuvent utiliser un meuble, un meuble complexe ou un modèle d'item display. ## Variantes selon le contenu [#variantes-selon-le-contenu] Depuis la version 1.0.13, un stockage peut changer d'apparence lorsqu'il est fermé selon son niveau de remplissage. ```yaml behaviours: storage: type: STORAGE empty_variant: my_empty_storage # optionnel ; inventaire vide filled_variant: my_filled_storage # optionnel ; inventaire non vide half_variant: my_half_storage # optionnel ; inventaire partiellement rempli full_variant: my_full_storage # optionnel ; chaque emplacement est rempli à sa limite ``` `filled_variant` permet une configuration simple à deux états : cette variante est utilisée pour tout inventaire non vide, sauf si une variante `half_variant` ou `full_variant` plus précise est configurée. Une variante manquante revient à `filled_variant`, puis à l'apparence d'origine du stockage. `open_variant` reste prioritaire tant que l'inventaire est ouvert. La variante correspondant au contenu est restaurée après la fermeture par le dernier joueur. Les IDs et la compatibilité bloc/meuble suivent les mêmes règles que `open_variant`, et la rotation des blocs directionnels est conservée. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) * [Compatibilité CoreProtect](/fr/docs/compatibility/coreprotect) * [Compatibilité PlaceholderAPI](/fr/docs/compatibility/placeholderapi) # Affichage de texte (/fr/docs/behaviours/text-display) Attache un ou plusieurs affichages de texte flottants à un bloc ou meuble personnalisé. Prend en charge le formatage MiniMessage, les placeholders PlaceholderAPI et les images de police ItemsAdder. Fonctionne sur les **blocs**, **meubles** et **meubles complexes**. ## Configuration de base [#configuration-de-base] ```yaml behaviours: text_display: text: "Bonjour !" ``` Texte multiligne (une ligne par entrée de liste) : ```yaml behaviours: text_display: text: - "Stockage" - "Clic droit pour ouvrir" ``` ## Affichages multiples [#affichages-multiples] Utilisez la section `displays` pour attacher plus d’un affichage de texte au même objet. Chaque entrée est positionnée et stylisée indépendamment. ```yaml behaviours: text_display: displays: label: text: "Mon Coffre" offset: "0, 0.5, 0" hint: text: "Clic droit pour ouvrir" offset: "0, 0.25, 0" ``` ## Options [#options] | Clé | Type | Défaut | Description | | ------------------ | ------------------------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | chaîne ou liste | *(obligatoire)* | Le texte à afficher. Prend en charge MiniMessage, PlaceholderAPI et les images de police `:icon:`. | | `offset` | `"x, y, z"` ou liste | `"0, 0.25, 0"` | Décalage de position relatif au centre du bloc ou meuble. | | `billboard` | `FIXED` \| `VERTICAL` \| `HORIZONTAL` \| `CENTER` | `VERTICAL` | Comment l'affichage pivote pour faire face aux joueurs. | | `alignment` | `LEFT` \| `CENTER` \| `RIGHT` | `CENTER` | Alignement du texte dans l'affichage. | | `text_shadow` | booléen | `true` | Si le texte a une ombre portée. | | `see_through` | booléen | `false` | Si le texte est visible à travers les blocs. | | `line_width` | entier ≥ 1 | `1403` | Largeur maximale de ligne en pixels avant le retour à la ligne. | | `background` | `#RRGGBB`, `#RRGGBBAA`, `false` ou `null` | `null` | Couleur de fond. `null` ou `false` utilise le fond sombre vanilla par défaut. | | `text_opacity` | float 0.0-1.0 | *(omettre pour défaut)* | Opacité du texte. `0.0` est entièrement transparent, `1.0` est entièrement opaque. Omettre la clé entièrement pour le défaut vanilla (entièrement opaque). | | `scale` | float > 0, `"x, y, z"` ou liste | `1.0` | Multiplicateur de taille du texte. Une valeur unique s'applique uniformément ; utilisez `"x, y, z"` ou une liste de 3 éléments pour une mise à l'échelle non uniforme. | | `view_range` | float > 0 | `16.0` | Distance en blocs à laquelle l'affichage devient visible. | | `refresh_interval` | entier ≥ 0 | `0` | Fréquence (en ticks) à laquelle le texte est rafraîchi par joueur. `0` désactive le rafraîchissement automatique. Définir une valeur positive lors de l'utilisation de placeholders PlaceholderAPI qui changent dans le temps. | | `brightness` | entier 0-15, `[block, sky]` ou section | *(omettre pour l'éclairage du monde)* | Forcer le niveau de lumière. Un entier unique fixe les lumières de bloc et de ciel au même niveau. Utilisez une liste de deux éléments `[block, sky]` ou une section avec les clés `block:` et `sky:` pour les définir séparément. Omettre pour hériter de l'éclairage du monde. | | `shadow_radius` | float ≥ 0 | `0.0` | Rayon de l'ombre portée derrière le texte. | | `shadow_strength` | float ≥ 0 | `1.0` | Force (opacité) de l'ombre portée. | | `yaw` | float | `0.0` | Rotation horizontale de l'affichage en degrés. Significatif uniquement quand `billboard` est `FIXED`. | | `pitch` | float | `0.0` | Rotation verticale de l'affichage en degrés. Significatif uniquement quand `billboard` est `FIXED`. | ## Exemple complet [#exemple-complet] ```yaml behaviours: text_display: text: - "" - "Score : %vault_eco_balance%" offset: "0, 0.6, 0" billboard: VERTICAL alignment: CENTER text_shadow: true see_through: false line_width: 1403 background: "#00000080" scale: 1.0 view_range: 16.0 refresh_interval: 20 ``` ## Notes [#notes] * Le texte prend en charge les balises de formatage [MiniMessage](https://docs.advntr.dev/minimessage/format.html). * Les placeholders PlaceholderAPI sont résolus par joueur si PlaceholderAPI est installé. * Les images de police ItemsAdder (`:my_icon:`) sont prises en charge. * Lors de l'utilisation de placeholders qui se mettent à jour dans le temps, définissez `refresh_interval` à une valeur positive (ex. `20` pour une fois par seconde). ## Pages associées [#pages-associées] * [Compatibilité PlaceholderAPI](/fr/docs/compatibility/placeholderapi) * [Compatibilité WorldGuard](/fr/docs/compatibility/worldguard) # /iatrademachine (/fr/docs/commands/iatrademachine) ## `/iatrademachine` [#iatrademachine] Ouvrir une interface `trade_machine` ou `block_trade_machine` ItemsAdder pour un joueur sans que le bloc ou meuble physique soit placé dans le monde. Utile si vous souhaitez ouvrir différentes interfaces de machines à échange via d’autres plugins tels que des systèmes de menus, des PNJ ou des flux de commandes personnalisés. ## Syntaxe [#syntaxe] ```text /iatrademachine [-silent] ``` ## Paramètres [#paramètres] ### `` [#joueur] Le joueur en ligne pour lequel ouvrir la machine à échange. ### `` [#namespaceid] L'ID du bloc ou meuble personnalisé qui possède un comportement `trade_machine` ou `block_trade_machine`. Exemple : ```text stations:alchemy_table ``` ### `-silent` [#-silent] Indicateur optionnel. S'il est ajouté, la commande supprime le message de confirmation normalement envoyé à l'exécuteur de la commande. ## Exemples [#exemples] ```text /iatrademachine twinkycome stations:alchemy_table ``` ```text /iatrademachine twinkycome stations:alchemy_table -silent ``` ## Permission [#permission] ```text ia.admin.iatrademachine ``` ## Notes [#notes] * Fonctionne depuis les joueurs et la console. * Nécessite que l’ID cible ait un comportement `trade_machine` ou `block_trade_machine`. * L'ID complet avec namespace doit être utilisé. * Si l’ID n'a pas de comportement de machine à échange pris en charge, la commande échoue. ## Exemple d'utilisation [#exemple-dutilisation] Combinez cette commande avec un plugin GUI tel que DeluxeMenus pour créer un menu de sélection de catégories qui ouvre directement différentes machines à échange, au lieu de faire défiler les joueurs dans une grande interface de machine à échange. # /itemsadderadditions (/fr/docs/commands/itemsadderadditions) ## `/itemsadderadditions` [#itemsadderadditions] Commande d'administration principale pour ItemsAdderAdditions. Alias : ```text /iaadditions /iaa ``` ## Permissions [#permissions] Permission de base : ```text itemsadderadditions.command.itemsadderadditions ``` ## Sous-commandes [#sous-commandes] ### `/itemsadderadditions reload` [#itemsadderadditions-reload] Recharge le `config.yml` d'ItemsAdderAdditions et actualise les toggles de fonctionnalités, actions, comportements et composants au niveau du plugin. ```text /itemsadderadditions reload ``` Permission : ```text itemsadderadditions.command.itemsadderadditions.reload ``` Cette commande ne recharge **pas** les fichiers YAML de contenu ItemsAdder. Utilisez `/iareload` après avoir modifié des sections YAML de contenu ItemsAdderAdditions comme les actions, comportements, tags personnalisés, recettes, progrès, peintures personnalisées, métadonnées Valhalla ou entrées de génération du monde. Utilisez `/iazip` après avoir modifié les sections `components` ou des assets du resource pack. ### `/itemsadderadditions debug` [#itemsadderadditions-debug] Active ou désactive le mode debug. ```text /itemsadderadditions debug ``` Permission : ```text itemsadderadditions.command.itemsadderadditions.debug ``` # CoreProtect (/fr/docs/compatibility/coreprotect) Le support de CoreProtect est optionnel. ItemsAdderAdditions utilise actuellement CoreProtect uniquement pour journaliser les ouvertures du comportement storage comme interactions. ## Prérequis [#prérequis] * CoreProtect installé et activé. * API CoreProtect activée. * Comportement storage d'ItemsAdderAdditions en cours d'utilisation. ## Ce qui est journalisé [#ce-qui-est-journalisé] Lorsqu'un joueur ouvre un conteneur storage ItemsAdderAdditions, ItemsAdderAdditions appelle le journaliseur d'interactions de CoreProtect avec : * le nom du joueur * l'emplacement du stockage Les ouvertures de storage apparaissent ainsi comme interactions CoreProtect lorsque CoreProtect est disponible. ## Ce qui n'est pas journalisé [#ce-qui-nest-pas-journalisé] ItemsAdderAdditions ne journalise pas actuellement ces éléments via CoreProtect : * déplacements d'objets dans l'inventaire de storage * exécution d'actions * pose de peintures personnalisées * placement stackable * dégâts de contact effect * craft de recettes * complétion de progrès * génération du monde ## Comportement avec dépendance optionnelle [#comportement-avec-dépendance-optionnelle] Si CoreProtect n'est pas installé, est désactivé ou si son API est indisponible, ItemsAdderAdditions ignore l'appel de journalisation. Le storage continue de fonctionner normalement. ## Fonctionnalités prises en charge [#fonctionnalités-prises-en-charge] | Fonctionnalité | Comportement CoreProtect | | --------------------------------------------------- | --------------------------------------------------------- | | [Comportement storage](/fr/docs/behaviours/storage) | Journalise une interaction lorsque le storage est ouvert. | ## Limites [#limites] Le support de CoreProtect est volontairement restreint. Il enregistre que le storage a été ouvert ; il ne fournit pas un journal d'audit complet du contenu de l'inventaire ni des transferts d'objets. ## Dépannage [#dépannage] * Vérifiez que CoreProtect est installé et activé. * Vérifiez que l'API CoreProtect est activée et fonctionne. * Testez avec un bloc ou meuble utilisant le comportement storage, pas avec une action ou recette sans rapport. * Si aucune interaction n'apparaît, vérifiez que le joueur a bien ouvert le storage avec succès. ## Pages associées [#pages-associées] * [Comportement storage](/fr/docs/behaviours/storage) * [WorldGuard](/fr/docs/compatibility/worldguard) # Custom Structures (/fr/docs/compatibility/customstructures) La prise en charge de Custom Structures est optionnelle et disponible depuis ItemsAdderAdditions 1.0.12. Elle permet d'exiger qu'un joueur se trouve dans une structure générée par le plugin Custom Structures. ## Configuration [#configuration] Utilisez le nom de la structure avec le namespace `customstructures:` sous `conditions.player.location.structure` ou `structures`. ```yaml criteria: find_temple: trigger: tick conditions: player: location: structures: - customstructures:ancient_temple ``` L'alias `custom_structures:` est aussi accepté. La casse du nom est ignorée. ## Fonctionnement [#fonctionnement] ItemsAdderAdditions utilise l'intégration Custom Structures pour faire correspondre les limites des structures. Les structures existantes et nouvellement générées sont prises en charge ; il n'est pas nécessaire de les générer à nouveau après l'installation d'ItemsAdderAdditions. Les structures vanilla n'ont pas besoin de Custom Structures et utilisent leurs clés normales, par exemple `minecraft:village_plains`. ## Dépannage [#dépannage] * Vérifiez que Custom Structures est activé avant ItemsAdderAdditions. * Utilisez le nom configuré de la structure, pas le nom du schematic sauf s'ils sont identiques. * Recherchez `Enabled advancement structure predicate integration.` dans les logs. ## Pages associées [#pages-associées] * [Prédicats de joueur](/fr/docs/advancements/player-predicates) * [Configuration des avancements](/fr/docs/advancements/configuration) # IDs (/fr/docs/compatibility/ids) ItemsAdderAdditions normalise les IDs en minuscules avant de les comparer. Dans les exemples et les configurations partagées, privilégiez les IDs explicites comme `minecraft:diamond` et `my_pack:ruby_sword`. La plupart des champs sont soit des **sorties concrètes**, soit des **correspondances à l'exécution** : * Les sorties concrètes doivent résoudre une seule pile d'objets. Les tags n'y sont pas valides. * Les correspondances à l'exécution peuvent accepter des tags, car le plugin doit seulement comparer du contenu existant. ## Référence rapide [#référence-rapide] | Contenu | Format pris en charge | Exemple | | ------------------------------------ | ------------------------------------------------------------------------------- | ------------------------------------------ | | Objet vanilla | `minecraft:id`, clé Minecraft seule ou nom de matériau Bukkit | `minecraft:diamond`, `diamond`, `DIAMOND` | | Bloc vanilla | `minecraft:id`, clé Minecraft seule ou nom de matériau Bukkit | `minecraft:oak_log`, `oak_log`, `OAK_LOG` | | Objet ItemsAdder | `namespace:id` ou `id` seul | `my_pack:ruby_sword`, `ruby_sword` | | Bloc ItemsAdder | `namespace:id` ou `id` seul | `my_pack:ruby_ore`, `ruby_ore` | | Meuble ItemsAdder | `namespace:id` ou `id` seul | `my_pack:ruby_lamp`, `ruby_lamp` | | Objet MMOItems | `mmoitems:type:id` | `mmoitems:sword:flame_blade` | | ID de recette | `namespace:id`, `id` seul ou tag de recette personnalisé lorsque pris en charge | `my_pack:ruby_sword`, `ruby_sword` | | Tag vanilla d'objets/blocs | `#minecraft:tag` ou `#tag` seul lorsque les tags vanilla sont acceptés | `#minecraft:planks`, `#logs` | | Tag personnalisé ItemsAdderAdditions | `#namespace:tag`, ou `#tag` seul dans le namespace actuel | `#my_pack:ruby_tools`, `#ruby_tools` | | Clé namespaced | `namespace:path` | `minecraft:strength`, `custom_pack:my_key` | ## Objets et blocs vanilla [#objets-et-blocs-vanilla] Les objets et blocs vanilla peuvent être écrits sous forme d'IDs namespaced, de clés Minecraft seules ou de noms de matériaux Bukkit. ```yaml item: minecraft:diamond_sword item: diamond_sword item: DIAMOND_SWORD block: minecraft:oak_log block: oak_log block: OAK_LOG ``` Pour les champs d'objet concrets, un ID seul est d'abord recherché dans le contenu ItemsAdder, puis dans les objets Minecraft vanilla. ## Objets, blocs et meubles ItemsAdder [#objets-blocs-et-meubles-itemsadder] Le contenu ItemsAdder peut utiliser `namespace:id` ou l'ID de contenu seul. ```yaml item: my_pack:ruby_sword block: my_pack:ruby_ore furniture: my_pack:ruby_lamp ``` Les chemins seuls fonctionnent aussi dans de nombreux champs : ```yaml info: namespace: my_pack items: ruby_wand: events: interact: right: replace_item: item: ruby_sword ``` Les IDs seuls fonctionnent, mais `namespace:id` est plus clair lorsque deux packs utilisent le même ID de contenu. ## Objets MMOItems [#objets-mmoitems] Les références MMOItems utilisent exactement cette forme : ```yaml item: mmoitems:type:id ``` Exemple : ```yaml item: mmoitems:sword:flame_blade ``` Le type et l'ID sont comparés via les métadonnées MMOItems. Si MMOItems n'est pas installé ou activé, ces références ne se résolvent pas et ne correspondent à rien. ## Recettes [#recettes] Les IDs de recettes peuvent être namespaced ou seuls selon la fonctionnalité. ```yaml recipe: my_pack:ruby_sword recipe: ruby_sword ``` Pour la correspondance de recettes, un ID de recette seul peut correspondre à la partie chemin d'un ID de recette namespaced. Les tags de recette personnalisés ne sont pris en charge que dans les champs qui acceptent explicitement les tags personnalisés. ## Tags personnalisés [#tags-personnalisés] Les tags personnalisés sont définis dans une section `tags` au niveau racine. ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer ``` Référencez le tag avec `#tag` dans le même namespace ou `#namespace:tag` depuis un autre namespace. ```yaml items: - "#ruby_tools" - "#my_pack:ruby_tools" ``` Les types de tags personnalisés sont `item`, `block`, `furniture` et `recipe`. Consultez [Tags personnalisés](/fr/docs/custom-tags) pour les règles d'imbrication et la prise en charge par fonctionnalité. ## Tags vanilla [#tags-vanilla] Les tags vanilla sont pris en charge lorsque le chemin de correspondance accepte les tags Bukkit d'objets ou de blocs. ```yaml item: "#minecraft:planks" block: "#minecraft:logs" ``` Pour la correspondance des tags d'objets et de blocs, un tag vanilla seul comme `#logs` est normalisé en `#minecraft:logs`, sauf si un tag personnalisé avec le même ID existe dans le registre de tags actuel. Les tags vanilla ne correspondent qu'aux entrées du registre vanilla. Ils ne correspondent pas au contenu ItemsAdder ni au contenu MMOItems. ## Sorties d'objet concrètes [#sorties-dobjet-concrètes] Utilisez des IDs concrets pour les champs qui doivent créer une seule pile d'objets, notamment : * les résultats de recettes * les résultats de feu de camp, de tailleur de pierre et d'alambic * `toast.icon` * `clear_item.item` * `replace_item.item` * les champs de composants qui créent des piles d'objets stockées, comme `bundle_contents` et `charged_projectiles` Les tags ne sont pas valides dans ces champs, car un tag peut contenir plusieurs valeurs. ## Blocs et meubles ItemsAdder orientés [#blocs-et-meubles-itemsadder-orientés] La correspondance à l'exécution des blocs et meubles traite les suffixes directionnels comme le même contenu de base : ```text my_pack:chair_north -> my_pack:chair my_pack:chair_south -> my_pack:chair my_pack:chair_east -> my_pack:chair my_pack:chair_west -> my_pack:chair my_pack:chair_up -> my_pack:chair my_pack:chair_down -> my_pack:chair ``` Cela s'applique aux vérifications de correspondance comme les déclencheurs de progrès et l'appartenance aux tags personnalisés. Vous n'avez pas besoin de lister chaque variante orientée. ## Erreurs courantes [#erreurs-courantes] * Utiliser des tags dans des champs de sortie comme `result.item`, `toast.icon`, `clear_item.item` ou `replace_item.item`. * S'attendre à ce que les tags vanilla correspondent aux objets ItemsAdder ou MMOItems. * Utiliser `mmoitems:type:id` sans MMOItems installé. * Oublier le préfixe `#` pour les références de tags. * Écrire un ID namespaced invalide avec plusieurs deux-points, comme `namespace:path:extra`. * Réutiliser le même ID seul dans plusieurs packs sans savoir quel contenu sera retenu. ## Pages associées [#pages-associées] * [Vue d'ensemble de la compatibilité](/fr/docs/compatibility) * [ItemsAdder](/fr/docs/compatibility/itemsadder) * [MMOItems](/fr/docs/compatibility/mmoitems) * [Tags personnalisés](/fr/docs/custom-tags) * [Recettes de craft](/fr/docs/recipes/crafting) * [Déclencheurs de progrès](/fr/docs/advancements/triggers) # Compatibilité (/fr/docs/compatibility) Les pages de compatibilité expliquent comment ItemsAdderAdditions communique avec ItemsAdder et les plugins optionnels. Utilisez cette section pour savoir si une intégration est requise, comment un plugin externe influence une fonctionnalité, ou quel format d'ID un champ accepte. ## Intégrations prises en charge [#intégrations-prises-en-charge] **Requise :** * [ItemsAdder](/fr/docs/compatibility/itemsadder) - chargement du contenu, stacks personnalisés, blocs/meubles personnalisés, hooks de modification d'objet et événements de rechargement. **Optionnelles :** * [MMOItems](/fr/docs/compatibility/mmoitems) - références d'objets `mmoitems:type:id` et correspondance d'objets à l'exécution. * [ValhallaMMO & ValhallaTrinkets](/fr/docs/compatibility/valhalla) - métadonnées Valhalla écrites sur les piles d'objets ItemsAdder. * [WorldGuard](/fr/docs/compatibility/worldguard) - flags de région pour les comportements, peintures personnalisées et actions pris en charge. * [Custom Structures](/fr/docs/compatibility/customstructures) - limites de structures personnalisées dans les prédicats de position des avancements. * [CoreProtect](/fr/docs/compatibility/coreprotect) - journalisation des interactions d'ouverture de stockage. * [PlaceholderAPI](/fr/docs/compatibility/placeholderapi) - résolution des placeholders dans les champs de texte pris en charge. * [MythicMobs](/fr/docs/compatibility/mythicmobs) - l'action `mythic_mobs_skill`. ## Syntaxe des IDs [#syntaxe-des-ids] Pour les formats d'IDs d'objets, de blocs, de meubles, de recettes, de tags et de clés namespaced, consultez [IDs](/fr/docs/compatibility/ids). ## Pages associées [#pages-associées] * [Configuration](/fr/docs/configuration) * [Tags personnalisés](/fr/docs/custom-tags) * [Paramètres des actions](/fr/docs/actions/parameters) * [Comportement storage](/fr/docs/behaviours/storage) * [Recettes de craft](/fr/docs/recipes/crafting) * [Progrès](/fr/docs/advancements) # ItemsAdder (/fr/docs/compatibility/itemsadder) ItemsAdder est requis. ItemsAdderAdditions charge sa configuration depuis les fichiers YAML de contenu ItemsAdder et utilise les APIs ItemsAdder pour résoudre les stacks personnalisés, blocs personnalisés, meubles, images de police et événements de rechargement. ## Prérequis [#prérequis] * ItemsAdder v4 est pris en charge ; la dernière version est recommandée. * Une version de serveur Paper prise en charge avec un adaptateur NMS ItemsAdderAdditions correspondant. La prise en charge d'ItemsAdder 4.0.18 a été ajoutée dans ItemsAdderAdditions 1.0.13, avec la mise à jour des correspondances des patchs runtime. ## Fonctionnalités prises en charge [#fonctionnalités-prises-en-charge] ItemsAdderAdditions utilise ItemsAdder pour : * lire les sections d'objets, blocs, meubles, recettes, comportements, actions, composants, tags personnalisés, progrès, peintures et génération du monde depuis le YAML de contenu * résoudre les IDs d'objets ItemsAdder en `ItemStack`s * reconnaître les blocs personnalisés et meubles déjà placés * appliquer les hooks de modification d'objet pour les composants et les métadonnées Valhalla * écouter les événements de chargement/rechargement ItemsAdder * gérer les images de police ItemsAdder dans le texte rendu * appliquer, si nécessaire, des patchs runtime pour les cooldowns ItemsAdder, exigences de stats, comportement du tailleur de pierre, machines d'échange et comportement du craft ## Comportement au rechargement [#comportement-au-rechargement] La plupart des sections ItemsAdderAdditions uniquement en YAML se rechargent via les rechargements ItemsAdder et `/iareload`. Les composants modifient les stacks générés via le pipeline de modification d'objet d'ItemsAdder. Après avoir changé des composants, exécutez `/iazip` pour qu'ItemsAdder régénère le pack et les données d'objets. ## Syntaxe des IDs [#syntaxe-des-ids] Le contenu ItemsAdder peut généralement être référencé avec `namespace:id` ou `id` seul. Consultez [IDs](/fr/docs/compatibility/ids) pour les formats exacts et les erreurs courantes. ## Dépannage [#dépannage] * Si un ID personnalisé ne se résout pas, vérifiez que le contenu est chargé par ItemsAdder et que le namespace est correct. * Préférez `namespace:id` lorsque plusieurs packs peuvent utiliser le même ID seul. * Après avoir changé des données d'objets générées, exécutez `/iazip` ; après avoir changé des sections YAML runtime, exécutez `/iareload`. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Configuration](/fr/docs/configuration) * [Composants](/fr/docs/components) * [Tags personnalisés](/fr/docs/custom-tags) # MMOItems (/fr/docs/compatibility/mmoitems) Le support de MMOItems est optionnel. Si MMOItems est installé et activé, ItemsAdderAdditions peut créer et reconnaître des stacks MMOItems avec les références `mmoitems:type:id`. ## Prérequis [#prérequis] * MMOItems installé et activé uniquement sur les serveurs qui utilisent des références `mmoitems:type:id`. * Le type MMOItems et l'ID d'objet doivent exister dans MMOItems. ## Fonctionnalités prises en charge [#fonctionnalités-prises-en-charge] Les références d'objets MMOItems sont prises en charge par les chemins partagés de résolution d'objets, notamment : * ingrédients de recettes et sorties concrètes de recettes lorsque des piles d'objets sont créées * actions d'objets comme `clear_item`, `replace_item` et `toast.icon` * prédicats d'objets de progrès et conditions d'objets prises en charge * tags personnalisés d'objets * champs de composants qui créent des piles d'objets, comme `bundle_contents` et `charged_projectiles` ## Syntaxe [#syntaxe] ```yaml item: mmoitems:sword:flame_blade ``` Le format est : ```text mmoitems:type:id ``` ItemsAdderAdditions lit les clés de métadonnées MMOItems `MMOITEMS_ITEM_TYPE` et `MMOITEMS_ITEM_ID` lorsqu'il compare des piles d'objets existantes. ## Comportement avec dépendance optionnelle [#comportement-avec-dépendance-optionnelle] Si MMOItems n'est pas installé ou n'est pas activé : * les références `mmoitems:type:id` ne peuvent pas créer de piles d'objets ; * les références `mmoitems:type:id` ne correspondent pas aux objets existants ; * les autres références vanilla et ItemsAdder continuent de fonctionner. ## Limites [#limites] * Les références MMOItems sont uniquement des références d'objets. Ce ne sont pas des IDs de blocs, de meubles ou de recettes. * Les tags vanilla ne correspondent pas aux objets MMOItems. * Les tags restent invalides dans les champs de sortie concrets, même si un tag personnalisé contient des valeurs MMOItems. ## Dépannage [#dépannage] * Vérifiez l'orthographe du type MMOItems et de l'ID. * Utilisez exactement deux séparateurs après le préfixe : `mmoitems:type:id`. * Installez et activez MMOItems avant de tester les références MMOItems. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Recettes de craft](/fr/docs/recipes/crafting) * [Tags personnalisés](/fr/docs/custom-tags) * [Clear Item](/fr/docs/actions/clear-item) * [Replace Item](/fr/docs/actions/replace-item) # MythicMobs (/fr/docs/compatibility/mythicmobs) Le support de MythicMobs est optionnel. ItemsAdderAdditions utilise MythicMobs uniquement pour l'action `mythic_mobs_skill`. ## Prérequis [#prérequis] * MythicMobs installé et activé. * Un nom de skill MythicMobs valide. * L'action `mythic_mobs_skill` activée dans la configuration d'ItemsAdderAdditions. ## Fonctionnalités prises en charge [#fonctionnalités-prises-en-charge] | Fonctionnalité | Comportement MythicMobs | | -------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [Action Mythic Mobs Skill](/fr/docs/actions/mythic-mobs-skill) | Lance une skill MythicMobs depuis le joueur avec une puissance configurable. | ## Exemple [#exemple] ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 ``` L'action demande à MythicMobs de lancer la skill depuis le joueur, en utilisant la position du joueur et l'aide de ciblage d'entité de MythicMobs. ## Comportement avec dépendance optionnelle [#comportement-avec-dépendance-optionnelle] Si MythicMobs n'est pas installé ou n'est pas activé, l'action retourne sans lancer de skill. Les autres actions continuent de fonctionner. ## Limites [#limites] * Cette intégration n'ajoute pas de nouvelles mécaniques MythicMobs. * Elle est limitée aux actions ; les références d'objets de style MMO sont gérées par [MMOItems](/fr/docs/compatibility/mmoitems), pas par MythicMobs. ## Dépannage [#dépannage] * Vérifiez que le nom de skill existe dans MythicMobs. * Confirmez que la clé d'action est `mythic_mobs_skill`. * Vérifiez que l'action est activée dans `config.yml`. * Confirmez que MythicMobs est installé et activé avant de tester. ## Pages associées [#pages-associées] * [Action Mythic Mobs Skill](/fr/docs/actions/mythic-mobs-skill) * [Paramètres des actions](/fr/docs/actions/parameters) * [Configuration](/fr/docs/configuration) # PlaceholderAPI (/fr/docs/compatibility/placeholderapi) Le support de PlaceholderAPI est optionnel. Lorsque PlaceholderAPI est installé, ItemsAdderAdditions résout les placeholders dans les champs de texte pris en charge. Lorsqu'il n'est pas installé, le texte d'origine reste inchangé. ## Fonctionnalités prises en charge [#fonctionnalités-prises-en-charge] PlaceholderAPI est utilisé par les chemins de rendu de texte documentés sur les pages de fonctionnalités, notamment : * actions message, actionbar, title, toast et open inventory * actions de texte à la complétion d'un progrès * titres des inventaires storage * texte du comportement text display ## Exemples [#exemples] ```yaml message: text: "Hello %player_name%!" ``` ```yaml behaviours: text_display: text: "Coins: %vault_eco_balance%" refresh_interval: 20 ``` Pour les text displays, définissez `refresh_interval` sur une valeur positive lorsque les placeholders doivent se mettre à jour au fil du temps. ## Comportement avec dépendance optionnelle [#comportement-avec-dépendance-optionnelle] Si PlaceholderAPI est absent, les placeholders ne sont pas résolus et restent dans le texte rendu. ## Limites [#limites] * ItemsAdderAdditions ne fournit pas d'expansions PlaceholderAPI lui-même. * Le support des placeholders s'applique uniquement aux champs qui utilisent le moteur de rendu de texte partagé ou qui documentent explicitement le support de PlaceholderAPI. ## Dépannage [#dépannage] * Installez l'expansion PlaceholderAPI qui fournit le placeholder que vous utilisez. * Utilisez un intervalle de rafraîchissement positif pour les placeholders de text display qui changent. * Si le texte apparaît littéralement comme `%placeholder%`, vérifiez que PlaceholderAPI est installé et activé. ## Pages associées [#pages-associées] * [Action Message](/fr/docs/actions/message) * [Action Actionbar](/fr/docs/actions/actionbar) * [Action Title](/fr/docs/actions/title) * [Action Toast](/fr/docs/actions/toast) * [Action Open Inventory](/fr/docs/actions/open-inventory) * [Comportement Text Display](/fr/docs/behaviours/text-display) * [Comportement storage](/fr/docs/behaviours/storage) # ValhallaMMO & Trinkets (/fr/docs/compatibility/valhalla) ItemsAdderAdditions peut écrire des données persistantes ValhallaMMO et ValhallaTrinkets sur les piles d'objets ItemsAdder lorsqu'elles sont créées. Configurez ces données dans la section `valhalla` d'un objet ItemsAdder. Les métadonnées sont écrites directement sur la pile d'objets. Les effets en jeu nécessitent que le plugin Valhalla correspondant soit installé sur le serveur. ## Prérequis [#prérequis] * Contenu d'objet ItemsAdder chargé par ItemsAdder. * ValhallaMMO pour les stats ValhallaMMO, la classe d'équipement, les flags d'objet et les effets permanents. * ValhallaTrinkets pour les métadonnées de trinket. ## Comportement avec dépendance optionnelle [#comportement-avec-dépendance-optionnelle] ItemsAdderAdditions écrit les clés de données persistantes même si ValhallaMMO ou ValhallaTrinkets n'est pas installé. Sans le plugin Valhalla correspondant, les données restent sur l'objet mais n'ont aucun effet en jeu. ## Structure de base [#structure-de-base] ```yaml info: namespace: my_pack items: ruby_sword: display_name: "Ruby Sword" valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` ## Stats [#stats] Utilisez `stats` lorsque les mêmes entrées doivent être écrites dans les stats actuelles et par défaut de Valhalla. ```yaml valhalla: stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER hidden: false ``` Vous pouvez aussi écrire les deux conteneurs de stats séparément : ```yaml valhalla: actual_stats: - stat: DAMAGE_BASE amount: 6.0 operation: ADD_NUMBER default_stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` | Clé | Type | Défaut | Description | | ----------- | ------- | ---------- | --------------------------------------------------------------- | | `stat` | string | *(requis)* | Clé de stat Valhalla. Les clés de stat inconnues sont ignorées. | | `amount` | number | *(requis)* | Valeur de la stat. | | `operation` | string | *(requis)* | `ADD_NUMBER`, `ADD_SCALAR` ou `MULTIPLY_SCALAR_1`. | | `hidden` | boolean | `false` | Indique si Valhalla doit masquer la ligne de stat. | ## Classe d'équipement et flags [#classe-déquipement-et-flags] ```yaml valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES - HIDE_QUALITY ``` Les classes d'équipement courantes incluent `SWORD`, `BOW`, `CROSSBOW`, `TRIDENT`, `MACE`, `HELMET`, `CHESTPLATE`, `LEGGINGS`, `BOOTS`, `PICKAXE`, `AXE`, `SHOVEL`, `HOE`, `SHIELD`, `TRINKET` et `OTHER`. Les flags d'objet pris en charge sont : ```text HIDE_TAGS, HIDE_QUALITY, DISPLAY_ATTRIBUTES, HIDE_DURABILITY, ATTRIBUTE_FOR_BOTH_HANDS, ATTRIBUTE_FOR_HELMET, INFINITY_EXPLOITABLE, UNCRAFTABLE, TEMPORARY_POTION_DISPLAY, UNENCHANTABLE, UNMENDABLE ``` ## Effets permanents [#effets-permanents] ```yaml valhalla: permanent_effects: effects: - type: minecraft:strength amplifier: 1 duration: 200 condition: constant cooldown_properties: cooldown: 1200 cdr_affected: true ``` `effect` peut être utilisé à la place de `type`. La clé historique `permanent_potion_effects` est aussi acceptée pour la liste d'effets. `cooldown_properties` peut aussi être placé au niveau supérieur sous le nom `permanent_effects_cooldown_properties`. `cdrAffected` est accepté comme alias de `cdr_affected`. ## ValhallaTrinkets [#valhallatrinkets] ```yaml valhalla: trinkets: trinket_id: 1001 trinket_unique_id: 1001 unique: true unstackable: true ``` | Clé | Type | Défaut | Description | | ------------------- | ------- | --------- | ----------------------------------------------------------------- | | `trinket_id` | integer | *(aucun)* | ID ValhallaTrinkets. Doit être un entier 32 bits positif ou nul. | | `trinket_unique_id` | integer | *(aucun)* | ID unique de trinket. Doit être un entier 32 bits positif ou nul. | | `unique` | boolean | *(aucun)* | Écrit ou retire le flag unique ValhallaTrinkets. | | `unstackable` | boolean | *(aucun)* | Si `true`, chaque pile d'objets générée reçoit un UUID aléatoire. | ## Comportement au rechargement [#comportement-au-rechargement] Exécutez `/iareload` après avoir modifié les sections `valhalla`. Les données sont appliquées aux piles d'objets créées après le rechargement ; les piles existantes ne sont pas réécrites automatiquement. ## Dépannage [#dépannage] * Les noms de stats Valhalla inconnus sont ignorés. * Les valeurs d'énumération pour `operation`, `equipment_class` et `item_flags` doivent utiliser les noms en majuscules de style Valhalla indiqués ci-dessus. * Les objets déjà présents dans les inventaires des joueurs ne sont pas réécrits automatiquement. * Si les effets en jeu ne s'appliquent pas, vérifiez que ValhallaMMO ou ValhallaTrinkets est installé et prend en charge les métadonnées écrites. ## Pages associées [#pages-associées] * [ItemsAdder](/fr/docs/compatibility/itemsadder) * [IDs](/fr/docs/compatibility/ids) * [Configuration](/fr/docs/configuration) # WorldGuard (/fr/docs/compatibility/worldguard) Le support de WorldGuard est optionnel. Lorsque WorldGuard est installé, ItemsAdderAdditions enregistre des flags de région qui peuvent autoriser ou refuser les comportements pris en charge, la pose de peintures personnalisées et les actions intégrées. Si WorldGuard n'est pas installé, ou si une vérification WorldGuard est désactivée dans la configuration d'ItemsAdderAdditions, la fonctionnalité protégée est autorisée par ItemsAdderAdditions. ## Prérequis [#prérequis] * WorldGuard est installé avant qu'ItemsAdderAdditions enregistre ses flags. * Redémarrez le serveur après avoir ajouté WorldGuard ou modifié des plugins qui définissent des flags en conflit. ## Configuration [#configuration] Les vérifications WorldGuard sont activées par défaut. ```yaml worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true ``` Définissez `worldguard.enabled: false` pour désactiver toutes les vérifications WorldGuard d'ItemsAdderAdditions. Définissez une option de flag individuelle sur `false` pour ne plus vérifier ce flag tout en gardant les autres vérifications actives. ## Flags [#flags] ItemsAdderAdditions enregistre des `StateFlag`s WorldGuard avec la valeur par défaut `allow`. | Flag | Comportement contrôlé | | --------------------------- | ---------------------------------------------------- | | `iaa-storage-open` | Ouverture des inventaires du comportement storage. | | `iaa-contact-damage` | Dégâts appliqués par le comportement contact effect. | | `iaa-stackable-place` | Placement géré par le comportement stackable. | | `iaa-bed-use` | Utilisation du comportement bed. | | `iaa-custom-painting-place` | Pose de peintures personnalisées. | ## Flags d'action [#flags-daction] ItemsAdderAdditions enregistre aussi un flag par action intégrée. Le nom du flag est : ```text iaa-action- ``` Exemples : | Clé d'action | Flag WorldGuard | | ------------------------- | ------------------------------------ | | `replace_biome` | `iaa-action-replace-biome` | | `iaa_replace_near_blocks` | `iaa-action-iaa-replace-near-blocks` | | `open_trade_machine` | `iaa-action-open-trade-machine` | | `mythic_mobs_skill` | `iaa-action-mythic-mobs-skill` | Flags d'actions intégrées actuels : ```text iaa-action-actionbar iaa-action-clear-item iaa-action-ignite iaa-action-message iaa-action-mythic-mobs-skill iaa-action-open-inventory iaa-action-open-trade-machine iaa-action-play-animation iaa-action-play-emote iaa-action-replace-biome iaa-action-iaa-replace-near-blocks iaa-action-replace-item iaa-action-shoot-fireball iaa-action-swing-hand iaa-action-teleport iaa-action-title iaa-action-toast iaa-action-veinminer ``` Tous les exécuteurs d'actions vérifient leur flag d'action avant de s'exécuter. L'emplacement vérifié est choisi depuis le contexte de l'action : entité cible, bloc, entité de meuble ou position du joueur en dernier recours. ## Déclencheur d'avancement de région [#déclencheur-davancement-de-région] ItemsAdderAdditions 1.0.12 ajoute le déclencheur `enter_region`. Il valide un critère lorsqu'un joueur se déplace ou se téléporte de l'extérieur vers l'intérieur d'une région WorldGuard configurée. ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # optionnel ``` La casse des IDs de région est ignorée. La valeur optionnelle `world` est le nom du monde Bukkit. Ce déclencheur nécessite seulement WorldGuard ; `worldguard.enabled` et `worldguard.flags.*` contrôlent les protections, pas la détection des régions pour les avancements. Consultez la [référence du déclencheur `enter_region`](/fr/docs/advancements/triggers#enter_region). ## Exemples de régions [#exemples-de-régions] Refuser l'ouverture des stockages dans une région : ```text /rg flag spawn iaa-storage-open deny ``` Refuser les dégâts de contact effect dans une région : ```text /rg flag spawn iaa-contact-damage deny ``` Refuser uniquement l'action `replace_biome` dans une région : ```text /rg flag spawn iaa-action-replace-biome deny ``` Autoriser explicitement la pose de peintures personnalisées : ```text /rg flag gallery iaa-custom-painting-place allow ``` ## Comportement par défaut [#comportement-par-défaut] * Les flags ont `allow` par défaut. * Sans WorldGuard, ItemsAdderAdditions autorise la fonctionnalité. * Si la configuration WorldGuard d'ItemsAdderAdditions est désactivée, ItemsAdderAdditions autorise la fonctionnalité. * Si un nom de flag entre en conflit avec un flag qui n'est pas un `StateFlag`, ce flag est désactivé et un avertissement est journalisé. ## Dépannage [#dépannage] * Si une commande de flag indique que le flag n'existe pas, redémarrez avec WorldGuard installé afin qu'ItemsAdderAdditions puisse enregistrer les flags au démarrage. * Si une fonctionnalité s'exécute quand même, vérifiez `config.yml` et confirmez que l'option `worldguard.flags.*` correspondante vaut `true`. * Pour les actions, utilisez le nom de flag d'action avec des tirets, pas des underscores. * Consultez les logs serveur pour les avertissements de conflit de flags. ## Pages associées [#pages-associées] * [Configuration](/fr/docs/configuration) * [Comportement storage](/fr/docs/behaviours/storage) * [Comportement contact effect](/fr/docs/behaviours/contact-effect) * [Comportement stackable](/fr/docs/behaviours/stackable) * [Comportement bed](/fr/docs/behaviours/bed) * [Peintures personnalisées](/fr/docs/custom-paintings) * [Paramètres des actions](/fr/docs/actions/parameters) * [Déclencheurs d'avancement](/fr/docs/advancements/triggers) # Brewing (/fr/docs/recipes/brewing) ItemsAdderAdditions ajoute un type de recette `brewing` pour les brewing stands. Il enregistre un mélange de potion Paper et prend en charge la correspondance exacte des objets ItemsAdder, MMOItems et vanilla. ## Recette de base [#recette-de-base] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 1 result: item: my_pack:ruby_elixir brew_time: 400 fuel_cost: 1 ``` `base` est la clé recommandée pour la bouteille d'entrée. La clé historique `input` est toujours acceptée. ## Options [#options] | Clé | Type | Défaut | Description | | -------------------- | ------- | ---------- | ------------------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Définissez sur `false` pour ignorer cette recette. | | `base.item` | string | *(requis)* | Bouteille/objet d'entrée requis. Le chemin historique `input.item` est aussi accepté. | | `ingredient.item` | string | *(requis)* | Ingrédient de brewing requis. | | `ingredient.consume` | integer | `1` | Nombre d'objets ingrédient à consommer. Doit être supérieur à `0`. | | `result.item` | string | *(requis)* | Objet de sortie. | | `result.amount` | integer | `1` | Les sorties de brewing sont limitées à un objet par emplacement de bouteille. | | `brew_time` | integer | `400` | Temps de brewing en ticks. Doit être supérieur à `0`. | | `fuel_cost` | integer | `1` | Unités de combustible blaze powder à consommer. Doit être supérieur à `0`. | | `on_complete` | section | *(aucun)* | Actions optionnelles de son et de commandes après la fin du brewing. | ## Références d'objets [#références-dobjets] `base.item`, `ingredient.item` et `result.item` peuvent utiliser : * des matériaux vanilla comme `POTION` ou `minecraft:awkward_potion` * des objets ItemsAdder comme `my_pack:ruby_dust` * des objets MMOItems comme `mmoitems:material:ruby_dust` Les tags ne sont pas valides ici, car le brewing doit comparer des piles d'objets concrètes. Consultez [IDs](/fr/docs/compatibility/ids) pour les formats d'objets pris en charge. ## Actions de complétion [#actions-de-complétion] `on_complete` s'exécute lorsque le brewing stand termine et qu'au moins un joueur le consulte. ```yaml on_complete: sound: name: minecraft:block.brewing_stand.brew source: master volume: 1.0 pitch: 1.0 commands: reward: command: "say {player} brewed a ruby elixir" as_console: true ``` `{player}` est remplacé par le nom du joueur qui consulte l'interface. Les commandes s'exécutent en tant que joueur, sauf si `as_console: true` est défini. ## Exemple complet [#exemple-complet] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: enabled: true base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 2 result: item: my_pack:ruby_elixir amount: 1 brew_time: 600 fuel_cost: 2 on_complete: sound: name: minecraft:entity.player.levelup source: master ``` ## Erreurs courantes [#erreurs-courantes] * Définir `result.amount` au-dessus de `1`. Les brewing stands ne contiennent qu'un objet résultat par emplacement de bouteille, donc la quantité est limitée à `1`. * Utiliser des tags `#minecraft:*`. Les recettes de brewing correspondent à des piles d'objets exactes, pas à des tags. * Définir `fuel_cost` au-dessus du combustible actuellement présent dans le stand. La recette ne se terminera pas tant qu'il n'y aura pas assez de combustible. ## Comportement au rechargement [#comportement-au-rechargement] Exécutez `/iareload` après avoir modifié des recettes de brewing. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité MMOItems](/fr/docs/compatibility/mmoitems) # Cuisson au feu de camp (/fr/docs/recipes/campfire-cooking) Ajoutez des recettes de cuisson au feu de camp sans créer de fichiers de recettes supplémentaires. ## Paramètres [#paramètres] ### `enabled` [#enabled] Optionnel. Par défaut : `true`. Définissez à `false` pour ignorer l'enregistrement de la recette. ### `ingredient.item` [#ingredientitem] Obligatoire. L'objet d'entrée pour la recette. Utilisez un matériau vanilla, un objet ItemsAdder ou un objet MMOItems. Voir [IDs](/fr/docs/compatibility/ids). ```yaml ingredient: item: BEEF ``` ```yaml ingredient: item: my_pack:raw_fish_fillet ``` ```yaml ingredient: item: mmoitems:consumable:raw_fish ``` ### `result.item` [#resultitem] Obligatoire. L'objet cuit en sortie. ```yaml result: item: COOKED_BEEF ``` ### `result.amount` [#resultamount] Optionnel. Par défaut : `1`. Le nombre d’objets produits. ### `cook_time` [#cook_time] Optionnel. Par défaut : `600` ticks. Temps de cuisson. 20 ticks = 1 seconde. ### `exp` [#exp] Optionnel. Par défaut : `0.0`. Expérience accordée lors de la récupération du résultat cuit. ## Exemple complet [#exemple-complet] ```yaml info: namespace: my_pack recipes: campfire_cooking: roasted_berry_skewer: ingredient: item: my_pack:berry_skewer_raw result: item: my_pack:berry_skewer_roasted amount: 1 cook_time: 160 exp: 0.25 ``` ## Notes [#notes] * Prend en charge les objets vanilla, ItemsAdder et MMOItems. * Les tags comme `#minecraft:fishes` ne sont pas pris en charge ici, car les recettes de feu de camp nécessitent une pile d’entrée concrète. * Les ID de recette comme `roasted_berry_skewer` sont des identifiants internes. * Le namespace provient de `info.namespace`. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité MMOItems](/fr/docs/compatibility/mmoitems) # Table de craft (/fr/docs/recipes/crafting) ItemsAdderAdditions ajoute un type de recette de craft avancé appelé `iaa_crafting_table`. Il fonctionne avec les recettes 3x3 et les recettes 2x2 de l'inventaire joueur. `iaa_crafting` est accepté comme alias. Il ne remplace pas le type de recette `crafting_table` normal d’ItemsAdder. Il fournit un autre système de recettes pour les cas où vous avez besoin de fonctionnalités de validation d'ingrédients supplémentaires. Ce type de recette prend en charge les options de recette de craft habituelles déjà connues d’ItemsAdder, tout en ajoutant des fonctionnalités supplémentaires telles que : * les tags vanilla d’objets/blocs * les ingrédients ItemsAdder, MMOItems et vanilla * les quantités d'ingrédients * les dégâts de durabilité sur les ingrédients * les objets de remplacement * l'ignorance de la correspondance de durabilité * le filtrage par type de potion * les listes d'ingrédients sans forme ## Important [#important] Les recettes utilisant ces fonctionnalités supplémentaires doivent être placées sous : ```yaml recipes: iaa_crafting_table: ``` ```yaml recipes: iaa_crafting: ``` Privilégiez `iaa_crafting_table` dans les nouveaux fichiers. `iaa_crafting` se comporte de la même manière et existe comme alias. Si vous n'avez besoin que des fonctionnalités de craft normales d'ItemsAdder, vous pouvez continuer à utiliser le type de recette `crafting_table` classique. ## Recette avec forme de base [#recette-avec-forme-de-base] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: wooden_scythe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ## Recette sans forme de base [#recette-sans-forme-de-base] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: mega_diamond: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 - item: COPPER_INGOT amount: 2 result: item: DIAMOND amount: 3 ``` ## Structure [#structure] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: my_recipe: enabled: true permission: "my_pack.recipe.use" pattern: - "ABC" - "DEF" - "GHI" ingredients: A: STICK result: item: DIAMOND amount: 1 ``` ## Fonctionnalités de recette standard prises en charge [#fonctionnalités-de-recette-standard-prises-en-charge] `iaa_crafting_table` prend en charge également les fonctionnalités de craft courantes que vous connaissez peut-être déjà d’ItemsAdder, comme : * `enabled` * `permission` * les recettes avec forme via `pattern` * les recettes sans forme * plusieurs variantes `pattern...` * le filtrage par `potion_type` ## Fonctionnalités supplémentaires d’ItemsAdderAdditions [#fonctionnalités-supplémentaires-ditemsadderadditions] La principale raison d'utiliser `iaa_crafting_table` est sa prise en charge des prédicats d'ingrédients supplémentaires : * les tags vanilla avec `#minecraft:tag` * les ingrédients MMOItems avec `mmoitems:type:id` * `amount` par ingrédient * `damage` par ingrédient * `replacement` par ingrédient * `ignore_durability` * le format de liste d'ingrédients sans forme ## Paramètres [#paramètres] ### `enabled` [#enabled] Optionnel. Par défaut : `true`. Si défini à `false`, la recette n'est pas enregistrée. ### `permission` [#permission] Optionnel. Si défini, les joueurs doivent avoir cette permission pour que le résultat de la recette apparaisse et soit fabricable. ```yaml permission: "my_pack.recipe.use" ``` ### `shapeless` [#shapeless] Optionnel. Par défaut : `false`. Si `true`, la recette est traitée comme une recette sans forme. ## Actions d'achèvement [#actions-dachèvement] Utilisez `on_complete` pour jouer un son et/ou exécuter des commandes lorsque la recette est fabriquée. ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # optionnel, par défaut : master volume: 1.0 # optionnel, par défaut : 1.0 pitch: 1.0 # optionnel, par défaut : 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # optionnel, par défaut : false ``` `{player}` est remplacé par le nom du joueur qui fabrique la recette. Les commandes sont exécutées par le joueur par défaut ; définissez `as_console: true` pour les exécuter depuis la console. ## Résultat [#résultat] ### `result.item` [#resultitem] Obligatoire. L'objet en sortie. Prend en charge les matériaux vanilla, les objets ItemsAdder et les objets MMOItems. Les tags sont valides uniquement pour les ingrédients, pas pour les résultats. ```yaml result: item: "my_pack:custom_sword" ``` ### `result.amount` [#resultamount] Optionnel. Par défaut : `1`. ```yaml result: item: DIAMOND amount: 3 ``` ### `result.durability` [#resultdurability] Optionnel. Disponible depuis la version 1.0.13 pour les objets de résultat pouvant subir des dégâts. Définit la **durabilité restante** du résultat, et non sa valeur de dégâts. La valeur doit être comprise entre `0` et la durabilité maximale de l'objet. Une durabilité maximale personnalisée appliquée via les composants du résultat est également prise en compte. ```yaml result: item: DIAMOND_PICKAXE durability: 250 ``` ## Recettes avec forme [#recettes-avec-forme] Les recettes avec forme utilisent un `pattern` et une section `ingredients` indexée par caractères. ```yaml my_recipe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ### Notes sur le pattern [#notes-sur-le-pattern] * Les clés d'ingrédients doivent être un seul caractère. * `X` marque les emplacements vides. Ne définissez pas `X` comme ingrédient. * Tout autre caractère non défini dans `ingredients` est également traité comme vide. * Plusieurs patterns sont pris en charge en utilisant des clés comme `pattern_1`, `pattern_2`, etc. ## Recettes sans forme [#recettes-sans-forme] Les recettes sans forme utilisent : ```yaml shapeless: true ``` et peuvent utiliser une liste d'ingrédients : ```yaml my_recipe: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 result: item: DIAMOND ``` ## Formats d'ingrédients [#formats-dingrédients] Les ingrédients prennent en charge plusieurs formats. ### Chaîne simple [#chaîne-simple] ```yaml ingredients: S: STICK P: "#minecraft:planks" C: "my_pack:custom_part" M: "mmoitems:material:ruby_shard" ``` ### Objet détaillé [#objet-détaillé] ```yaml ingredients: S: item: STICK amount: 2 damage: 5 replacement: STICK ignore_durability: true potion_type: minecraft:water ``` ### Style liste sans forme [#style-liste-sans-forme] ```yaml ingredients: - SNOWBALL - item: WATER_BUCKET replacement: BUCKET ``` ## Fonctionnalités d'ingrédients avancées [#fonctionnalités-dingrédients-avancées] ### Tags [#tags] Utilisez des tags vanilla d’objets ou de blocs Minecraft en préfixant la valeur avec `#`. Les tags correspondent uniquement aux entrées du registre vanilla ; ils ne correspondent pas au contenu ItemsAdder ou MMOItems. ```yaml ingredients: P: "#minecraft:planks" ``` Cela permet à n’importe quel objet de ce tag de correspondre. ### `amount` [#amount] Exiger plus d’un exemplaire du même ingrédient. ```yaml ingredients: I: item: IRON_INGOT amount: 3 ``` ### `damage` [#damage] Au lieu de consommer l'ingrédient, l'endommager du montant configuré. Utile pour les outils utilisés dans le craft. ```yaml ingredients: H: item: IRON_PICKAXE damage: 10 ``` ### `replacement` [#replacement] Remplacer l'ingrédient par un autre objet après le craft. Utile pour les seaux, bouteilles, moules et contenants similaires. ```yaml ingredients: W: item: WATER_BUCKET replacement: BUCKET ``` ### `ignore_durability` [#ignore_durability] Ignorer la valeur de durabilité actuelle lors de la correspondance d’un objet. ```yaml ingredients: T: item: IRON_PICKAXE ignore_durability: true ``` ### `potion_type` [#potion_type] Restreindre un ingrédient potion à un type de potion de base spécifique. ```yaml ingredients: P: item: POTION potion_type: minecraft:jump_boost ``` ## Exemple complet avec forme [#exemple-complet-avec-forme] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: reinforced_blade: enabled: true permission: "my_pack.recipes.reinforced_blade" pattern: - "XIT" - "XSI" - "SXX" ingredients: I: item: IRON_INGOT amount: 2 S: STICK T: item: IRON_PICKAXE damage: 8 ignore_durability: true result: item: "my_pack:reinforced_blade" amount: 1 ``` ## Exemple complet sans forme [#exemple-complet-sans-forme] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: purified_bottle: shapeless: true ingredients: - item: POTION potion_type: minecraft:water - item: DIAMOND amount: 2 result: item: "my_pack:purified_bottle" ``` ## Références d’objets prises en charge [#références-dobjets-prises-en-charge] Voir [IDs](/fr/docs/compatibility/ids) pour la référence d'ID partagée. Les objets des ingrédients et résultats peuvent utiliser : * des noms de matériaux vanilla comme `STICK` ou `DIAMOND` * des IDs namespaced vanilla comme `minecraft:stick` * des IDs ItemsAdder comme `namespace:item` * des IDs MMOItems comme `mmoitems:type:id` Les ingrédients peuvent aussi utiliser des tags vanilla comme `#minecraft:planks` et des tags d'objets personnalisés ItemsAdderAdditions. Les tags ne sont pas valides comme résultats ou objets de remplacement. ## Notes [#notes] * `replacement` et `damage` sont appliqués lors du craft. * Les recettes sans forme avec des prédicats avancés doivent utiliser le format liste. * `iaa_crafting_table` est un type de recette avancé supplémentaire, pas un remplacement du `crafting_table` d’ItemsAdder. * `iaa_crafting` est un alias de `iaa_crafting_table`. * Chaque clé `pattern...` est chargée comme variante de pattern shaped. Exemples : `pattern`, `pattern_2`, `pattern_alt`. * Les listes anonymes d'ingrédients shapeless prennent en charge jusqu'à 26 entrées. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité MMOItems](/fr/docs/compatibility/mmoitems) * [Tags personnalisés](/fr/docs/custom-tags) # Tailleur de pierre (/fr/docs/recipes/stonecutter) Ajoutez des recettes de tailleur de pierre sans créer de fichiers de recettes supplémentaires. ## Paramètres [#paramètres] ### `enabled` [#enabled] Optionnel. Par défaut : `true`. Définissez à `false` pour ignorer l'enregistrement de la recette. ### `ingredient.item` [#ingredientitem] Obligatoire. L'objet d'entrée affiché dans le tailleur de pierre. Utilisez un matériau vanilla, un objet ItemsAdder ou un objet MMOItems. Voir [IDs](/fr/docs/compatibility/ids). ```yaml ingredient: item: STONE ``` ```yaml ingredient: item: my_pack:rough_marble ``` ```yaml ingredient: item: mmoitems:material:rough_marble ``` ### `result.item` [#resultitem] Obligatoire. L'objet en sortie. ```yaml result: item: STONE_BRICKS ``` ### `result.amount` [#resultamount] Optionnel. Par défaut : `1`. Le nombre d’objets produits. ## Actions d'achèvement [#actions-dachèvement] Utilisez `on_complete` pour jouer un son et/ou exécuter des commandes lorsque la recette est fabriquée. ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # optionnel, par défaut : master volume: 1.0 # optionnel, par défaut : 1.0 pitch: 1.0 # optionnel, par défaut : 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # optionnel, par défaut : false ``` `{player}` est remplacé par le nom du joueur qui fabrique la recette. Les commandes sont exécutées par le joueur par défaut ; définissez `as_console: true` pour les exécuter depuis la console. ## Exemple complet [#exemple-complet] ```yaml info: namespace: my_pack recipes: stonecutter: marble_tiles: ingredient: item: my_pack:rough_marble result: item: my_pack:marble_tiles amount: 2 on_complete: sound: name: "minecraft:block.stonecutter.use" commands: reward: command: "give {player} diamond 1" as_console: true ``` ## Notes [#notes] * Prend en charge les objets vanilla, ItemsAdder et MMOItems. * Les tags comme `#minecraft:stone_tool_materials` ne sont pas pris en charge ici, car le tailleur de pierre nécessite une pile d’entrée concrète. * Les ID de recette comme `marble_tiles` sont des identifiants internes. * Le namespace provient de `info.namespace`. ## Pages associées [#pages-associées] * [IDs](/fr/docs/compatibility/ids) * [Compatibilité MMOItems](/fr/docs/compatibility/mmoitems) # Génération du monde (/fr/docs/worldgen/world-generation) Deux modes de génération du monde permettent de faire apparaître des meubles personnalisés dans les chunks nouvellement générés. Les deux se définissent directement dans vos fichiers YML de contenu ItemsAdder. | | World Populator | Surface Decorator | | ------------------------------- | ----------------------------- | --------------------- | | Clé YAML | `blocks_populators` | `surface_decorators` | | Style de placement | Par veines (groupé) | Dispersion en surface | | Contrôle de densité | `vein_blocks` + `chunk_veins` | `amount` | | Clé de configuration de surface | `replaceable_blocks` | `bottom_blocks` | Utilisez le **World Populator** pour les apparitions groupées (champignons, groupes de type minerai). Utilisez le **Surface Decorator** pour les objets de surface répartis régulièrement (fleurs, petits rochers). ## World Populator [#world-populator] Fait apparaître des meubles en groupes de type veine pendant la génération des chunks. Utilise la clé `blocks_populators` (la clé historique `worlds_populators` est aussi acceptée). ```yaml info: namespace: my_pack blocks_populators: big_mushroom: enabled: true furniture: "my_pack:big_mushroom" worlds: - world biomes: - minecraft:dark_forest replaceable_blocks: - GRASS_BLOCK - DIRT vein_blocks: 1 chunk_veins: 3 chunk_chance: 25.0 min_height: 60 max_height: 100 ``` | Clé | Type | Défaut | Description | | ------------------------ | -------------- | -------------------- | ------------------------------------------------------------------------------------------ | | `enabled` | boolean | `true` | Définissez sur `false` pour ignorer sans supprimer. | | `furniture` | `namespace:id` | *(requis)* | Le meuble ItemsAdder à faire apparaître. Voir [IDs](/fr/docs/compatibility/ids). | | `worlds` | list | *(tous)* | Noms des mondes à cibler. Prend en charge les motifs wildcard comme `world_*`. | | `biomes` | list | *(tous)* | IDs de biomes (ex. `minecraft:forest`). Tous doivent être valides ou l'entrée est ignorée. | | `replaceable_blocks` | list | *(n'importe lequel)* | Matériaux autorisés pour le bloc directement sous le point d'apparition. | | `vein_blocks` | integer | `1` | Nombre de meubles par tentative de veine. | | `chunk_veins` | integer | `4` | Tentatives de veine par chunk. | | `chunk_chance` | double | `-1` | Chance de 0 à 100 par chunk. `-1` = toujours. | | `min_height` | integer | `60` | Niveau Y minimal. Doit être inférieur à `max_height`. | | `max_height` | integer | `80` | Niveau Y maximal. | | `allow_liquid_placement` | boolean | `false` | Autorise l'apparition dans l'eau ou la lave. | Les alias historiques restent acceptés : `worlds_populators` pour `blocks_populators`, `amount` pour `vein_blocks`, `iterations` pour `chunk_veins` et `chance` pour `chunk_chance`. ## Surface Decorator [#surface-decorator] Répartit des meubles sur la surface du terrain nouvellement généré. Utilise la clé `surface_decorators`. ```yaml info: namespace: my_pack surface_decorators: small_flower: enabled: true furniture: "my_pack:small_flower" worlds: - world biomes: - minecraft:plains - minecraft:sunflower_plains bottom_blocks: - GRASS_BLOCK amount: 4 chunk_chance: 50.0 min_height: 60 max_height: 120 ``` | Clé | Type | Défaut | Description | | ------------------------ | -------------- | -------------------- | ------------------------------------------------------------------------------------------ | | `enabled` | boolean | `true` | Définissez sur `false` pour ignorer sans supprimer. | | `furniture` | `namespace:id` | *(requis)* | Le meuble ItemsAdder à faire apparaître. Voir [IDs](/fr/docs/compatibility/ids). | | `worlds` | list | *(tous)* | Noms des mondes à cibler. Prend en charge les motifs wildcard comme `world_*`. | | `biomes` | list | *(tous)* | IDs de biomes (ex. `minecraft:plains`). Tous doivent être valides ou l'entrée est ignorée. | | `bottom_blocks` | list | *(n'importe lequel)* | Matériaux autorisés pour le bloc directement sous le point d'apparition. | | `amount` | integer | `4` | Tentatives de placement par chunk. | | `chunk_chance` | double | `-1` | Chance de 0 à 100 par chunk. `-1` = toujours. | | `min_height` | integer | `60` | Niveau Y minimal. Doit être inférieur à `max_height`. | | `max_height` | integer | `80` | Niveau Y maximal. | | `allow_liquid_surface` | boolean | `false` | Autorise un bloc liquide sous le point d'apparition comme surface valide. | | `allow_liquid_placement` | boolean | `false` | Autorise l'apparition dans l'eau ou la lave. | L'alias historique `chance` est accepté pour `chunk_chance`. ## Notes [#notes] * Seuls les chunks nouvellement générés déclenchent l'apparition. Les chunks existants ne sont pas affectés. * Le meuble doit être enregistré par ItemsAdder avant le chargement de l'entrée. * Les IDs de biomes invalides font ignorer toute l'entrée. * Les surface decorators dans le Nether scannent vers le bas de `max_height` à `min_height`. * Lorsque `allow_liquid_placement` est activé, la décoration de surface en dimension normale utilise la heightmap du fond océanique afin de trouver les surfaces sous l'eau. # Bouwer (/nl/docs/builder) Kies een actie, gedraging of recept, vul de velden in en kopieer de gegenereerde YAML direct in je itemconfiguratie. * **Acties**: plak de uitvoer in de `events`-sectie van je item. Zie de pagina [actieparameters](/nl/docs/actions/parameters) voor een volledig voorbeeld. * **Gedragingen**: plak de uitvoer direct onder je itemdefinitie. * **Recepten**: plak de uitvoer in een willekeurig ItemsAdder-inhoud-YML-bestand (het volledige `info` + `recipes`-blok is inbegrepen). # Componenten (/nl/docs/components) ItemsAdderAdditions past Minecraft-datacomponenten toe op aangepaste items tijdens packgeneratie via de ItemsAdder item-modifier hook. Voeg een `components`-sectie toe onder je itemdefinitie en voer `/iazip` uit. ```yaml items: my_item: components: rarity: RARE use_cooldown: cooldown: 1.5 tool: default_mining_speed: 2.0 rules: - blocks: "#minecraft:logs" speed: 4.0 correct_for_drops: true ``` Componenten worden toegepast wanneer ItemsAdder de pack- en itemdata opnieuw bouwt. Voer `/iazip` uit na het wijzigen van component-YAML. `/iareload` herlaadt andere ItemsAdderAdditions-content, maar geen componenten. ## Statuslegenda [#statuslegenda] | Status | Betekenis | | ----------------------- | --------------------------------------------------------------------- | | **Gespecialiseerd** | Toegewijde IAA-handler met een IAA-specifieke YAML-syntaxis | | **Generiek** | Geen toegewijde handler; valt terug op de generieke NMS-codecpijplijn | | **Afgehandeld door IA** | Ingesteld door ItemsAdder zelf; IAA slaat het over | | **Niet ondersteund** | Geen Paper/NMS API; kan niet worden toegepast | ## Generieke NMS-componenten [#generieke-nms-componenten] Voor componentsleutels die geen gespecialiseerde IAA-handler hebben, valt IAA terug op een generieke NMS-pijplijn. De sleutel wordt genormaliseerd (`custom_data` wordt `minecraft:custom_data`), de waardeboom wordt uit de YAML geparseerd en het resultaat wordt toegepast via het Mojang-codecsysteem van Minecraft via NMS. **Minimale serverversie voor generieke componenten: 1.21.3.** Op 1.20.6 en 1.21.1 is de generieke NMS-pijplijn niet beschikbaar. Gespecialiseerde handlers werken nog steeds op die versies. ### Gebruik [#gebruik] Gebruik de volledige naamruimtesleutel of de korte vorm (de `minecraft:`-prefix wordt automatisch toegevoegd): ```yaml items: my_item: components: minecraft:custom_data: my_plugin: id: my_item tier: 3 enabled: true ``` Korte vorm (gelijkwaardig): ```yaml items: my_item: components: custom_data: my_plugin: id: my_item ``` De YAML-structuur moet overeenkomen met de vanilla-codec voor dat component. IAA herinterpreteert de vorm niet. Als de codec de waarde afwijst, logt IAA een waarschuwing en slaat dat component over. **Opmerking:** `minecraft:custom_data` is een echt vanilla NBT-compound-component. Verwar het niet met Bukkit's `PersistentDataContainer` (PDC). De twee systemen zijn onafhankelijk. PDC-data wordt intern door Bukkit opgeslagen en is geen `custom_data`. ## Componentreferentie [#componentreferentie] ### `attack_range` [#attack_range] **Status:** Gespecialiseerd | **Minimale versie:** 1.21.11 Overschrijft het aanvalsbereik van het item voor melee- en projectielaanvallen. | Eigenschap | Type | Standaard | Bereik | | -------------------- | ----- | --------- | ---------- | | `min_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_reach` | Float | `3.0` | 0.0 - 64.0 | | `min_creative_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_creative_reach` | Float | `5.0` | 0.0 - 64.0 | | `hitbox_margin` | Float | `0.3` | 0.0 - 1.0 | | `mob_factor` | Float | `1.0` | 0.0 - 2.0 | ```yaml components: attack_range: max_reach: 5.0 max_creative_reach: 7.0 hitbox_margin: 0.5 ``` ### `banner_patterns` [#banner_patterns] **Status:** Gespecialiseerd Stelt de bannerpatroonlagen in op een banneritem. | Eigenschap | Type | Formaat | | ---------- | ------ | ------------------------------------------------------------- | | `type` | String | Patroontypesleutel (bijv. `stripe_top`, `square_bottom_left`) | | `color` | String | Verfkleurnaam (`WHITE`, `RED`, `BLUE`, enz.) | ```yaml components: banner_patterns: - type: stripe_top color: RED - type: square_bottom_left color: BLUE ``` Geldige verfkleuren: `WHITE`, `ORANGE`, `MAGENTA`, `LIGHT_BLUE`, `YELLOW`, `LIME`, `PINK`, `GRAY`, `LIGHT_GRAY`, `CYAN`, `PURPLE`, `BLUE`, `BROWN`, `GREEN`, `RED`, `BLACK`. Patroontypesleutels zijn Minecraft-registersleutels. De `minecraft:`-prefix is optioneel (bijv. `stripe_top` en `minecraft:stripe_top` zijn gelijkwaardig). ### `base_color` [#base_color] **Status:** Gespecialiseerd Stelt de basiskleur van een schilditem in. | Eigenschap | Type | Waarden | | ---------- | ------ | ------------- | | (waarde) | String | Verfkleurnaam | ```yaml components: base_color: RED ``` ### `blocks_attacks` [#blocks_attacks] **Status:** Gespecialiseerd Laat het item inkomende aanvallen blokkeren als een schild. | Eigenschap | Type | Standaard | | ------------------------ | ----------------- | ----------------------------------------------------------- | | `block_delay_seconds` | Float | `0.0` | | `disable_cooldown_scale` | Float | `1.0` | | `bypassed_by` | String | `null` (schadetype-tag, bijv. `#minecraft:bypasses_shield`) | | `block_sound` | String | `null` (geluidssleutel) | | `disable_sound` | String | `null` (geluidssleutel) | | `damage_reductions` | Lijst van secties | `[]` | | `item_damage` | Sectie | `null` | `damage_reductions`-vermelding: | Eigenschap | Type | Standaard | | --------------------------- | --------------- | -------------------------------------------------------- | | `type` | String of Lijst | `null` (schadetype-tag of IDs; weglaten voor alle types) | | `horizontal_blocking_angle` | Float | `90.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | `item_damage`-sectie: | Eigenschap | Type | Standaard | | ----------- | ----- | --------- | | `threshold` | Float | `0.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | ```yaml components: blocks_attacks: block_delay_seconds: 0.25 disable_cooldown_scale: 1.0 bypassed_by: "#minecraft:bypasses_shield" block_sound: minecraft:item.shield.block disable_sound: minecraft:item.shield.break damage_reductions: - type: "#minecraft:is_projectile" horizontal_blocking_angle: 90.0 base: 0.0 factor: 0.5 - type: minecraft:player_attack base: 1.0 factor: 1.0 item_damage: threshold: 3.0 base: 1.0 factor: 1.0 ``` Het `type`-veld in `damage_reductions` accepteert een tagstring (`#minecraft:is_fire`), een enkele schadetypesleutel (`minecraft:fire`), of een lijst van schadetypesleutels. ### `bundle_contents` [#bundle_contents] **Status:** Gespecialiseerd Stelt de begininhoud van een bundelitem in. Accepteert vanilla-IDs, ItemsAdder-IDs en het `mmoitems:TYPE:ID`-formaat. Zie [ID's](/nl/docs/compatibility/ids) voor volledige formaatdetails. ```yaml components: bundle_contents: - minecraft:arrow - my_pack:special_arrow ``` ### `can_break` [#can_break] **Status:** Gespecialiseerd Beperkt welke blokken dit item kan breken in Avontuurmodus. ```yaml components: can_break: - minecraft:stone - "#minecraft:logs" ``` Accepteert blok-IDs (`minecraft:stone`) en bloktags (`#minecraft:logs`). De `minecraft:`-prefix is optioneel. ### `can_place_on` [#can_place_on] **Status:** Gespecialiseerd Beperkt op welke blokken dit item geplaatst kan worden in Avontuurmodus. ```yaml components: can_place_on: - minecraft:grass_block - "#minecraft:dirt" ``` Zelfde formaat als `can_break`. ### `charged_projectiles` [#charged_projectiles] **Status:** Gespecialiseerd Stelt de voorgeladen projectielen in een kruisboog in. Accepteert vanilla-IDs, ItemsAdder-IDs en het `mmoitems:TYPE:ID`-formaat. Zie [ID's](/nl/docs/compatibility/ids). ```yaml components: charged_projectiles: - minecraft:arrow - my_pack:special_bolt ``` ### `damage_resistant` [#damage_resistant] **Status:** Gespecialiseerd Maakt de item-entiteit immuun voor een schadecategorie (zoals netheriet dat vuur negeert). ```yaml components: damage_resistant: minecraft:is_fire ``` Accepteert een schadetype-tagsleutel. De `#`-prefix en de `minecraft:`-prefix zijn beide optioneel (`is_fire`, `#is_fire`, `minecraft:is_fire`, `#minecraft:is_fire` zijn allemaal gelijkwaardig). ### `damage_type` [#damage_type] **Status:** Gespecialiseerd Stelt het schadetype in dat wordt gebruikt wanneer de item-entiteit schade toebrengt. ```yaml components: damage_type: minecraft:magic ``` Moet een geldige schadetype-registersleutel zijn. ### `death_protection` [#death_protection] **Status:** Gespecialiseerd Voorkomt de dood en past optioneel effecten toe wanneer geactiveerd (zoals een totem van onsterfelijkheid). | Eigenschap | Type | Standaard | | --------------- | ----------------- | ------------------------------------- | | `death_effects` | Lijst van secties | `[]` (weglaten voor kale bescherming) | Effecttypes in `death_effects`: | Type | Eigenschappen | | ------------------- | ------------------------------------------------------------------------------ | | `apply_effects` | `effects` (lijst van toverdrankeffecten), `probability` (float, standaard 1.0) | | `remove_effects` | `effects` (lijst van effecttypesleutels) | | `clear_all_effects` | *(geen eigenschappen)* | | `teleport_randomly` | `diameter` (float, standaard 16.0) | | `play_sound` | `sound` (geluidssleutel met naamruimte) | Toverdrankeffect-vermelding (gebruikt in `apply_effects`): | Eigenschap | Type | Standaard | | ----------- | ------- | ---------------------------------------- | | `type` | String | Effecttypesleutel (bijv. `regeneration`) | | `duration` | Integer | Duur in ticks | | `amplifier` | Integer | Niveau - 1 (0 = niveau I) | ```yaml components: death_protection: death_effects: - type: apply_effects probability: 1.0 effects: - type: regeneration duration: 900 amplifier: 1 - type: absorption duration: 100 amplifier: 1 - type: remove_effects effects: - wither - poison - type: play_sound sound: minecraft:item.totem.use ``` Laat `death_effects` volledig weg voor een kaal totemeffect (voorkomt de dood, geen extra effecten): ```yaml components: death_protection: {} ``` ### `dyed_color` [#dyed_color] **Status:** Gespecialiseerd Stelt de verfkleur van leren harnas of andere verfbare items in. ```yaml components: dyed_color: "#FF4400" ``` Accepteert `#RRGGBB`-hexkleurstrings. ### `enchantable` [#enchantable] **Status:** Gespecialiseerd Stelt de betoverbaarheidswaarde van het item in (beïnvloedt betoveringskwaliteit in de betoveringstafel). ```yaml components: enchantable: 15 ``` Bereik: 1 - 255. Hogere waarden verbeteren de betoveringskwaliteit. ### `firework_explosion` [#firework_explosion] **Status:** Gespecialiseerd Stelt het vuurwerkexplosie-effect in op een vuurwerksteritem. | Eigenschap | Type | Standaard | | ------------- | --------------------------- | --------- | | `type` | String | `BALL` | | `colors` | Lijst van `#RRGGBB`-strings | `[]` | | `fade_colors` | Lijst van `#RRGGBB`-strings | `[]` | | `trail` | Boolean | `false` | | `flicker` | Boolean | `false` | Geldige types: `BALL`, `BALL_LARGE`, `STAR`, `BURST`, `CREEPER`. ```yaml components: firework_explosion: type: STAR colors: - "#FF0000" - "#0000FF" fade_colors: - "#FFFFFF" trail: true flicker: false ``` ### `fireworks` [#fireworks] **Status:** Gespecialiseerd Stelt de vuurwerkeigenschappen in op een vuurwerkpijl-item. | Eigenschap | Type | Standaard | | ----------------- | ----------------- | ------------- | | `flight_duration` | Integer | `1` (0 - 255) | | `explosions` | Lijst van secties | `[]` | Elke vermelding in `explosions` gebruikt hetzelfde schema als `firework_explosion`. ```yaml components: fireworks: flight_duration: 2 explosions: - type: BURST colors: - "#FFAA00" trail: true ``` ### `intangible_projectile` [#intangible_projectile] **Status:** Gespecialiseerd Markeert dit item als een ongrijpbaar projectiel (kan niet worden opgepakt nadat het is afgeschoten). ```yaml components: intangible_projectile: true ``` Zet op `true` of een willekeurige niet-null waarde om in te schakelen. Dit is een markeringscomponent zonder eigenschappen. ### `kinetic_weapon` [#kinetic_weapon] **Status:** Gespecialiseerd | **Minimale versie:** 1.21.5 Laat het item schade toebrengen op basis van de bewegingssnelheid van de speler (zoals een strijdknots). | Eigenschap | Type | Standaard | | ------------------------ | ------------------------------- | --------- | | `contact_cooldown_ticks` | Integer | `0` | | `delay_ticks` | Integer | `0` | | `forward_movement` | Float | `1.0` | | `damage_multiplier` | Float | `1.0` | | `sound` | String (sleutel met naamruimte) | `null` | | `hit_sound` | String (sleutel met naamruimte) | `null` | | `dismount_conditions` | Sectie | `null` | | `knockback_conditions` | Sectie | `null` | | `damage_conditions` | Sectie | `null` | Conditiesecties (`dismount_conditions`, `knockback_conditions`, `damage_conditions`): | Eigenschap | Type | Standaard | | -------------------- | ------- | --------- | | `max_duration_ticks` | Integer | `0` | | `min_speed` | Float | `0.0` | | `min_relative_speed` | Float | `0.0` | ```yaml components: kinetic_weapon: damage_multiplier: 2.0 forward_movement: 1.5 sound: minecraft:entity.player.attack.sweep damage_conditions: min_speed: 0.1 ``` ### `lodestone_tracker` [#lodestone_tracker] **Status:** Gespecialiseerd Laat een kompas naar een hemelsteenlocatie wijzen. | Eigenschap | Type | Standaard | | ---------- | ------- | -------------------------------------------------------------- | | `tracked` | Boolean | `true` | | `world` | String | `null` (wereldnaam; weglaten voor een niet-gekoppelde tracker) | | `x` | Integer | `0` | | `y` | Integer | `0` | | `z` | Integer | `0` | ```yaml components: lodestone_tracker: world: world x: 100 y: 64 z: -200 tracked: true ``` Als `world` wordt weggelaten, is het kompas niet gekoppeld (toont een draaiende naald). Als `world` is ingesteld maar de wereld niet is geladen tijdens het herladen, logt IAA een waarschuwing en past het component toe zonder locatie. ### `map_color` [#map_color] **Status:** Gespecialiseerd Stelt de randkleur van een ingevuld kaartitem in. ```yaml components: map_color: "#2A6DB5" ``` Accepteert `#RRGGBB`-hexkleurstrings. ### `map_decorations` [#map_decorations] **Status:** Gespecialiseerd Stelt vaste decoraties (markeringen) in op een ingevulde kaart. ```yaml components: map_decorations: my_marker: type: RED_MARKER x: 100.0 z: 200.0 rotation: 0.0 another_marker: type: player x: -50.0 z: 75.0 rotation: 90.0 ``` Elke sleutel onder `map_decorations` is een unieke decoratie-ID. `type` is een `MapCursor.Type`-sleutel (hoofdletterongevoelig; `minecraft:`-prefix optioneel). `x` en `z` zijn wereldcoördinaten. `rotation` is in graden. ### `map_id` [#map_id] **Status:** Gespecialiseerd Koppelt het item aan een specifieke kaart via zijn integer-ID. ```yaml components: map_id: 42 ``` ### `minimum_attack_charge` [#minimum_attack_charge] **Status:** Gespecialiseerd | **Minimale versie:** 1.21.1 Stelt de minimale aanvalslaadfractie in die nodig is om volledige-lading-effecten te activeren. ```yaml components: minimum_attack_charge: 0.9 ``` Bereik: 0.0 - 1.0. ### `ominous_bottle_amplifier` [#ominous_bottle_amplifier] **Status:** Gespecialiseerd Stelt het versterkerniveau van een onheilspellende fles in (beïnvloedt de sterkte van Slecht Voorteken bij consumptie). ```yaml components: ominous_bottle_amplifier: 3 ``` Bereik: 0 - 4. ### `piercing_weapon` [#piercing_weapon] **Status:** Gespecialiseerd | **Minimale versie:** 1.21.5 Laat het item door entiteiten heen prikken (zoals een pijl met Doorboring). | Eigenschap | Type | Standaard | | ----------------- | ------------------------------- | --------- | | `deals_knockback` | Boolean | `true` | | `dismounts` | Boolean | `true` | | `sound` | String (sleutel met naamruimte) | `null` | | `hit_sound` | String (sleutel met naamruimte) | `null` | ```yaml components: piercing_weapon: deals_knockback: true dismounts: false hit_sound: minecraft:entity.arrow.hit ``` ### `pot_decorations` [#pot_decorations] **Status:** Gespecialiseerd Stelt de potscherfdecoraties in op een versierde pot. | Eigenschap | Type | Standaard | | ---------- | ------ | ------------------------------------------------------- | | `back` | String | `null` (vanilla item-ID, bijv. `arms_up_pottery_sherd`) | | `left` | String | `null` | | `right` | String | `null` | | `front` | String | `null` | ```yaml components: pot_decorations: back: arms_up_pottery_sherd left: archer_pottery_sherd right: blade_pottery_sherd front: burn_pottery_sherd ``` Accepteert vanilla item-IDs. De `minecraft:`-prefix is optioneel. ### `potion_contents` [#potion_contents] **Status:** Gespecialiseerd Stelt de toverdrankeffecten in van een toverdrank-, werpdrank- of nawerkdrankitem. | Eigenschap | Type | Standaard | | ------------- | ----------------- | ------------------------------------------------------- | | `potion` | String | `null` (PotionType-sleutel, bijv. `minecraft:strength`) | | `color` | String | `null` (#RRGGBB hex-override) | | `custom_name` | String | `null` | | `effects` | Lijst van secties | `[]` | Ten minste een van `potion`, `color`, `custom_name`, of `effects` moet aanwezig zijn. ```yaml components: potion_contents: potion: minecraft:strength color: "#FF0000" custom_name: "Super Strength" effects: - type: strength duration: 600 amplifier: 2 ``` ### `potion_duration_scale` [#potion_duration_scale] **Status:** Gespecialiseerd Vermenigvuldigt de duur van alle toverdrankeffecten die door dit item worden toegepast. ```yaml components: potion_duration_scale: 2.0 ``` Bereik: 0.0 - 255.0. ### `profile` [#profile] **Status:** Gespecialiseerd Stelt het spelerskin-profiel in op een spelerhoofd-item. Accepteert een spelernaam (opgelost door de client) of een sectie met expliciete profieldata. Eenvoudige vorm (spelernaam): ```yaml components: profile: Notch ``` Sectievorm (expliciete UUID, naam of textuur): ```yaml components: profile: name: Notch uuid: 069a79f4-44e9-4726-a5be-fca90e38aaf5 texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvLi4uIn19fQ== ``` Ten minste een van `name`, `uuid`, of `texture` is vereist in de sectievorm. ### `provides_banner_patterns` [#provides_banner_patterns] **Status:** Gespecialiseerd Markeert het item als een ingrediënt dat bannerpatronen ontgrendelt wanneer het in een weefgetouw wordt geplaatst. ```yaml components: provides_banner_patterns: minecraft:no_item_required ``` Accepteert een bannerpatroon-tagsleutel. De `#`-prefix is optioneel. ### `provides_trim_material` [#provides_trim_material] **Status:** Gespecialiseerd Markeert het item als een smeed-randmateriaal. ```yaml components: provides_trim_material: gold ``` Accepteert een randmateriaal-registersleutel. De `minecraft:`-prefix is optioneel. ### `rarity` [#rarity] **Status:** Gespecialiseerd Stelt de zeldzaamheid van het item in, wat de kleur van de itemnaam in het standaard resourcepack beïnvloedt. ```yaml components: rarity: RARE ``` Geldige waarden: `COMMON`, `UNCOMMON`, `RARE`, `EPIC`. ### `repairable` [#repairable] **Status:** Gespecialiseerd Stelt in welke items dit item kunnen repareren in een aambeeld. Accepteert een tagstring of een lijst van item-IDs: ```yaml # Met een tag components: repairable: "#minecraft:planks" ``` ```yaml # Met een lijst van items components: repairable: - minecraft:diamond - minecraft:netherite_ingot ``` ### `stored_enchantments` [#stored_enchantments] **Status:** Gespecialiseerd Stelt de betoveringen in die in een betoverd boek zijn opgeslagen. Gebruikt een sectie met `betoveringssleutel: niveau`-paren. ```yaml components: stored_enchantments: sharpness: 5 looting: 3 minecraft:mending: 1 ``` Niveaubereik: 1 - 255. De `minecraft:`-prefix is optioneel. ### `suspicious_stew_effects` [#suspicious_stew_effects] **Status:** Gespecialiseerd Stelt de effecten in die door een verdacht stoofpot-item worden gegeven. ```yaml components: suspicious_stew_effects: - type: speed duration: 200 - type: minecraft:night_vision duration: 400 ``` `duration` is in ticks. Standaard is 160. De `minecraft:`-prefix op effecttypes is optioneel. ### `swing_animation` [#swing_animation] **Status:** Gespecialiseerd | **Minimale versie:** 1.21.5 Stelt het zwaaianimatietype en de duur in voor melee-aanvallen. | Eigenschap | Type | Waarden | | ---------- | ------- | ----------------------- | | `type` | String | `NONE`, `WHACK`, `STAB` | | `duration` | Integer | >= 1 | ```yaml components: swing_animation: type: WHACK duration: 6 ``` ### `tool` [#tool] **Status:** Gespecialiseerd Configureert het item als een gereedschap met mijnsnelheidsregels. | Eigenschap | Type | Standaard | | ------------------------- | ----------------- | --------- | | `default_mining_speed` | Float | `1.0` | | `damage_per_block` | Integer | `1` | | `can_destroy_in_creative` | Boolean | `true` | | `rules` | Lijst van secties | `[]` | Regelsectie: | Eigenschap | Type | Standaard | | ------------------- | --------------------- | ---------------------- | | `blocks` | String, tag of Lijst | Vereist | | `speed` | Float | `null` (geen override) | | `correct_for_drops` | Boolean of weggelaten | `null` (NOT\_SET) | ```yaml components: tool: default_mining_speed: 1.0 damage_per_block: 1 can_destroy_in_creative: true rules: - blocks: "#minecraft:mineable/pickaxe" speed: 6.0 correct_for_drops: true - blocks: - minecraft:obsidian - minecraft:crying_obsidian speed: 12.0 correct_for_drops: true ``` `blocks` accepteert een tagstring (`#minecraft:logs`), een enkele blok-ID (`minecraft:stone`), of een lijst van blok-IDs. `correct_for_drops`: `true` betekent dat dit gereedschap de juiste drops produceert; `false` betekent dat het dat niet doet; het weglaten van de sleutel betekent NOT\_SET (erft vanilla-standaarden). ### `tooltip_display` [#tooltip_display] **Status:** Gespecialiseerd Bepaalt welke componenten worden weergegeven in de item-tooltip. | Eigenschap | Type | Standaard | | ------------------- | --------------------------- | --------- | | `hide_tooltip` | Boolean | `false` | | `hidden_components` | Lijst van componentsleutels | `[]` | ```yaml components: tooltip_display: hide_tooltip: false hidden_components: - enchantments - attribute_modifiers - stored_enchantments ``` `hidden_components` accepteert `DataComponentTypes`-veldnamen (hoofdletterongevoelig). Gebruik de Minecraft-componentsleutel zonder de `minecraft:`-prefix en in UPPER\_SNAKE\_CASE (bijv. `ATTRIBUTE_MODIFIERS`). De opzoeking is hoofdletterongevoelig. ### `use_cooldown` [#use_cooldown] **Status:** Gespecialiseerd Stelt een gebruikscooldown in op het item. | Eigenschap | Type | Vereist | | ---------- | ------------------------------- | ------- | | `cooldown` | Float (seconden) | Ja | | `group` | String (sleutel met naamruimte) | Nee | ```yaml components: use_cooldown: cooldown: 2.0 ``` Als `group` wordt weggelaten, is de cooldowngroep standaard `itemsadder:`, waardoor de cooldown itemspecifiek wordt. Stel `group` in om een cooldown te delen met andere items: ```yaml components: use_cooldown: cooldown: 5.0 group: my_pack:special_items ``` ### `use_remainder` [#use_remainder] **Status:** Gespecialiseerd Stelt in welk item in het slot achterblijft nadat dit item volledig is geconsumeerd. ```yaml components: use_remainder: minecraft:glass_bottle ``` Accepteert vanilla-IDs, ItemsAdder-IDs en het `mmoitems:TYPE:ID`-formaat. Zie [ID's](/nl/docs/compatibility/ids). ### `weapon` [#weapon] **Status:** Gespecialiseerd | **Minimale versie:** 1.21.5 Configureert het item als een wapen met aangepaste schade en blokkeerinteractie. | Eigenschap | Type | Standaard | | ------------------------------ | ------- | --------- | | `item_damage_per_attack` | Integer | `1` | | `disable_blocking_for_seconds` | Float | `0.0` | ```yaml components: weapon: item_damage_per_attack: 2 disable_blocking_for_seconds: 0.6 ``` `disable_blocking_for_seconds`: wanneer dit wapen een blokkerende entiteit raakt, wordt blokkeren voor deze duur uitgeschakeld. ### `writable_book_content` [#writable_book_content] **Status:** Gespecialiseerd Stelt de pagina's van een beschrijfbaar boek in (boek en veer). ```yaml components: writable_book_content: - "Page 1 content here." - "Page 2 content here." ``` ## Versieoverzicht [#versieoverzicht] | Component | Minimale versie | | ------------------------- | --------------- | | `minimum_attack_charge` | 1.21.1 | | `kinetic_weapon` | 1.21.5 | | `piercing_weapon` | 1.21.5 | | `swing_animation` | 1.21.5 | | `weapon` | 1.21.5 | | `attack_range` | 1.21.11 | | Generieke NMS-componenten | 1.21.3 | | Alle andere componenten | 1.20.6+ | Componenten die een nieuwere versie vereisen dan de draaiende server worden stilzwijgend overgeslagen met een waarschuwing in de console. # Configuratie (/nl/docs/configuration) ItemsAdderAdditions gebruikt `config.yml` voor pluginbrede featuretoggles. ItemsAdder content-YAML definieert nog steeds de daadwerkelijke acties, behaviours, recepten, advancements, paintings, tags en world generation entries. ## Standaardconfiguratie [#standaardconfiguratie] ```yaml features: creative_inventory_integration: true custom_paintings: true item_model_definitions: true behaviours: bed: true connectable: true contact_effect: true stackable: true storage: true text_display: true worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true actions: actionbar: true clear_item: true ignite: true message: true mythic_mobs_skill: true open_inventory: true open_trade_machine: true play_animation: true play_emote: true replace_biome: true replace_item: true shoot_fireball: true swing_hand: true teleport: true title: true toast: true veinminer: true update-checker: enabled: true on-join: true ``` ## Toggle-gedrag [#toggle-gedrag] Ontbrekende toggle keys zijn standaard ingeschakeld. Dit geldt ook voor optionele secties die niet in de standaardconfiguratie staan. WorldGuard-regiocontroles kunnen worden geconfigureerd onder `worldguard`; zie [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard). Components kunnen op dezelfde manier worden uitgeschakeld: ```yaml components: rarity: false ``` ## Herlaadgedrag [#herlaadgedrag] Voer uit: ```text /itemsadderadditions reload ``` of: ```text /iaa reload ``` Dit commando herlaadt `config.yml` en past pluginbrede feature-, actie-, behaviour- en componenttoggles opnieuw toe. Het herlaadt **geen** ItemsAdder content-YAML-bestanden. Gebruik `/iareload` na wijzigingen aan ItemsAdderAdditions content-YAML-secties zoals acties, behaviours, custom tags, recepten, advancements, custom paintings, Valhalla-metadata of world generation entries. Gebruik `/iazip` na wijzigingen aan `components` secties of resourcepack-assets. `/iareload` herlaadt ItemsAdderAdditions-content behalve components. ## Veelgemaakte fouten [#veelgemaakte-fouten] * Een toggle op `false` zetten en verwachten dat bestaande content na herladen blijft werken. * Een typefout toevoegen onder `actions`, `behaviours`, `features` of `components`; onbekende toggle keys schakelen de bedoelde functie niet uit. * Verwachten dat `/itemsadderadditions reload` ItemsAdder content-YAML herlaadt of het resourcepack opnieuw bouwt. Gebruik `/iareload` voor content-YAML en `/iazip` voor components of assets. # Creatieve inventarisintegratie (/nl/docs/creative-inventory-integration) **Credits:** Deze functie is oorspronkelijk gecodeerd door **Misieur** ([GitHub](https://github.com/Misieur)). **Versievereiste:** Vereist **Paper 1.21.5 of hoger**. De functie is uitgeschakeld op oudere versies. Deze functie injecteert automatisch elk aangepast item dat door ItemsAdder is geregistreerd in het vanilla creatieve menu. Er is geen handmatige configuratie per item nodig; het pikt alles op wat ItemsAdder laadt. **Belangrijk**: Je hebt operatorrechten en het **Operator Items Tab** nodig om ItemsAdder-items in de creatieve inventaris te zien. ## Instellen [#instellen] Voer `/iazip` uit om het resourcepack opnieuw te genereren. Je creatieve inventaris bevat alle aangepaste items nadat je opnieuw verbinding hebt gemaakt. Elke keer dat je aangepaste items toevoegt of verwijdert via ItemsAdder, moet je opnieuw de server betreden en `/iazip` uitvoeren om de wijzigingen zichtbaar te maken in je creatieve inventaris. ## In- en uitschakelen [#in--en-uitschakelen] Je kunt deze functie in- of uitschakelen in de `config.yml` van de plugin: ```yaml features: creative_inventory_integration: true ``` Stel dit in op `false` om de functie volledig uit te schakelen. De plugin genereert geen resourcepack-bestanden en injecteert geen registeritems wanneer uitgeschakeld. ## ItemsAdder-configuratie [#itemsadder-configuratie] Tijdens de eerste instelling voegt de plugin zichzelf automatisch toe aan de resourcepack-samenvoeglijst van ItemsAdder: ```yaml # In ItemsAdder/config.yml (automatisch beheerd) resource-pack: zip: merge_other_plugins_resourcepacks_folders: - ItemsAdderAdditions/resourcepack ``` Als dit item om welke reden dan ook ontbreekt (bijv. het bestand was niet beschrijfbaar), kun je het veilig handmatig toevoegen. De plugin logt een waarschuwing als het de wijziging niet automatisch kon toepassen. ## Opmerkingen [#opmerkingen] * **Sjabloonitems** zijn uitgesloten. Items gemarkeerd met `template: true` in hun ItemsAdder-configuratie verschijnen niet in het creatieve menu. * **Directionele varianten** zijn uitgesloten. Items waarvan de namespace-ID eindigt op `_north`, `_south`, `_east`, `_west`, `_up` of `_down` worden overgeslagen wanneer het basisitem (zonder het richtingsachtervoegsel) bestaat in het register. Dit voorkomt dubbele vermeldingen voor roteerbare blokken. * Items met `hide_from_inventory: true` in hun ItemsAdder-configuratie zijn uitgesloten. * Items die `graphics.icon` of `resource.icon` gebruiken, tonen hun platte GUI-pictogram. Alle andere items gebruiken het 3D-model dat ze normaal tonen wanneer ze in de hand worden gehouden. * Vanilla schilderijen zijn niet beïnvloed; reguliere schilderijitems blijven normaal functioneren. # Aangepaste schilderijen (/nl/docs/custom-paintings) **Versievereiste:** Vereist **Paper 1.21.5 of hoger**. De functie is uitgeschakeld op oudere versies. Aangepaste schilderijen worden rechtstreeks gedefinieerd in ItemsAdder-inhoud YML-bestanden via een sectie `paintings` op het hoogste niveau. Elke invoer registreert een echte Minecraft-schilderijvariant die spelers in het spel kunnen tegenkomen. ## Configuratie [#configuratie] ```yaml info: namespace: mynamespace paintings: sunset: enabled: true width: 2 height: 1 asset: mynamespace:sunset title: "Sunset" author: "Toutou" item: mynamespace:sunset_painting include_in_random: true ``` ## Opties [#opties] | Sleutel | Type | Standaard | Beschrijving | | ------------------- | ------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `enabled` | bool | `true` | Stel dit in op `false` om dit schilderij over te slaan zonder de invoer te verwijderen. | | `width` | integer | *(verplicht)* | Breedte van het schilderij in blokken. | | `height` | integer | *(verplicht)* | Hoogte van het schilderij in blokken. | | `asset` | `namespace:key` | *(verplicht)* | Sleutel van de textuurasset. Zie [Tekstuurpad](#tekstuurpad) hieronder. | | `title` | string | *(geen)* | Optionele weergavetitel getoond in tooltips. Ondersteunt MiniMessage. | | `author` | string | *(geen)* | Optionele auteurnaam getoond in tooltips. | | `item` | `namespace:item_id` | *(geen)* | Optioneel gekoppeld ItemsAdder-item. Wanneer er met rechts op een geldig muurvlak wordt geklikt, plaatst dit item het aangepaste schilderij. Zie [ID's](/nl/docs/compatibility/ids). | | `include_in_random` | bool | `false` | Wanneer `true`, kunnen vanilla schilderijitems willekeurig dit aangepaste schilderij selecteren wanneer de muurruimte past. | ## Tekstuurpad [#tekstuurpad] De `asset`-waarde verwijst naar een textuurbestand in je ItemsAdder-inhoudsmap. Voor `asset: mynamespace:sunset` verwacht de plugin: ``` contents/mynamespace/textures/painting/sunset.png ``` Er zijn geen datapack-bestanden nodig. De plugin injecteert de schilderijvarianten bij runtime en werkt de vanilla `minecraft:placeable`-schilderijtag automatisch bij. ## Schilderijen in het spel plaatsen [#schilderijen-in-het-spel-plaatsen] Als je een `item` instelt, gedraagt dat ItemsAdder-item zich als een aangepast schilderijitem: * Rechtsklikken op een geldig muurvlak plaatst het aangepaste schilderij. * WorldGuard-vlaggen voor painting placement worden gerespecteerd wanneer WorldGuard-integratie is ingeschakeld. * Het probleem met dubbele plaatsing via de tweede hand wordt automatisch afgehandeld. Als `include_in_random` `false` is (de standaard), kan het schilderij alleen worden geplaatst via het gekoppelde item. Stel het in op `true` om ook vanilla schilderijitems toe te staan het willekeurig te kiezen. ## In- en uitschakelen [#in--en-uitschakelen] Je kunt deze functie in- of uitschakelen in de `config.yml` van de plugin: ```yaml features: custom_paintings: true ``` ## Opmerkingen [#opmerkingen] * Deze functie is alleen beschikbaar op Minecraft **1.21.5** en nieuwer. Op oudere ondersteunde versies logt de plugin een waarschuwing en slaat hij de sectie `paintings` over. * Er is geen `/iazip` of handmatige resourcepackstap nodig voor de schilderijvarianten zelf, maar je textuurbestand moet zoals gebruikelijk in je resourcepack zijn opgenomen. * Het gekoppelde `item` moet een bestaand ItemsAdder-item zijn. Als het ontbreekt, wordt de schilderijvariant nog steeds geregistreerd, maar werkt er geen plaatsingsitem. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # Custom Tags (/nl/docs/custom-tags) Custom tags laten je content-ID's één keer groeperen en die groep hergebruiken in ondersteunde ItemsAdderAdditions-functies. Ze worden geladen uit een top-level `tags` sectie in elk ItemsAdder content-YAML-bestand. ## Basisstructuur [#basisstructuur] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer decorative_blocks: type: block values: - ruby_lamp - minecraft:amethyst_block trading_stations: type: furniture values: - alchemy_table - forge_table ruby_recipes: type: recipe values: - ruby_sword - ruby_pickaxe ``` Verwijs naar een tag met `#tag_id` binnen dezelfde namespace of met `#namespace:tag_id` vanuit een andere namespace. Zie [ID's](/nl/docs/compatibility/ids) voor regels rond tagreferenties. ## Tagtypes [#tagtypes] | Type | Aliassen | Waarden kunnen bevatten | | ----------- | ------------ | -------------------------------------------------------------------- | | `item` | `items` | ItemsAdder-items, vanilla items, MMOItems-items en geneste itemtags. | | `block` | `blocks` | ItemsAdder-blokken, vanilla blokken en geneste bloktags. | | `furniture` | `furnitures` | ItemsAdder furniture-ID's en geneste furniture-tags. | | `recipe` | `recipes` | Recept-ID's en geneste recepttags. | Als `type` ontbreekt, wordt de tag behandeld als een itemtag. ## Geneste tags [#geneste-tags] Tags kunnen andere tags van hetzelfde type bevatten. ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe mining_tools: type: item values: - "#ruby_tools" - minecraft:iron_pickaxe - minecraft:diamond_pickaxe ``` Geneste tags worden tijdens reload opgelost. Circulaire verwijzingen worden gedetecteerd en genegeerd, zodat de server niet blijft hangen. ## Waar custom tags werken [#waar-custom-tags-werken] Custom tags worden ondersteund door runtime ID-matchingpaden, waaronder: * advancementvoorwaarden voor items, blokken, furniture en recepten * spelerpredicaten voor items, equipment, slots en blokcontroles * `items` van het `stackable` behaviour * craftingreceptingrediënten (`iaa_crafting_table`) ## Compleet voorbeeld [#compleet-voorbeeld] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe items: charged_ruby: display_name: "Charged Ruby" behaviours: stackable: blocks: - charged_ruby_block items: - "#my_pack:ruby_tools" ``` ```yaml advancements: collect_any_ruby_tool: display: title: "Ruby Tools" description: "Obtain any ruby tool." icon: my_pack:ruby_pickaxe criteria: collect: trigger: obtain_item conditions: items: - "#my_pack:ruby_tools" ``` ## Herlaadgedrag [#herlaadgedrag] Custom tags worden voorbereid voordat acties, behaviours, recepten, advancements en world generation worden herladen. Voer `/iareload` uit na wijzigingen aan tags. ## Veelgemaakte fouten [#veelgemaakte-fouten] * Tagtypes mengen. Een furniture-tag kan geen itemtag bevatten. * Dezelfde combinatie van `type` en tag-ID twee keer definiëren. De eerste declaratie wint. * Verwachten dat custom tags itemstacks kunnen aanmaken. Gebruik concrete item-ID's voor uitvoer zoals receptresultaten, `toast.icon`, `clear_item.item` en `replace_item.item`. * Een vanilla-ogende tag zoals `#minecraft:planks` overschrijven. Custom tags worden eerst opgelost wanneer er een custom tag met die ID bestaat. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [Compatibiliteit](/nl/docs/compatibility) # Aan de slag met ItemsAdderAdditions (/nl/docs) **ItemsAdderAdditions** breidt [ItemsAdder](https://itemsadder.com/) uit met extra acties, behaviours, recepten, tags en functies - rechtstreeks geconfigureerd in je bestaande YML-bestanden. Het lost ItemsAdder-content, MMOItems-items, vanilla Minecraft-items/blokken, vanilla tags en ItemsAdderAdditions custom tags op via dezelfde compatibiliteitslaag. De meeste YAML-only ItemsAdderAdditions-wijzigingen worden herladen met `/iareload`; components hebben `/iazip` nodig. ## Downloaden [#downloaden] ## Vereisten [#vereisten] * **ItemsAdder** (nieuwste versie aanbevolen) * **Paper** 1.20.6, 1.21.1, 1.21.3-1.21.8, 1.21.10-1.21.11, 26.1.2 of 26.2 * **MMOItems** *(optioneel, alleen nodig voor `mmoitems:type:id`-referenties)* ## Compatibiliteit [#compatibiliteit] Zie [Compatibiliteit](/nl/docs/compatibility) voor integratienotities en [ID's](/nl/docs/compatibility/ids) voor ItemsAdder-ID's, MMOItems-ID's, vanilla item-/blok-ID's, recept-ID's, vanilla tags en custom tags. ## Optioneel voorbeeldpack [#optioneel-voorbeeldpack] Een eenvoudig pack dat enkele functies van ItemsAdderAdditions laat zien. [Downloadlink voor het pack](https://www.spigotmc.org/resources/itemsadderadditions-example-pack.134800) # Item Model Definitions (/nl/docs/item-model-definitions) Item model definitions zijn de vanilla resource pack-bestanden (toegevoegd in Minecraft 1.21.4) die een item aan een model koppelen en tussen modellen kiezen op basis van de itemstatus. ItemsAdderAdditions genereert deze JSON-bestanden voor je vanuit een YAML-sectie op je custom item, schrijft ze naar de resource pack en koppelt (optioneel) de bijbehorende `minecraft:item_model` component aan het item. Voeg een `item_model_definition` sectie toe onder je itemdefinitie en voer `/iazip` uit om de bestanden naar de pack te schrijven. ```yaml items: my_item: item_model_definition: model: type: model model: my_pack:item/my_item ``` **Minimale serverversie: 1.21.4.** Op oudere versies wordt elke `item_model_definition` sectie genegeerd met een waarschuwing in de console. Gegenereerde bestanden worden geschreven naar `assets//items/.json` binnen de resource pack. Voer na het wijzigen van de YAML `/iazip` uit om de pack opnieuw te genereren. Het gegenereerde item model-id is `:`. ## Inschakelen [#inschakelen] De functie wordt geregeld door `item_model_definitions` in `config.yml` (standaard ingeschakeld): ```yaml features: item_model_definitions: true ``` ## Sectie-referentie [#sectie-referentie] | Sleutel | Type | Standaard | Beschrijving | | ------------------------- | ------- | --------- | --------------------------------------------------------------------------------------------------------------------- | | `enabled` | Boolean | `true` | Zet op `false` om dit item over te slaan. | | `path` | String | item-id | Uitvoerpad / gegenereerd model-id. Ondersteunt `namespace:path`. | | `model` | Object | - | Builder-shorthand voor de modelboom (zie hieronder). | | `raw` | Object | - | Volledige item model definition-root, letterlijk geschreven. | | `oversized_in_gui` | Boolean | `false` | Staat toe dat het model buiten de grenzen van het slot in GUI's wordt gerenderd. Vereist Minecraft 1.21.6 of nieuwer. | | `apply_component` | Boolean | `true` | Koppelt de `minecraft:item_model` component die naar het gegenereerde id wijst. | | `overwrite_existing_file` | Boolean | `true` | Bij `false` blijft een bestaand bestand op het doelpad onaangeroerd. | | `custom_model_data` | Object | - | Voegt een `minecraft:custom_model_data` component toe (zie hieronder). | Precies één van `model` of `raw` is vereist. Als beide aanwezig zijn, wordt `raw` gebruikt en wordt een waarschuwing gelogd. ### `path` [#path] Indien weggelaten is het pad standaard het item-id en de namespace standaard de namespace van het item. Een `.json`-extensie wordt automatisch verwijderd. ```yaml item_model_definition: path: my_pack:custom/sword # schrijft assets/my_pack/items/custom/sword.json model: type: model model: my_pack:item/sword ``` Regels: * Namespace: kleine letters, cijfers, `_`, `-`, `.` * Pad: kleine letters, cijfers, `_`, `-`, `.`, `/` * Geen `/` aan begin of eind, geen `//` * Absolute paden, backslashes en `..` worden geweigerd ### `oversized_in_gui` [#oversized_in_gui] Stel `oversized_in_gui: true` in om toe te staan dat het itemmodel buiten de grenzen van het slot in inventaris-GUI's wordt gerenderd. Minecraft heeft dit veld voor item model definitions toegevoegd in 1.21.6, dus het heeft alleen effect op 1.21.6 of nieuwer. ```yaml item_model_definition: oversized_in_gui: true model: type: model model: my_pack:item/large_item ``` De waarde wordt naast `model` in de root van de gegenereerde JSON geschreven. Wanneer deze is weggelaten, geldt de vanilla standaardwaarde `false`. Bij gebruik met `raw` overschrijft deze instelling op het hoogste niveau `raw.oversized_in_gui`. ## Builder-model (`model`) [#builder-model-model] `model` is een shorthand: het object wordt het `model`-veld van de gegenereerde root. Het moet een `type` bevatten. In builder-modus krijgen de `type`- en `property`-waarden automatisch het voorvoegsel `minecraft:` wanneer je een namespace weglaat (`model` wordt `minecraft:model`). ```yaml item_model_definition: model: type: model # wordt minecraft:model model: my_pack:item/my_item ``` ### Ondersteunde types [#ondersteunde-types] De builder valideert de volgende types. Elk ander `type` wordt zonder validatie geschreven. #### `minecraft:model` [#minecraftmodel] Eén enkel model. Vereist `model` (een modelresourcepad). ```yaml model: type: model model: my_pack:item/my_item ``` #### `minecraft:composite` [#minecraftcomposite] Toont meerdere modellen over elkaar. Vereist een niet-lege `models`-lijst van modelobjecten. ```yaml model: type: composite models: - type: model model: my_pack:item/base - type: model model: my_pack:item/overlay ``` #### `minecraft:condition` [#minecraftcondition] Kiest tussen twee modellen op basis van een booleaanse property. Vereist `property`, `on_true` en `on_false`. ```yaml model: type: condition property: using_item on_true: type: model model: my_pack:item/drawing on_false: type: model model: my_pack:item/idle ``` #### `minecraft:select` [#minecraftselect] Kiest een model uit een lijst cases op basis van een property-waarde. Vereist `property` en een niet-lege `cases`-lijst; elke case heeft `when` en `model` nodig. Een optionele `fallback` wordt gebruikt wanneer geen case past. ```yaml model: type: select property: display_context cases: - when: gui model: type: model model: my_pack:item/gui - when: firstperson_righthand model: type: model model: my_pack:item/hand fallback: type: model model: my_pack:item/default ``` #### `minecraft:range_dispatch` [#minecraftrange_dispatch] Kiest een model op basis van een numerieke property en drempels. Vereist `property` en een niet-lege `entries`-lijst; elke entry heeft een numerieke `threshold` en een `model` nodig. Een optionele `fallback` wordt gebruikt onder de laagste drempel. ```yaml model: type: range_dispatch property: damage entries: - threshold: 0.0 model: type: model model: my_pack:item/fresh - threshold: 0.5 model: type: model model: my_pack:item/worn fallback: type: model model: my_pack:item/broken ``` #### `minecraft:special` [#minecraftspecial] Een speciaal model met een renderer. Vereist `base` en een `model`-object met een eigen `type`. ```yaml model: type: special base: my_pack:item/shield_base model: type: minecraft:shield ``` #### `minecraft:empty` / `minecraft:bundle/selected_item` [#minecraftempty--minecraftbundleselected_item] Markertypes zonder extra velden. ```yaml model: type: empty ``` ## Raw-model (`raw`) [#raw-model-raw] Gebruik `raw` wanneer je volledige controle wilt. Het is de volledige item model definition-root en wordt letterlijk naar schijf geschreven. Het moet een `model`-object op rootniveau bevatten. Anders dan de builder voegt `raw` geen `minecraft:`-voorvoegsels toe, dus schrijf volledige namespaced ids. ```yaml item_model_definition: raw: model: type: minecraft:range_dispatch property: minecraft:custom_model_data entries: - threshold: 1.0 model: type: minecraft:model model: my_pack:item/variant_1 fallback: type: minecraft:model model: my_pack:item/default ``` ## Componenten [#componenten] ### `apply_component` [#apply_component] Bij `true` (standaard) koppelt IAA een `minecraft:item_model` component aan het item die naar het gegenereerde model-id wijst, zodat het item de nieuwe definitie daadwerkelijk gebruikt zonder dat je de component handmatig instelt. Als het item al `components.item_model` (of `minecraft:item_model`) definieert en die verschilt van het gegenereerde id, laat IAA de bestaande component onaangeroerd en logt een waarschuwing. Zet `apply_component: false` om het bestand te genereren zonder componenten aan te raken. ### `custom_model_data` [#custom_model_data] Wanneer `apply_component` `true` is en het item nog geen `custom_model_data` component definieert, kun je er een koppelen. Het gebruikt de vanilla `minecraft:custom_model_data` vorm: lijsten van `floats`, `flags`, `strings` en `colors`. ```yaml item_model_definition: model: type: range_dispatch property: custom_model_data entries: - threshold: 1.0 model: type: model model: my_pack:item/variant_1 custom_model_data: floats: - 1.0 flags: - true strings: - hello colors: - "#FF0000" ``` Als `components.custom_model_data` al op het item bestaat, wordt de sectie overgeslagen met een waarschuwing. ## Wijzigingen toepassen [#wijzigingen-toepassen] Item model definition-bestanden worden tijdens het herladen naar de resource pack geschreven. Voer daarna `/iazip` uit om de pack opnieuw te bouwen en toe te passen. De console logt hoeveel definities zijn gegenereerd, hoeveel bestanden zijn gewijzigd en hoeveel bestaande bestanden zijn overgeslagen. # Valhalla Metadata verplaatst (/nl/docs/valhalla) De documentatie voor ValhallaMMO en ValhallaTrinkets is verplaatst naar [Compatibiliteit: ValhallaMMO & Trinkets](/nl/docs/compatibility/valhalla). Gebruik de nieuwe pagina voor de actuele metadata-syntax, voorbeelden, gedrag bij optionele afhankelijkheden en probleemoplossing. # Actiebalk (/nl/docs/actions/actionbar) ```yaml actionbar: text: "Mijn aangepaste actiebalk verstuurd naar %player_name%" ``` ## Parameters [#parameters] ### `text` [#text] Verplicht. Het bericht om weer te geven. Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) en lettertypeafbeeldingen. # Item verwijderen (/nl/docs/actions/clear-item) ```yaml clear_item: item: my_item amount: 2 # optioneel, standaard: 1 ``` ## Parameters [#parameters] ### `item` [#item] Verplicht. Het te verwijderen item. Gebruik een vanilla-materiaal uit [deze lijst](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary), een aangepast ItemsAdder-item met `namespace:id` of alleen `id`, of een MMOItems-item met `mmoitems:type:id`. Tags worden voor deze parameter niet ondersteund. ### `amount` [#amount] Optioneel. Standaard: `1`. Het aantal te verwijderen items. # In brand steken (/nl/docs/actions/ignite) ```yaml ignite: duration: 200 # ticks ``` ## Parameters [#parameters] ### `duration` [#duration] Verplicht. Hoe lang het doelwit in brand staat, in ticks. 20 ticks = 1 seconde. # Bericht (/nl/docs/actions/message) ```yaml message: text: "Mijn aangepaste bericht verstuurd naar %player_name%" ``` ## Parameters [#parameters] ### `text` [#text] Verplicht. Het te versturen bericht. Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) en lettertypeafbeeldingen. # MythicMobs-vaardigheid (/nl/docs/actions/mythic-mobs-skill) ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 # optioneel, standaard: 1.0 ``` ## Parameters [#parameters] ### `skill` [#skill] Verplicht. De naam van de te activeren MythicMobs-vaardigheid. ### `power` [#power] Optioneel. Standaard: `1.0`. De krachtsvermenigvuldiger die aan de vaardigheid wordt doorgegeven. ## Gerelateerde pagina's [#gerelateerde-paginas] * [MythicMobs-compatibiliteit](/nl/docs/compatibility/mythicmobs) * [Actieparameters](/nl/docs/actions/parameters) # Inventaris openen (/nl/docs/actions/open-inventory) Vereist Paper 1.21.4 of hoger voor de `title`-parameter. ```yaml open_inventory: type: "anvil" title: "Mijn geweldige aangepaste aambeeld" # Optioneel ``` Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/)-opmaak, [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi)-placeholders en [ItemsAdder](https://itemsadder.com/)-lettertypeafbeeldingen. ## Ondersteunde typen [#ondersteunde-typen] * `anvil` * `cartography`, `cartography_table` * `crafting_table`, `workbench` * `enchanting`, `enchanting_table` * `ender_chest` * `grindstone` * `loom` * `smithing`, `smithing_table` * `stonecutter` # Trade Machine openen (/nl/docs/actions/open-trade-machine) `open_trade_machine` opent de ItemsAdder trade-machine GUI voor de doelspeler zonder dat het blok of furniture in de wereld geplaatst hoeft te zijn. Gebruik dit voor menu-items, NPC-flows, custom stations of andere triggers die een specifieke ItemsAdder trade machine moeten openen. ## Vereisten [#vereisten] * Het doel moet een speler zijn. Niet-spelerdoelen worden overgeslagen. * De gerefereerde ItemsAdder-content moet een `trade_machine` of `block_trade_machine` behaviour hebben. ## Configuratie [#configuratie] ```yaml info: namespace: stations items: alchemy_token: display_name: "Alchemy Station" events: interact: right: open_trade_machine: trade_machine: stations:alchemy_table ``` ## Opties [#opties] | Sleutel | Type | Vereist | Beschrijving | | --------------- | ------ | ------- | --------------------------------------------------------------------------------------------------------------------------- | | `trade_machine` | string | ja | ItemsAdder item-, blok- of furniture-ID dat een trade-machine GUI levert. Losse ID's gebruiken de huidige `info.namespace`. | ## Met targeting [#met-targeting] De actie ondersteunt de gedeelde actieparameters: ```yaml open_trade_machine: trade_machine: stations:alchemy_table target: in_sight target_in_sight_distance: 8 ``` ## Pluginconfiguratie [#pluginconfiguratie] Deze actie kan worden uitgeschakeld in `config.yml`: ```yaml actions: open_trade_machine: false ``` De sleutel is optioneel. Ontbrekende actietoggles zijn standaard ingeschakeld. ## Herladen [#herladen] Voer `/iareload` uit nadat je de ItemsAdder content-YAML hebt aangepast. De gerefereerde trade machine moet al door ItemsAdder geregistreerd zijn. ## Veelgemaakte fouten [#veelgemaakte-fouten] * Een normaal item-ID gebruiken zonder `trade_machine` of `block_trade_machine` behaviour. * `target: other` gebruiken wanneer het eventdoel geen speler is. * De namespace weglaten terwijl de trade machine in een andere `info.namespace` staat. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [ItemsAdder-compatibiliteit](/nl/docs/compatibility/itemsadder) # Actieparameters (/nl/docs/actions/parameters) Elke actie ondersteunt een set gedeelde parameters. Hiermee kun je acties beperken tot bepaalde rechten, vertragingen toevoegen en bepalen op wie de actie van toepassing is. Je kunt ze naar wens combineren op dezelfde actie. ## Parameters [#parameters] ### `permission` [#permission] Als dit is ingesteld, wordt de actie alleen uitgevoerd als de speler deze permissienode heeft. Spelers zonder dit recht worden stilzwijgend genegeerd. ```yaml actionbar: text: "Hallo!" permission: "my_pack.greet" ``` ### `delay` [#delay] Wacht dit aantal ticks voordat de actie wordt uitgevoerd. 20 ticks = 1 seconde. Standaard: `0` (direct). ```yaml message: text: "Laden..." delay: 40 # 2 seconden na de trigger ``` ### `target` [#target] Bepaalt op wie de actie van toepassing is. Standaard: `self`. | Waarde | Beschrijving | | ---------- | --------------------------------------------------------------------------------------------------- | | `self` | De speler die de gebeurtenis heeft geactiveerd *(standaard)* | | `other` | De entiteit waarmee de speler interageert (bijv. degene die wordt aangevallen) | | `all` | Zowel de activerende speler **als** de doelentiteit | | `radius` | Alle entiteiten binnen de ingestelde X/Y/Z-radius rond het interactiepunt - vereist `target_radius` | | `in_sight` | De entiteit waar de speler naar kijkt - vereist `target_in_sight_distance` | ```yaml message: text: "Je hebt iemand geraakt!" target: other ``` ### `target_radius` [#target_radius] Alleen gebruikt bij `target: radius`. Bepaalt de X/Y/Z-radius in blokken rond het eventdoel, eventblok of de activerende speler. ```yaml actionbar: text: "Gebiedseffect!" target: radius target_radius: 10 ``` ### `target_in_sight_distance` [#target_in_sight_distance] Alleen gebruikt bij `target: in_sight`. Het maximale aantal blokken dat vanuit de oogpositie van de speler wordt gescand bij het zoeken naar een entiteit. Als er geen entiteit wordt gevonden binnen dat bereik, wordt de actie volledig overgeslagen. ```yaml ignite: duration: 100 target: in_sight target_in_sight_distance: 10 ``` ## Triggerplaatsing [#triggerplaatsing] Acties worden gedeclareerd binnen `events` secties van ItemsAdder-items, -blokken, furniture of complex furniture. ```yaml info: namespace: my_pack items: ruby_staff: events: interact: right: message: text: "Right-clicked" ruby_lamp: events: placed_furniture: interact: message: text: "Furniture clicked" ``` `placed_block` acties kunnen worden genest onder `events.placed_block`. Furniture- en complex furniture-acties worden geladen uit `events.placed_furniture`. ## Ondersteunde triggernamen [#ondersteunde-triggernamen] Veelgebruikte itemtriggers zijn: ```text interact, interact_mainhand, interact_offhand, block_break, attack, kill, drop, pickup, held, held_offhand, unheld, unheld_offhand, item_break, eat, drink, bow_shot, gun_shot, gun_no_ammo, gun_reload, item_throw, item_hit_ground, item_hit_entity, book_write, book_read, fishing_start, fishing_caught, fishing_failed, fishing_cancel, fishing_bite, fishing_in_ground, bucket_empty, bucket_fill ``` Bloktriggers zijn onder andere `interact`, `break` en geneste `placed_block` triggers. Furniture-triggers gebruiken dezelfde item-style triggernamen onder `placed_furniture`. Complex furniture ondersteunt momenteel `placed_furniture.interact`. `interact`, `interact_mainhand` en `interact_offhand` kunnen argumentsecties gebruiken zoals `right`, `left`, `right_shift` en `left_shift`. Wildcardacties onder de trigger worden ook uitgevoerd na de exacte argumentmatch. ## Cooldowns en stat requirements [#cooldowns-en-stat-requirements] Wanneer een actie wordt geactiveerd vanuit een vastgehouden ItemsAdder-item, controleert ItemsAdderAdditions de door ItemsAdder geconfigureerde cooldowns en stat requirements voor dat item voordat de actie wordt uitgevoerd. Als de speler niet aan die eisen voldoet, wordt de actie overgeslagen. ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml my_item: events: interact: right: actionbar: text: "Rechtsgeklikt!" permission: "some.permission" # Alleen spelers met dit recht activeren dit delay: 10 # Een halve seconde vertraging target: self # Alleen van toepassing op de klikker ``` # Animatie afspelen (/nl/docs/actions/play-animation) ```yaml play_animation: name: "spin" ``` ## Parameters [#parameters] ### `name` [#name] Verplicht. De naam van de af te spelen animatie, zoals gedefinieerd in de meubelconfiguratie. # Emote afspelen (/nl/docs/actions/play-emote) ```yaml play_emote: name: "wave" ``` ## Parameters [#parameters] ### `name` [#name] Verplicht. De naam van de af te spelen emote. # Bioom vervangen (/nl/docs/actions/replace-biome) ```yaml replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` Verander het bioom in een geselecteerd gebied wanneer een ItemsAdder-gebeurtenis wordt geactiveerd. ## Parameters [#parameters] ### `biome` [#biome] Het toe te passen bioom. Gebruik een geldig bioom-ID met namespace zoals `minecraft:plains`, `minecraft:desert` of `minecraft:cherry_grove`. Je kunt ook biomen van aangepaste plugins/datapacks gebruiken. ```yaml replace_biome: biome: "minecraft:desert" ``` ### `shape` [#shape] De vorm die wordt gebruikt voor het bioomvervangingsgebied. Ondersteunde vormen: * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` * `SHELL` * `TORUS` * `CONE` * `BEAM` * `PYRAMID` ```yaml replace_biome: biome: "minecraft:swamp" shape: CYLINDER ``` ### `radius` [#radius] Bepaalt de grootte van de vorm. Er zijn twee ondersteunde straalformaten, afhankelijk van de vorm en hoe je het wilt configureren. #### Uniforme straal [#uniforme-straal] Handig voor ronde vormen zoals `SPHERE`. ```yaml replace_biome: biome: "minecraft:snowy_taiga" shape: SPHERE radius: blocks_from_center: 5 ``` #### Straal per as [#straal-per-as] Handig voor uitgerekte vormen of vormen met een aangepast formaat. ```yaml replace_biome: biome: "minecraft:jungle" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ## Vormopmerkingen [#vormopmerkingen] Sommige vormen zijn rotatiegebaseerd: * `PYRAMID` * `BEAM` * `CONE` Deze vormen worden beïnvloed door de rotatie van de speler wanneer de actie wordt uitgevoerd. Voor deze vormen bepalen `x`, `y` en `z` nog steeds de uiteindelijke vormdimensies, ook al is de vorm gebaseerd op de kijkrichting van de speler. ## Belangrijke beperking [#belangrijke-beperking] Minecraft bioombewerking is niet perfect precies op kleine schaal. Het resultaat kan er iets willekeurig of ruw uitzien, vooral bij kleine straalwaarden. Dit is een beperking van het spel. * Kleine `SPHERE`-vormen zien er misschien niet perfect bolvormig uit. * Directionele vormen kunnen er iets ongelijkmatig uitzien. * Sommige randen kunnen er ruw uitzien. Met een grotere straal ziet de vorm er veel dichter bij het verwachte resultaat uit. ## Voorbeelden [#voorbeelden] ### Bol [#bol] ```yaml replace_biome: biome: "minecraft:mushroom_fields" shape: SPHERE radius: blocks_from_center: 6 ``` ### Balk [#balk] ```yaml replace_biome: biome: "minecraft:badlands" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ### Straal gebaseerd op spelerrotatie [#straal-gebaseerd-op-spelerrotatie] ```yaml replace_biome: biome: "minecraft:nether_wastes" shape: BEAM radius: x: 12 y: 2 z: 2 ``` ### Kegel gebaseerd op spelerrotatie [#kegel-gebaseerd-op-spelerrotatie] ```yaml replace_biome: biome: "minecraft:soul_sand_valley" shape: CONE radius: x: 10 y: 4 z: 4 ``` ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml my_item: events: interact: right: replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` ## Gerelateerde pagina's [#gerelateerde-paginas] * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # Item vervangen (/nl/docs/actions/replace-item) ```yaml replace_item: item: my_pack:upgraded_sword copy_durability: true # optioneel, standaard: false copy_enchantments: true # optioneel, standaard: false copy_pdc: true # optioneel, standaard: false ``` Vervangt het item dat de doelspeler vasthoudt. Normale itemtriggers vervangen het item in de hoofdhand. Offhand-triggervarianten, zoals `ITEM_INTERACT_OFFHAND`, vervangen in plaats daarvan het item in de offhand. ## Parameters [#parameters] ### `item` [#item] Verplicht. Het vervangende item dat aan de speler wordt gegeven. Gebruik een vanilla materiaal uit [deze lijst](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary), een aangepast ItemsAdder-item met `namespace:id` of alleen `id`, of een MMOItems-item met `mmoitems:type:id`. Tags zoals `#minecraft:planks` worden niet ondersteund, omdat de actie één concreet itemstack moet aanmaken. ```yaml replace_item: item: minecraft:diamond_sword ``` ```yaml replace_item: item: my_pack:ruby_sword ``` ```yaml replace_item: item: mmoitems:sword:flame_blade ``` ### `copy_durability` [#copy_durability] Optioneel. Standaard: `false`. Als dit `true` is, worden de huidige duurzaamheidschade van het originele item naar het vervangende item gekopieerd. Dit geldt alleen wanneer beide items duurzaamheid ondersteunen. ### `copy_enchantments` [#copy_enchantments] Optioneel. Standaard: `false`. Als dit `true` is, worden alle enchantments van het originele item naar het vervangende item gekopieerd. ### `copy_pdc` [#copy_pdc] Optioneel. Standaard: `false`. Als dit `true` is, wordt de Persistent Data Container van het originele item naar het vervangende item gekopieerd. Bestaande sleutels op het vervangende item worden overschreven wanneer ze dezelfde sleutel gebruiken. ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml my_pack:ruby_sword: events: interact: right: replace_item: item: my_pack:charged_ruby_sword copy_durability: true copy_enchantments: true copy_pdc: true ``` ## Opmerkingen [#opmerkingen] * Als het geconfigureerde `item` niet kan worden opgelost, doet de actie niets. * Als het actiedoel geen speler is, doet de actie niets. * Universele actieparameters zoals `permission`, `delay` en `target` worden ondersteund. Zie [Actieparameters](/nl/docs/actions/parameters). # Nabije blokken vervangen (/nl/docs/actions/replace-near-blocks) ```yaml iaa_replace_near_blocks: from: - minecraft:stone - my_pack:old_ore - "#minecraft:dirt" - "#my_pack:replaceable_blocks" to: minecraft:gold_block shape: SPHERE radius: blocks_from_center: 5 ``` Vervangt overeenkomende blokken rond het doel van de actie. Het voorvoegsel `iaa_` is verplicht; `replace_near_blocks` is geen alias omdat ItemsAdder al een actie met die naam heeft. Het werk wordt over meerdere serverticks verdeeld om tickvertragingen te beperken. Bestaande actieparameters zoals `permission`, `delay` en `target` worden ondersteund. Zie [Actieparameters](/nl/docs/actions/parameters). ## Parameters [#parameters] ### `from` [#from] Verplicht. Een lijst met 1 tot 32 blok-ID's of bloktags. Een blok wordt vervangen wanneer het werkelijke ID met een van de vermeldingen overeenkomt. Ondersteunde vermeldingen: * Vanilla blok-ID's, zoals `minecraft:stone` * Aangepaste ItemsAdder-blok-ID's, zoals `my_pack:old_ore` * Minecraft-bloktags, zoals `#minecraft:dirt` * Aangepaste ItemsAdderAdditions-tags met `type: block`, zoals `#my_pack:replaceable_blocks` Tags voor items, meubels of recepten en onbekende of ongeldige tags worden bij het laden van de configuratie geweigerd. Rotatiesuffixen van aangepaste blokken volgen de gebruikelijke matchingregels van ItemsAdderAdditions. Zie [Aangepaste tags](/nl/docs/custom-tags) en [ID's](/nl/docs/compatibility/ids). ### `to` [#to] Verplicht. Eén exact vanilla blok-ID. Het doel mag lucht zijn of een stateless, volledig massief blok zoals steen, aarde, planken, ertsen of metaalblokken. Aangepaste blokken, vallende blokken, niet-massieve blokken en blokken met geserialiseerde state-eigenschappen worden geweigerd. Aangepaste blokken mogen in `from` worden gebruikt. Ze worden via de ItemsAdder-API verwijderd voordat het vanilla doel wordt geplaatst, zodat ItemsAdder de opgeslagen toestand van het aangepaste blok kan verwijderen. Als opzoeken of verwijderen mislukt, stopt de taak zonder het onderliggende vanilla blok te vervangen. ### `shape` [#shape] Optioneel. Standaardwaarde: `SPHERE`. Ondersteunde vormen: * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` Alle vier de vormen zijn gecentreerd op het bepaalde actiedoel. Directionele vormen worden door deze actie niet ondersteund. ### `radius` [#radius] Verplicht. Gebruik een uniforme straal: ```yaml radius: blocks_from_center: 5 ``` Of stel elke as afzonderlijk in: ```yaml radius: x: 8 y: 2 z: 8 ``` Wanneer `blocks_from_center` aanwezig is, overschrijft die waarde `x`, `y` en `z`. Ontbrekende aswaarden zijn standaard 5. Een `CYLINDER` met `y: 0` is één blok hoog. Elke straal moet een geheel getal van 0 tot en met 25 zijn. De inclusieve omhullende doos `(2x + 1) × (2y + 1) × (2z + 1)` mag maximaal 32.768 coördinaten bevatten. Een uniforme straal kan daarom maximaal 15 zijn. Configuraties boven een limiet worden geweigerd en niet afgekapt. ## Bescherming en veiligheid [#bescherming-en-veiligheid] Voor elke vervanging vraagt de actie AntiGriefLib om zowel `BREAK`- als `PLACE`-toestemming voor dat blok. De WorldGuard-vlag van de actie is `iaa-action-iaa-replace-near-blocks`. De volgende bronblokken worden overgeslagen: * Blokentiteiten en barriers * Aangepaste blokken met actief ItemsAdderAdditions-gedrag * Blokken met persistente ItemsAdderAdditions-blokdata * Blokken waarvan de state tijdens de beschermingscontroles verandert De scanner controleert de chunkstatus voordat blokken worden gelezen en vraagt niet om ongeladen chunks te laden. Voor een vervanging moet ook het omliggende gebied van 3×3 chunks geladen zijn. Anders wordt het blok overgeslagen. De actie voegt geen chunktickets toe. Normale blokphysics blijft ingeschakeld, zodat Paper updates van buren, verlichting, opslag en clientsynchronisatie afhandelt. Physics en callbacks van andere plugins kunnen extra werk uitvoeren of indirect chunks laden; de regel voor geladen chunks geldt alleen voor rechtstreekse toegang door deze actie. ## Prestatielimieten [#prestatielimieten] Alle uitvoeringen delen één synchrone wachtrij: * Maximaal 4 actieve uitvoeringen * Maximaal 512 kandidaatcoördinaten per tick * Maximaal 32 vervangingen per tick * Ongeveer 2 ms zacht verwerkingsbudget per tick Als er al vier taken actief zijn, wordt een nieuwe uitvoering genegeerd. Wachtend werk wordt geannuleerd wanneer de speler de verbinding verbreekt of wanneer de plugin wordt herladen of uitgeschakeld. Reeds voltooide vervangingen blijven in de wereld staan; de actie draait ze niet terug. ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml my_pack:replacement_wand: events: interact: right: iaa_replace_near_blocks: from: - minecraft:stone - "#my_pack:replaceable_blocks" to: minecraft:deepslate shape: CYLINDER radius: x: 8 y: 1 z: 8 permission: myserver.replacement-wand ``` ## Gerelateerde pagina's [#gerelateerde-paginas] * [Actieparameters](/nl/docs/actions/parameters) * [Aangepaste tags](/nl/docs/custom-tags) * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # Vuurbal schieten (/nl/docs/actions/shoot-fireball) ```yaml shoot_fireball: power: 1 speed: 2.0 # optioneel, standaard: 1.0 fire: false # optioneel, standaard: true ``` ## Parameters [#parameters] ### `power` [#power] Verplicht. De explosiekracht van de vuurbal. ### `speed` [#speed] Optioneel. Standaard: `1.0`. De snelheidsvermenigvuldiger van het projectiel. ### `fire` [#fire] Optioneel. Standaard: `true`. Of de vuurbal brand achterlaat bij inslag. # Hand zwaaien (/nl/docs/actions/swing-hand) ```yaml swing_hand: hand: "off_hand" ``` ## Parameters [#parameters] ### `hand` [#hand] Optioneel. Standaard: `hand`. Met welke hand er gezwaaid wordt: `hand` of `off_hand`. # Teleportatie (/nl/docs/actions/teleport) Teleporteer de doelentiteit van de actie naar absolute coördinaten, coördinaten ten opzichte van de huidige locatie of een benoemde bestemming. ## Coördinaatbestemmingen [#coördinaatbestemmingen] Alle drie de assen zijn verplicht. Numerieke waarden zijn absoluut en blijven compatibel met bestaande configuraties. ```yaml teleport: x: 100 y: 64 z: -50 ``` Zet `~` voor een coördinaat tussen aanhalingstekens om deze relatief te maken aan de entiteit die wordt geteleporteerd. `"~"` behoudt de huidige coördinaat, `"~10"` telt er 10 bij op en `"~-2.5"` trekt er 2,5 van af. ```yaml teleport: x: "~10" y: "~" z: "~-2.5" ``` Absolute en relatieve assen kunnen worden gecombineerd: ```yaml teleport: x: 100 y: "~5" z: "~-2" ``` Relatieve coördinaten gebruiken altijd de huidige locatie van de doelentiteit, niet die van de speler die de actie activeerde. Lege, ongeldige, NaN- en oneindige waarden worden geweigerd. ## Benoemde bestemmingen [#benoemde-bestemmingen] Gebruik `destination` in plaats van `x`, `y` en `z`. Coördinaten en een benoemde bestemming kunnen niet worden gecombineerd. ### Wereldspawn [#wereldspawn] ```yaml teleport: destination: world_spawn ``` `world_spawn` gebruikt de huidige wereld van de doelentiteit. Stel `world` in om de spawn van een andere geladen wereld te gebruiken: ```yaml teleport: destination: world_spawn world: "world_nether" ``` ### Respawn van de speler [#respawn-van-de-speler] ```yaml teleport: destination: respawn ``` `respawn` gebruikt de respawnlocatie van de speler die de actie activeerde, inclusief bedden en respawnankers. Als de speler geen geldige respawnlocatie heeft, wordt de spawn van de ingestelde wereld gebruikt, of de spawn van de huidige wereld van de speler wanneer `world` ontbreekt. De actie teleporteert nog steeds de doelentiteit. De activerende speler wordt alleen gebruikt om de respawnlocatie te vinden. ## Optionele parameters [#optionele-parameters] ### `yaw` en `pitch` [#yaw-en-pitch] Absolute rotatiewaarden. Bij coördinaten behouden ontbrekende waarden de huidige rotatie van de doelentiteit. Bij een benoemde bestemming behouden ontbrekende waarden de rotatie van die bestemming. ```yaml teleport: destination: respawn yaw: 90.0 pitch: 0.0 ``` ### `world` [#world] Bij coördinaten of `world_spawn` wordt standaard de huidige wereld van de doelentiteit gebruikt. Bij `respawn` dient deze alleen als terugvalwereld wanneer de speler geen respawnlocatie heeft. Een ingestelde wereld moet bestaan en geladen zijn. # Titel (/nl/docs/actions/title) ```yaml title: title: "Welkom!" subtitle: "Geniet van je verblijf" # optioneel fade_in: 5 # optioneel, standaard: 10 ticks stay: 40 # optioneel, standaard: 70 ticks fade_out: 30 # optioneel, standaard: 20 ticks ``` ## Parameters [#parameters] ### `title` [#title] Verplicht. De grote titeltekst. Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) en lettertypeafbeeldingen. ### `subtitle` [#subtitle] Optioneel. De kleinere tekst onder de titel. Ondersteunt MiniMessage, PlaceholderAPI en lettertypeafbeeldingen. ### `fade_in` [#fade_in] Optioneel. Standaard: `10` ticks. Duur van het infaden. ### `stay` [#stay] Optioneel. Standaard: `70` ticks. Hoe lang de titel op het scherm blijft. ### `fade_out` [#fade_out] Optioneel. Standaard: `20` ticks. Duur van het uitfaden. # Toast (/nl/docs/actions/toast) ```yaml toast: icon: my_item text: - "Mijn ItemsAdderAdditions" - "<#E6FBFE>Aangepaste toast" frame: "task" # optioneel, standaard: goal ``` ## Parameters [#parameters] ### `icon` [#icon] Verplicht. Het item dat als toast-icoon wordt weergegeven. Gebruik een vanilla-materiaal uit [deze lijst](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary), een aangepast ItemsAdder-item met `namespace:id` of alleen `id`, of een MMOItems-item met `mmoitems:type:id`. Tags worden niet ondersteund voor toast-iconen. ### `text` [#text] Verplicht. Het toastbericht. Kan een enkele string of een lijst zijn (één item per regel). Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/), [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) en lettertypeafbeeldingen. ### `frame` [#frame] Optioneel. Standaard: `goal`. De toast-stijl: `task`, `goal` of `challenge`. # VeinMiner (/nl/docs/actions/veinminer) ```yaml veinminer: max_blocks: 16 ``` ## Parameters [#parameters] ### `max_blocks` [#max_blocks] Verplicht. Het maximale aantal te breken blokken in een veinmining-actie. # Voltooiingsacties (/nl/docs/advancements/completion-actions) De `on_complete`-sectie bepaalt wat er gebeurt wanneer de speler een voortgang verdient. Vier actietypen worden ondersteund: geluid, titel, actionbar en commando's. Alle vier kunnen in één voortgang worden gecombineerd. ```yaml on_complete: sound: ... title: ... actionbar: ... commands: ... ``` Acties worden onmiddellijk geactiveerd nadat de voortgang is toegekend. Voor voortgangen met meerdere criteria wordt `on_complete` eenmaal uitgevoerd wanneer het laatste criterium is voltooid. *** ## sound [#sound] Speelt een geluid af op de locatie van de speler. ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.0 source: master ``` | Sleutel | Type | Standaard | Beschrijving | | -------- | ------ | ----------- | ------------------------------------------------------------------------------------------------------------------------ | | `name` | string | *(vereist)* | Geluidssleutel (bijv. `minecraft:entity.player.levelup`). | | `volume` | float | `1.0` | Volumevermenigvuldiger. | | `pitch` | float | `1.0` | Toonhoogtevermenigvuldiger. | | `source` | string | `master` | Audiobroncategorie: `master`, `music`, `record`, `weather`, `block`, `hostile`, `neutral`, `player`, `ambient`, `voice`. | *** ## title [#title] Geeft een titel en optionele ondertitel op het scherm weer. ```yaml on_complete: title: title: "Voortgang!" subtitle: "Eerste robijnzwaard verkregen." fade_in: 10 stay: 70 fade_out: 20 ``` | Sleutel | Type | Standaard | Beschrijving | | ---------- | ------- | ----------- | --------------------------------------------------------------------------------------------------------------------- | | `title` | string | *(vereist)* | Grote titeltekst. Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) en PlaceholderAPI. | | `subtitle` | string | `""` | Kleinere tekst onder de titel. Ondersteunt MiniMessage en PlaceholderAPI. | | `fade_in` | integer | `10` | Vervagingsduur in ticks (20 ticks = 1 seconde). | | `stay` | integer | `70` | Hoe lang de titel op het scherm blijft, in ticks. | | `fade_out` | integer | `20` | Vervagingsduur in ticks. | *** ## actionbar [#actionbar] Stuurt een bericht naar de actionbar van de speler. ```yaml on_complete: actionbar: text: "Robijnzwaard verkregen!" ``` | Sleutel | Type | Vereist | Beschrijving | | ------- | ------ | ------- | ----------------------------------------------------------- | | `text` | string | ja | Actionbar-tekst. Ondersteunt MiniMessage en PlaceholderAPI. | *** ## commands [#commands] Voert een of meer commando's uit. Elke invoer is een benoemde subsectie; de naam is willekeurig en wordt alleen gebruikt om invoeren te onderscheiden. ```yaml on_complete: commands: give_reward: command: "give {player} gold_ingot 4" as_console: true notify: command: "broadcast {player} earned the Ruby Sword achievement!" as_console: true ``` | Sleutel | Type | Standaard | Beschrijving | | ------------ | ------ | ----------- | ----------------------------------------------------------------------------------------------- | | `command` | string | *(vereist)* | Het uit te voeren commando. `{player}` wordt vervangen door de naam van de speler. | | `as_console` | bool | `false` | Voer uit als console. Wanneer `false`, voert de speler het commando uit met zijn eigen rechten. | *** ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.2 title: title: "Voortgang!" subtitle: "Eerste robijnzwaard verkregen." fade_in: 10 stay: 70 fade_out: 20 actionbar: text: "Je hebt het robijnzwaard gekregen!" commands: reward_gold: command: "give {player} gold_ingot 4" as_console: true log: command: "say {player} completed First Ruby Sword" as_console: true ``` # Configuratiereferentie (/nl/docs/advancements/configuration) Elke voortgangsvermelding bevindt zich onder de `advancements`-sleutel op het hoogste niveau in elk ItemsAdder-inhoudsbestand. IAA haalt automatisch bestanden op die deze sleutel bevatten. ```yaml info: namespace: my_pack advancements: : # ... opties hieronder ``` ## Opties op het hoogste niveau [#opties-op-het-hoogste-niveau] | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | bool | `true` | Stel dit in op `false` om deze voortgang over te slaan zonder deze uit het bestand te verwijderen. | | `parent` | string | *(geen)* | ID van de bovenliggende voortgang. Laat weg om dit een hoofdvoortgang (tabblad) te maken. Zie [Ouder](#ouder). | | `display` | section | *(vereist)* | Visuele instellingen. Zie [Weergave](#weergave). | | `criteria` | section | *(geen)* | Voorwaarden die moeten worden vervuld om de voortgang te voltooien. Elk criterium heeft één trigger, triggerspecifieke voorwaarden en een optioneel `conditions.player`-predicaat. Zie [Triggers](/nl/docs/advancements/triggers) en [Spelerspredicaten](/nl/docs/advancements/player-predicates). | | `rewards` | section | *(geen)* | Ervaring en receptontgrendeling. Zie [Beloningen](#beloningen). | | `on_complete` | section | *(geen)* | Acties die worden uitgevoerd wanneer de voortgang volledig is voltooid. Zie [Voltooiingsacties](/nl/docs/advancements/completion-actions). | ## Ouder [#ouder] ```yaml parent: root # dezelfde namespace als dit bestand, wordt opgelost als my_pack:root parent: otherns:someroot # expliciete namespace ``` Als `parent` geen dubbele punt bevat, wordt de namespace van het bestand eraan vooraf toegevoegd. Als `parent` helemaal wordt weggelaten, wordt deze voortgang een hoofdvoortgang en maakt een nieuw tabblad in het voortgangsscherm. ## Weergave [#weergave] ```yaml display: title: "Eerste Robijnzwaard" description: "Verkrijg je eerste aangepaste zwaard." icon: my_pack:ruby_sword frame: task background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: true announce_to_chat: true hidden: false ``` | Sleutel | Type | Standaard | Beschrijving | | ------------------ | -------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `title` | string | *(vereist)* | Voortgangstitel. Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/). | | `description` | string | `""` | Tooltip-beschrijving. Ondersteunt MiniMessage. | | `icon` | `namespace:id` | `minecraft:barrier` | Item dat als pictogram wordt weergegeven. Accepteert ItemsAdder-item-ID's, MMOItems-ID's of vanilla-materiaal-ID's. Tags worden niet ondersteund, omdat het pictogram naar één concreet item moet verwijzen. | | `frame` | string | `task` | Vorm van de pictogramrand: `task`, `goal` of `challenge`. | | `background` | string | *(geen)* | **Alleen hoofdvoortgangen.** Tekstuurpad voor de tabblad-achtergrond (bijv. `minecraft:gui/advancements/backgrounds/adventure`). | | `show_toast` | bool | `true` | Toon een toast-melding wanneer voltooid. | | `announce_to_chat` | bool | `true` | Stuur de voltooiing naar alle spelers in de chat. | | `hidden` | bool | `false` | Verberg deze voortgang totdat deze is voltooid. | `background` is wat maakt dat een voortgang een nieuw tabblad creëert. Het wordt alleen gebruikt op hoofdvoortgangen (geen `parent`). ## Criteria [#criteria] Elk criterium heeft een `trigger` en een optionele `conditions`-sectie. Triggerspecifieke opties staan direct onder `conditions`. Je kunt ook een `player`-predicaat toevoegen aan elke runtime-trigger om een extra spelerstatuscontrole te vereisen voordat het criterium wordt toegekend. ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true high_fall: trigger: fall_from_height conditions: distance: y: min: 30 ``` | Sleutel | Type | Standaard | Beschrijving | | ------------------- | ---------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `trigger` | string | `impossible` | Triggertype voor dit criterium. Zie de volledige [triggerreferentie](/nl/docs/advancements/triggers). | | `conditions` | section | *(geen)* | Triggerspecifieke opties, plus optionele `player`-predicaten. | | `conditions.player` | section of lijst | *(elke speler)* | Extra spelerspredicaat dat wordt gecontroleerd wanneer het criterium bijna wordt toegekend. Wordt genegeerd door de trigger `impossible`. Zie [Spelerspredicaten](/nl/docs/advancements/player-predicates). | Kindvoortgangen hebben minstens één geldig criterium nodig. Hoofdvoortgangen kunnen `criteria` weglaten; IAA maakt een intern hoofdcriterium aan en kent dit automatisch toe zodat het voortgangstabblad verschijnt. ## Beloningen [#beloningen] ```yaml rewards: experience: 50 recipes: - my_pack:ruby_sword_recipe - minecraft:golden_apple ``` | Sleutel | Type | Standaard | Beschrijving | | ------------ | ----------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- | | `experience` | integer | `0` | Ervaringspunten toegekend bij voltooiing. | | `loot` | lijst van strings | `[]` | Loottabelsleutels die bij voltooiing worden gebruikt. | | `recipes` | lijst van strings | `[]` | Receptsleutels om te ontgrendelen. Accepteert `namespace:id` of een `id` zonder namespace (gebruikt de bestandsnamespace). | ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml info: namespace: my_pack advancements: root: display: title: "Mijn Server" description: "Aangepaste voortgangen voor Mijn Server." icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false frame: task first_ruby_sword: parent: root display: title: "Eerste Robijnzwaard" description: "Verkrijg je eerste aangepaste zwaard." icon: my_pack:ruby_sword frame: task show_toast: true announce_to_chat: true criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword amount: 1 on_complete: sound: name: minecraft:entity.player.levelup title: title: "Voortgang!" subtitle: "Eerste robijnzwaard verkregen." commands: reward: command: "give {player} gold_ingot 4" as_console: true master_crafter: parent: my_pack:root display: title: "Meestervakman" description: "Maak het zwaard, schild en drankje." icon: minecraft:crafting_table frame: goal criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe craft_shield: trigger: craft_recipe conditions: recipe: my_pack:ruby_shield_recipe craft_potion: trigger: craft_recipe conditions: recipe: my_pack:ruby_potion_recipe rewards: experience: 100 loot: - minecraft:chests/simple_dungeon ``` Advancements met meerdere criteria (zoals `master_crafter` hierboven) vereisen dat alle criteria worden voltooid. Elk criterium wordt onafhankelijk bijgehouden en de voortgang wordt door vanilla opgeslagen. Sinds ItemsAdderAdditions 1.0.12 behoudt `/iareload` de bestaande registraties en voortgang wanneer de definities ongewijzigd zijn. Een gewijzigde definitie kan opnieuw geregistreerd moeten worden. # Aangepaste voortgangen (/nl/docs/advancements) Definieer aangepaste Minecraft-voortgangsbomen direct in uw ItemsAdder-inhouds-YAML-bestanden. Geen datapacks, geen herstarts. Voeg een `advancements`-sectie toe en voer `/iareload` uit. ## Functies [#functies] * Maak **aangepaste voortgangstabbladen** met een aangepaste achtergrondtextuur * Bouw **boomstructuren** door voortgangen aan elkaar te koppelen * Gebruik **49 ingebouwde triggertypen** (item verkrijgen, recept maken, entiteit doden, bioom betreden, server joinen, furniture controleren, en meer) * Voeg optionele **spelerspredicaten** toe aan elk criterium, zoals sluipen, gamemode, level, inventarisslots, potioneffecten, locatie en meer * Voer **voltooiingsacties** uit wanneer een voortgang is voltooid (titel, geluid, commando's, actionbar) * Verstrek **ervaring en ontgrendel recepten** als beloningen * Spelersvoortgang blijft behouden na herladen ## Basisstructuur [#basisstructuur] ```yaml info: namespace: my_pack advancements: root: display: title: "Mijn Server" description: "Prestaties voor Mijn Server." icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false first_sword: parent: root display: title: "Eerste Robijnzwaard" description: "Verkrijg je eerste aangepaste zwaard." icon: my_pack:ruby_sword frame: task criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword on_complete: sound: name: minecraft:entity.player.levelup title: title: "Voortgang!" subtitle: "Eerste robijnzwaard verkregen." ``` ## Hoe het werkt [#hoe-het-werkt] IAA laadt elk inhoudsbestand dat een `advancements`-sectie bevat. Elke invoer wordt een Minecraft-voortgang die tijdens runtime via NMS wordt geïnjecteerd. Spelersvoortgang wordt opgeslagen door vanilla in de werelden-opslagbestanden en blijft behouden na herladen. Wortelvoortgangen (geen `parent`) maken een nieuw tabblad in het voortgangsscherm. Kinderen verbinden zich visueel met hun ouder in de boom. Alle voortgangen in een bestand delen dezelfde `info.namespace`. Ouders van verschillende namespacen worden ondersteund met het formaat `namespace:id`. # Spelerspredicaten (/nl/docs/advancements/player-predicates) Spelerspredicaten laten je extra vereisten toevoegen aan een criterium, bovenop de trigger zelf. Plaats ze onder `conditions.player`. De trigger moet eerst afgaan; daarna wordt het spelerspredicaat gecontroleerd vlak voordat het criterium wordt toegekend. ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true ``` `conditions.player` werkt met runtime-triggers. De trigger `impossible` negeert spelerspredicaten, omdat die alleen handmatig kan worden toegekend. ## Object- en lijstformaten [#object--en-lijstformaten] Gebruik één object wanneer je maar één predicaat nodig hebt. Alle sleutels in het object moeten overeenkomen. ```yaml conditions: player: type: minecraft:player flags: is_sneaking: true type_specific: type: minecraft:player gamemode: survival ``` Je kunt ook een lijst gebruiken. Elke invoer in de lijst moet overeenkomen. Dit is handig wanneer je liever vanilla-achtige predicaatwrappers gebruikt. ```yaml conditions: player: - condition: minecraft:entity_properties predicate: flags: is_sneaking: true - condition: minecraft:entity_properties predicate: type_specific: type: minecraft:player gamemode: survival ``` ## Bereiksyntaxis [#bereiksyntaxis] Numerieke waarden accepteren een exact getal of een `min`/`max`-object. ```yaml level: 10 level: min: 10 max: 30 ``` Deze syntaxis wordt gebruikt door spelerslevel, voedselniveau, bewegingssnelheid, potionduur, enchantmentlevel, itemaantal, duurzaamheid, lichtniveau en andere numerieke controles. ## Veelgebruikte spelercontroles [#veelgebruikte-spelercontroles] ```yaml conditions: player: flags: is_sneaking: true is_sprinting: false type_specific: type: minecraft:player gamemode: adventure level: min: 10 food: level: min: 16 saturation: min: 4.0 ``` | Sleutel | Type | Beschrijving | | ------------------------------- | --------------- | ------------------------------------------------------------------------------------------- | | `flags.is_baby` | boolean | Komt overeen met baby-/volwassenstatus wanneer de entiteit dit ondersteunt. | | `flags.is_on_fire` | boolean | Vereist dat de speler wel of niet in brand staat. | | `flags.is_sneaking` | boolean | Vereist sluipstatus. | | `flags.is_sprinting` | boolean | Vereist sprintstatus. | | `flags.is_swimming` | boolean | Vereist zwemstatus. | | `flags.is_on_ground` | boolean | Vereist status op de grond. | | `flags.is_flying` | boolean | Komt overeen met creative flight of glijden. | | `flags.is_fall_flying` | boolean | Vereist glijden met elytra. | | `type_specific.gamemode` | string of lijst | Komt overeen met één of meer gamemodes: `survival`, `creative`, `adventure` of `spectator`. | | `type_specific.level` | getal of bereik | Komt overeen met het XP-level van de speler. | | `type_specific.food.level` | getal of bereik | Komt overeen met het voedselniveau. | | `type_specific.food.saturation` | getal of bereik | Komt overeen met verzadiging. | `gamemode`, `level`, `food`, `advancements`, `recipes`, `stats`, `input` en `looking_at` kunnen ook direct in `player` worden geplaatst, maar `type_specific` is duidelijker en ligt dichter bij de vanilla-predicaatstructuur. ## Inputcontroles [#inputcontroles] Inputpredicaten kunnen de huidige bewegingsinvoer van de speler controleren wanneer de server die informatie beschikbaar stelt. `sneak` en `sprint` vallen terug op de Bukkit-spelerstatus wanneer directe inputdata niet beschikbaar is. ```yaml conditions: player: type_specific: type: minecraft:player input: forward: true jump: true sneak: false sprint: true ``` | Sleutel | Type | Beschrijving | | ---------------- | ------- | ----------------------------------------- | | `input.forward` | boolean | Vereist de status van de vooruit-toets. | | `input.backward` | boolean | Vereist de status van de achteruit-toets. | | `input.left` | boolean | Vereist de status van de links-toets. | | `input.right` | boolean | Vereist de status van de rechts-toets. | | `input.jump` | boolean | Vereist de status van de spring-toets. | | `input.sneak` | boolean | Vereist sneak-input of sluipstatus. | | `input.sprint` | boolean | Vereist sprint-input of sprintstatus. | ## Locatiecontroles [#locatiecontroles] ```yaml conditions: player: location: dimension: minecraft:overworld world: world biomes: - minecraft:plains - minecraft:forest position: x: min: 100 max: 200 y: min: 60 z: 0 block: blocks: minecraft:grass_block light: min: 8 can_see_sky: true structures: - minecraft:village_plains - customstructures:ancient_temple ``` | Sleutel | Type | Beschrijving | | ----------------------------------- | --------------- | --------------------------------------------------------------------------------------------------------------- | | `location.dimension` / `dimensions` | string of lijst | Komt overeen met de wereldomgeving, zoals `minecraft:overworld`, `minecraft:the_nether` of `minecraft:the_end`. | | `location.world` | string | Komt overeen met de Bukkit-wereldnaam. | | `location.biome` / `biomes` | string of lijst | Komt overeen met bioomsleutels. | | `location.position.x` | getal of bereik | Komt overeen met X-coördinaat. | | `location.position.y` | getal of bereik | Komt overeen met Y-coördinaat. | | `location.position.z` | getal of bereik | Komt overeen met Z-coördinaat. | | `location.block` | blokpredicaat | Komt overeen met het blok op de locatie. | | `location.light` | getal of bereik | Komt overeen met het bloklichtniveau. | | `location.can_see_sky` | boolean | Vereist zicht op de lucht. | | `location.structure` / `structures` | string of lijst | Komt overeen met een vanilla structure of een Custom Structures-structure. Elke vermelding kan matchen. | Vanilla structures gebruiken registry keys zoals `minecraft:village_plains`. Custom Structures-vermeldingen gebruiken `customstructures:` (de alias `custom_structures:` wordt ook geaccepteerd) en vereisen ItemsAdderAdditions 1.0.12 of hoger met de Custom Structures-plugin. Zie [Custom Structures-compatibiliteit](/nl/docs/compatibility/customstructures). ## Blokpredicaten [#blokpredicaten] Blokpredicaten worden gebruikt door `location.block`, `stepping_on` en `movement_affected_by`. ```yaml conditions: player: stepping_on: block: blocks: minecraft:stone state: axis: y ``` | Sleutel | Type | Beschrijving | | --------------- | ----------------- | ------------------------------------------------------------------ | | `block` | string of section | Verkorte vorm voor één blok, of een volledige blokpredicaatsectie. | | `blocks` / `id` | string of lijst | Blok-ID's om mee te vergelijken. | | `state.` | string of bereik | Komt exact overeen met een blokstatuswaarde, of met `min`/`max`. | ItemsAdderAdditions custom bloktags worden eerst opgelost. Als er geen custom tag bestaat, wordt bloktagsyntaxis zoals `#minecraft:logs` opgelost met vanilla-bloktags. Vanilla tags komen alleen overeen met vanilla-blokken. ## Item- en uitrustingspredicaten [#item--en-uitrustingspredicaten] Itempredicaten kunnen worden gebruikt in `equipment`, `slots` en geneste entiteitspredicaten. Ze accepteren ItemsAdder-ID's, MMOItems-ID's, vanilla item-ID's, vanilla itemtags zoals `#minecraft:planks` en ondersteunde custom tags. ```yaml conditions: player: equipment: mainhand: items: my_pack:ruby_sword count: 1 durability: min: 100 components: minecraft:custom_model_data: 123 enchantments: - enchantment: minecraft:sharpness levels: min: 3 ``` | Sleutel | Type | Beschrijving | | ---------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------- | | `item` / `items` | string of lijst | Item-ID's om mee te vergelijken. Een gewone string kan worden gebruikt als verkorte vorm voor één item. | | `count` | getal of bereik | Komt overeen met het stapelaantal. | | `durability` | getal of bereik | Komt overeen met resterende duurzaamheid. | | `components.minecraft:custom_model_data` | integer | Komt overeen met custom model data. | | `components.minecraft:custom_name` | string | Komt overeen met de weergavenaam van het item. | | `components.minecraft:damage` | integer | Komt overeen met itemdamage. | | `enchantments[].enchantment` / `id` | string | Enchantmentsleutel. | | `enchantments[].levels` | getal of bereik | Vereist enchantmentlevel. | ItemsAdderAdditions custom itemtags worden eerst opgelost. Als er geen custom tag bestaat, worden vanilla itemtags opgelost met het vanilla-itemregister. Itemsecties `predicates` worden nog niet ondersteund en laten het itempredicaat gesloten falen in plaats van per ongeluk te matchen. ## Slots [#slots] Gebruik `slots` wanneer je de inventaris van de speler moet controleren in plaats van alleen uitgeruste items. ```yaml conditions: player: slots: weapon.mainhand: items: minecraft:diamond_sword inventory.0: items: minecraft:apple count: 2 hotbar.2: items: my_pack:ruby_staff ``` | Slotsleutel | Beschrijving | | ----------------------------------------------- | ----------------------------------- | | `mainhand` of `weapon.mainhand` | Item in de hoofdhand. | | `offhand` of `weapon.offhand` | Item in de off-hand. | | `head` of `armor.head` | Helm-slot. | | `chest` of `armor.chest` | Borstplaat. | | `legs` of `armor.legs` | Leggings. | | `feet` of `armor.feet` | Laarzen. | | `*`, `inventory.*`, `container.*` | Elk slot in de spelersinventaris. | | `hotbar.` | Hotbar-slot, van `0` tot `8`. | | `inventory.` of `inventory.-` | Hoofdinventarisslots, na de hotbar. | | `container.` of `container.-` | Ruwe containerslotnummers. | ## Potioneffecten [#potioneffecten] ```yaml conditions: player: effects: minecraft:speed: amplifier: min: 1 duration: min: 100 ambient: false visible: true ``` | Sleutel | Type | Beschrijving | | ---------------------------- | --------------- | ------------------------------------------------ | | `effects..amplifier` | getal of bereik | Komt overeen met de potionversterker. | | `effects..duration` | getal of bereik | Komt overeen met resterende duur in ticks. | | `effects..ambient` | boolean | Komt overeen met de ambient-flag. | | `effects..visible` | boolean | Komt overeen met de zichtbaarheid van particles. | ## Voortgang, recepten en statistieken [#voortgang-recepten-en-statistieken] ```yaml conditions: player: type_specific: type: minecraft:player advancements: minecraft:story/mine_stone: true my_pack:custom_root: root_trigger: true recipes: minecraft:diamond_sword: true stats: - type: minecraft:custom stat: minecraft:jump value: min: 50 ``` | Sleutel | Type | Beschrijving | | ------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------- | | `advancements.` | boolean of section | Vereist dat een andere voortgang wel of niet voltooid is. Een section controleert genoemde criteria. | | `recipes.` | boolean | Vereist dat een recept ontdekt of niet ontdekt is. | | `stats[].type` | string | Statistiekgroep, zoals `minecraft:custom`, `minecraft:mined`, `minecraft:used`, `minecraft:killed` of `minecraft:killed_by`. | | `stats[].stat` | string | Statistieksleutel, materiaalsleutel of entiteitsleutel afhankelijk van het statistiektype. | | `stats[].value` | getal of bereik | Vereiste statistiekwaarde. | ## Geneste entiteitscontroles [#geneste-entiteitscontroles] Hetzelfde entiteitspredicaatsysteem kan worden gebruikt voor gerelateerde entiteiten. ```yaml conditions: player: type_specific: type: minecraft:player looking_at: type: minecraft:zombie distance: absolute: max: 12 vehicle: type: minecraft:horse ``` | Sleutel | Type | Beschrijving | | -------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | `passenger` | entiteitspredicaat | Komt overeen met een van de passagiers van de speler. | | `vehicle` | entiteitspredicaat | Komt overeen met de entiteit waarop de speler rijdt. | | `targeted_entity` | entiteitspredicaat | Voor mobs: komt overeen met hun huidige doelwit. | | `type_specific.looking_at` | entiteitspredicaat | Voor spelers: komt overeen met de entiteit waarnaar ze kijken binnen 100 blokken. | | `distance` | section | Komt overeen met de afstand van de speler tot de gerelateerde entiteit. Ondersteunt `absolute`, `horizontal`, `x`, `y` en `z`. | ## Andere typespecifieke predicaten [#andere-typespecifieke-predicaten] Geneste entiteitspredicaten kunnen ook een paar entiteitsspecifieke controles gebruiken. | Type | Sleutels | Beschrijving | | --------------------------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------- | | `minecraft:sheep` | `sheared` | Komt overeen met of het schaap geschoren is. | | `minecraft:slime`, `minecraft:magma_cube`, `minecraft:cube_mob` | `size` | Komt overeen met slimegrootte met een getal of bereik. | | `minecraft:raider` | `is_captain`, `has_raid` | Komt overeen met raider-patrouillekapitein en raidstatus wanneer beschikbaar. | | `minecraft:fishing_hook` | `in_open_water` | Komt overeen met open-waterstatus van de vishaak wanneer beschikbaar. | ## Beperkingen [#beperkingen] * Entiteitstypetags worden syntactisch geaccepteerd maar niet opgelost. Vanilla item- en bloktags worden opgelost waar item-/blokpredicaten worden ondersteund. * Entiteitsniveau-secties `components` en `predicates` worden niet ondersteund en laten het predicaat gesloten falen. * NBT-matching is bewust beperkt; het ondersteunt alleen eenvoudige scoreboard-tagcontroles binnen een `nbt`-string. # Triggers (/nl/docs/advancements/triggers) Triggers bepalen wat de speler moet doen om een criterium te voltooien. Elk criterium heeft één trigger en een optioneel `conditions`-blok. ```yaml criteria: : trigger: conditions: # triggerspecifieke opties ``` Een voortgang kan meerdere criteria hebben. Alle moeten worden voltooid voordat de voortgang wordt toegekend. Elke runtime-trigger ondersteunt ook een optioneel `conditions.player`-predicaat voor extra vereisten rond spelerstatus; zie [Spelerspredicaten](/nl/docs/advancements/player-predicates). Itemvoorwaarden accepteren ItemsAdder-ID's, MMOItems-ID's, vanilla ID's, vanilla tags en ondersteunde custom tags. Blok-, furniture- en receptvoorwaarden kunnen ook custom tags gebruiken waar de trigger dat ondersteunt. ## obtain\_item [#obtain_item] Wordt geactiveerd wanneer de speler een item van de grond oppakt. ```yaml criteria: get_sword: trigger: obtain_item conditions: items: - my_pack:ruby_sword - my_pack:iron_sword amount: 1 ``` | Sleutel | Type | Standaard | Beschrijving | | -------- | ----------------- | --------- | --------------------------------------------------------------------------------------------------------------------- | | `items` | lijst van strings | `[]` | Item-ID's of vanilla itemtags (IA, MMOItems, vanilla of `#minecraft:tag`). Elke overeenkomst activeert het criterium. | | `amount` | integer | `1` | Minimale stapelgrootte die de speler tegelijk moet oppakken. | *** ## consume\_item [#consume_item] Wordt geactiveerd wanneer de speler klaar is met eten of drinken van een item. ```yaml criteria: eat_ruby_apple: trigger: consume_item conditions: item: my_pack:ruby_apple ``` | Sleutel | Type | Vereist | Beschrijving | | ------- | ------ | ------- | ----------------------------------------------------------------------- | | `item` | string | ja | Item-ID of vanilla itemtag (IA, MMOItems, vanilla of `#minecraft:tag`). | *** ## using\_item [#using_item] Wordt geactiveerd wanneer de speler rechtsklikt (in de lucht of op een blok) terwijl hij een aangepast item in de hoofdhand vasthoudt. ```yaml criteria: use_staff: trigger: using_item conditions: item: my_pack:ruby_staff ``` | Sleutel | Type | Vereist | Beschrijving | | ------- | ------ | ------- | ----------------------------------------------------------------------- | | `item` | string | ja | Item-ID of vanilla itemtag (IA, MMOItems, vanilla of `#minecraft:tag`). | *** ## place\_block [#place_block] Wordt geactiveerd wanneer de speler een aangepast ItemsAdder-blok of een vanilla blok plaatst. ```yaml criteria: place_ruby_ore: trigger: place_block conditions: block: my_pack:ruby_ore ``` | Sleutel | Type | Vereist | Beschrijving | | ------- | ------ | ------- | ------------------------------------------------------------------------------- | | `block` | string | ja | ItemsAdder-blok-ID, vanilla blok-ID of vanilla bloktag zoals `#minecraft:logs`. | *** ## break\_block [#break_block] Wordt geactiveerd wanneer de speler een aangepast ItemsAdder-blok of een vanilla blok breekt. ```yaml criteria: mine_ruby_ore: trigger: break_block conditions: block: my_pack:ruby_ore ``` | Sleutel | Type | Vereist | Beschrijving | | ------- | ------ | ------- | ------------------------------------------------------------------------------- | | `block` | string | ja | ItemsAdder-blok-ID, vanilla blok-ID of vanilla bloktag zoals `#minecraft:logs`. | *** ## place\_furniture [#place_furniture] Wordt geactiveerd wanneer de speler een aangepast meubel plaatst. ```yaml criteria: place_lamp: trigger: place_furniture conditions: furniture: my_pack:ruby_lamp ``` | Sleutel | Type | Vereist | Beschrijving | | ----------- | ------ | ------- | -------------------------------------- | | `furniture` | string | ja | ItemsAdder-meubel-ID (`namespace:id`). | *** ## break\_furniture [#break_furniture] Wordt geactiveerd wanneer de speler een aangepast meubel breekt. ```yaml criteria: break_lamp: trigger: break_furniture conditions: furniture: my_pack:ruby_lamp ``` | Sleutel | Type | Vereist | Beschrijving | | ----------- | ------ | ------- | -------------------------------------- | | `furniture` | string | ja | ItemsAdder-meubel-ID (`namespace:id`). | *** ## interact\_furniture [#interact_furniture] Wordt geactiveerd wanneer de speler rechtsklikt op een aangepast meubel. ```yaml criteria: use_workbench: trigger: interact_furniture conditions: furniture: my_pack:ruby_workbench ``` | Sleutel | Type | Vereist | Beschrijving | | ----------- | ------ | ------- | -------------------------------------- | | `furniture` | string | ja | ItemsAdder-meubel-ID (`namespace:id`). | *** ## craft\_recipe [#craft_recipe] Wordt geactiveerd wanneer de speler een item craft met een specifiek IAA-recept. ```yaml criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe ``` | Sleutel | Type | Vereist | Beschrijving | | -------- | ------ | ------- | ---------------------------------------------------------------------------------------------- | | `recipe` | string | ja | Receptsleutel als `namespace:id` of een `id` zonder namespace (gebruikt de bestandsnamespace). | *** ## kill\_entity\_with\_item [#kill_entity_with_item] Wordt geactiveerd wanneer de speler een entiteit doodt terwijl hij een specifiek item in zijn hoofdhand vasthoudt. ```yaml criteria: slay_zombie: trigger: kill_entity_with_item conditions: item: my_pack:ruby_sword entity_type: minecraft:zombie # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | ----------- | ------------------------------------------------------------------------------------------------------- | | `item` | string | *(vereist)* | Item-ID of vanilla itemtag die de speler moet vasthouden. | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel (bijv. `minecraft:zombie`). Indien weggelaten, komt elke entiteit overeen. | *** ## player\_hurt\_entity [#player_hurt_entity] Wordt geactiveerd wanneer de speler schade toebrengt aan een entiteit. In tegenstelling tot `kill_entity_with_item` wordt dit geactiveerd bij elke klap, niet alleen de doodslag. ```yaml criteria: hit_zombie: trigger: player_hurt_entity conditions: item: my_pack:ruby_sword # optioneel entity_type: minecraft:zombie # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | -------------------------------------------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID die de speler moet vasthouden. Indien weggelaten, komt elk item (of blote handen) overeen. | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elke entiteit overeen. | *** ## entity\_hurt\_player [#entity_hurt_player] Wordt geactiveerd wanneer een entiteit schade aan de speler toebrengt. ```yaml criteria: hurt_by_zombie: trigger: entity_hurt_player conditions: entity_type: minecraft:zombie # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | ----------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elke aanvaller overeen. | *** ## player\_killed\_entity [#player_killed_entity] Wordt geactiveerd wanneer de speler een entiteit doodt (ongeacht het gebruikte wapen). ```yaml criteria: kill_creeper: trigger: player_killed_entity conditions: entity_type: minecraft:creeper # optioneel item: my_pack:ruby_sword # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | -------------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elke entiteit overeen. | | `item` | string | *(elke)* | Item-ID die de speler moet vasthouden. Indien weggelaten, komt elk item overeen. | *** ## entity\_killed\_player [#entity_killed_player] Wordt geactiveerd wanneer de speler wordt gedood door een niet-speler-entiteit (projectielsterfgevallen worden opgelost tot de schutter). ```yaml criteria: killed_by_skeleton: trigger: entity_killed_player conditions: entity_type: minecraft:skeleton # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | ---------------------------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel van de moordenaar. Indien weggelaten, komt elke entiteit overeen. | *** ## killed\_by\_arrow [#killed_by_arrow] Wordt geactiveerd wanneer de speler wordt gedood door een pijl. Het entiteitstype komt overeen met de schutter van de pijl, of de pijl zelf als deze geen schutter had. ```yaml criteria: shot_by_skeleton: trigger: killed_by_arrow conditions: entity_type: minecraft:skeleton # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | -------------------------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel van de schutter. Indien weggelaten, komt elke pijlbron overeen. | *** ## tame\_animal [#tame_animal] Wordt geactiveerd wanneer de speler een dier temt. ```yaml criteria: tame_wolf: trigger: tame_animal conditions: entity_type: minecraft:wolf # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | ------------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elk tembaar dier overeen. | *** ## bred\_animals [#bred_animals] Wordt geactiveerd wanneer de speler twee dieren fokt. ```yaml criteria: breed_cows: trigger: bred_animals conditions: entity_type: minecraft:cow # optioneel, type van de nakomelingen parent_type: minecraft:cow # optioneel partner_type: minecraft:cow # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | -------------- | ------ | --------- | ---------------------------------- | | `entity_type` | string | *(elke)* | Entiteitstype van de nakomelingen. | | `parent_type` | string | *(elke)* | Entiteitstype van de moeder. | | `partner_type` | string | *(elke)* | Entiteitstype van de vader. | *** ## villager\_trade [#villager_trade] Wordt geactiveerd wanneer de speler een handel met een dorpeling voltooit. ```yaml criteria: buy_diamond: trigger: villager_trade conditions: item: minecraft:diamond # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | ------------------------------------------------------------------------------ | | `item` | string | *(elke)* | Item-ID van het handelsresultaat. Indien weggelaten, komt elke handel overeen. | *** ## enchanted\_item [#enchanted_item] Wordt geactiveerd wanneer de speler een item betovert bij een betovertafel. ```yaml criteria: enchant_ruby_sword: trigger: enchanted_item conditions: item: my_pack:ruby_sword # optioneel min_levels: 10 # optioneel max_levels: 30 # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------ | ------- | ------------- | --------------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID. Indien weggelaten, komt elk item dat wordt betoverd overeen. | | `min_levels` | integer | `0` | Minimale XP-niveaukosten van de betovering. | | `max_levels` | integer | *(onbeperkt)* | Maximale XP-niveaukosten van de betovering. | *** ## shoot\_bow [#shoot_bow] Wordt geactiveerd wanneer de speler een projectiel van een boog schiet. ```yaml criteria: shoot_ruby_bow: trigger: shoot_bow conditions: item: my_pack:ruby_bow # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | --------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID van de boog. Indien weggelaten, komt elke boog overeen. | *** ## shot\_crossbow [#shot_crossbow] Wordt geactiveerd wanneer de speler een projectiel van een kruisboog schiet. ```yaml criteria: shoot_crossbow: trigger: shot_crossbow conditions: item: my_pack:ruby_crossbow # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | ------------------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID van de kruisboog. Indien weggelaten, komt elke kruisboog overeen. | *** ## fishing\_rod\_hooked [#fishing_rod_hooked] Wordt geactiveerd wanneer de speler een vis of entiteit inrolt. ```yaml criteria: hook_fish: trigger: fishing_rod_hooked conditions: rod: my_pack:ruby_rod # optioneel caught_entity_type: minecraft:cod # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | -------------------- | ------ | --------- | -------------------------------------------------------------------------------- | | `rod` | string | *(elke)* | Item-ID van de hengel. Indien weggelaten, komt elke hengel overeen. | | `caught_entity_type` | string | *(elke)* | Entiteitstype van wat werd gehaakt. Indien weggelaten, komt elke vangst overeen. | *** ## filled\_bucket [#filled_bucket] Wordt geactiveerd wanneer de speler een emmer met vloeistof vult. ```yaml criteria: fill_lava: trigger: filled_bucket conditions: item: minecraft:lava_bucket # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | -------------------------------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID van de resulterende emmer. Indien weggelaten, komt elke gevulde emmer overeen. | *** ## item\_durability\_changed [#item_durability_changed] Wordt geactiveerd wanneer een item in de hand van de speler duurzaamheidsschade oploopt. ```yaml criteria: damage_ruby_sword: trigger: item_durability_changed conditions: item: my_pack:ruby_sword # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | --------------------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID van het beschadigde item. Indien weggelaten, komt elk item overeen. | *** ## item\_used\_on\_block [#item_used_on_block] Wordt geactiveerd wanneer de speler met de rechtermuisknop op een blok klikt met een item in zijn hoofdhand. ```yaml criteria: use_on_crafting_table: trigger: item_used_on_block conditions: item: my_pack:ruby_wand # optioneel block: minecraft:crafting_table # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | --------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID of vanilla itemtag die de speler moet vasthouden. | | `block` | string | *(elke)* | ItemsAdder-blok-ID, vanilla blok-ID of vanilla bloktag. | *** ## recipe\_crafted [#recipe_crafted] Wordt geactiveerd wanneer de speler een item craft met het vanilla craftingsysteem. ```yaml criteria: craft_diamond_sword: trigger: recipe_crafted conditions: recipe: minecraft:diamond_sword # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | -------- | ------ | --------- | ---------------------------------------------------------------------------------- | | `recipe` | string | *(elke)* | Receptsleutel als `namespace:id`. Indien weggelaten, komt elke craftactie overeen. | *** ## recipe\_unlocked [#recipe_unlocked] Wordt geactiveerd wanneer de speler een nieuw recept ontdekt. ```yaml criteria: unlock_diamond_sword: trigger: recipe_unlocked conditions: recipe: minecraft:diamond_sword ``` | Sleutel | Type | Vereist | Beschrijving | | -------- | ------ | ------- | --------------------------------- | | `recipe` | string | ja | Receptsleutel als `namespace:id`. | *** ## player\_interacted\_with\_entity [#player_interacted_with_entity] Wordt geactiveerd wanneer de speler met de rechtermuisknop op een entiteit klikt met zijn hoofdhand. ```yaml criteria: name_a_villager: trigger: player_interacted_with_entity conditions: entity_type: minecraft:villager # optioneel item: minecraft:name_tag # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | ------------------------------------------------------------------------------------------------------------------ | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elke entiteit overeen. | | `item` | string | *(elke)* | Item-ID of vanilla itemtag die de speler moet vasthouden. Indien weggelaten, komt elk item (of lege hand) overeen. | *** ## player\_sheared\_equipment [#player_sheared_equipment] Wordt geactiveerd wanneer de speler een entiteit scheert. ```yaml criteria: shear_sheep: trigger: player_sheared_equipment conditions: entity_type: minecraft:sheep # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | --------------------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elke scheerbare entiteit overeen. | *** ## bee\_nest\_destroyed [#bee_nest_destroyed] Wordt geactiveerd wanneer de speler een bijenkast of bijennest breekt. ```yaml criteria: break_beehive: trigger: bee_nest_destroyed conditions: block: minecraft:beehive # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | -------------------------------------------------------------------------------------------------------------- | | `block` | string | *(elke)* | Bloktype sleutel (`minecraft:beehive` of `minecraft:bee_nest`). Indien weggelaten, komt één van beide overeen. | *** ## started\_riding [#started_riding] Wordt geactiveerd wanneer de speler een entiteit berijdt. ```yaml criteria: ride_horse: trigger: started_riding conditions: entity_type: minecraft:horse # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------------- | ------ | --------- | -------------------------------------------------------------------------- | | `entity_type` | string | *(elke)* | Vanilla-entiteitstypesleutel. Indien weggelaten, komt elk rijdier overeen. | *** ## effects\_changed [#effects_changed] Wordt geactiveerd wanneer de speler een drankeffect krijgt of wanneer een drankeffect wordt gewijzigd. ```yaml criteria: get_speed: trigger: effects_changed conditions: effect: minecraft:speed # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | -------- | ------ | --------- | ----------------------------------------------------------------------------------------------------------------- | | `effect` | string | *(elke)* | Drankeffectsleutel (bijv. `minecraft:speed`). Indien weggelaten, komt elke effecttoevoeging of wijziging overeen. | *** ## changed\_dimension [#changed_dimension] Wordt geactiveerd wanneer de speler naar een andere dimensie gaat. ```yaml criteria: enter_nether: trigger: changed_dimension conditions: to: minecraft:the_nether # optioneel from: minecraft:overworld # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | ------------------------------------------------------------------------------ | | `to` | string | *(elke)* | Dimensiesleutel waar de speler naar toe reisde (bijv. `minecraft:the_nether`). | | `from` | string | *(elke)* | Dimensiesleutel waar de speler van afkomstig is. | *** ## slept\_in\_bed [#slept_in_bed] Wordt geactiveerd wanneer de speler met succes een bed betreedt. Geen voorwaarden. ```yaml criteria: first_sleep: trigger: slept_in_bed ``` *** ## used\_totem [#used_totem] Wordt geactiveerd wanneer de speler van de dood wordt gered door een totem van onsterfelijkheid. Geen voorwaarden. ```yaml criteria: totem_pop: trigger: used_totem ``` *** ## fall\_from\_height [#fall_from_height] Wordt geactiveerd wanneer de speler valschade oploopt. ```yaml criteria: survived_fall: trigger: fall_from_height conditions: distance: y: min: 30 max: 320 ``` Je kunt ook één getal gebruiken als minimale valafstand: ```yaml criteria: small_fall: trigger: fall_from_height conditions: distance: 8 ``` | Sleutel | Type | Standaard | Beschrijving | | --------------------- | ----------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | `distance` | number of section | `0` tot onbeperkt | Bereik van de valafstand. Een getal betekent minimale afstand. Een section kan `min`/`max` gebruiken, of een genest `y`, `absolute` of `horizontal` bereik. | | `distance.min` | number | `0` | Minimale valafstand. | | `distance.max` | number | *(onbeperkt)* | Maximale valafstand. | | `distance.y` | section | *(geen)* | Voorkeursvorm voor verticaal valafstandbereik. Ondersteunt `min` en `max`. | | `distance.absolute` | section | *(geen)* | Alternatieve bereikvorm. Ondersteunt `min` en `max`. | | `distance.horizontal` | section | *(geen)* | Alternatieve bereikvorm. Ondersteunt `min` en `max`. | *** ## used\_ender\_eye [#used_ender_eye] Wordt geactiveerd wanneer de speler een oog van ender werpt. Geen voorwaarden. ```yaml criteria: use_ender_eye: trigger: used_ender_eye ``` *** ## held\_item [#held_item] IAA aangepaste trigger. Wordt geactiveerd wanneer de speler naar een hotbarslot scrolt dat een specifiek item bevat. ```yaml criteria: equip_ruby_sword: trigger: held_item conditions: item: my_pack:ruby_sword # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | ------------------------------------------------------------------------- | | `item` | string | *(elke)* | Item-ID. Indien weggelaten, komt elk item waarop wordt gescrolld overeen. | *** ## permission [#permission] Wordt geactiveerd wanneer de speler inlogt terwijl hij de opgegeven permissie heeft. ```yaml criteria: has_vip: trigger: permission conditions: permission: "myserver.rank.vip" ``` | Sleutel | Type | Vereist | Beschrijving | | ------------ | ------ | ------- | ------------------------------------------------------------------------------------------------------ | | `permission` | string | ja | Permissienode. Wordt bij elke login gecontroleerd en geactiveerd zodra de speler deze permissie heeft. | *** ## in\_biome [#in_biome] Wordt geactiveerd wanneer de speler een specifiek bioom binnenstapt. ```yaml criteria: visit_jungle: trigger: in_biome conditions: biome: minecraft:jungle world: world # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | ----------- | -------------------------------------------------------------- | | `biome` | string | *(vereist)* | Bioomsleutel als `namespace:id` (bijv. `minecraft:deep_dark`). | | `world` | string | *(elke)* | Wereldnaam om de controle tot één wereld te beperken. | *** ## enter\_region [#enter_region] Wordt geactiveerd wanneer een speler van buiten naar binnen een WorldGuard-regio loopt of teleporteert. **Versievereisten:** Vereist **ItemsAdderAdditions 1.0.12 of hoger** en WorldGuard. ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # optioneel ``` | Sleutel | Type | Standaard | Beschrijving | | -------- | ------ | ----------- | ------------------------------------------------------------ | | `region` | string | *(vereist)* | WorldGuard-regio-ID. Hoofdletters worden genegeerd. | | `world` | string | *(elke)* | Bukkit-wereldnaam om de controle tot één wereld te beperken. | Het criterium wordt alleen geactiveerd bij het overschrijden van de regiogrens. Bewegen terwijl de speler al binnen de regio is activeert het niet opnieuw. Deze trigger staat los van de ItemsAdderAdditions WorldGuard-vlagopties. Zie [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) voor installatie en probleemoplossing. *** ## sit\_furniture [#sit_furniture] Wordt geactiveerd wanneer de speler op ItemsAdder furniture gaat zitten. **Versievereiste:** Vereist **ItemsAdder 4.0.17 of hoger**. ```yaml criteria: sit_on_chair: trigger: sit_furniture conditions: furniture: my_pack:ruby_chair ``` | Sleutel | Type | Vereist | Beschrijving | | ----------- | ------ | ------- | ------------------------------------------------------------- | | `furniture` | string | ja | ItemsAdder furniture-ID of ondersteunde custom furniture-tag. | *** ## unsit\_furniture [#unsit_furniture] Wordt geactiveerd wanneer de speler stopt met zitten op ItemsAdder furniture. **Versievereiste:** Vereist **ItemsAdder 4.0.17 of hoger**. ```yaml criteria: leave_chair: trigger: unsit_furniture conditions: furniture: my_pack:ruby_chair ``` | Sleutel | Type | Vereist | Beschrijving | | ----------- | ------ | ------- | ------------------------------------------------------------- | | `furniture` | string | ja | ItemsAdder furniture-ID of ondersteunde custom furniture-tag. | *** ## open\_trade\_machine [#open_trade_machine] Wordt geactiveerd wanneer de speler een ItemsAdder `trade_machine` of `block_trade_machine` GUI opent. ```yaml criteria: open_alchemy_station: trigger: open_trade_machine conditions: trade_machine: stations:alchemy_table ``` | Sleutel | Type | Vereist | Beschrijving | | --------------- | ------ | ------- | -------------------------------------------------------------- | | `trade_machine` | string | ja | Trade-machine content-ID of ondersteunde custom furniture-tag. | *** ## start\_emote [#start_emote] Wordt geactiveerd wanneer de speler een ItemsAdder emote start. ```yaml criteria: start_wave: trigger: start_emote conditions: emote: my_pack:wave ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | -------------------------------------------------------- | | `emote` | string | *(elke)* | Emote-ID. Als dit ontbreekt, matcht elke gestarte emote. | *** ## stop\_emote [#stop_emote] Wordt geactiveerd wanneer de speler een ItemsAdder emote stopt. ```yaml criteria: stop_wave: trigger: stop_emote conditions: emote: my_pack:wave ``` | Sleutel | Type | Standaard | Beschrijving | | ------- | ------ | --------- | -------------------------------------------------------- | | `emote` | string | *(elke)* | Emote-ID. Als dit ontbreekt, matcht elke gestopte emote. | *** ## join\_server [#join_server] Wordt geactiveerd wanneer de speler de server joint. Geen voorwaarden. ```yaml criteria: joined: trigger: join_server ``` *** ## first\_join [#first_join] Wordt geactiveerd wanneer de speler voor het eerst joint volgens Bukkit's `hasPlayedBefore` controle. Geen voorwaarden. ```yaml criteria: first_join: trigger: first_join ``` *** ## tick [#tick] Wordt eenmaal per servertick geactiveerd voor elke online speler. Gebruik `conditions.player` om het criterium beperkt te houden. ```yaml criteria: sneaking_tick: trigger: tick conditions: player: flags: is_sneaking: true ``` *** ## impossible [#impossible] Wordt nooit op zichzelf geactiveerd. ```yaml criteria: manual: trigger: impossible ``` Geen `conditions` opties. # Bed (/nl/docs/behaviours/bed) Verandert elk aangepast meubel in een functioneel bed. Ondersteunt meerdere slaapplaatsen op een enkel stuk, zodat een tweepersoonsbed twee spelers tegelijkertijd kan herbergen. Werkt met **aangepaste meubels** en **complexe meubels**. ## Configuratie [#configuratie] ```yaml behaviours: bed: slots: - "0,0,0" # verplicht - minimaal een slot - "1,0,0" # tweede slot, bijv. voor een tweepersoonsbed ``` Elk item in `slots` is een `"dx,dy,dz"` integer-offset ten opzichte van het basisblok van het meubel. De offsetassen volgen de **eigen kijkrichting van het meubel**, niet de wereldassen: | As | Betekenis | | ---- | ---------------------------------------------------------- | | `dx` | Naar voren / achteren langs de kijkrichting van het meubel | | `dy` | Omhoog / omlaag | | `dz` | Links / rechts (loodrecht op de kijkrichting) | Dit betekent dat `"1,0,0"` altijd een blok voor de basis is, ongeacht in welke richting het meubel is geplaatst. ### Enkelvoudig slot (standaard) [#enkelvoudig-slot-standaard] ```yaml behaviours: bed: slots: - "0,0,0" ``` Als `slots` volledig wordt weggelaten, is er ook standaard een enkel slot op `0,0,0`. ### Tweepersoonsbed (twee slots naast elkaar) [#tweepersoonsbed-twee-slots-naast-elkaar] ```yaml behaviours: bed: slots: - "0,0,0" - "0,0,1" ``` `dz: 1` plaatst het tweede slot een blok rechts van de basis bij het kijken naar het meubel. ### Tweepersoonsbed (twee slots voor en achter) [#tweepersoonsbed-twee-slots-voor-en-achter] ```yaml behaviours: bed: slots: - "0,0,0" - "1,0,0" ``` `dx: 1` plaatst het tweede slot een blok voor de basis. ## Gedrag [#gedrag] * Rechtsklikken op het meubel (of de barrièreblokken) probeert de speler in het volgende beschikbare slot te laten slapen. * Als alle slots bezet zijn, ziet de speler het bericht **"Dit bed is bezet"** in de actiebalk. * Er wordt tijdelijk een vanilla bedblok op het slot geplaatst zodat het Minecraft-slaapmechanisme werkt. Het wordt verwijderd wanneer de speler wakker wordt, de verbinding verbreekt of het meubel wordt afgebroken. * Het afbreken van het meubel wekt slapende spelers. * Sluipen terwijl je rechtsklikt wordt genegeerd zodat spelers normaal kunnen interageren terwijl ze gehurkt lopen. Bed voorbeeld ## Gerelateerde pagina's [#gerelateerde-paginas] * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # Verbindbaar (/nl/docs/behaviours/connectable) ```yaml behaviours: connectable: type: stair # Optioneel (standaardwaarde: stair) ``` ```yaml behaviours: connectable: type: stair # Optioneel (standaardwaarde: stair) default: connectable_furniture straight: connectable_furniture_straight left: connectable_furniture_left right: connectable_furniture_right outer: connectable_furniture_outer inner: connectable_furniture_inner ``` Verbindbaar trap-type voorbeeld ```yaml behaviours: connectable: type: table ``` ```yaml behaviours: connectable: type: table default: connectable_furniture straight: connectable_furniture_straight middle: connectable_furniture_middle border: connectable_furniture_border corner: connectable_furniture_corner end: connectable_furniture_end ``` Verbindbaar tafel-type voorbeeld De ID's moeten aangepaste meubels zijn. ## Standaard ID-resolutie [#standaard-id-resolutie] Alle meubeltype-ID's zijn optioneel. Als ze niet zijn opgegeven, zoekt de plugin automatisch naar overeenkomende meubel-ID's: * `default` erft de meubel-ID waarop het gedrag is geconfigureerd. * Elk ander type gebruikt `_`. Als het gedrag bijvoorbeeld is geconfigureerd op een meubel met de naam `connectable_furniture`: ### Automatisch opzoeken trap-type [#automatisch-opzoeken-trap-type] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `left` → `connectable_furniture_left` * `right` → `connectable_furniture_right` * `outer` → `connectable_furniture_outer` * `inner` → `connectable_furniture_inner` ### Automatisch opzoeken tafel-type [#automatisch-opzoeken-tafel-type] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `middle` → `connectable_furniture_middle` * `border` → `connectable_furniture_border` * `corner` → `connectable_furniture_corner` * `end` → `connectable_furniture_end` ## Minimale configuratie [#minimale-configuratie] ```yaml behaviours: connectable: type: stair # of table ``` In de meeste gevallen hoef je alleen het type in te stellen; automatische ID-resolutie regelt de rest. # Contacteffect (/nl/docs/behaviours/contact-effect) Past effecten toe op spelers terwijl ze een aangepast blok, meubel of complex meubel aanraken of erop staan. Er zijn vier effectgroepen beschikbaar, allemaal optioneel. Combineer er zoveel je wilt op hetzelfde item. | Groep | Effect | | ---------------- | ---------------------------------------------------------------- | | `damage` | Verwondt de speler op een interval (een negatief bedrag geneest) | | `heal` | Geneest de speler op een interval (een negatief bedrag verwondt) | | `potion_effects` | Herhaalt een lijst van drankeffecten tijdens het contact | | `attributes` | Past tijdelijke attribuutmodificaties toe tijdens het contact | ## Configuratie [#configuratie] ```yaml behaviours: contact_effect: damage: amount: 1.0 interval: 20 # optioneel, standaard: 20 ticks cause: CACTUS # optioneel, standaard: CACTUS fire_duration: 0 # optioneel, standaard: 0 ticks ``` ```yaml behaviours: contact_effect: heal: amount: 1.0 interval: 20 # optioneel, standaard: 20 ticks ``` ```yaml behaviours: contact_effect: potion_effects: - type: POISON duration: 80 # optioneel, standaard: 40 ticks amplifier: 0 # optioneel, standaard: 0 (0 = niveau 1) ambient: false # optioneel, standaard: false particles: true # optioneel, standaard: true icon: true # optioneel, standaard: true interval: 20 # optioneel, standaard: 20 ticks - type: SLOWNESS duration: 80 ``` ```yaml behaviours: contact_effect: attributes: - attribute: MOVEMENT_SPEED amount: 0.05 operation: ADD_NUMBER # optioneel, standaard: ADD_NUMBER - attribute: STEP_HEIGHT amount: 0.5 ``` ```yaml behaviours: contact_effect: apply_when_sneaking: true # optioneel, standaard: true block_faces: # optioneel top: true # optioneel, standaard: true north: true # optioneel, standaard: true south: true # optioneel, standaard: true west: true # optioneel, standaard: true east: true # optioneel, standaard: true damage: amount: 1.0 interval: 40 cause: CACTUS heal: amount: 0.5 interval: 20 potion_effects: - type: SPEED amplifier: 1 duration: 60 interval: 10 attributes: - attribute: STEP_HEIGHT amount: 0.5 operation: ADD_NUMBER ``` ## Schade [#schade] | Sleutel | Type | Standaard | Beschrijving | | --------------- | ------ | --------- | -------------------------------------------------------------------- | | `amount` | Double | - | Halve harten schade. Een negatieve waarde geneest in plaats daarvan. | | `interval` | Int | `20` | Ticks tussen elke toepassing. | | `cause` | String | `CACTUS` | Het schadetype, zodat andere plugins de reden kunnen detecteren. | | `fire_duration` | Int | `0` | Ticks dat de speler in brand staat bij schade. | Gebruik voor `cause` een waarde uit [DamageType](https://jd.papermc.io/paper/org/bukkit/damage/DamageType.html#field-summary) (hoofdletterongevoelig, bijvoorbeeld `CACTUS`, `LAVA`, `MAGIC`). Een onbekende waarde geeft een waarschuwing en valt terug op `CACTUS`. Een negatieve `amount` geneest de speler in plaats van te verwonden, begrensd tot de maximale gezondheid van de speler. ## Genezing [#genezing] | Sleutel | Type | Standaard | Beschrijving | | ---------- | ------ | --------- | -------------------------------------------------------------- | | `amount` | Double | - | Halve harten om te genezen. Een negatieve waarde geeft schade. | | `interval` | Int | `20` | Ticks tussen elke toepassing. | Genezing overschrijdt nooit de maximale gezondheid van de speler. Een negatieve `amount` geeft schade via het schadetype `CACTUS`. ## Drankeffecten [#drankeffecten] `potion_effects` is een lijst. Elke vermelding wordt herhaald zolang de speler in contact blijft. | Sleutel | Type | Standaard | Beschrijving | | ----------- | ------- | --------- | ------------------------------------- | | `type` | String | - | Vereist. Het type drankeffect. | | `duration` | Int | `40` | Duur van het effect in ticks. | | `amplifier` | Int | `0` | Niveau van het effect (0 = niveau 1). | | `ambient` | Boolean | `false` | Of het effect omgevend is. | | `particles` | Boolean | `true` | Of er deeltjes worden getoond. | | `icon` | Boolean | `true` | Of het HUD-pictogram wordt getoond. | | `interval` | Int | `20` | Ticks tussen elke herhaling. | Gebruik voor `type` een waarde uit [PotionEffectType](https://jd.papermc.io/paper/org/bukkit/potion/PotionEffectType.html#field-summary). Een onbekend type geeft een waarschuwing en alleen die vermelding wordt overgeslagen. ## Attributen [#attributen] `attributes` is een lijst van tijdelijke attribuutmodificaties die worden toegepast terwijl de speler in contact is en worden verwijderd zodra hij vertrekt. | Sleutel | Type | Standaard | Beschrijving | | ----------- | ------ | ------------ | --------------------------------------- | | `attribute` | String | - | Vereist. Het te wijzigen attribuut. | | `amount` | Double | - | Vereist. Het bedrag van de modificatie. | | `operation` | String | `ADD_NUMBER` | Hoe het bedrag wordt toegepast. | Gebruik voor `attribute` een waarde uit [Attribute](https://jd.papermc.io/paper/org/bukkit/attribute/Attribute.html#field-summary). De oude `GENERIC_`- en `PLAYER_`-voorvoegsels worden ook geaccepteerd (bijvoorbeeld `GENERIC_MOVEMENT_SPEED` verwijst naar `MOVEMENT_SPEED`). Geldige `operation`-waarden uit [AttributeModifier.Operation](https://jd.papermc.io/paper/org/bukkit/attribute/AttributeModifier.Operation.html): `ADD_NUMBER`, `ADD_SCALAR`, `MULTIPLY_SCALAR_1`. Attribuutmodificaties zijn tijdelijk. Ze worden automatisch verwijderd wanneer de speler het blok verlaat, de server verlaat, of wanneer de plugin herlaadt of afsluit. Een onbekend attribuut, bedrag of operatie geeft een waarschuwing en alleen die vermelding wordt overgeslagen. ## Contactcontrole [#contactcontrole] Het contact wordt gecontroleerd op het kleinste interval dat nodig is voor een interval-gebaseerd effect (`damage`, `heal`, en elke `potion_effects`-vermelding). Elk effect houdt zijn eigen cooldown bij, dus verschillende intervallen blijven onafhankelijk. Als er `attributes` zijn geconfigureerd, wordt het contact elke tick gecontroleerd zodat modificaties snel worden verwijderd wanneer de speler van het blok stapt. ## Gedeelde opties [#gedeelde-opties] | Sleutel | Type | Standaard | Beschrijving | | --------------------- | ------- | --------- | --------------------------------------------------------------------------- | | `apply_when_sneaking` | Boolean | `true` | Of effecten van toepassing zijn terwijl de speler sluipt. | | `block_faces` | Section | alle aan | Welke vlakken als contact tellen (`top`, `north`, `south`, `west`, `east`). | ## Gerelateerde pagina's [#gerelateerde-paginas] * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # Stapelbaar (/nl/docs/behaviours/stackable) ```yaml behaviours: stackable: - my_block_2 - my_block_3 - my_block_4 ``` ```yaml behaviours: stackable: blocks: - my_block_2 - my_block_3 - my_block_4 items: # optioneel, standaard is het item waarop dit gedrag is ingesteld - my_item - BONE_MEAL sound: # optioneel name: entity.villager.ambient # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master decrement_amount: 2 # optioneel, standaard: 1 ``` Gebruik voor `name` een waarde uit [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) of een aangepast geluid met `namespace:value`. ```yaml behaviours: stackable: first_step: block: my_block_2 items: # optioneel, standaard is het item waarop dit gedrag is ingesteld - my_item - BONE_MEAL sound: # optioneel name: entity.villager.ambient # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master decrement_amount: 2 # optioneel, standaard: 1 another_step: ... ``` Gebruik voor `name` een waarde uit [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) of een aangepast geluid met `namespace:value`. De blok-ID's moeten custom blocks zijn. Ondersteunde typen: `REAL`, `REAL_NOTE`, `REAL_TRANSPARENT` en `REAL_WIRE`. `items` kan concrete item-ID's of ondersteunde itemtags bevatten. Zie [ID's](/nl/docs/compatibility/ids). Je kunt zoveel stappen toevoegen als nodig. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # Opslag (/nl/docs/behaviours/storage) Verandert elk aangepast blok of meubel in een opslagcontainer. Er zijn drie modi beschikbaar. | Type | Gedrag | | ---------- | ------------------------------------------------------------------------------- | | `STORAGE` | Gedeelde container - alle spelers zien dezelfde inventaris | | `SHULKER` | Inhoud reist mee in het item bij afbreken en wordt hersteld bij herplaatsen | | `DISPOSAL` | Prullenbak - inhoud wordt stilzwijgend verwijderd wanneer de GUI wordt gesloten | ## Configuratie [#configuratie] ```yaml behaviours: storage: type: STORAGE rows: 3 # optioneel, standaard: 3 inventory_type: furnace # optioneel, vervangt rows indien ingesteld title: "Community Chest" # optioneel, standaard is de naam van het blok/meubel open_variant: my_open_storage # optioneel open_sound: # optioneel name: entity.villager.celebrate # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master close_sound: # optioneel name: entity.villager.ambient # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master ``` ```yaml behaviours: storage: type: SHULKER rows: 3 # optioneel, standaard: 3 inventory_type: furnace # optioneel, vervangt rows indien ingesteld title: "Portable Storage" # optioneel, standaard is de naam van het blok/meubel open_variant: my_open_storage # optioneel open_sound: # optioneel name: entity.villager.celebrate # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master close_sound: # optioneel name: entity.villager.ambient # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master ``` ```yaml behaviours: storage: type: DISPOSAL rows: 1 # optioneel, standaard: 3 title: "Trash Can" # optioneel, standaard is de naam van het blok/meubel open_variant: my_open_storage # optioneel open_sound: # optioneel name: entity.villager.celebrate # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master close_sound: # optioneel name: entity.villager.ambient # of een aangepast geluid volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 source: master # optioneel, standaard: master ``` Gebruik voor `name` een waarde uit [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) of een aangepast geluid met `namespace:value`. Ondersteunt [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/)-opmaak, [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi)-placeholders en [ItemsAdder](https://itemsadder.com/)-lettertypeafbeeldingen. ## Inventaristype [#inventaristype] Standaard opent opslag een kistachtige inventaris waarvan de hoogte wordt bepaald door `rows` (1-6, standaard: 3). Stel `inventory_type` in om een inventaris van een specifiek type te openen - `rows` wordt genegeerd als dit is ingesteld. | Waarde | GUI-vorm | | --------------- | ------------------------------------- | | `furnace` | Oven (invoer + brandstof + uitvoer) | | `blast_furnace` | Hoogoven | | `smoker` | Roker | | `brewing_stand` | Brouwstandaard (3 flesjes + 2 vakjes) | | `dispenser` | Verdeler (3×3) | | `dropper` | Dropper (3×3) | | `hopper` | Trechter (1×5) | ```yaml behaviours: storage: type: STORAGE inventory_type: furnace title: "Aangepaste Oven" ``` ## Itembeperkingen [#itembeperkingen] Vanaf versie 1.0.14 kan opslag beperken welke items spelers mogen invoegen. Gebruik `allowed_items` om alleen overeenkomende items toe te staan: ```yaml behaviours: storage: type: STORAGE allowed_items: - minecraft:book - "#minecraft:logs" - "#my_pack:building_materials" ``` Of gebruik `denied_items` om overeenkomende items te weigeren en alle andere items toe te staan: ```yaml behaviours: storage: type: STORAGE denied_items: - minecraft:tnt - "#my_pack:portable_storage" ``` Vermeldingen mogen vanilla- of ItemsAdder-item-ID's, Minecraft-itemtags of aangepaste IAA-itemtags zijn. `allowed_items` en `denied_items` sluiten elkaar uit. Als beide zijn ingesteld, wordt het opslaggedrag afgewezen. Een lege lijst `allowed_items` staat niets toe. Een lege lijst `denied_items` weigert niets. Als beide opties ontbreken, blijft de opslag onbeperkt. De beperkingen gelden alleen voor nieuwe invoegingen door spelers; eerder opgeslagen inhoud wordt niet verwijderd. ## Open variant [#open-variant] Je kunt optioneel `open_variant` instellen om het aangepaste blok, meubel of complexe meubel te laten veranderen naar een andere variant terwijl ten minste een speler de opslag open heeft. Dit is handig voor dingen zoals: * kisten die visueel openen * vaten met een geopend model * containers met een andere actieve toestand ```yaml behaviours: storage: type: STORAGE open_variant: my_open_storage ``` `open_variant` moet de ID zijn van een ander aangepast blok, meubel of complex meubel, met gebruik van: * `id` * `namespace:id` Zie [ID's](/nl/docs/compatibility/ids) voor ID-syntax. Wanneer de inventaris door alle spelers wordt gesloten, keert de storage terug naar zijn normale variant. `open_variant`-waarden voor complex furniture worden ondersteund vanaf ItemsAdderAdditions 1.0.12. Block-storage moet een blockvariant gebruiken; furniture en complex furniture kunnen furniture, complex furniture of een item display-model gebruiken. ## Inhoudsvarianten [#inhoudsvarianten] Vanaf versie 1.0.13 kan een gesloten opslaghouder van uiterlijk veranderen op basis van hoe vol deze is. ```yaml behaviours: storage: type: STORAGE empty_variant: my_empty_storage # optioneel; lege inventaris filled_variant: my_filled_storage # optioneel; elke niet-lege inventaris half_variant: my_half_storage # optioneel; gedeeltelijk gevulde inventaris full_variant: my_full_storage # optioneel; elk slot gevuld tot de stapellimiet ``` `filled_variant` is de eenvoudige optie met twee toestanden: deze wordt voor elke niet-lege inventaris gebruikt, tenzij een specifiekere `half_variant` of `full_variant` is ingesteld. Ontbrekende varianten vallen terug op `filled_variant` en daarna op het oorspronkelijke uiterlijk van de opslaghouder. `open_variant` heeft voorrang zolang spelers de inventaris bekijken. Nadat de laatste speler deze sluit, wordt de juiste inhoudsvariant hersteld. ID's en blok-/furniturecompatibiliteit volgen dezelfde regels als `open_variant`, en de rotatie van directionele blokken blijft behouden. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) * [CoreProtect-compatibiliteit](/nl/docs/compatibility/coreprotect) * [PlaceholderAPI-compatibiliteit](/nl/docs/compatibility/placeholderapi) # Tekstweergave (/nl/docs/behaviours/text-display) Koppelt een of meer zwevende tekstweergaven aan een aangepast blok of meubel. Ondersteunt MiniMessage-opmaak, PlaceholderAPI-placeholders en ItemsAdder-lettertypeafbeeldingen. Werkt op **blokken**, **meubels** en **complexe meubels**. ## Basisconfiguratie [#basisconfiguratie] ```yaml behaviours: text_display: text: "Hallo!" ``` Meerdere regels tekst (een regel per lijstitem): ```yaml behaviours: text_display: text: - "Opslag" - "Rechtsklik om te openen" ``` ## Meerdere weergaven [#meerdere-weergaven] Gebruik de sectie `displays` om meer dan een tekstweergave aan hetzelfde item te koppelen. Elke invoer heeft een onafhankelijke positie en stijl. ```yaml behaviours: text_display: displays: label: text: "Mijn kist" offset: "0, 0.5, 0" hint: text: "Rechtsklik om te openen" offset: "0, 0.25, 0" ``` ## Opties [#opties] | Sleutel | Type | Standaard | Beschrijving | | ------------------ | ------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `text` | string of lijst | *(verplicht)* | De weer te geven tekst. Ondersteunt MiniMessage, PlaceholderAPI en `:icon:` lettertypeafbeeldingen. | | `offset` | `"x, y, z"` of lijst | `"0, 0.25, 0"` | Positie-offset ten opzichte van het blok- of meubelcentrum. | | `billboard` | `FIXED` \| `VERTICAL` \| `HORIZONTAL` \| `CENTER` | `VERTICAL` | Hoe de weergave roteert om spelers te volgen. | | `alignment` | `LEFT` \| `CENTER` \| `RIGHT` | `CENTER` | Tekstuitlijning binnen de weergave. | | `text_shadow` | bool | `true` | Of tekst een slagschaduw heeft. | | `see_through` | bool | `false` | Of tekst zichtbaar is door blokken heen. | | `line_width` | integer >= 1 | `1403` | Maximale regelbreedte in pixels voor terugloop. | | `background` | `#RRGGBB`, `#RRGGBBAA`, `false` of `null` | `null` | Achtergrondkleur. `null` of `false` gebruikt de standaard donkere achtergrond. | | `text_opacity` | float 0.0-1.0 | *(weglaten voor standaard)* | Tekstdoorzichtigheid. `0.0` is volledig transparant, `1.0` is volledig ondoorzichtig. Laat de sleutel volledig weg voor de standaard vanilla waarde (volledig ondoorzichtig). | | `scale` | float > 0, `"x, y, z"` of lijst | `1.0` | Tekstgrootte-vermenigvuldiger. Een enkele waarde wordt uniform toegepast; gebruik `"x, y, z"` of een lijst met 3 elementen voor niet-uniforme schaling. | | `view_range` | float > 0 | `16.0` | Afstand in blokken waarop de weergave zichtbaar wordt. | | `refresh_interval` | integer >= 0 | `0` | Hoe vaak (in ticks) de tekst per speler wordt vernieuwd. `0` schakelt automatisch vernieuwen uit. Stel dit in op een positieve waarde wanneer je PlaceholderAPI-placeholders gebruikt die in de loop der tijd veranderen. | | `brightness` | integer 0-15, `[block, sky]` of sectie | *(weglaten voor wereldverlichting)* | Overschrijf het lichtniveau. Een enkel geheel getal stelt zowel blok- als hemelverlichting gelijk in. Gebruik een lijst met twee elementen `[block, sky]` of een sectie met `block:` en `sky:` sleutels om ze afzonderlijk in te stellen. Laat weg om van de wereldverlichting te erven. | | `shadow_radius` | float >= 0 | `0.0` | Straal van de slagschaduw achter de tekst. | | `shadow_strength` | float >= 0 | `1.0` | Sterkte (ondoorzichtigheid) van de slagschaduw. | | `yaw` | float | `0.0` | Horizontale rotatie van de weergave in graden. Alleen zinvol wanneer `billboard` `FIXED` is. | | `pitch` | float | `0.0` | Verticale rotatie van de weergave in graden. Alleen zinvol wanneer `billboard` `FIXED` is. | ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml behaviours: text_display: text: - "" - "Score: %vault_eco_balance%" offset: "0, 0.6, 0" billboard: VERTICAL alignment: CENTER text_shadow: true see_through: false line_width: 1403 background: "#00000080" scale: 1.0 view_range: 16.0 refresh_interval: 20 ``` ## Opmerkingen [#opmerkingen] * Tekst ondersteunt [MiniMessage](https://docs.advntr.dev/minimessage/format.html)-opmaak-tags. * PlaceholderAPI-placeholders worden per speler opgelost als PlaceholderAPI is geïnstalleerd. * ItemsAdder-lettertypeafbeeldingen (`:my_icon:`) worden ondersteund. * Wanneer je placeholders gebruikt die in de loop der tijd bijwerken, stel `refresh_interval` in op een positieve waarde (bijv. `20` voor eens per seconde). ## Gerelateerde pagina's [#gerelateerde-paginas] * [PlaceholderAPI-compatibiliteit](/nl/docs/compatibility/placeholderapi) * [WorldGuard-compatibiliteit](/nl/docs/compatibility/worldguard) # /iatrademachine (/nl/docs/commands/iatrademachine) ## `/iatrademachine` [#iatrademachine] Open een ItemsAdder `trade_machine`- of `block_trade_machine`-GUI voor een speler zonder dat het fysieke blok of meubel in de wereld geplaatst hoeft te zijn. Dit is handig als je verschillende handelsmachine-GUIs wilt openen via andere plugins zoals menusystemen, NPC's of aangepaste commando-workflows. ## Syntaxis [#syntaxis] ```text /iatrademachine [-silent] ``` ## Parameters [#parameters] ### `` [#speler] De online speler voor wie de handelsmachine wordt geopend. ### `` [#namespaceid] De ID van het aangepaste blok of meubel dat een `trade_machine`- of `block_trade_machine`-gedrag heeft. Voorbeeld: ```text stations:alchemy_table ``` ### `-silent` [#-silent] Optionele vlag. Indien toegevoegd, onderdrukt het commando het bevestigingsbericht dat normaal naar de commandouitvoerder wordt gestuurd. ## Voorbeelden [#voorbeelden] ```text /iatrademachine twinkycome stations:alchemy_table ``` ```text /iatrademachine twinkycome stations:alchemy_table -silent ``` ## Permissie [#permissie] ```text ia.admin.iatrademachine ``` ## Opmerkingen [#opmerkingen] * Werkt zowel voor spelers als vanuit de console. * Vereist dat de doel-ID een `trade_machine`- of `block_trade_machine`-gedrag heeft. * Het volledige namespace-ID moet worden gebruikt. * Als de ID geen ondersteund handelsmachinegedrag heeft, mislukt het commando. ## Gebruiksscenario-voorbeeld [#gebruiksscenario-voorbeeld] Combineer dit commando met een GUI-plugin zoals DeluxeMenus om een categorieselectiemenu te maken dat verschillende handelsmachines rechtstreeks opent, in plaats van dat spelers door een grote handelsmachine-GUI moeten scrollen. # /itemsadderadditions (/nl/docs/commands/itemsadderadditions) ## `/itemsadderadditions` [#itemsadderadditions] Hoofdbeheerderscommando voor ItemsAdderAdditions. Aliassen: ```text /iaadditions /iaa ``` ## Permissies [#permissies] Basispermissie: ```text itemsadderadditions.command.itemsadderadditions ``` ## Subcommando's [#subcommandos] ### `/itemsadderadditions reload` [#itemsadderadditions-reload] Herlaadt ItemsAdderAdditions `config.yml` en vernieuwt pluginbrede feature-, actie-, behaviour- en componenttoggles. ```text /itemsadderadditions reload ``` Permissie: ```text itemsadderadditions.command.itemsadderadditions.reload ``` Dit commando herlaadt **geen** ItemsAdder content-YAML-bestanden. Gebruik `/iareload` na wijzigingen aan ItemsAdderAdditions content-YAML-secties zoals acties, behaviours, custom tags, recepten, advancements, custom paintings, Valhalla-metadata of world generation entries. Gebruik `/iazip` na wijzigingen aan `components` secties of resourcepack-assets. ### `/itemsadderadditions debug` [#itemsadderadditions-debug] Schakelt debugmodus in of uit. ```text /itemsadderadditions debug ``` Permissie: ```text itemsadderadditions.command.itemsadderadditions.debug ``` # CoreProtect (/nl/docs/compatibility/coreprotect) CoreProtect-ondersteuning is optioneel. ItemsAdderAdditions gebruikt CoreProtect momenteel alleen om het openen van storage behaviours als interacties te loggen. ## Vereisten [#vereisten] * CoreProtect is geïnstalleerd en ingeschakeld. * De CoreProtect-API is ingeschakeld. * Een ItemsAdderAdditions storage behaviour is in gebruik. ## Wat wordt gelogd [#wat-wordt-gelogd] Wanneer een speler een ItemsAdderAdditions storagecontainer opent, roept ItemsAdderAdditions CoreProtect's interactielogger aan met: * de naam van de speler * de opslaglocatie Hierdoor zijn storage-openingen zichtbaar als CoreProtect-interacties wanneer CoreProtect beschikbaar is. ## Wat wordt niet gelogd [#wat-wordt-niet-gelogd] ItemsAdderAdditions logt deze zaken momenteel niet via CoreProtect: * itemverplaatsingen binnen de storage-inventaris * uitvoering van acties * plaatsing van custom paintings * stackable-plaatsing * contact effect-schade * receptcrafting * voltooiing van advancements * world generation ## Gedrag bij optionele afhankelijkheid [#gedrag-bij-optionele-afhankelijkheid] Als CoreProtect niet is geïnstalleerd, is uitgeschakeld of als de API niet beschikbaar is, slaat ItemsAdderAdditions de logaanroep over. Storage blijft normaal werken. ## Ondersteunde functies [#ondersteunde-functies] | Functie | CoreProtect-gedrag | | ------------------------------------------------ | -------------------------------------------------- | | [Storage behaviour](/nl/docs/behaviours/storage) | Logt een interactie wanneer storage wordt geopend. | ## Beperkingen [#beperkingen] CoreProtect-ondersteuning is bewust smal. Ze registreert dat storage is geopend; ze levert geen volledige auditlog van inventarisinhoud of itemtransfers. ## Problemen oplossen [#problemen-oplossen] * Controleer of CoreProtect is geïnstalleerd en ingeschakeld. * Controleer of de CoreProtect-API is ingeschakeld en werkt. * Test met een blok of furniture met storage behaviour, niet met een losstaande actie of recept. * Als er geen interactie verschijnt, controleer dan of de speler de storage daadwerkelijk succesvol heeft geopend. ## Gerelateerde pagina's [#gerelateerde-paginas] * [Storage behaviour](/nl/docs/behaviours/storage) * [WorldGuard](/nl/docs/compatibility/worldguard) # Custom Structures (/nl/docs/compatibility/customstructures) Custom Structures-ondersteuning is optioneel en beschikbaar vanaf ItemsAdderAdditions 1.0.12. Hiermee kan een advancement vereisen dat de speler zich in een door Custom Structures gegenereerde structure bevindt. ## Configuratie [#configuratie] Gebruik de structurenaam met de namespace `customstructures:` onder `conditions.player.location.structure` of `structures`. ```yaml criteria: find_temple: trigger: tick conditions: player: location: structures: - customstructures:ancient_temple ``` De alias `custom_structures:` wordt ook geaccepteerd. Hoofdletters in de structurenaam worden genegeerd. ## Werking [#werking] ItemsAdderAdditions gebruikt de Custom Structures-integratie om structuregrenzen te matchen. Bestaande en nieuw gegenereerde structures worden ondersteund; ze hoeven na de installatie van ItemsAdderAdditions niet opnieuw te worden gegenereerd. Vanilla structures hebben Custom Structures niet nodig en gebruiken normale registry keys, bijvoorbeeld `minecraft:village_plains`. ## Probleemoplossing [#probleemoplossing] * Controleer of Custom Structures vóór ItemsAdderAdditions is ingeschakeld. * Gebruik de geconfigureerde structurenaam, niet de schematic-bestandsnaam tenzij die gelijk zijn. * Zoek in de serverlog naar `Enabled advancement structure predicate integration.` ## Gerelateerde pagina's [#gerelateerde-paginas] * [Spelerpredicaten](/nl/docs/advancements/player-predicates) * [Advancementconfiguratie](/nl/docs/advancements/configuration) # ID's (/nl/docs/compatibility/ids) ItemsAdderAdditions normaliseert ID's naar kleine letters voordat ze worden gematcht. Gebruik in voorbeelden en gedeelde configuraties bij voorkeur expliciete ID's zoals `minecraft:diamond` en `my_pack:ruby_sword`. De meeste velden zijn ofwel **concrete uitvoer** of **runtime-matches**: * Concrete uitvoer moet naar één itemstack oplossen. Tags zijn daar niet geldig. * Runtime-matches kunnen tags accepteren, omdat de plugin alleen bestaande content hoeft te vergelijken. ## Snelle referentie [#snelle-referentie] | Content | Ondersteund formaat | Voorbeeld | | ------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------ | | Vanilla item | `minecraft:id`, losse Minecraft-key of Bukkit-materiaalnaam | `minecraft:diamond`, `diamond`, `DIAMOND` | | Vanilla blok | `minecraft:id`, losse Minecraft-key of Bukkit-materiaalnaam | `minecraft:oak_log`, `oak_log`, `OAK_LOG` | | ItemsAdder-item | `namespace:id` of losse `id` | `my_pack:ruby_sword`, `ruby_sword` | | ItemsAdder-blok | `namespace:id` of losse `id` | `my_pack:ruby_ore`, `ruby_ore` | | ItemsAdder-furniture | `namespace:id` of losse `id` | `my_pack:ruby_lamp`, `ruby_lamp` | | MMOItems-item | `mmoitems:type:id` | `mmoitems:sword:flame_blade` | | Recept-ID | `namespace:id`, losse `id` of custom recepttag waar ondersteund | `my_pack:ruby_sword`, `ruby_sword` | | Vanilla item-/bloktag | `#minecraft:tag` of losse `#tag` waar vanilla tags worden geaccepteerd | `#minecraft:planks`, `#logs` | | ItemsAdderAdditions custom tag | `#namespace:tag`, of losse `#tag` binnen de huidige namespace | `#my_pack:ruby_tools`, `#ruby_tools` | | Namespaced key | `namespace:path` | `minecraft:strength`, `custom_pack:my_key` | ## Vanilla items en blokken [#vanilla-items-en-blokken] Vanilla items en blokken kunnen worden geschreven als namespaced ID's, losse Minecraft-keys of Bukkit-materiaalnamen. ```yaml item: minecraft:diamond_sword item: diamond_sword item: DIAMOND_SWORD block: minecraft:oak_log block: oak_log block: OAK_LOG ``` Voor concrete itemvelden wordt een losse ID eerst gecontroleerd tegen ItemsAdder-content en daarna tegen vanilla Minecraft-items. ## ItemsAdder-items, -blokken en -furniture [#itemsadder-items--blokken-en--furniture] ItemsAdder-content kan `namespace:id` of de losse content-ID gebruiken. ```yaml item: my_pack:ruby_sword block: my_pack:ruby_ore furniture: my_pack:ruby_lamp ``` Losse paden werken ook in veel velden: ```yaml info: namespace: my_pack items: ruby_wand: events: interact: right: replace_item: item: ruby_sword ``` Losse ID's werken, maar `namespace:id` is duidelijker wanneer twee packs dezelfde content-ID gebruiken. ## MMOItems-items [#mmoitems-items] MMOItems-referenties gebruiken precies deze vorm: ```yaml item: mmoitems:type:id ``` Voorbeeld: ```yaml item: mmoitems:sword:flame_blade ``` Het type en de ID worden via MMOItems-metadata gematcht. Als MMOItems niet is geïnstalleerd of ingeschakeld, lossen deze referenties niet op en matchen ze niet. ## Recepten [#recepten] Recept-ID's kunnen namespaced of los zijn, afhankelijk van de functie. ```yaml recipe: my_pack:ruby_sword recipe: ruby_sword ``` Bij receptmatching kan een losse recept-ID overeenkomen met het padgedeelte van een namespaced recept-ID. Custom recepttags worden alleen ondersteund in velden die custom tags expliciet accepteren. ## Custom tags [#custom-tags] Custom tags worden gedefinieerd in een top-level `tags` sectie. ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer ``` Verwijs naar de tag met `#tag` binnen dezelfde namespace of met `#namespace:tag` vanuit een andere namespace. ```yaml items: - "#ruby_tools" - "#my_pack:ruby_tools" ``` Custom tagtypes zijn `item`, `block`, `furniture` en `recipe`. Zie [Custom Tags](/nl/docs/custom-tags) voor nestingregels en functieondersteuning. ## Vanilla tags [#vanilla-tags] Vanilla tags worden ondersteund waar het matchingpad Bukkit item- of bloktags accepteert. ```yaml item: "#minecraft:planks" block: "#minecraft:logs" ``` Voor item- en bloktagmatching wordt een losse vanilla tag zoals `#logs` genormaliseerd naar `#minecraft:logs`, tenzij er een custom tag met dezelfde ID bestaat in de huidige tagregistry. Vanilla tags matchen alleen vanilla registry entries. Ze matchen geen ItemsAdder-content of MMOItems-content. ## Concrete itemuitvoer [#concrete-itemuitvoer] Gebruik concrete ID's voor velden die precies één itemstack moeten aanmaken, zoals: * receptresultaten * kampvuur-, steensnijder- en brouwresultaten * `toast.icon` * `clear_item.item` * `replace_item.item` * componentvelden die opgeslagen itemstacks aanmaken, zoals `bundle_contents` en `charged_projectiles` Tags zijn in deze velden ongeldig, omdat een tag meer dan één waarde kan bevatten. ## Geroteerde ItemsAdder-blokken en -furniture [#geroteerde-itemsadder-blokken-en--furniture] Runtime matching voor blokken en furniture behandelt directionele suffixen als dezelfde basiscontent: ```text my_pack:chair_north -> my_pack:chair my_pack:chair_south -> my_pack:chair my_pack:chair_east -> my_pack:chair my_pack:chair_west -> my_pack:chair my_pack:chair_up -> my_pack:chair my_pack:chair_down -> my_pack:chair ``` Dit geldt voor matchingcontroles zoals advancement-triggers en custom tag-lidmaatschap. Je hoeft niet elke geroteerde variant apart te noteren. ## Veelgemaakte fouten [#veelgemaakte-fouten] * Tags gebruiken in uitvoervelden zoals `result.item`, `toast.icon`, `clear_item.item` of `replace_item.item`. * Verwachten dat vanilla tags ItemsAdder- of MMOItems-items matchen. * `mmoitems:type:id` gebruiken zonder dat MMOItems is geïnstalleerd. * De `#`-prefix voor tagreferenties vergeten. * Een ongeldig namespaced ID schrijven met meer dan één dubbele punt, zoals `namespace:path:extra`. * Dezelfde losse ID in meerdere packs gebruiken zonder te weten welke content wordt gematcht. ## Gerelateerde pagina's [#gerelateerde-paginas] * [Compatibiliteitsoverzicht](/nl/docs/compatibility) * [ItemsAdder](/nl/docs/compatibility/itemsadder) * [MMOItems](/nl/docs/compatibility/mmoitems) * [Custom Tags](/nl/docs/custom-tags) * [Craftingrecepten](/nl/docs/recipes/crafting) * [Advancement-triggers](/nl/docs/advancements/triggers) # Compatibiliteit (/nl/docs/compatibility) De compatibiliteitspagina's leggen uit hoe ItemsAdderAdditions samenwerkt met ItemsAdder en optionele plugins. Gebruik deze sectie wanneer je wilt weten of een integratie vereist is, hoe een externe plugin een functie beïnvloedt, of welke ID-syntax een veld accepteert. ## Ondersteunde integraties [#ondersteunde-integraties] **Vereist:** * [ItemsAdder](/nl/docs/compatibility/itemsadder) - content laden, custom stacks, custom blocks/furniture, item modifier hooks en reload-events. **Optioneel:** * [MMOItems](/nl/docs/compatibility/mmoitems) - `mmoitems:type:id`-itemreferenties en runtime itemmatching. * [ValhallaMMO & ValhallaTrinkets](/nl/docs/compatibility/valhalla) - Valhalla-metadata die naar ItemsAdder itemstacks wordt geschreven. * [WorldGuard](/nl/docs/compatibility/worldguard) - regiovlaggen voor ondersteunde behaviours, custom paintings en acties. * [Custom Structures](/nl/docs/compatibility/customstructures) - custom structure-grenzen in locatiepredicaten van advancements. * [CoreProtect](/nl/docs/compatibility/coreprotect) - logging van interacties bij het openen van storage. * [PlaceholderAPI](/nl/docs/compatibility/placeholderapi) - placeholderverwerking in ondersteunde tekstvelden. * [MythicMobs](/nl/docs/compatibility/mythicmobs) - de actie `mythic_mobs_skill`. ## ID-syntax [#id-syntax] Zie [ID's](/nl/docs/compatibility/ids) voor item-, blok-, furniture-, recept-, tag- en namespaced ID-formaten. ## Gerelateerde pagina's [#gerelateerde-paginas] * [Configuratie](/nl/docs/configuration) * [Custom Tags](/nl/docs/custom-tags) * [Actieparameters](/nl/docs/actions/parameters) * [Storage behaviour](/nl/docs/behaviours/storage) * [Craftingrecepten](/nl/docs/recipes/crafting) * [Advancements](/nl/docs/advancements) # ItemsAdder (/nl/docs/compatibility/itemsadder) ItemsAdder is vereist. ItemsAdderAdditions laadt configuratie uit ItemsAdder content-YAML-bestanden en gebruikt ItemsAdder-API's om custom stacks, custom blocks, furniture, font images en reload-events op te lossen. ## Vereisten [#vereisten] * ItemsAdder v4 wordt ondersteund; de nieuwste versie wordt aanbevolen. * Een ondersteunde Paper-serverversie met een bijpassende ItemsAdderAdditions NMS-adapter. Ondersteuning voor ItemsAdder 4.0.18 is toegevoegd in ItemsAdderAdditions 1.0.13, inclusief bijgewerkte mappings voor runtimepatches. ## Ondersteunde functies [#ondersteunde-functies] ItemsAdderAdditions gebruikt ItemsAdder voor: * het lezen van item-, blok-, furniture-, recept-, behaviour-, actie-, component-, custom tag-, advancement-, painting- en world-generation-secties uit content-YAML * het oplossen van ItemsAdder item-ID's naar `ItemStack`s * het matchen van al geplaatste custom blocks en furniture * het toepassen van item modifier hooks voor components en Valhalla-metadata * het luisteren naar ItemsAdder load-/reload-events * het verwerken van ItemsAdder font images in gerenderde tekst * runtimepatches voor ItemsAdder-cooldowns, stat requirements, stonecuttergedrag, trade machines en craftinggedrag waar nodig ## Herlaadgedrag [#herlaadgedrag] De meeste YAML-only ItemsAdderAdditions-secties worden herladen via ItemsAdder-reloads en `/iareload`. Components muteren gegenereerde itemstacks via ItemsAdder's item modifier pipeline. Voer na het wijzigen van components `/iazip` uit, zodat ItemsAdder het pack en de itemdata opnieuw genereert. ## ID-syntax [#id-syntax] ItemsAdder-content kan meestal worden verwezen met `namespace:id` of een losse `id`. Zie [ID's](/nl/docs/compatibility/ids) voor exacte formaten en veelgemaakte fouten. ## Problemen oplossen [#problemen-oplossen] * Als een custom ID niet oplost, controleer dan of de content door ItemsAdder is geladen en of de namespace klopt. * Gebruik bij voorkeur `namespace:id` wanneer verschillende packs dezelfde losse ID kunnen gebruiken. * Voer na wijzigingen aan gegenereerde itemdata `/iazip` uit; voer na wijzigingen aan runtime YAML-secties `/iareload` uit. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [Configuratie](/nl/docs/configuration) * [Components](/nl/docs/components) * [Custom Tags](/nl/docs/custom-tags) # MMOItems (/nl/docs/compatibility/mmoitems) MMOItems-ondersteuning is optioneel. Als MMOItems is geïnstalleerd en ingeschakeld, kan ItemsAdderAdditions MMOItems-stacks aanmaken en matchen met `mmoitems:type:id`-referenties. ## Vereisten [#vereisten] * MMOItems is alleen geïnstalleerd en ingeschakeld op servers die `mmoitems:type:id`-referenties gebruiken. * Het MMOItems-type en de item-ID moeten in MMOItems bestaan. ## Ondersteunde functies [#ondersteunde-functies] MMOItems-itemreferenties worden ondersteund door gedeelde item-resolutiepaden, waaronder: * receptingrediënten en concrete receptuitvoer waar itemstacks worden aangemaakt * itemacties zoals `clear_item`, `replace_item` en `toast.icon` * advancement-itempredicaten en ondersteunde itemvoorwaarden * custom itemtags * componentvelden die itemstacks aanmaken, zoals `bundle_contents` en `charged_projectiles` ## Syntax [#syntax] ```yaml item: mmoitems:sword:flame_blade ``` Het formaat is: ```text mmoitems:type:id ``` ItemsAdderAdditions leest MMOItems-metadata keys `MMOITEMS_ITEM_TYPE` en `MMOITEMS_ITEM_ID` bij het matchen van bestaande itemstacks. ## Gedrag bij optionele afhankelijkheid [#gedrag-bij-optionele-afhankelijkheid] Als MMOItems niet is geïnstalleerd of niet is ingeschakeld: * kunnen `mmoitems:type:id`-referenties geen itemstacks aanmaken; * matchen `mmoitems:type:id`-referenties geen bestaande items; * blijven andere vanilla- en ItemsAdder-referenties werken. ## Beperkingen [#beperkingen] * MMOItems-referenties zijn alleen itemreferenties. Het zijn geen blok-, furniture- of recept-ID's. * Vanilla tags matchen geen MMOItems-items. * Tags blijven ongeldig in concrete uitvoervelden, ook als een custom tag MMOItems-waarden bevat. ## Problemen oplossen [#problemen-oplossen] * Controleer de spelling van het MMOItems-type en de ID. * Gebruik precies twee scheidingstekens na de prefix: `mmoitems:type:id`. * Installeer en activeer MMOItems voordat je MMOItems-referenties test. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [Craftingrecepten](/nl/docs/recipes/crafting) * [Custom Tags](/nl/docs/custom-tags) * [Clear Item](/nl/docs/actions/clear-item) * [Replace Item](/nl/docs/actions/replace-item) # MythicMobs (/nl/docs/compatibility/mythicmobs) MythicMobs-ondersteuning is optioneel. ItemsAdderAdditions gebruikt MythicMobs alleen voor de actie `mythic_mobs_skill`. ## Vereisten [#vereisten] * MythicMobs is geïnstalleerd en ingeschakeld. * Een geldige MythicMobs-skillnaam. * De actie `mythic_mobs_skill` is ingeschakeld in de configuratie van ItemsAdderAdditions. ## Ondersteunde functies [#ondersteunde-functies] | Functie | MythicMobs-gedrag | | ------------------------------------------------------------- | --------------------------------------------------------------------- | | [Mythic Mobs Skill-actie](/nl/docs/actions/mythic-mobs-skill) | Cast een MythicMobs-skill vanuit de speler met configureerbare power. | ## Voorbeeld [#voorbeeld] ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 ``` De actie vraagt MythicMobs om de skill vanuit de speler te casten, met de locatie van de speler en de targeted entity helper van MythicMobs. ## Gedrag bij optionele afhankelijkheid [#gedrag-bij-optionele-afhankelijkheid] Als MythicMobs niet is geïnstalleerd of niet is ingeschakeld, keert de actie terug zonder een skill te casten. Andere acties blijven werken. ## Beperkingen [#beperkingen] * Deze integratie voegt geen nieuwe MythicMobs-mechanics toe. * Ze is alleen voor acties; MMO-style itemreferenties worden afgehandeld door [MMOItems](/nl/docs/compatibility/mmoitems), niet door MythicMobs. ## Problemen oplossen [#problemen-oplossen] * Controleer of de skillnaam in MythicMobs bestaat. * Controleer of de actionsleutel `mythic_mobs_skill` is. * Controleer of de actie is ingeschakeld in `config.yml`. * Controleer of MythicMobs is geïnstalleerd en ingeschakeld voordat je test. ## Gerelateerde pagina's [#gerelateerde-paginas] * [Mythic Mobs Skill-actie](/nl/docs/actions/mythic-mobs-skill) * [Actieparameters](/nl/docs/actions/parameters) * [Configuratie](/nl/docs/configuration) # PlaceholderAPI (/nl/docs/compatibility/placeholderapi) PlaceholderAPI-ondersteuning is optioneel. Wanneer PlaceholderAPI is geïnstalleerd, verwerkt ItemsAdderAdditions placeholders in ondersteunde tekstvelden. Wanneer PlaceholderAPI ontbreekt, blijft de oorspronkelijke tekst ongewijzigd. ## Ondersteunde functies [#ondersteunde-functies] PlaceholderAPI wordt gebruikt door tekst-renderingpaden die op functiepagina's zijn gedocumenteerd, waaronder: * message-, actionbar-, title-, toast- en open inventory-acties * tekstacties bij voltooiing van advancements * titels van storage-inventarissen * tekst van het text display behaviour ## Voorbeelden [#voorbeelden] ```yaml message: text: "Hello %player_name%!" ``` ```yaml behaviours: text_display: text: "Coins: %vault_eco_balance%" refresh_interval: 20 ``` Stel voor text displays `refresh_interval` in op een positieve waarde wanneer placeholders in de tijd moeten worden bijgewerkt. ## Gedrag bij optionele afhankelijkheid [#gedrag-bij-optionele-afhankelijkheid] Als PlaceholderAPI ontbreekt, worden placeholders niet opgelost en blijven ze letterlijk in de gerenderde tekst staan. ## Beperkingen [#beperkingen] * ItemsAdderAdditions levert zelf geen PlaceholderAPI-expansions. * Placeholderondersteuning geldt alleen voor velden die de gedeelde tekst-renderer gebruiken of PlaceholderAPI-ondersteuning expliciet documenteren. ## Problemen oplossen [#problemen-oplossen] * Installeer de PlaceholderAPI-expansion die de placeholder levert die je gebruikt. * Gebruik een positieve refresh interval voor text display-placeholders die veranderen. * Als tekst letterlijk als `%placeholder%` verschijnt, controleer dan of PlaceholderAPI is geïnstalleerd en ingeschakeld. ## Gerelateerde pagina's [#gerelateerde-paginas] * [Message-actie](/nl/docs/actions/message) * [Actionbar-actie](/nl/docs/actions/actionbar) * [Title-actie](/nl/docs/actions/title) * [Toast-actie](/nl/docs/actions/toast) * [Open Inventory-actie](/nl/docs/actions/open-inventory) * [Text Display behaviour](/nl/docs/behaviours/text-display) * [Storage behaviour](/nl/docs/behaviours/storage) # ValhallaMMO & Trinkets (/nl/docs/compatibility/valhalla) ItemsAdderAdditions kan ValhallaMMO- en ValhallaTrinkets persistent data naar ItemsAdder itemstacks schrijven wanneer ze worden gemaakt. Configureer de data onder de `valhalla` sectie van een ItemsAdder-item. De metadata wordt rechtstreeks naar de itemstack geschreven. Gameplay-effecten vereisen dat de bijpassende Valhalla-plugin op de server is geïnstalleerd. ## Vereisten [#vereisten] * ItemsAdder-itemcontent die door ItemsAdder is geladen. * ValhallaMMO voor ValhallaMMO-stats, equipment class, item flags en permanente effecten. * ValhallaTrinkets voor trinket-metadata. ## Gedrag bij optionele afhankelijkheid [#gedrag-bij-optionele-afhankelijkheid] ItemsAdderAdditions schrijft de persistent data keys ook als ValhallaMMO of ValhallaTrinkets niet is geïnstalleerd. Zonder de bijpassende Valhalla-plugin blijft de data op het item staan, maar heeft die geen gameplay-effect. ## Basisstructuur [#basisstructuur] ```yaml info: namespace: my_pack items: ruby_sword: display_name: "Ruby Sword" valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` ## Stats [#stats] Gebruik `stats` wanneer dezelfde entries naar zowel Valhalla's actual stats als default stats moeten worden geschreven. ```yaml valhalla: stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER hidden: false ``` Je kunt de twee statcontainers ook apart schrijven: ```yaml valhalla: actual_stats: - stat: DAMAGE_BASE amount: 6.0 operation: ADD_NUMBER default_stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` | Sleutel | Type | Standaard | Beschrijving | | ----------- | ------- | ----------- | ----------------------------------------------------------- | | `stat` | string | *(vereist)* | Valhalla stat key. Onbekende stat keys worden overgeslagen. | | `amount` | number | *(vereist)* | Statwaarde. | | `operation` | string | *(vereist)* | `ADD_NUMBER`, `ADD_SCALAR` of `MULTIPLY_SCALAR_1`. | | `hidden` | boolean | `false` | Of Valhalla de statregel moet verbergen. | ## Equipment class en flags [#equipment-class-en-flags] ```yaml valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES - HIDE_QUALITY ``` Veelgebruikte equipment classes zijn `SWORD`, `BOW`, `CROSSBOW`, `TRIDENT`, `MACE`, `HELMET`, `CHESTPLATE`, `LEGGINGS`, `BOOTS`, `PICKAXE`, `AXE`, `SHOVEL`, `HOE`, `SHIELD`, `TRINKET` en `OTHER`. Ondersteunde item flags zijn: ```text HIDE_TAGS, HIDE_QUALITY, DISPLAY_ATTRIBUTES, HIDE_DURABILITY, ATTRIBUTE_FOR_BOTH_HANDS, ATTRIBUTE_FOR_HELMET, INFINITY_EXPLOITABLE, UNCRAFTABLE, TEMPORARY_POTION_DISPLAY, UNENCHANTABLE, UNMENDABLE ``` ## Permanente effecten [#permanente-effecten] ```yaml valhalla: permanent_effects: effects: - type: minecraft:strength amplifier: 1 duration: 200 condition: constant cooldown_properties: cooldown: 1200 cdr_affected: true ``` `effect` kan worden gebruikt in plaats van `type`. De legacy key `permanent_potion_effects` wordt ook geaccepteerd voor de effectenlijst. `cooldown_properties` kan ook op het hoogste niveau worden geplaatst als `permanent_effects_cooldown_properties`. `cdrAffected` wordt geaccepteerd als alias voor `cdr_affected`. ## ValhallaTrinkets [#valhallatrinkets] ```yaml valhalla: trinkets: trinket_id: 1001 trinket_unique_id: 1001 unique: true unstackable: true ``` | Sleutel | Type | Standaard | Beschrijving | | ------------------- | ------- | --------- | --------------------------------------------------------------------- | | `trinket_id` | integer | *(geen)* | ValhallaTrinkets-ID. Moet een niet-negatieve 32-bit integer zijn. | | `trinket_unique_id` | integer | *(geen)* | Unieke trinket-ID. Moet een niet-negatieve 32-bit integer zijn. | | `unique` | boolean | *(geen)* | Schrijft of verwijdert de ValhallaTrinkets unique flag. | | `unstackable` | boolean | *(geen)* | Als `true`, krijgt elke gegenereerde itemstack een willekeurige UUID. | ## Herlaadgedrag [#herlaadgedrag] Voer `/iareload` uit na wijzigingen aan `valhalla` secties. De data wordt toegepast op itemstacks die na de reload worden gemaakt; bestaande stacks worden niet automatisch herschreven. ## Problemen oplossen [#problemen-oplossen] * Onbekende Valhalla statnamen worden overgeslagen. * Enumwaarden voor `operation`, `equipment_class` en `item_flags` moeten de Valhalla-style hoofdletternamen gebruiken die hierboven staan. * Bestaande items in spelerinventarissen worden niet automatisch herschreven. * Als gameplay-effecten niet worden toegepast, controleer dan of ValhallaMMO of ValhallaTrinkets is geïnstalleerd en de geschreven metadata ondersteunt. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ItemsAdder](/nl/docs/compatibility/itemsadder) * [ID's](/nl/docs/compatibility/ids) * [Configuratie](/nl/docs/configuration) # WorldGuard (/nl/docs/compatibility/worldguard) WorldGuard-ondersteuning is optioneel. Wanneer WorldGuard is geïnstalleerd, registreert ItemsAdderAdditions regiovlaggen waarmee ondersteunde behaviours, plaatsing van custom paintings en ingebouwde acties kunnen worden toegestaan of geweigerd. Als WorldGuard niet is geïnstalleerd, of als een WorldGuard-controle is uitgeschakeld in de configuratie van ItemsAdderAdditions, staat ItemsAdderAdditions de beschermde functie toe. ## Vereisten [#vereisten] * WorldGuard is geïnstalleerd voordat ItemsAdderAdditions vlaggen registreert. * Herstart de server nadat je WorldGuard toevoegt of plugins wijzigt die conflicterende vlaggen definiëren. ## Configuratie [#configuratie] WorldGuard-controles zijn standaard ingeschakeld. ```yaml worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true ``` Zet `worldguard.enabled: false` om alle WorldGuard-controles van ItemsAdderAdditions uit te schakelen. Zet een individuele flagoptie op `false` om die vlag niet meer te controleren terwijl andere controles ingeschakeld blijven. ## Vlaggen [#vlaggen] ItemsAdderAdditions registreert WorldGuard `StateFlag`s met standaardwaarde `allow`. | Vlag | Gecontroleerd gedrag | | --------------------------- | ------------------------------------------------------------- | | `iaa-storage-open` | Inventarissen van het storage behaviour openen. | | `iaa-contact-damage` | Schade die door het contact effect behaviour wordt toegepast. | | `iaa-stackable-place` | Plaatsing die door het stackable behaviour wordt afgehandeld. | | `iaa-bed-use` | Het bed behaviour gebruiken. | | `iaa-custom-painting-place` | Custom paintings plaatsen. | ## Actievlaggen [#actievlaggen] ItemsAdderAdditions registreert ook één vlag per ingebouwde actie. De vlagnaam is: ```text iaa-action- ``` Voorbeelden: | Actiesleutel | WorldGuard-vlag | | ------------------------- | ------------------------------------ | | `replace_biome` | `iaa-action-replace-biome` | | `iaa_replace_near_blocks` | `iaa-action-iaa-replace-near-blocks` | | `open_trade_machine` | `iaa-action-open-trade-machine` | | `mythic_mobs_skill` | `iaa-action-mythic-mobs-skill` | Huidige ingebouwde actievlaggen: ```text iaa-action-actionbar iaa-action-clear-item iaa-action-ignite iaa-action-message iaa-action-mythic-mobs-skill iaa-action-open-inventory iaa-action-open-trade-machine iaa-action-play-animation iaa-action-play-emote iaa-action-replace-biome iaa-action-iaa-replace-near-blocks iaa-action-replace-item iaa-action-shoot-fireball iaa-action-swing-hand iaa-action-teleport iaa-action-title iaa-action-toast iaa-action-veinminer ``` Alle action executors controleren hun actievlag voordat ze worden uitgevoerd. De gecontroleerde locatie wordt gekozen uit de action context: targetentiteit, blok, furniture-entiteit of de locatie van de speler als fallback. ## Regiotrigger voor advancements [#regiotrigger-voor-advancements] ItemsAdderAdditions 1.0.12 voegt de `enter_region`-trigger toe. Deze voltooit een criterium wanneer een speler van buiten naar binnen een ingestelde WorldGuard-regio loopt of teleporteert. ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # optioneel ``` Hoofdletters in regio-ID's worden genegeerd. De optionele waarde `world` is de Bukkit-wereldnaam. Deze trigger heeft alleen WorldGuard nodig; `worldguard.enabled` en `worldguard.flags.*` beheren beschermingscontroles, niet regiodetectie voor advancements. Zie de [`enter_region`-triggerreferentie](/nl/docs/advancements/triggers#enter_region). ## Regiovoorbeelden [#regiovoorbeelden] Storage-openingen in een regio weigeren: ```text /rg flag spawn iaa-storage-open deny ``` Contact effect-schade in een regio weigeren: ```text /rg flag spawn iaa-contact-damage deny ``` Alleen de actie `replace_biome` in een regio weigeren: ```text /rg flag spawn iaa-action-replace-biome deny ``` Plaatsing van custom paintings expliciet toestaan: ```text /rg flag gallery iaa-custom-painting-place allow ``` ## Standaardgedrag [#standaardgedrag] * Vlaggen staan standaard op `allow`. * Als WorldGuard ontbreekt, staat ItemsAdderAdditions de functie toe. * Als de WorldGuard-configuratie van ItemsAdderAdditions is uitgeschakeld, staat ItemsAdderAdditions de functie toe. * Als een vlagnaam conflicteert met een niet-`StateFlag`, wordt die vlag uitgeschakeld en wordt er een waarschuwing gelogd. ## Problemen oplossen [#problemen-oplossen] * Als een flagcommando zegt dat de vlag niet bestaat, herstart dan met WorldGuard geïnstalleerd zodat ItemsAdderAdditions de vlaggen tijdens startup kan registreren. * Als een functie toch wordt uitgevoerd, controleer `config.yml` en bevestig dat de bijbehorende optie `worldguard.flags.*` op `true` staat. * Gebruik voor acties de actievlagnaam met streepjes, niet met underscores. * Controleer de serverlogs op waarschuwingen over vlagconflicten. ## Gerelateerde pagina's [#gerelateerde-paginas] * [Configuratie](/nl/docs/configuration) * [Storage behaviour](/nl/docs/behaviours/storage) * [Contact effect behaviour](/nl/docs/behaviours/contact-effect) * [Stackable behaviour](/nl/docs/behaviours/stackable) * [Bed behaviour](/nl/docs/behaviours/bed) * [Custom Paintings](/nl/docs/custom-paintings) * [Actieparameters](/nl/docs/actions/parameters) * [Advancementtriggers](/nl/docs/advancements/triggers) # Brewing (/nl/docs/recipes/brewing) ItemsAdderAdditions voegt een `brewing` recepttype toe voor brewing stands. Het registreert een Paper potion mix en ondersteunt exacte matching van ItemsAdder-, MMOItems- en vanilla items. ## Basisrecept [#basisrecept] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 1 result: item: my_pack:ruby_elixir brew_time: 400 fuel_cost: 1 ``` `base` is de aanbevolen key voor de invoerfles. De legacy key `input` wordt nog geaccepteerd. ## Opties [#opties] | Sleutel | Type | Standaard | Beschrijving | | -------------------- | ------- | ----------- | ------------------------------------------------------------------------------ | | `enabled` | boolean | `true` | Zet op `false` om dit recept over te slaan. | | `base.item` | string | *(vereist)* | Vereiste invoerfles/item. Het legacy pad `input.item` wordt ook geaccepteerd. | | `ingredient.item` | string | *(vereist)* | Vereist brewing-ingrediënt. | | `ingredient.consume` | integer | `1` | Hoeveel ingrediëntitems worden verbruikt. Moet groter zijn dan `0`. | | `result.item` | string | *(vereist)* | Uitvoeritem. | | `result.amount` | integer | `1` | Brewing-uitvoer wordt beperkt tot één item per flessenslot. | | `brew_time` | integer | `400` | Brewingtijd in ticks. Moet groter zijn dan `0`. | | `fuel_cost` | integer | `1` | Blaze-powder brandstofeenheden die worden verbruikt. Moet groter zijn dan `0`. | | `on_complete` | section | *(geen)* | Optionele sound- en commandacties nadat brewing is voltooid. | ## Itemreferenties [#itemreferenties] `base.item`, `ingredient.item` en `result.item` kunnen gebruiken: * vanilla materialen zoals `POTION` of `minecraft:awkward_potion` * ItemsAdder-items zoals `my_pack:ruby_dust` * MMOItems-items zoals `mmoitems:material:ruby_dust` Tags zijn hier niet geldig, omdat brewing concrete itemstacks moet vergelijken. Zie [ID's](/nl/docs/compatibility/ids) voor ondersteunde itemformaten. ## Voltooiingsacties [#voltooiingsacties] `on_complete` wordt uitgevoerd wanneer de brewing stand klaar is en minstens één speler de stand bekijkt. ```yaml on_complete: sound: name: minecraft:block.brewing_stand.brew source: master volume: 1.0 pitch: 1.0 commands: reward: command: "say {player} brewed a ruby elixir" as_console: true ``` `{player}` wordt vervangen door de naam van de kijkende speler. Commands worden als speler uitgevoerd, tenzij `as_console: true` is ingesteld. ## Compleet voorbeeld [#compleet-voorbeeld] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: enabled: true base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 2 result: item: my_pack:ruby_elixir amount: 1 brew_time: 600 fuel_cost: 2 on_complete: sound: name: minecraft:entity.player.levelup source: master ``` ## Veelgemaakte fouten [#veelgemaakte-fouten] * `result.amount` hoger dan `1` zetten. Brewing stands bevatten maar één resultaatitem per flessenslot, dus de hoeveelheid wordt beperkt tot `1`. * `#minecraft:*`-tags gebruiken. Brewing recepten matchen exacte itemstacks, geen tags. * `fuel_cost` hoger zetten dan de huidige brandstof in de stand. Het recept wordt pas voltooid zodra er genoeg brandstof beschikbaar is. ## Herlaadgedrag [#herlaadgedrag] Voer `/iareload` uit na wijzigingen aan brewing recepten. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [MMOItems-compatibiliteit](/nl/docs/compatibility/mmoitems) # Kampvuurkoken (/nl/docs/recipes/campfire-cooking) Voeg kampvuurbereidingsrecepten toe zonder extra receptbestanden aan te maken. ## Parameters [#parameters] ### `enabled` [#enabled] Optioneel. Standaard: `true`. Stel dit in op `false` om het registreren van het recept over te slaan. ### `ingredient.item` [#ingredientitem] Verplicht. Het invoeritem voor het recept. Gebruik een vanilla materiaal, een ItemsAdder-item of een MMOItems-item. Zie [ID's](/nl/docs/compatibility/ids). ```yaml ingredient: item: BEEF ``` ```yaml ingredient: item: my_pack:raw_fish_fillet ``` ```yaml ingredient: item: mmoitems:consumable:raw_fish ``` ### `result.item` [#resultitem] Verplicht. Het bereide uitvoeritem. ```yaml result: item: COOKED_BEEF ``` ### `result.amount` [#resultamount] Optioneel. Standaard: `1`. Het aantal geproduceerde items. ### `cook_time` [#cook_time] Optioneel. Standaard: `600` ticks. Bereidingstijd. 20 ticks = 1 seconde. ### `exp` [#exp] Optioneel. Standaard: `0.0`. Ervaring verdiend bij het nemen van het bereide resultaat. ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml info: namespace: my_pack recipes: campfire_cooking: roasted_berry_skewer: ingredient: item: my_pack:berry_skewer_raw result: item: my_pack:berry_skewer_roasted amount: 1 cook_time: 160 exp: 0.25 ``` ## Opmerkingen [#opmerkingen] * Ondersteunt vanilla, ItemsAdder- en MMOItems-items. * Tags zoals `#minecraft:fishes` worden hier niet ondersteund, omdat kampvuurrecepten één concrete invoerstack nodig hebben. * Recept-ID's zoals `roasted_berry_skewer` zijn interne identificatoren. * De namespace komt van `info.namespace`. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [MMOItems-compatibiliteit](/nl/docs/compatibility/mmoitems) # Werkbank (/nl/docs/recipes/crafting) ItemsAdderAdditions voegt een geavanceerd craftingrecepttype toe genaamd `iaa_crafting_table`. Het werkt voor zowel 3x3 recepten als 2x2 recepten in het spelerinventaris. `iaa_crafting` wordt geaccepteerd als alias. Het vervangt of overschrijft het normale ItemsAdder `crafting_table`-recepttype niet. In plaats daarvan biedt het een ander receptsysteem voor gevallen waarbij je extra functies voor ingrediëntvalidatie nodig hebt. Dit recepttype ondersteunt normale knutselreceptopties die al bekend zijn van ItemsAdder, en voegt ook extra functies toe zoals: * vanilla item-/bloktags * ItemsAdder-, MMOItems- en vanilla ingrediënten * ingrediënthoeveelheden * duurzaamheidsschade op ingrediënten * vervangingsitems * duurzaamheidsmatch negeren * potiontype-filtering * shapeless ingrediëntenlijsten ## Belangrijk [#belangrijk] Recepten die deze extra functies gebruiken, moeten worden geplaatst onder: ```yaml recipes: iaa_crafting_table: ``` ```yaml recipes: iaa_crafting: ``` Gebruik bij voorkeur `iaa_crafting_table` in nieuwe bestanden. `iaa_crafting` werkt hetzelfde en bestaat als alias. Als je alleen normale ItemsAdder-knutselfuncties nodig hebt, kun je het gewone `crafting_table`-recepttype blijven gebruiken. ## Basis gevormd recept [#basis-gevormd-recept] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: wooden_scythe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ## Basis shapeless recept [#basis-shapeless-recept] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: mega_diamond: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 - item: COPPER_INGOT amount: 2 result: item: DIAMOND amount: 3 ``` ## Structuur [#structuur] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: my_recipe: enabled: true permission: "my_pack.recipe.use" pattern: - "ABC" - "DEF" - "GHI" ingredients: A: STICK result: item: DIAMOND amount: 1 ``` ## Ondersteunde standaard receptfuncties [#ondersteunde-standaard-receptfuncties] `iaa_crafting_table` ondersteunt ook veelgebruikte knutselfuncties die je mogelijk al kent van ItemsAdder, zoals: * `enabled` * `permission` * gevormde recepten met `pattern` * shapeless recepten * meerdere `pattern...`-varianten * `potion_type` ingrediëntfiltering ## Extra ItemsAdderAdditions-functies [#extra-itemsadderadditions-functies] De belangrijkste reden om `iaa_crafting_table` te gebruiken is de aanvullende ondersteuning voor ingrediëntpredicaten: * vanilla tags met `#minecraft:tag` * MMOItems-ingrediënten met `mmoitems:type:id` * per-ingrediënt `amount` * per-ingrediënt `damage` * per-ingrediënt `replacement` * `ignore_durability` * shapeless lijststijl ingrediëntformaat ## Parameters [#parameters] ### `enabled` [#enabled] Optioneel. Standaard: `true`. Als ingesteld op `false`, wordt het recept niet geregistreerd. ### `permission` [#permission] Optioneel. Als ingesteld, moeten spelers deze permissie hebben om het receptresultaat te zien en te craften. ```yaml permission: "my_pack.recipe.use" ``` ### `shapeless` [#shapeless] Optioneel. Standaard: `false`. Als `true`, wordt het recept behandeld als shapeless. ## Voltooiingsacties [#voltooiingsacties] Gebruik `on_complete` om een geluid af te spelen en/of commando's uit te voeren wanneer het recept wordt gemaakt. ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # optioneel, standaard: master volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # optioneel, standaard: false ``` `{player}` wordt vervangen door de naam van de speler die het recept maakt. Commando's worden standaard als speler uitgevoerd; stel `as_console: true` in om ze vanuit de console uit te voeren. ## Resultaat [#resultaat] ### `result.item` [#resultitem] Verplicht. Het uitvoeritem. Ondersteunt vanilla materialen, ItemsAdder-items en MMOItems-items. Tags zijn alleen geldig voor ingrediënten, niet voor resultaten. ```yaml result: item: "my_pack:custom_sword" ``` ### `result.amount` [#resultamount] Optioneel. Standaard: `1`. ```yaml result: item: DIAMOND amount: 3 ``` ### `result.durability` [#resultdurability] Optioneel. Vanaf versie 1.0.13 beschikbaar voor beschadigbare resultaatitems. Stelt de **resterende duurzaamheid** van het resultaat in, niet de schadewaarde. De waarde moet tussen `0` en de maximale duurzaamheid van het item liggen. Een aangepaste maximale duurzaamheid die via resultaatcomponents is toegepast wordt ook gerespecteerd. ```yaml result: item: DIAMOND_PICKAXE durability: 250 ``` ## Gevormde recepten [#gevormde-recepten] Gevormde recepten gebruiken een `pattern` en een met tekens gesleutelde `ingredients`-sectie. ```yaml my_recipe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ### Patroonopmerkingen [#patroonopmerkingen] * Ingrediëntsleutels moeten een enkel teken zijn. * `X` markeert lege slots. Definieer `X` niet als ingrediënt. * Elk ander teken dat niet in `ingredients` is gedefinieerd, wordt ook als leeg behandeld. * Meerdere patronen worden ondersteund met sleutels zoals `pattern_1`, `pattern_2`, enzovoort. ## Shapeless recepten [#shapeless-recepten] Shapeless recepten gebruiken: ```yaml shapeless: true ``` en kunnen een lijst van ingrediënten gebruiken: ```yaml my_recipe: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 result: item: DIAMOND ``` ## Ingrediëntformaten [#ingrediëntformaten] Ingrediënten ondersteunen meerdere formaten. ### Eenvoudige string [#eenvoudige-string] ```yaml ingredients: S: STICK P: "#minecraft:planks" C: "my_pack:custom_part" M: "mmoitems:material:ruby_shard" ``` ### Gedetailleerd item [#gedetailleerd-item] ```yaml ingredients: S: item: STICK amount: 2 damage: 5 replacement: STICK ignore_durability: true potion_type: minecraft:water ``` ### Shapeless lijststijl [#shapeless-lijststijl] ```yaml ingredients: - SNOWBALL - item: WATER_BUCKET replacement: BUCKET ``` ## Geavanceerde ingrediëntfuncties [#geavanceerde-ingrediëntfuncties] ### Tags [#tags] Gebruik vanilla Minecraft item- of bloktags door de waarde met `#` te prefixen. Tags matchen alleen vanilla registry-items/blokken; ze matchen geen ItemsAdder- of MMOItems-content. ```yaml ingredients: P: "#minecraft:planks" ``` Dit laat elk item in die tag overeenkomen. ### `amount` [#amount] Vereist meer dan een van hetzelfde ingrediënt. ```yaml ingredients: I: item: IRON_INGOT amount: 3 ``` ### `damage` [#damage] In plaats van het ingrediënt te verbruiken, wordt het beschadigd met het geconfigureerde bedrag. Handig voor gereedschappen gebruikt bij craften. ```yaml ingredients: H: item: IRON_PICKAXE damage: 10 ``` ### `replacement` [#replacement] Vervang het ingrediënt door een ander item na het craften. Handig voor emmers, flessen, mallen en soortgelijke containers. ```yaml ingredients: W: item: WATER_BUCKET replacement: BUCKET ``` ### `ignore_durability` [#ignore_durability] Negeer de huidige duurzaamheidswaarde bij het matchen van een item. ```yaml ingredients: T: item: IRON_PICKAXE ignore_durability: true ``` ### `potion_type` [#potion_type] Beperk een potioningrediënt tot een specifiek basis-potiontype. ```yaml ingredients: P: item: POTION potion_type: minecraft:jump_boost ``` ## Volledig gevormd voorbeeld [#volledig-gevormd-voorbeeld] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: reinforced_blade: enabled: true permission: "my_pack.recipes.reinforced_blade" pattern: - "XIT" - "XSI" - "SXX" ingredients: I: item: IRON_INGOT amount: 2 S: STICK T: item: IRON_PICKAXE damage: 8 ignore_durability: true result: item: "my_pack:reinforced_blade" amount: 1 ``` ## Volledig shapeless voorbeeld [#volledig-shapeless-voorbeeld] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: purified_bottle: shapeless: true ingredients: - item: POTION potion_type: minecraft:water - item: DIAMOND amount: 2 result: item: "my_pack:purified_bottle" ``` ## Ondersteunde itemreferenties [#ondersteunde-itemreferenties] Zie [ID's](/nl/docs/compatibility/ids) voor de gedeelde ID-referentie. Ingrediënt- en resultaatitems kunnen gebruiken: * vanilla materiaalnamen zoals `STICK` of `DIAMOND` * vanilla namespaced ID's zoals `minecraft:stick` * ItemsAdder-ID's zoals `namespace:item` * MMOItems-ID's zoals `mmoitems:type:id` Ingrediënten kunnen daarnaast vanilla tags gebruiken zoals `#minecraft:planks` en ItemsAdderAdditions custom item-tags. Tags zijn niet geldig als resultaat of vervangingsitem. ## Opmerkingen [#opmerkingen] * `replacement` en `damage` worden toegepast tijdens het craften. * Shapeless recepten met geavanceerde predicaten moeten het lijstformaat gebruiken. * `iaa_crafting_table` is een aanvullend geavanceerd recepttype, geen vervanging voor ItemsAdder `crafting_table`. * `iaa_crafting` is een alias voor `iaa_crafting_table`. * Elke `pattern...` key wordt geladen als een shaped pattern variant. Voorbeelden: `pattern`, `pattern_2`, `pattern_alt`. * Anonieme shapeless ingrediëntenlijsten ondersteunen maximaal 26 entries. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [MMOItems-compatibiliteit](/nl/docs/compatibility/mmoitems) * [Custom Tags](/nl/docs/custom-tags) # Steensnijder (/nl/docs/recipes/stonecutter) Voeg steensnijderrecepten toe zonder extra receptbestanden aan te maken. ## Parameters [#parameters] ### `enabled` [#enabled] Optioneel. Standaard: `true`. Stel dit in op `false` om het registreren van het recept over te slaan. ### `ingredient.item` [#ingredientitem] Verplicht. Het invoeritem dat in de steensnijder wordt getoond. Gebruik een vanilla materiaal, een ItemsAdder-item of een MMOItems-item. Zie [ID's](/nl/docs/compatibility/ids). ```yaml ingredient: item: STONE ``` ```yaml ingredient: item: my_pack:rough_marble ``` ```yaml ingredient: item: mmoitems:material:rough_marble ``` ### `result.item` [#resultitem] Verplicht. Het uitvoeritem. ```yaml result: item: STONE_BRICKS ``` ### `result.amount` [#resultamount] Optioneel. Standaard: `1`. Het aantal geproduceerde items. ## Voltooiingsacties [#voltooiingsacties] Gebruik `on_complete` om een geluid af te spelen en/of commando's uit te voeren wanneer het recept wordt gemaakt. ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # optioneel, standaard: master volume: 1.0 # optioneel, standaard: 1.0 pitch: 1.0 # optioneel, standaard: 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # optioneel, standaard: false ``` `{player}` wordt vervangen door de naam van de speler die het recept maakt. Commando's worden standaard als speler uitgevoerd; stel `as_console: true` in om ze vanuit de console uit te voeren. ## Volledig voorbeeld [#volledig-voorbeeld] ```yaml info: namespace: my_pack recipes: stonecutter: marble_tiles: ingredient: item: my_pack:rough_marble result: item: my_pack:marble_tiles amount: 2 on_complete: sound: name: "minecraft:block.stonecutter.use" commands: reward: command: "give {player} diamond 1" as_console: true ``` ## Opmerkingen [#opmerkingen] * Ondersteunt vanilla, ItemsAdder- en MMOItems-items. * Tags zoals `#minecraft:stone_tool_materials` worden hier niet ondersteund, omdat de steensnijder één concrete invoerstack nodig heeft. * Recept-ID's zoals `marble_tiles` zijn interne identificatoren. * De namespace komt van `info.namespace`. ## Gerelateerde pagina's [#gerelateerde-paginas] * [ID's](/nl/docs/compatibility/ids) * [MMOItems-compatibiliteit](/nl/docs/compatibility/mmoitems) # Wereldgeneratie (/nl/docs/worldgen/world-generation) Met twee world generation-modi kun je custom furniture spawnen in nieuw gegenereerde chunks. Beide worden direct in je ItemsAdder content-YML-bestanden gedefinieerd. | | World Populator | Surface Decorator | | ------------------ | ----------------------------- | ---------------------------- | | YAML key | `blocks_populators` | `surface_decorators` | | Plaatsingsstijl | Vein-based (geclusterd) | Verspreid over het oppervlak | | Dichtheidscontrole | `vein_blocks` + `chunk_veins` | `amount` | | Surface-config key | `replaceable_blocks` | `bottom_blocks` | Gebruik de **World Populator** voor geclusterde spawns (paddenstoelen, ertsachtige groepen). Gebruik de **Surface Decorator** voor gelijkmatig verspreide objecten aan het oppervlak (bloemen, kleine stenen). ## World Populator [#world-populator] Spawnt furniture in vein-achtige clusters tijdens chunkgeneratie. Gebruikt de key `blocks_populators` (de legacy key `worlds_populators` wordt ook geaccepteerd). ```yaml info: namespace: my_pack blocks_populators: big_mushroom: enabled: true furniture: "my_pack:big_mushroom" worlds: - world biomes: - minecraft:dark_forest replaceable_blocks: - GRASS_BLOCK - DIRT vein_blocks: 1 chunk_veins: 3 chunk_chance: 25.0 min_height: 60 max_height: 100 ``` | Sleutel | Type | Standaard | Beschrijving | | ------------------------ | -------------- | ----------- | ------------------------------------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Zet op `false` om over te slaan zonder te verwijderen. | | `furniture` | `namespace:id` | *(vereist)* | De ItemsAdder-furniture die moet spawnen. Zie [ID's](/nl/docs/compatibility/ids). | | `worlds` | list | *(alle)* | Wereldnamen om tot te beperken. Ondersteunt wildcardpatronen zoals `world_*`. | | `biomes` | list | *(alle)* | Biome-ID's (bijv. `minecraft:forest`). Alle IDs moeten geldig zijn, anders wordt de entry overgeslagen. | | `replaceable_blocks` | list | *(elk)* | Toegestane materialen voor het blok direct onder het spawnpunt. | | `vein_blocks` | integer | `1` | Furniture-stukken per veinpoging. | | `chunk_veins` | integer | `4` | Veinpogingen per chunk. | | `chunk_chance` | double | `-1` | Kans per chunk van 0-100. `-1` = altijd. | | `min_height` | integer | `60` | Minimum Y-niveau. Moet lager zijn dan `max_height`. | | `max_height` | integer | `80` | Maximum Y-niveau. | | `allow_liquid_placement` | boolean | `false` | Sta spawnen in water of lava toe. | Legacy aliases worden nog geaccepteerd: `worlds_populators` voor `blocks_populators`, `amount` voor `vein_blocks`, `iterations` voor `chunk_veins` en `chance` voor `chunk_chance`. ## Surface Decorator [#surface-decorator] Verspreidt furniture over het oppervlak van nieuw gegenereerd terrein. Gebruikt de key `surface_decorators`. ```yaml info: namespace: my_pack surface_decorators: small_flower: enabled: true furniture: "my_pack:small_flower" worlds: - world biomes: - minecraft:plains - minecraft:sunflower_plains bottom_blocks: - GRASS_BLOCK amount: 4 chunk_chance: 50.0 min_height: 60 max_height: 120 ``` | Sleutel | Type | Standaard | Beschrijving | | ------------------------ | -------------- | ----------- | ------------------------------------------------------------------------------------------------------- | | `enabled` | boolean | `true` | Zet op `false` om over te slaan zonder te verwijderen. | | `furniture` | `namespace:id` | *(vereist)* | De ItemsAdder-furniture die moet spawnen. Zie [ID's](/nl/docs/compatibility/ids). | | `worlds` | list | *(alle)* | Wereldnamen om tot te beperken. Ondersteunt wildcardpatronen zoals `world_*`. | | `biomes` | list | *(alle)* | Biome-ID's (bijv. `minecraft:plains`). Alle IDs moeten geldig zijn, anders wordt de entry overgeslagen. | | `bottom_blocks` | list | *(elk)* | Toegestane materialen voor het blok direct onder het spawnpunt. | | `amount` | integer | `4` | Plaatsingspogingen per chunk. | | `chunk_chance` | double | `-1` | Kans per chunk van 0-100. `-1` = altijd. | | `min_height` | integer | `60` | Minimum Y-niveau. Moet lager zijn dan `max_height`. | | `max_height` | integer | `80` | Maximum Y-niveau. | | `allow_liquid_surface` | boolean | `false` | Sta een vloeistofblok onder het spawnpunt toe als geldig oppervlak. | | `allow_liquid_placement` | boolean | `false` | Sta spawnen in water of lava toe. | De legacy alias `chance` wordt geaccepteerd voor `chunk_chance`. ## Opmerkingen [#opmerkingen] * Alleen nieuw gegenereerde chunks activeren spawning. Bestaande chunks worden niet beïnvloed. * De furniture moet door ItemsAdder zijn geregistreerd voordat de entry wordt geladen. * Ongeldige biome-ID's zorgen ervoor dat de volledige entry wordt overgeslagen. * Surface decorators in de Nether scannen omlaag van `max_height` naar `min_height`. * Wanneer `allow_liquid_placement` is ingeschakeld, gebruikt surface decoration in normale dimensies de ocean-floor heightmap zodat onderwateroppervlakken gevonden kunnen worden. # 配置生成器 (/zh/docs/builder) 选择一个动作、行为或配方等,填写字段,然后将生成的 YAML 直接复制到你的物品配置中 * **动作**:将输出粘贴到物品的 `events` 部分。完整示例请参见[动作参数](/zh/docs/actions/parameters)页面 * **行为**:将输出直接粘贴到定义物品的部分下方 * **配方**:将输出粘贴到任意 ItemsAdder 内容 YML 文件中(已包含完整的 `info` + `recipes` 代码块) # 组件 (/zh/docs/components) ItemsAdderAdditions 通过 ItemsAdder 的物品修改器钩子,在生成资源包时为自定义物品应用 Minecraft 数据组件。在物品定义下添加 `components` 节,然后运行 `/iazip`。 ```yaml items: my_item: components: rarity: RARE use_cooldown: cooldown: 1.5 tool: default_mining_speed: 2.0 rules: - blocks: "#minecraft:logs" speed: 4.0 correct_for_drops: true ``` 组件会在 ItemsAdder 重建资源包/物品数据时应用。修改组件 YAML 后请运行 `/iazip`。`/iareload` 会重新加载其他 ItemsAdderAdditions 内容,但不会重新加载组件。 ## 状态图例 [#状态图例] | 状态 | 含义 | | ----------- | ------------------------------ | | **专用** | 专门的 IAA 处理器,带有 IAA 专属的 YAML 语法 | | **通用** | 无专门处理器;回退到通用 NMS 编解码器流程 | | **由 IA 处理** | 由 ItemsAdder 自身设置;IAA 跳过该项 | | **不支持** | 没有 Paper/NMS API;无法应用 | ## 通用 NMS 组件 [#通用-nms-组件] 对于没有专用 IAA 处理器的组件键,IAA 回退到通用 NMS 流程。键会被规范化(`custom_data` 变为 `minecraft:custom_data`),值树从 YAML 解析,结果通过 Minecraft 的 Mojang 编解码器系统经由 NMS 应用。 **通用组件所需的最低服务端版本:1.21.3。** 在 1.20.6 和 1.21.1 上,通用 NMS 流程不可用。专用处理器在这些版本上仍然有效。 ### 用法 [#用法] 使用完整的带命名空间键或简写形式(`minecraft:` 前缀会自动添加): ```yaml items: my_item: components: minecraft:custom_data: my_plugin: id: my_item tier: 3 enabled: true ``` 简写形式(等效): ```yaml items: my_item: components: custom_data: my_plugin: id: my_item ``` YAML 结构必须匹配该组件的原版编解码器。IAA 不会重新解释其结构。如果编解码器拒绝该值,IAA 会记录一条警告并跳过该组件。 **注意:** `minecraft:custom_data` 是真正的原版 NBT 复合组件。不要将其与 Bukkit 的 `PersistentDataContainer`(PDC)混淆。这两套系统相互独立。PDC 数据由 Bukkit 内部存储,并不是 `custom_data`。 ## 组件参考 [#组件参考] ### `attack_range` [#attack_range] **状态:** 专用 | **最低版本:** 1.21.11 覆盖物品在近战和弹射攻击时的攻击范围。 | 属性 | 类型 | 默认值 | 范围 | | -------------------- | ----- | ----- | ---------- | | `min_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_reach` | Float | `3.0` | 0.0 - 64.0 | | `min_creative_reach` | Float | `0.0` | 0.0 - 64.0 | | `max_creative_reach` | Float | `5.0` | 0.0 - 64.0 | | `hitbox_margin` | Float | `0.3` | 0.0 - 1.0 | | `mob_factor` | Float | `1.0` | 0.0 - 2.0 | ```yaml components: attack_range: max_reach: 5.0 max_creative_reach: 7.0 hitbox_margin: 0.5 ``` ### `banner_patterns` [#banner_patterns] **状态:** 专用 设置旗帜物品上的旗帜图案层。 | 属性 | 类型 | 格式 | | ------- | ------ | ------------------------------------------ | | `type` | String | 图案类型键(如 `stripe_top`、`square_bottom_left`) | | `color` | String | 染料颜色名(`WHITE`、`RED`、`BLUE` 等) | ```yaml components: banner_patterns: - type: stripe_top color: RED - type: square_bottom_left color: BLUE ``` 有效染料颜色:`WHITE`、`ORANGE`、`MAGENTA`、`LIGHT_BLUE`、`YELLOW`、`LIME`、`PINK`、`GRAY`、`LIGHT_GRAY`、`CYAN`、`PURPLE`、`BLUE`、`BROWN`、`GREEN`、`RED`、`BLACK`。 图案类型键是 Minecraft 注册表键。`minecraft:` 前缀可选(如 `stripe_top` 和 `minecraft:stripe_top` 等效)。 ### `base_color` [#base_color] **状态:** 专用 设置盾牌物品的基础颜色。 | 属性 | 类型 | 取值 | | --- | ------ | ----- | | (值) | String | 染料颜色名 | ```yaml components: base_color: RED ``` ### `blocks_attacks` [#blocks_attacks] **状态:** 专用 使物品能像盾牌一样格挡来袭的攻击。 | 属性 | 类型 | 默认值 | | ------------------------ | ------ | --------------------------------------------- | | `block_delay_seconds` | Float | `0.0` | | `disable_cooldown_scale` | Float | `1.0` | | `bypassed_by` | String | `null`(伤害类型标签,如 `#minecraft:bypasses_shield`) | | `block_sound` | String | `null`(音效键) | | `disable_sound` | String | `null`(音效键) | | `damage_reductions` | 节列表 | `[]` | | `item_damage` | 节 | `null` | `damage_reductions` 条目: | 属性 | 类型 | 默认值 | | --------------------------- | ------------- | --------------------------- | | `type` | String 或 List | `null`(伤害类型标签或 ID;省略表示所有类型) | | `horizontal_blocking_angle` | Float | `90.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | `item_damage` 节: | 属性 | 类型 | 默认值 | | ----------- | ----- | ----- | | `threshold` | Float | `0.0` | | `base` | Float | `0.0` | | `factor` | Float | `1.0` | ```yaml components: blocks_attacks: block_delay_seconds: 0.25 disable_cooldown_scale: 1.0 bypassed_by: "#minecraft:bypasses_shield" block_sound: minecraft:item.shield.block disable_sound: minecraft:item.shield.break damage_reductions: - type: "#minecraft:is_projectile" horizontal_blocking_angle: 90.0 base: 0.0 factor: 0.5 - type: minecraft:player_attack base: 1.0 factor: 1.0 item_damage: threshold: 3.0 base: 1.0 factor: 1.0 ``` `damage_reductions` 中的 `type` 字段接受标签字符串(`#minecraft:is_fire`)、单个伤害类型键(`minecraft:fire`)或伤害类型键列表。 ### `bundle_contents` [#bundle_contents] **状态:** 专用 设置收纳袋物品的初始内容。接受原版 ID、ItemsAdder ID 和 `mmoitems:TYPE:ID` 格式。见 [ID](/zh/docs/compatibility/ids)。完整格式详情见 [ID](/zh/docs/compatibility/ids)。 ```yaml components: bundle_contents: - minecraft:arrow - my_pack:special_arrow ``` ### `can_break` [#can_break] **状态:** 专用 限制该物品在冒险模式下可以破坏的方块。 ```yaml components: can_break: - minecraft:stone - "#minecraft:logs" ``` 接受方块 ID(`minecraft:stone`)和方块标签(`#minecraft:logs`)。`minecraft:` 前缀可选。 ### `can_place_on` [#can_place_on] **状态:** 专用 限制该物品在冒险模式下可以放置到的方块上。 ```yaml components: can_place_on: - minecraft:grass_block - "#minecraft:dirt" ``` 格式与 `can_break` 相同。 ### `charged_projectiles` [#charged_projectiles] **状态:** 专用 设置弩中预装的弹射物。接受原版 ID、ItemsAdder ID 和 `mmoitems:TYPE:ID` 格式。见 [ID](/zh/docs/compatibility/ids)。 ```yaml components: charged_projectiles: - minecraft:arrow - my_pack:special_bolt ``` ### `damage_resistant` [#damage_resistant] **状态:** 专用 使物品实体免疫某一类伤害(如下界合金无视火焰)。 ```yaml components: damage_resistant: minecraft:is_fire ``` 接受伤害类型标签键。`#` 前缀和 `minecraft:` 前缀均可选(`is_fire`、`#is_fire`、`minecraft:is_fire`、`#minecraft:is_fire` 全部等效)。 ### `damage_type` [#damage_type] **状态:** 专用 设置物品实体造成伤害时所用的伤害类型。 ```yaml components: damage_type: minecraft:magic ``` 必须是有效的伤害类型注册表键。 ### `death_protection` [#death_protection] **状态:** 专用 防止死亡,并在触发时可选地施加效果(如不死图腾)。 | 属性 | 类型 | 默认值 | | --------------- | --- | ------------- | | `death_effects` | 节列表 | `[]`(省略表示纯保护) | `death_effects` 中的效果类型: | 类型 | 属性 | | ------------------- | --------------------------------------------- | | `apply_effects` | `effects`(药水效果列表)、`probability`(float,默认 1.0) | | `remove_effects` | `effects`(效果类型键列表) | | `clear_all_effects` | *(无属性)* | | `teleport_randomly` | `diameter`(float,默认 16.0) | | `play_sound` | `sound`(带命名空间的音效键) | 药水效果条目(用于 `apply_effects`): | 属性 | 类型 | 默认值 | | ----------- | ------- | ----------------------- | | `type` | String | 效果类型键(如 `regeneration`) | | `duration` | Integer | 持续时间(刻) | | `amplifier` | Integer | 等级 - 1(0 = 等级 I) | ```yaml components: death_protection: death_effects: - type: apply_effects probability: 1.0 effects: - type: regeneration duration: 900 amplifier: 1 - type: absorption duration: 100 amplifier: 1 - type: remove_effects effects: - wither - poison - type: play_sound sound: minecraft:item.totem.use ``` 完全省略 `death_effects` 即为纯图腾效果(防止死亡,无额外效果): ```yaml components: death_protection: {} ``` ### `dyed_color` [#dyed_color] **状态:** 专用 设置皮革盔甲或其他可染色物品的染料颜色。 ```yaml components: dyed_color: "#FF4400" ``` 接受 `#RRGGBB` 十六进制颜色字符串。 ### `enchantable` [#enchantable] **状态:** 专用 设置物品的可附魔值(影响附魔台中的附魔品质)。 ```yaml components: enchantable: 15 ``` 范围:1 - 255。值越高,附魔品质越好。 ### `firework_explosion` [#firework_explosion] **状态:** 专用 设置烟花星物品上的烟花爆炸效果。 | 属性 | 类型 | 默认值 | | ------------- | --------------- | ------- | | `type` | String | `BALL` | | `colors` | `#RRGGBB` 字符串列表 | `[]` | | `fade_colors` | `#RRGGBB` 字符串列表 | `[]` | | `trail` | Boolean | `false` | | `flicker` | Boolean | `false` | 有效类型:`BALL`、`BALL_LARGE`、`STAR`、`BURST`、`CREEPER`。 ```yaml components: firework_explosion: type: STAR colors: - "#FF0000" - "#0000FF" fade_colors: - "#FFFFFF" trail: true flicker: false ``` ### `fireworks` [#fireworks] **状态:** 专用 设置烟花火箭物品上的烟花属性。 | 属性 | 类型 | 默认值 | | ----------------- | ------- | ------------ | | `flight_duration` | Integer | `1`(0 - 255) | | `explosions` | 节列表 | `[]` | `explosions` 中的每个条目使用与 `firework_explosion` 相同的结构。 ```yaml components: fireworks: flight_duration: 2 explosions: - type: BURST colors: - "#FFAA00" trail: true ``` ### `intangible_projectile` [#intangible_projectile] **状态:** 专用 将该物品标记为无形弹射物(射出后无法被拾取)。 ```yaml components: intangible_projectile: true ``` 设为 `true` 或任意非 null 值即可启用。这是一个无属性的标记组件。 ### `kinetic_weapon` [#kinetic_weapon] **状态:** 专用 | **最低版本:** 1.21.5 使物品根据玩家移动速度造成伤害(如重锤)。 | 属性 | 类型 | 默认值 | | ------------------------ | -------------- | ------ | | `contact_cooldown_ticks` | Integer | `0` | | `delay_ticks` | Integer | `0` | | `forward_movement` | Float | `1.0` | | `damage_multiplier` | Float | `1.0` | | `sound` | String(带命名空间键) | `null` | | `hit_sound` | String(带命名空间键) | `null` | | `dismount_conditions` | 节 | `null` | | `knockback_conditions` | 节 | `null` | | `damage_conditions` | 节 | `null` | 条件节(`dismount_conditions`、`knockback_conditions`、`damage_conditions`): | 属性 | 类型 | 默认值 | | -------------------- | ------- | ----- | | `max_duration_ticks` | Integer | `0` | | `min_speed` | Float | `0.0` | | `min_relative_speed` | Float | `0.0` | ```yaml components: kinetic_weapon: damage_multiplier: 2.0 forward_movement: 1.5 sound: minecraft:entity.player.attack.sweep damage_conditions: min_speed: 0.1 ``` ### `lodestone_tracker` [#lodestone_tracker] **状态:** 专用 使指南针指向磁石位置。 | 属性 | 类型 | 默认值 | | --------- | ------- | ----------------------- | | `tracked` | Boolean | `true` | | `world` | String | `null`(世界名;省略表示未链接的追踪器) | | `x` | Integer | `0` | | `y` | Integer | `0` | | `z` | Integer | `0` | ```yaml components: lodestone_tracker: world: world x: 100 y: 64 z: -200 tracked: true ``` 如果省略 `world`,指南针未链接(显示旋转的指针)。如果设置了 `world` 但在重载时该世界未加载,IAA 会记录一条警告并应用该组件但不带位置。 ### `map_color` [#map_color] **状态:** 专用 设置已填充地图物品的边框颜色。 ```yaml components: map_color: "#2A6DB5" ``` 接受 `#RRGGBB` 十六进制颜色字符串。 ### `map_decorations` [#map_decorations] **状态:** 专用 设置已填充地图上的固定装饰(标记)。 ```yaml components: map_decorations: my_marker: type: RED_MARKER x: 100.0 z: 200.0 rotation: 0.0 another_marker: type: player x: -50.0 z: 75.0 rotation: 90.0 ``` `map_decorations` 下的每个键是唯一的装饰 ID。`type` 是 `MapCursor.Type` 键(不区分大小写;`minecraft:` 前缀可选)。`x` 和 `z` 是世界坐标。`rotation` 以度为单位。 ### `map_id` [#map_id] **状态:** 专用 通过整数 ID 将物品链接到特定地图。 ```yaml components: map_id: 42 ``` ### `minimum_attack_charge` [#minimum_attack_charge] **状态:** 专用 | **最低版本:** 1.21.1 设置触发满蓄力效果所需的最低攻击蓄力比例。 ```yaml components: minimum_attack_charge: 0.9 ``` 范围:0.0 - 1.0。 ### `ominous_bottle_amplifier` [#ominous_bottle_amplifier] **状态:** 专用 设置不祥之瓶的等级(影响饮用时不祥之兆的强度)。 ```yaml components: ominous_bottle_amplifier: 3 ``` 范围:0 - 4。 ### `piercing_weapon` [#piercing_weapon] **状态:** 专用 | **最低版本:** 1.21.5 使物品穿透实体(如带穿透附魔的箭)。 | 属性 | 类型 | 默认值 | | ----------------- | -------------- | ------ | | `deals_knockback` | Boolean | `true` | | `dismounts` | Boolean | `true` | | `sound` | String(带命名空间键) | `null` | | `hit_sound` | String(带命名空间键) | `null` | ```yaml components: piercing_weapon: deals_knockback: true dismounts: false hit_sound: minecraft:entity.arrow.hit ``` ### `pot_decorations` [#pot_decorations] **状态:** 专用 设置饰纹陶罐上的陶片装饰。 | 属性 | 类型 | 默认值 | | ------- | ------ | ----------------------------------------- | | `back` | String | `null`(原版物品 ID,如 `arms_up_pottery_sherd`) | | `left` | String | `null` | | `right` | String | `null` | | `front` | String | `null` | ```yaml components: pot_decorations: back: arms_up_pottery_sherd left: archer_pottery_sherd right: blade_pottery_sherd front: burn_pottery_sherd ``` 接受原版物品 ID。`minecraft:` 前缀可选。 ### `potion_contents` [#potion_contents] **状态:** 专用 设置药水、喷溅药水或滞留药水物品的药水效果。 | 属性 | 类型 | 默认值 | | ------------- | ------ | ------------------------------------------- | | `potion` | String | `null`(PotionType 键,如 `minecraft:strength`) | | `color` | String | `null`(#RRGGBB 十六进制覆盖值) | | `custom_name` | String | `null` | | `effects` | 节列表 | `[]` | `potion`、`color`、`custom_name`、`effects` 中至少需存在一个。 ```yaml components: potion_contents: potion: minecraft:strength color: "#FF0000" custom_name: "Super Strength" effects: - type: strength duration: 600 amplifier: 2 ``` ### `potion_duration_scale` [#potion_duration_scale] **状态:** 专用 将该物品施加的所有药水效果的持续时间相乘。 ```yaml components: potion_duration_scale: 2.0 ``` 范围:0.0 - 255.0。 ### `profile` [#profile] **状态:** 专用 设置玩家头颅物品上的玩家皮肤档案。接受玩家名(由客户端解析)或带有显式档案数据的节。 简单形式(玩家名): ```yaml components: profile: Notch ``` 节形式(显式 UUID、名称或纹理): ```yaml components: profile: name: Notch uuid: 069a79f4-44e9-4726-a5be-fca90e38aaf5 texture: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvLi4uIn19fQ== ``` 节形式中 `name`、`uuid`、`texture` 至少需提供一个。 ### `provides_banner_patterns` [#provides_banner_patterns] **状态:** 专用 将物品标记为放入织布机时可解锁旗帜图案的材料。 ```yaml components: provides_banner_patterns: minecraft:no_item_required ``` 接受旗帜图案标签键。`#` 前缀可选。 ### `provides_trim_material` [#provides_trim_material] **状态:** 专用 将物品标记为锻造纹饰材料。 ```yaml components: provides_trim_material: gold ``` 接受纹饰材料注册表键。`minecraft:` 前缀可选。 ### `rarity` [#rarity] **状态:** 专用 设置物品的稀有度,影响默认资源包中物品名称的颜色。 ```yaml components: rarity: RARE ``` 有效值:`COMMON`、`UNCOMMON`、`RARE`、`EPIC`。 ### `repairable` [#repairable] **状态:** 专用 设置可在铁砧上修复该物品的物品。 接受标签字符串或物品 ID 列表: ```yaml # 使用标签 components: repairable: "#minecraft:planks" ``` ```yaml # 使用物品列表 components: repairable: - minecraft:diamond - minecraft:netherite_ingot ``` ### `stored_enchantments` [#stored_enchantments] **状态:** 专用 设置附魔书中存储的附魔。使用 `enchantment_key: level` 键值对的节。 ```yaml components: stored_enchantments: sharpness: 5 looting: 3 minecraft:mending: 1 ``` 等级范围:1 - 255。`minecraft:` 前缀可选。 ### `suspicious_stew_effects` [#suspicious_stew_effects] **状态:** 专用 设置谜之炖菜物品给予的效果。 ```yaml components: suspicious_stew_effects: - type: speed duration: 200 - type: minecraft:night_vision duration: 400 ``` `duration` 以刻为单位。默认值为 160。效果类型上的 `minecraft:` 前缀可选。 ### `swing_animation` [#swing_animation] **状态:** 专用 | **最低版本:** 1.21.5 设置近战攻击的挥动动画类型和持续时间。 | 属性 | 类型 | 取值 | | ---------- | ------- | --------------------- | | `type` | String | `NONE`、`WHACK`、`STAB` | | `duration` | Integer | >= 1 | ```yaml components: swing_animation: type: WHACK duration: 6 ``` ### `tool` [#tool] **状态:** 专用 将物品配置为带挖掘速度规则的工具。 | 属性 | 类型 | 默认值 | | ------------------------- | ------- | ------ | | `default_mining_speed` | Float | `1.0` | | `damage_per_block` | Integer | `1` | | `can_destroy_in_creative` | Boolean | `true` | | `rules` | 节列表 | `[]` | 规则节: | 属性 | 类型 | 默认值 | | ------------------- | --------------- | ---------------- | | `blocks` | String、标签或 List | 必填 | | `speed` | Float | `null`(不覆盖) | | `correct_for_drops` | Boolean 或省略 | `null`(NOT\_SET) | ```yaml components: tool: default_mining_speed: 1.0 damage_per_block: 1 can_destroy_in_creative: true rules: - blocks: "#minecraft:mineable/pickaxe" speed: 6.0 correct_for_drops: true - blocks: - minecraft:obsidian - minecraft:crying_obsidian speed: 12.0 correct_for_drops: true ``` `blocks` 接受标签字符串(`#minecraft:logs`)、单个方块 ID(`minecraft:stone`)或方块 ID 列表。 `correct_for_drops`:`true` 表示该工具产出正确掉落物;`false` 表示不产出;省略该键表示 NOT\_SET(继承原版默认值)。 ### `tooltip_display` [#tooltip_display] **状态:** 专用 控制哪些组件显示在物品提示框中。 | 属性 | 类型 | 默认值 | | ------------------- | ------- | ------- | | `hide_tooltip` | Boolean | `false` | | `hidden_components` | 组件键列表 | `[]` | ```yaml components: tooltip_display: hide_tooltip: false hidden_components: - enchantments - attribute_modifiers - stored_enchantments ``` `hidden_components` 接受 `DataComponentTypes` 字段名(不区分大小写)。使用不带 `minecraft:` 前缀且为 UPPER\_SNAKE\_CASE 的 Minecraft 组件键(如 `ATTRIBUTE_MODIFIERS`)。查找不区分大小写。 ### `use_cooldown` [#use_cooldown] **状态:** 专用 为物品设置使用冷却时间。 | 属性 | 类型 | 必填 | | ---------- | -------------- | -- | | `cooldown` | Float(秒) | 是 | | `group` | String(带命名空间键) | 否 | ```yaml components: use_cooldown: cooldown: 2.0 ``` 如果省略 `group`,冷却分组默认为 `itemsadder:`,使冷却为物品专属。设置 `group` 可与其他物品共享冷却: ```yaml components: use_cooldown: cooldown: 5.0 group: my_pack:special_items ``` ### `use_remainder` [#use_remainder] **状态:** 专用 设置该物品被完全消耗后槽位中保留的物品。 ```yaml components: use_remainder: minecraft:glass_bottle ``` 接受原版 ID、ItemsAdder ID 和 `mmoitems:TYPE:ID` 格式。 ### `weapon` [#weapon] **状态:** 专用 | **最低版本:** 1.21.5 将物品配置为带自定义伤害和格挡交互的武器。 | 属性 | 类型 | 默认值 | | ------------------------------ | ------- | ----- | | `item_damage_per_attack` | Integer | `1` | | `disable_blocking_for_seconds` | Float | `0.0` | ```yaml components: weapon: item_damage_per_attack: 2 disable_blocking_for_seconds: 0.6 ``` `disable_blocking_for_seconds`:当该武器命中正在格挡的实体时,格挡会被禁用此段时长。 ### `writable_book_content` [#writable_book_content] **状态:** 专用 设置可写书(书与笔)的页面。 ```yaml components: writable_book_content: - "Page 1 content here." - "Page 2 content here." ``` ## 版本汇总 [#版本汇总] | 组件 | 最低版本 | | ----------------------- | ------- | | `minimum_attack_charge` | 1.21.1 | | `kinetic_weapon` | 1.21.5 | | `piercing_weapon` | 1.21.5 | | `swing_animation` | 1.21.5 | | `weapon` | 1.21.5 | | `attack_range` | 1.21.11 | | 通用 NMS 组件 | 1.21.3 | | 所有其他组件 | 1.20.6+ | 需要比运行中服务端更新版本的组件会被静默跳过,并在控制台记录一条警告。 # 配置 (/zh/docs/configuration) ItemsAdderAdditions 使用 `config.yml` 管理插件级功能开关。实际的动作、behaviours、配方、进度、画、标签和世界生成条目仍由 ItemsAdder 内容 YAML 定义。 ## 默认配置 [#默认配置] ```yaml features: creative_inventory_integration: true custom_paintings: true item_model_definitions: true behaviours: bed: true connectable: true contact_effect: true stackable: true storage: true text_display: true worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true actions: actionbar: true clear_item: true ignite: true message: true mythic_mobs_skill: true open_inventory: true open_trade_machine: true play_animation: true play_emote: true replace_biome: true replace_item: true shoot_fireball: true swing_hand: true teleport: true title: true toast: true veinminer: true update-checker: enabled: true on-join: true ``` ## 开关行为 [#开关行为] 缺失的 toggle key 默认视为启用。这也适用于默认配置中不存在的可选节。 WorldGuard 区域检查可在 `worldguard` 下配置;请见 [WorldGuard 兼容性](/zh/docs/compatibility/worldguard)。 Components 也可以用同样方式禁用: ```yaml components: rarity: false ``` ## 重载行为 [#重载行为] 运行: ```text /itemsadderadditions reload ``` 或: ```text /iaa reload ``` 该命令会重载 `config.yml`,并重新应用插件级功能、动作、behaviour 和 component 开关。它**不会**重载 ItemsAdder 内容 YAML 文件。 修改 ItemsAdderAdditions 内容 YAML 节后,请使用 `/iareload`,例如动作、behaviours、自定义标签、配方、进度、自定义画、Valhalla 元数据或世界生成条目。 修改 `components` 节或资源包资源后,请使用 `/iazip`。`/iareload` 会重载 components 以外的 ItemsAdderAdditions 内容。 ## 常见错误 [#常见错误] * 将 toggle 设为 `false`,却期望已有内容在重载后继续工作。 * 在 `actions`、`behaviours`、`features` 或 `components` 下写错键名;未知 toggle key 不会禁用目标功能。 * 期望 `/itemsadderadditions reload` 重载 ItemsAdder 内容 YAML 或重建资源包。内容 YAML 使用 `/iareload`,components 或资源使用 `/iazip`。 # 创造模式物品栏集成 (/zh/docs/creative-inventory-integration) **致谢:** 此功能最初由 **Misieur**([GitHub](https://github.com/Misieur))编写 **版本要求:** 需要 **Paper 1.21.5 或更高版本**。在旧版本上此功能将被禁用 将 ItemsAdder 注册的每个自定义物品注入原版创造模式菜单,无需逐项配置 **重要提示**:你需要具有管理员权限并在设置中启用**管理员物品选项卡**,才能在创造模式物品栏中查看 ItemsAdder 物品 ## 设置 [#设置] 运行 `/iazip` 重新生成资源包。重新加入服务器后,你的创造模式物品栏将包含所有自定义物品 每次通过 ItemsAdder 添加或移除自定义物品后,你必须重新加入服务器并再次运行 `/iazip`,才能在创造模式物品栏中看到更新 ## 启用/禁用 [#启用禁用] 你可以在插件的 `config.yml` 中切换此功能: ```yaml features: creative_inventory_integration: true ``` 设置为 `false` 可完全禁用此功能。禁用后,插件将不会生成任何资源包文件或注入任何注册表条目 ## ItemsAdder 配置 [#itemsadder-配置] 在首次设置期间,插件会自动将自身添加到 ItemsAdder 的资源包合并列表中: ```yaml # 在 ItemsAdder/config.yml 中(自动管理) resource-pack: zip: merge_other_plugins_resourcepacks_folders: - ItemsAdderAdditions/resourcepack ``` 如果由于某种原因缺少此条目(例如文件不可写入),你可以安全地手动添加。如果插件无法自动应用更改,将会记录一条警告 ## 备注 [#备注] * **模板物品**将被排除。在 ItemsAdder 配置中标记为 `template: true` 的物品不会出现在创造模式菜单中 * **方向变体**将被排除。当基础物品(不含方向后缀)存在于注册表中时,命名空间 ID 以 `_north`、`_south`、`_east`、`_west`、`_up` 或 `_down` 结尾的物品将被跳过 * 在 ItemsAdder 配置中设置了 `hide_from_inventory: true` 的物品将被排除 * 使用 `graphics.icon` 或 `resource.icon` 的物品将显示其平面的 GUI 图标。所有其他物品将使用其手持时正常显示的 3D 模型 * 原版画不受影响;普通画物品将继续正常工作 # 自定义画 (/zh/docs/custom-paintings) **版本要求:** 需要 **Paper 1.21.5 或更高版本**。在旧版本上此功能将被禁用 自定义画直接在 ItemsAdder 内容 YML 文件中使用顶层 `paintings` 部分定义。每个条目都会注册一个真正的 Minecraft 画变体,玩家可以在游戏中遇到 ## 配置 [#配置] ```yaml info: namespace: mynamespace paintings: sunset: enabled: true width: 2 height: 1 asset: mynamespace:sunset title: "日落" author: "Toutou" item: mynamespace:sunset_painting include_in_random: true ``` ## 选项 [#选项] | 键 | 类型 | 默认值 | 描述 | | ------------------- | ------------------- | ------- | ------------------------------------------------------------------------------- | | `enabled` | 布尔值 | `true` | 设置为 `false` 可在不移除条目的情况下跳过该画 | | `width` | 整数 | *(必填)* | 画的宽度(以方块计) | | `height` | 整数 | *(必填)* | 画的高度(以方块计) | | `asset` | `namespace:key` | *(必填)* | 纹理资源键。参见下方的[纹理路径](#纹理路径) | | `title` | 字符串 | *(无)* | 可选的在提示框中显示的标题。支持 MiniMessage | | `author` | 字符串 | *(无)* | 可选的在提示框中显示的作者名 | | `item` | `namespace:item_id` | *(无)* | 可选关联的 ItemsAdder 物品。在有效的墙面上右键点击时,此物品会放置该自定义画。见 [ID](/zh/docs/compatibility/ids) | | `include_in_random` | 布尔值 | `false` | 当设为 `true` 时,原版画物品在墙面空间合适时可以随机选中此自定义画 | ## 纹理路径 [#纹理路径] `asset` 值映射到 ItemsAdder 内容文件夹中的纹理文件。对于 `asset: mynamespace:sunset`,插件期望的文件路径为: ``` contents/mynamespace/textures/painting/sunset.png ``` 无需数据包文件。插件会在运行时注入画变体并自动更新原版 `minecraft:placeable` 画标签 ## 在游戏中放置画 [#在游戏中放置画] 如果你设置了 `item`,该 ItemsAdder 物品的行为将类似自定义画物品: * 在有效墙面上右键点击会放置该自定义画 * 启用 WorldGuard 集成时,会遵循画放置相关的 WorldGuard flags * 副手重复放置问题会被自动处理 如果 `include_in_random` 设为 `false`(默认值),该画只能通过其关联物品放置。将其设为 `true` 也可让原版画物品随机选中它 ## 启用/禁用 [#启用禁用] 你可以在插件的 `config.yml` 中切换此功能: ```yaml features: custom_paintings: true ``` ## 备注 [#备注] * 此功能仅在 Minecraft **1.21.5** 及更高版本上可用。在较旧的受支持版本上,插件会记录警告并跳过 `paintings` 部分 * 画变体本身不需要 `/iazip` 或手动资源包步骤,但你的纹理文件必须照常包含在资源包中 * 关联的 `item` 必须是已存在的 ItemsAdder 物品。如果该物品缺失,画变体仍会被注册,但没有放置物品可用 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # 自定义标签 (/zh/docs/custom-tags) 自定义标签可以把内容 ID 分组一次,然后在受支持的 ItemsAdderAdditions 功能中重复使用。它们会从任意 ItemsAdder 内容 YAML 文件的顶层 `tags` 节加载。 ## 基础结构 [#基础结构] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer decorative_blocks: type: block values: - ruby_lamp - minecraft:amethyst_block trading_stations: type: furniture values: - alchemy_table - forge_table ruby_recipes: type: recipe values: - ruby_sword - ruby_pickaxe ``` 在同一 namespace 中用 `#tag_id` 引用标签,跨 namespace 时用 `#namespace:tag_id`。标签引用规则请见 [ID](/zh/docs/compatibility/ids)。 ## 标签类型 [#标签类型] | 类型 | 别名 | 值可以包含 | | ----------- | ------------ | -------------------------------------- | | `item` | `items` | ItemsAdder 物品、原版物品、MMOItems 物品和嵌套物品标签。 | | `block` | `blocks` | ItemsAdder 方块、原版方块和嵌套方块标签。 | | `furniture` | `furnitures` | ItemsAdder 家具 ID 和嵌套家具标签。 | | `recipe` | `recipes` | 配方 ID 和嵌套配方标签。 | 如果省略 `type`,该标签会作为物品标签处理。 ## 嵌套标签 [#嵌套标签] 标签可以包含同类型的其他标签。 ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe mining_tools: type: item values: - "#ruby_tools" - minecraft:iron_pickaxe - minecraft:diamond_pickaxe ``` 嵌套标签会在重载时解析。循环引用会被检测并忽略,不会卡住服务器。 ## 自定义标签可用位置 [#自定义标签可用位置] 运行时 ID 匹配路径支持自定义标签,包括: * 进度中的物品、方块、家具和配方条件 * 玩家谓词中的物品、装备、槽位和方块检查 * `stackable` behaviour 的 `items` * 合成配方原料(`iaa_crafting_table`) ## 完整示例 [#完整示例] ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe items: charged_ruby: display_name: "Charged Ruby" behaviours: stackable: blocks: - charged_ruby_block items: - "#my_pack:ruby_tools" ``` ```yaml advancements: collect_any_ruby_tool: display: title: "Ruby Tools" description: "Obtain any ruby tool." icon: my_pack:ruby_pickaxe criteria: collect: trigger: obtain_item conditions: items: - "#my_pack:ruby_tools" ``` ## 重载行为 [#重载行为] 自定义标签会在动作、behaviours、配方、进度和世界生成重载前准备好。修改标签后运行 `/iareload`。 ## 常见错误 [#常见错误] * 混用标签类型。家具标签不能包含物品标签。 * 用相同的 `type` 和标签 ID 定义两次。第一条声明会生效。 * 期望自定义标签创建物品堆叠。对于配方结果、`toast.icon`、`clear_item.item`、`replace_item.item` 等输出,请使用具体物品 ID。 * 覆盖类似原版标签的标签,例如 `#minecraft:planks`。当存在相同 ID 的自定义标签时,会优先解析自定义标签。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [兼容性](/zh/docs/compatibility) # ItemsAdderAdditions 入门指南 (/zh/docs) **ItemsAdderAdditions** 为 [ItemsAdder](https://itemsadder.com/) 扩展了额外的动作、behaviours、配方、标签和功能 —— 直接在你现有的 YML 文件中配置即可。它通过统一的兼容层解析 ItemsAdder 内容、MMOItems 物品、原版 Minecraft 物品/方块、原版标签以及 ItemsAdderAdditions 自定义标签。大多数仅 YAML 的 ItemsAdderAdditions 修改可用 `/iareload` 重载;components 需要 `/iazip`。 ## 下载 [#下载] ## 环境要求 [#环境要求] * **ItemsAdder**(推荐最新版本) * **Paper** 1.20.6、1.21.1、1.21.3-1.21.8、1.21.10-1.21.11、26.1.2 或 26.2 * **MMOItems** *(可选,仅在引用 `mmoitems:type:id` 时需要)* ## 兼容性 [#兼容性] 集成说明请见[兼容性](/zh/docs/compatibility);ItemsAdder ID、MMOItems ID、原版物品/方块 ID、配方 ID、原版标签和自定义标签格式请见 [ID](/zh/docs/compatibility/ids)。 ## 可选示例包 [#可选示例包] 一个简单的示例包,展示了 ItemsAdderAdditions 的部分功能 [示例包下载链接](https://www.spigotmc.org/resources/itemsadderadditions-example-pack.134800) # 物品模型定义 (/zh/docs/item-model-definitions) 物品模型定义是 Minecraft 1.21.4 新增的原版资源包文件,用于把物品映射到模型,并根据物品状态在多个模型之间切换。ItemsAdderAdditions 会根据你自定义物品上的一段 YAML 为你生成这些 JSON 文件,写入资源包,并(可选)为物品附加对应的 `minecraft:item_model` 组件。 在物品定义下添加 `item_model_definition` 节,然后执行 `/iazip` 把文件写入资源包。 ```yaml items: my_item: item_model_definition: model: type: model model: my_pack:item/my_item ``` **最低服务端版本:1.21.4。** 在更旧的版本上,每个 `item_model_definition` 节都会被忽略,并在控制台输出警告。 生成的文件写入资源包内的 `assets//items/.json`。修改 YAML 后,执行 `/iazip` 重新生成资源包。生成的物品模型 id 为 `:`。 ## 启用 [#启用] 该功能由 `config.yml` 中的 `item_model_definitions` 控制(默认启用): ```yaml features: item_model_definitions: true ``` ## 节字段参考 [#节字段参考] | 键 | 类型 | 默认值 | 说明 | | ------------------------- | --- | ------- | ----------------------------------------------- | | `enabled` | 布尔 | `true` | 设为 `false` 跳过该物品。 | | `path` | 字符串 | 物品 id | 输出路径 / 生成的模型 id。支持 `namespace:path`。 | | `model` | 对象 | - | 模型树的 builder 简写(见下文)。 | | `raw` | 对象 | - | 完整的物品模型定义根对象,原样写入。 | | `oversized_in_gui` | 布尔 | `false` | 允许模型在 GUI 中渲染到槽位边界之外。需要 Minecraft 1.21.6 或更高版本。 | | `apply_component` | 布尔 | `true` | 附加指向生成 id 的 `minecraft:item_model` 组件。 | | `overwrite_existing_file` | 布尔 | `true` | 为 `false` 时,目标路径已存在的文件保持不变。 | | `custom_model_data` | 对象 | - | 添加 `minecraft:custom_model_data` 组件(见下文)。 | `model` 和 `raw` 必须且仅能提供其中一个。若两者都存在,则使用 `raw` 并记录警告。 ### `path` [#path] 若省略,路径默认为物品 id,命名空间默认为物品的命名空间。结尾的 `.json` 会被自动去除。 ```yaml item_model_definition: path: my_pack:custom/sword # 写入 assets/my_pack/items/custom/sword.json model: type: model model: my_pack:item/sword ``` 规则: * 命名空间:小写字母、数字、`_`、`-`、`.` * 路径:小写字母、数字、`_`、`-`、`.`、`/` * 不能以 `/` 开头或结尾,不能有 `//` * 拒绝绝对路径、反斜杠和 `..` ### `oversized_in_gui` [#oversized_in_gui] 设置 `oversized_in_gui: true` 可允许物品模型在物品栏 GUI 中渲染到槽位边界之外。Minecraft 1.21.6 新增了此物品模型定义字段,因此该设置仅在 1.21.6 或更高版本中生效。 ```yaml item_model_definition: oversized_in_gui: true model: type: model model: my_pack:item/large_item ``` 该值会与 `model` 一同写入生成的 JSON 根对象。若省略,则使用原版默认值 `false`。与 `raw` 一起使用时,此顶层设置会覆盖 `raw.oversized_in_gui`。 ## Builder 模型(`model`) [#builder-模型model] `model` 是一个简写:其对象会成为生成根对象的 `model` 字段。它必须包含 `type`。在 builder 模式下,当你省略命名空间时,`type` 和 `property` 的值会自动加上 `minecraft:` 前缀(`model` 变成 `minecraft:model`)。 ```yaml item_model_definition: model: type: model # 变成 minecraft:model model: my_pack:item/my_item ``` ### 支持的类型 [#支持的类型] builder 会校验以下类型。其他任何 `type` 都会原样写入,不做校验。 #### `minecraft:model` [#minecraftmodel] 单个模型。需要 `model`(模型资源路径)。 ```yaml model: type: model model: my_pack:item/my_item ``` #### `minecraft:composite` [#minecraftcomposite] 将多个模型叠加渲染。需要非空的 `models` 模型对象列表。 ```yaml model: type: composite models: - type: model model: my_pack:item/base - type: model model: my_pack:item/overlay ``` #### `minecraft:condition` [#minecraftcondition] 根据布尔属性在两个模型间选择。需要 `property`、`on_true` 和 `on_false`。 ```yaml model: type: condition property: using_item on_true: type: model model: my_pack:item/drawing on_false: type: model model: my_pack:item/idle ``` #### `minecraft:select` [#minecraftselect] 根据属性值从一组 case 中选择模型。需要 `property` 和非空的 `cases` 列表;每个 case 需要 `when` 和 `model`。当没有 case 匹配时使用可选的 `fallback` 模型。 ```yaml model: type: select property: display_context cases: - when: gui model: type: model model: my_pack:item/gui - when: firstperson_righthand model: type: model model: my_pack:item/hand fallback: type: model model: my_pack:item/default ``` #### `minecraft:range_dispatch` [#minecraftrange_dispatch] 根据数值属性和阈值选择模型。需要 `property` 和非空的 `entries` 列表;每个 entry 需要数值 `threshold` 和 `model`。低于最低阈值时使用可选的 `fallback`。 ```yaml model: type: range_dispatch property: damage entries: - threshold: 0.0 model: type: model model: my_pack:item/fresh - threshold: 0.5 model: type: model model: my_pack:item/worn fallback: type: model model: my_pack:item/broken ``` #### `minecraft:special` [#minecraftspecial] 带渲染器的特殊模型。需要 `base` 和一个带自身 `type` 的 `model` 对象。 ```yaml model: type: special base: my_pack:item/shield_base model: type: minecraft:shield ``` #### `minecraft:empty` / `minecraft:bundle/selected_item` [#minecraftempty--minecraftbundleselected_item] 无额外字段的标记类型。 ```yaml model: type: empty ``` ## 原始模型(`raw`) [#原始模型raw] 当你需要完全控制时使用 `raw`。它是完整的物品模型定义根对象,原样写入磁盘。它必须包含顶层 `model` 对象。与 builder 不同,`raw` 不会添加任何 `minecraft:` 前缀,因此请写完整的带命名空间 id。 ```yaml item_model_definition: raw: model: type: minecraft:range_dispatch property: minecraft:custom_model_data entries: - threshold: 1.0 model: type: minecraft:model model: my_pack:item/variant_1 fallback: type: minecraft:model model: my_pack:item/default ``` ## 组件 [#组件] ### `apply_component` [#apply_component] 为 `true`(默认)时,IAA 会为物品附加一个指向生成模型 id 的 `minecraft:item_model` 组件,这样物品就能真正使用新定义,而无需你手动设置组件。 如果物品已定义 `components.item_model`(或 `minecraft:item_model`)且与生成的 id 不同,IAA 会保留现有组件不变并记录警告。设为 `apply_component: false` 可只生成文件而不改动组件。 ### `custom_model_data` [#custom_model_data] 当 `apply_component` 为 `true` 且物品尚未定义 `custom_model_data` 组件时,你可以附加一个。它使用原版 `minecraft:custom_model_data` 形式:`floats`、`flags`、`strings` 和 `colors` 列表。 ```yaml item_model_definition: model: type: range_dispatch property: custom_model_data entries: - threshold: 1.0 model: type: model model: my_pack:item/variant_1 custom_model_data: floats: - 1.0 flags: - true strings: - hello colors: - "#FF0000" ``` 如果物品上已存在 `components.custom_model_data`,该节会被跳过并记录警告。 ## 应用更改 [#应用更改] 物品模型定义文件在重载时写入资源包。之后执行 `/iazip` 重新打包并应用资源包。控制台会记录生成了多少个定义、有多少文件发生变化,以及跳过了多少已存在的文件。 # Valhalla 元数据已移动 (/zh/docs/valhalla) ValhallaMMO 和 ValhallaTrinkets 文档已移动到[兼容性:ValhallaMMO & Trinkets](/zh/docs/compatibility/valhalla)。 请使用新页面查看当前元数据语法、示例、可选依赖行为和故障排查。 # 动作栏消息 (/zh/docs/actions/actionbar) ```yaml actionbar: text: "我的自定义动作栏消息已发送给 %player_name%" ``` ## 参数 [#参数] ### `text` [#text] 必填。要显示的消息。支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/)、[PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) 和字体图片 # 清除物品 (/zh/docs/actions/clear-item) ```yaml clear_item: item: my_item amount: 2 # 可选,默认:1 ``` ## 参数 [#参数] ### `item` [#item] 必填。要移除的物品。可使用[此列表](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary)中的原版材质、使用 `namespace:id` 或仅 `id` 的自定义 ItemsAdder 物品,或使用 `mmoitems:type:id` 的 MMOItems 物品。此参数不支持标签 ### `amount` [#amount] 可选。默认为 `1`。要移除的物品数量 # 点燃 (/zh/docs/actions/ignite) ```yaml ignite: duration: 200 # 刻 ``` ## 参数 [#参数] ### `duration` [#duration] 必填。将目标点燃多长时间,以刻为单位。20 刻 = 1 秒 # 消息 (/zh/docs/actions/message) ```yaml message: text: "我的自定义消息已发送给 %player_name%" ``` ## 参数 [#参数] ### `text` [#text] 必填。要发送的消息。支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/)、[PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) 和字体图片 # MythicMobs 技能 (/zh/docs/actions/mythic-mobs-skill) ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 # 可选,默认:1.0 ``` ## 参数 [#参数] ### `skill` [#skill] 必填。要施放的 MythicMobs 技能名称 ### `power` [#power] 可选。默认为 `1.0`。传递给技能的 power 倍率 ## 相关页面 [#相关页面] * [MythicMobs 兼容性](/zh/docs/compatibility/mythicmobs) * [动作参数](/zh/docs/actions/parameters) # 打开物品栏 (/zh/docs/actions/open-inventory) `title` 参数需要 Paper 1.21.4 或更高版本。 ```yaml open_inventory: type: "anvil" title: "我的超棒自定义铁砧" # 可选 ``` 支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) 格式、[PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) 占位符和 [ItemsAdder](https://itemsadder.com/) 字体图片 ## 支持的类型 [#支持的类型] * `anvil` * `cartography`、`cartography_table` * `crafting_table`、`workbench` * `enchanting`、`enchanting_table` * `ender_chest` * `grindstone` * `loom` * `smithing`、`smithing_table` * `stonecutter` # 打开交易机器 (/zh/docs/actions/open-trade-machine) `open_trade_machine` 会为目标玩家打开 ItemsAdder 交易机器界面,不需要把对应方块或家具实际放在世界中。 可用于菜单物品、NPC 流程、自定义工作站,或任何需要打开指定 ItemsAdder 交易机器的动作触发器。 ## 要求 [#要求] * 目标必须是玩家。非玩家目标会被跳过。 * 引用的 ItemsAdder 内容必须具有 `trade_machine` 或 `block_trade_machine` 行为。 ## 配置 [#配置] ```yaml info: namespace: stations items: alchemy_token: display_name: "炼金工作站" events: interact: right: open_trade_machine: trade_machine: stations:alchemy_table ``` ## 选项 [#选项] | 键 | 类型 | 必填 | 描述 | | --------------- | --- | -- | ------------------------------------------------------------- | | `trade_machine` | 字符串 | 是 | 提供交易机器界面的 ItemsAdder 物品、方块或家具 ID。纯 ID 会使用当前 `info.namespace`。 | ## 与目标参数一起使用 [#与目标参数一起使用] 此动作支持通用动作参数: ```yaml open_trade_machine: trade_machine: stations:alchemy_table target: in_sight target_in_sight_distance: 8 ``` ## 插件配置 [#插件配置] 可在 `config.yml` 中禁用此动作: ```yaml actions: open_trade_machine: false ``` 该键是可选的。缺失的动作开关默认启用。 ## 重载 [#重载] 修改 ItemsAdder 内容 YAML 后执行 `/iareload`。引用的交易机器必须已经由 ItemsAdder 注册。 ## 常见错误 [#常见错误] * 使用没有 `trade_machine` 或 `block_trade_machine` 行为的普通物品 ID。 * 在事件目标不是玩家时使用 `target: other`。 * 交易机器定义在其他 `info.namespace` 中,但省略了 namespace。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [ItemsAdder 兼容性](/zh/docs/compatibility/itemsadder) # 动作参数 (/zh/docs/actions/parameters) 每个动作都支持一组共享参数。这些参数允许你为动作设置权限门槛、添加延迟,以及控制动作的应用对象。你可以在同一个动作中任意组合使用它们 ## 参数 [#参数] ### `permission` [#permission] 如果设置此项,则仅当玩家拥有此权限节点时动作才会触发。没有该权限的玩家会被静默忽略 ```yaml actionbar: text: "你好!" permission: "my_pack.greet" ``` ### `delay` [#delay] 在执行动作前等待指定的刻数。20 刻 = 1 秒。默认为 `0`(立即执行) ```yaml message: text: "加载中..." delay: 40 # 触发后 2 秒 ``` ### `target` [#target] 控制动作应用于谁。默认为 `self` | 值 | 描述 | | ---------- | ------------------------------------------------------ | | `self` | 触发事件的玩家 *(默认)* | | `other` | 玩家正在交互的实体(例如正在攻击的实体) | | `all` | 触发玩家**和**目标实体 | | `radius` | 事件目标、事件方块或触发玩家周围指定 X/Y/Z 半径内的所有实体 - 需要 `target_radius` | | `in_sight` | 玩家当前注视的实体 - 需要 `target_in_sight_distance` | ```yaml message: text: "你打中了某人!" target: other ``` ### `target_radius` [#target_radius] 仅当 `target: radius` 时使用。定义围绕事件目标、事件方块或触发玩家的 X/Y/Z 半径(以方块计) ```yaml actionbar: text: "范围效果!" target: radius target_radius: 10 ``` ### `target_in_sight_distance` [#target_in_sight_distance] 仅当 `target: in_sight` 时使用。搜索实体时从玩家眼睛位置进行射线检测的最大距离(以方块计)。如果在该范围内未找到任何实体,则完全跳过该动作 ```yaml ignite: duration: 100 target: in_sight target_in_sight_distance: 10 ``` ## 触发器放置位置 [#触发器放置位置] 动作声明在 ItemsAdder 物品、方块、家具或复杂家具的 `events` 节中。 ```yaml info: namespace: my_pack items: ruby_staff: events: interact: right: message: text: "Right-clicked" ruby_lamp: events: placed_furniture: interact: message: text: "Furniture clicked" ``` `placed_block` 动作可以嵌套在 `events.placed_block` 下。家具和复杂家具动作从 `events.placed_furniture` 加载。 ## 支持的触发器名称 [#支持的触发器名称] 常见物品触发器包括: ```text interact, interact_mainhand, interact_offhand, block_break, attack, kill, drop, pickup, held, held_offhand, unheld, unheld_offhand, item_break, eat, drink, bow_shot, gun_shot, gun_no_ammo, gun_reload, item_throw, item_hit_ground, item_hit_entity, book_write, book_read, fishing_start, fishing_caught, fishing_failed, fishing_cancel, fishing_bite, fishing_in_ground, bucket_empty, bucket_fill ``` 方块触发器包括 `interact`、`break` 和嵌套的 `placed_block` 触发器。家具触发器在 `placed_furniture` 下使用相同的物品风格触发器名称。复杂家具目前支持 `placed_furniture.interact`。 `interact`、`interact_mainhand` 和 `interact_offhand` 可以使用 `right`、`left`、`right_shift`、`left_shift` 等参数节。触发器下的 wildcard 动作也会在精确参数匹配之后执行。 ## 冷却和属性要求 [#冷却和属性要求] 当动作由手持的 ItemsAdder 物品触发时,ItemsAdderAdditions 会在执行动作前检查 ItemsAdder 为该物品配置的冷却和属性要求。如果玩家不满足这些要求,该动作会被跳过。 ## 完整示例 [#完整示例] ```yaml my_item: events: interact: right: actionbar: text: "已右键点击!" permission: "some.permission" # 只有拥有此权限的玩家才能触发 delay: 10 # 半秒延迟 target: self # 仅应用于点击者自身 ``` # 播放动画 (/zh/docs/actions/play-animation) ```yaml play_animation: name: "spin" ``` ## 参数 [#参数] ### `name` [#name] 必填。要播放的动画名称,与家具配置中定义的名称一致 # 播放表情 (/zh/docs/actions/play-emote) ```yaml play_emote: name: "wave" ``` ## 参数 [#参数] ### `name` [#name] 必填。要播放的表情名称 # 替换生物群系 (/zh/docs/actions/replace-biome) ```yaml replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` 当 ItemsAdder 事件触发时,更改选定区域内的生物群系 ## 参数 [#参数] ### `biome` [#biome] 要应用的生物群系 使用有效的生物群系命名空间 ID,例如 `minecraft:plains`、`minecraft:desert` 或 `minecraft:cherry_grove` 你也可以使用自定义插件/数据包的生物群系 ```yaml replace_biome: biome: "minecraft:desert" ``` ### `shape` [#shape] 用于生物群系替换区域的形状 支持的形状: * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` * `SHELL` * `TORUS` * `CONE` * `BEAM` * `PYRAMID` ```yaml replace_biome: biome: "minecraft:swamp" shape: CYLINDER ``` ### `radius` [#radius] 定义形状的大小 根据形状和你想要的配置方式,有两种支持的半径格式 #### 统一半径 [#统一半径] 适用于球体等圆形形状 ```yaml replace_biome: biome: "minecraft:snowy_taiga" shape: SPHERE radius: blocks_from_center: 5 ``` #### 按轴半径 [#按轴半径] 适用于拉伸或自定义大小的形状 ```yaml replace_biome: biome: "minecraft:jungle" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ## 形状说明 [#形状说明] 部分形状是基于旋转的: * `PYRAMID` * `BEAM` * `CONE` 这些形状会受动作执行时玩家朝向的影响 对于这些形状,`x`、`y` 和 `z` 仍然控制最终的形状尺寸,尽管形状是使用玩家的朝向进行定向的 ## 重要限制 [#重要限制] Minecraft 的生物群系编辑在小范围内并非完全精确。结果可能看起来有些随机或粗糙,尤其是在使用较小的半径值时。这是游戏本身的限制 * 小型的 `SPHERE`(球体)形状可能看起来不是完美的球形 * 方向性形状可能看起来略显不均匀 * 部分边缘可能看起来粗糙 使用较大的半径时,形状会更接近预期效果 ## 示例 [#示例] ### 球体 [#球体] ```yaml replace_biome: biome: "minecraft:mushroom_fields" shape: SPHERE radius: blocks_from_center: 6 ``` ### 立方体 [#立方体] ```yaml replace_biome: biome: "minecraft:badlands" shape: CUBOID radius: x: 5 y: 4 z: 3 ``` ### 基于玩家朝向的光束 [#基于玩家朝向的光束] ```yaml replace_biome: biome: "minecraft:nether_wastes" shape: BEAM radius: x: 12 y: 2 z: 2 ``` ### 基于玩家朝向的圆锥体 [#基于玩家朝向的圆锥体] ```yaml replace_biome: biome: "minecraft:soul_sand_valley" shape: CONE radius: x: 10 y: 4 z: 4 ``` ## 完整示例 [#完整示例] ```yaml my_item: events: interact: right: replace_biome: biome: "minecraft:cherry_grove" shape: SPHERE radius: blocks_from_center: 5 ``` ## 相关页面 [#相关页面] * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # 替换物品 (/zh/docs/actions/replace-item) ```yaml replace_item: item: my_pack:upgraded_sword copy_durability: true # 可选,默认:false copy_enchantments: true # 可选,默认:false copy_pdc: true # 可选,默认:false ``` 替换目标玩家手持的物品。 普通物品触发器替换主手物品。副手触发器变体(如 `ITEM_INTERACT_OFFHAND`)则替换副手物品 ## 参数 [#参数] ### `item` [#item] 必填。要给予玩家的替换物品。可使用[此列表](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary)中的原版材质、使用 `namespace:id` 或仅 `id` 的自定义 ItemsAdder 物品,或使用 `mmoitems:type:id` 的 MMOItems 物品 不支持 `#minecraft:planks` 等标签,因为该动作必须指定一个具体的物品堆叠 ```yaml replace_item: item: minecraft:diamond_sword ``` ```yaml replace_item: item: my_pack:ruby_sword ``` ```yaml replace_item: item: mmoitems:sword:flame_blade ``` ### `copy_durability` [#copy_durability] 可选。默认为 `false` 如果设为 `true`,则将原物品当前的耐久度损耗复制到替换物品上。仅当两个物品都支持耐久度时生效 ### `copy_enchantments` [#copy_enchantments] 可选。默认为 `false` 如果设为 `true`,则将原物品的所有附魔复制到替换物品上 ### `copy_pdc` [#copy_pdc] 可选。默认为 `false` 如果设为 `true`,则将原物品的持久化数据容器复制到替换物品中。当替换物品上存在相同的键时,原物品的值会覆盖它们 ## 完整示例 [#完整示例] ```yaml my_pack:ruby_sword: events: interact: right: replace_item: item: my_pack:charged_ruby_sword copy_durability: true copy_enchantments: true copy_pdc: true ``` ## 备注 [#备注] * 如果配置的 `item` 无法解析,该动作不会执行任何操作 * 如果动作目标不是玩家,该动作不会执行任何操作 * 支持 `permission`、`delay` 和 `target` 等通用动作参数。参见[动作参数](/zh/docs/actions/parameters) # 替换附近方块 (/zh/docs/actions/replace-near-blocks) ```yaml iaa_replace_near_blocks: from: - minecraft:stone - my_pack:old_ore - "#minecraft:dirt" - "#my_pack:replaceable_blocks" to: minecraft:gold_block shape: SPHERE radius: blocks_from_center: 5 ``` 替换动作目标周围符合条件的方块。必须使用 `iaa_` 前缀;由于 ItemsAdder 已有同名动作,因此 `replace_near_blocks` 不是此动作的别名。 任务会分布到多个服务器 tick 中执行,以减少卡顿。支持 `permission`、`delay` 和 `target` 等现有动作参数。请参阅[动作参数](/zh/docs/actions/parameters)。 ## 参数 [#参数] ### `from` [#from] 必填。包含 1 至 32 个方块 ID 或方块标签的列表。方块的实际 ID 匹配任意一项时即会被替换。 支持的条目: * 原版方块 ID,例如 `minecraft:stone` * ItemsAdder 自定义方块 ID,例如 `my_pack:old_ore` * Minecraft 方块标签,例如 `#minecraft:dirt` * 使用 `type: block` 声明的 ItemsAdderAdditions 自定义标签,例如 `#my_pack:replaceable_blocks` 物品、家具、配方、未知或格式错误的标签会在加载配置时被拒绝。自定义方块的旋转后缀遵循 ItemsAdderAdditions 的常规匹配规则。请参阅[自定义标签](/zh/docs/custom-tags)和 [ID](/zh/docs/compatibility/ids)。 ### `to` [#to] 必填。一个准确的原版方块 ID。 目标可以是空气,也可以是无状态的完整固体方块,例如石头、泥土、木板、矿石或金属块。自定义方块、受重力影响的方块、非固体方块以及带有序列化状态属性的方块会被拒绝。 `from` 可以包含自定义方块。放置原版目标前会通过 ItemsAdder API 移除这些方块,使 ItemsAdder 能够清除已存储的自定义方块状态。如果查找或移除失败,任务会停止,并且不会替换其底层原版方块。 ### `shape` [#shape] 可选。默认值为 `SPHERE`。 支持的形状: * `CUBOID` * `RHOMBUS` * `SPHERE` * `CYLINDER` 四种形状都以解析后的动作目标为中心。此动作不支持方向性形状。 ### `radius` [#radius] 必填。使用统一半径: ```yaml radius: blocks_from_center: 5 ``` 或者分别配置每个轴: ```yaml radius: x: 8 y: 2 z: 8 ``` 存在 `blocks_from_center` 时,它会覆盖 `x`、`y` 和 `z`。缺少的轴默认值为 5。`y: 0` 的 `CYLINDER` 高度为一个方块。 每个半径必须是 0 至 25 的整数。包含边界的包围盒 `(2x + 1) × (2y + 1) × (2z + 1)` 最多可包含 32,768 个坐标。因此,统一半径最大为 15。超出任一限制的配置会被拒绝,而不会被截断。 ## 保护与安全 [#保护与安全] 每次替换前,此动作都会通过 AntiGriefLib 检查该方块的 `BREAK` 和 `PLACE` 权限。此动作的 WorldGuard flag 为 `iaa-action-iaa-replace-near-blocks`。 以下源方块会被跳过: * 方块实体和屏障 * 启用了 ItemsAdderAdditions 行为的自定义方块 * 包含 ItemsAdderAdditions 持久方块数据的方块 * 在保护检查期间状态发生变化的方块 扫描器会在读取方块前检查区块状态,并且不会请求加载未加载的区块。替换方块还要求其周围 3×3 的区块区域均已加载,否则会跳过该方块。此动作不会添加区块加载票。 方块物理保持正常启用,由 Paper 处理相邻方块更新、光照、持久化和客户端同步。方块物理和其他插件的回调可能执行额外工作或间接加载区块;已加载区块规则仅涵盖此动作执行的直接访问。 ## 性能限制 [#性能限制] 所有执行任务共用一个同步队列: * 最多 4 个活动任务 * 每 tick 最多处理 512 个候选坐标 * 每 tick 最多替换 32 个方块 * 每 tick 约 2 ms 的软处理预算 如果已有四个活动任务,新的执行会被忽略。玩家断开连接或插件重载、停用时会取消待处理任务。已经完成的替换会保留在世界中,此动作不会回滚它们。 ## 完整示例 [#完整示例] ```yaml my_pack:replacement_wand: events: interact: right: iaa_replace_near_blocks: from: - minecraft:stone - "#my_pack:replaceable_blocks" to: minecraft:deepslate shape: CYLINDER radius: x: 8 y: 1 z: 8 permission: myserver.replacement-wand ``` ## 相关页面 [#相关页面] * [动作参数](/zh/docs/actions/parameters) * [自定义标签](/zh/docs/custom-tags) * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # 发射火球 (/zh/docs/actions/shoot-fireball) ```yaml shoot_fireball: power: 1 speed: 2.0 # 可选,默认:1.0 fire: false # 可选,默认:true ``` ## 参数 [#参数] ### `power` [#power] 必填。火球的爆炸威力 ### `speed` [#speed] 可选。默认为 `1.0`。弹射物的速度倍率 ### `fire` [#fire] 可选。默认为 `true`。火球撞击时是否产生火焰 # 挥手 (/zh/docs/actions/swing-hand) ```yaml swing_hand: hand: "off_hand" ``` ## 参数 [#参数] ### `hand` [#hand] 可选。默认为 `hand`。要挥动的手:`hand` 或 `off_hand` # 传送 (/zh/docs/actions/teleport) 将动作的目标实体传送到绝对坐标、相对于其当前位置的坐标或命名目的地。 ## 坐标目的地 [#坐标目的地] 三个坐标轴都必须提供。数值保持为绝对坐标,并与现有配置兼容。 ```yaml teleport: x: 100 y: 64 z: -50 ``` 在带引号的坐标前加 `~`,即可使其相对于被传送的实体。`"~"` 保持当前坐标,`"~10"` 增加 10,`"~-2.5"` 减少 2.5。 ```yaml teleport: x: "~10" y: "~" z: "~-2.5" ``` 绝对坐标轴和相对坐标轴可以混合使用: ```yaml teleport: x: 100 y: "~5" z: "~-2" ``` 相对坐标始终以目标实体的当前位置为基准,而不是触发动作的玩家。空白、格式错误、NaN 和无限值都会被拒绝。 ## 命名目的地 [#命名目的地] 使用 `destination` 代替 `x`、`y` 和 `z`。坐标不能与命名目的地同时配置。 ### 世界出生点 [#世界出生点] ```yaml teleport: destination: world_spawn ``` `world_spawn` 使用目标实体当前所在的世界。设置 `world` 可使用另一个已加载世界的出生点: ```yaml teleport: destination: world_spawn world: "world_nether" ``` ### 玩家重生点 [#玩家重生点] ```yaml teleport: destination: respawn ``` `respawn` 使用触发动作的玩家的重生位置,包括床和重生锚。如果玩家没有有效的重生位置,则回退到所配置世界的出生点;省略 `world` 时,回退到玩家当前世界的出生点。 动作仍会传送目标实体。触发动作的玩家仅用于解析重生位置。 ## 可选参数 [#可选参数] ### `yaw` 和 `pitch` [#yaw-和-pitch] 绝对旋转值。使用坐标时,省略的值会保留目标实体当前的旋转;使用命名目的地时,省略的值会保留该目的地的旋转。 ```yaml teleport: destination: respawn yaw: 90.0 pitch: 0.0 ``` ### `world` [#world] 使用坐标或 `world_spawn` 时,默认使用目标实体当前所在的世界。使用 `respawn` 时,仅在玩家没有重生位置时作为回退世界。所配置的世界必须存在并已加载。 # 标题 (/zh/docs/actions/title) ```yaml title: title: "欢迎!" subtitle: "祝你玩得愉快" # 可选 fade_in: 5 # 可选,默认:10 刻 stay: 40 # 可选,默认:70 刻 fade_out: 30 # 可选,默认:20 刻 ``` ## 参数 [#参数] ### `title` [#title] 必填。大标题文本。支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/)、[PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) 和字体图片 ### `subtitle` [#subtitle] 可选。标题下方显示的较小文本。支持 MiniMessage、PlaceholderAPI 和字体图片 ### `fade_in` [#fade_in] 可选。默认为 `10` 刻。淡入持续时间 ### `stay` [#stay] 可选。默认为 `70` 刻。标题在屏幕上停留的时间 ### `fade_out` [#fade_out] 可选。默认为 `20` 刻。淡出持续时间 # 弹窗 (/zh/docs/actions/toast) ```yaml toast: icon: my_item text: - "我的 ItemsAdderAdditions" - "<#E6FBFE>自定义弹窗" frame: "task" # 可选,默认:goal ``` ## 参数 [#参数] ### `icon` [#icon] 必填。作为弹窗图标显示的物品。可使用[此列表](https://jd.papermc.io/paper/org/bukkit/inventory/ItemType.html#field-summary)中的原版材质、使用 `namespace:id` 或仅 `id` 的自定义 ItemsAdder 物品,或使用 `mmoitems:type:id` 的 MMOItems 物品。弹窗图标不支持标签 ### `text` [#text] 必填。弹窗消息。可以是单个字符串或列表(每个条目为一行)。支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/)、[PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) 和字体图片 ### `frame` [#frame] 可选。默认为 `goal`。弹窗样式:`task`、`goal` 或 `challenge` # 连锁采集 (/zh/docs/actions/veinminer) ```yaml veinminer: max_blocks: 16 ``` ## 参数 [#参数] ### `max_blocks` [#max_blocks] 必填。单次连锁采集动作最多破坏的方块数量 # 完成动作 (/zh/docs/advancements/completion-actions) `on_complete` 部分定义了玩家获得进度时会发生什么。支持四种动作类型:音效、标题、动作栏和命令。所有四种类型可以在单个进度中组合使用 ```yaml on_complete: sound: ... title: ... actionbar: ... commands: ... ``` 动作在进度授予后立即触发。对于有多个准则的进度,`on_complete` 在最后一个准则完成时运行一次 *** ## sound [#sound] 在玩家位置播放音效 ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.0 source: master ``` | 键 | 类型 | 默认值 | 描述 | | -------- | --- | -------- | ------------------------------------------------------------------------------------------------- | | `name` | 字符串 | *(必填)* | 音效键(例如 `minecraft:entity.player.levelup`) | | `volume` | 浮点数 | `1.0` | 音量倍率 | | `pitch` | 浮点数 | `1.0` | 音高倍率 | | `source` | 字符串 | `master` | 音频来源类别:`master`、`music`、`record`、`weather`、`block`、`hostile`、`neutral`、`player`、`ambient`、`voice` | *** ## title [#title] 在屏幕上显示标题和可选的副标题 ```yaml on_complete: title: title: "成就达成!" subtitle: "获得了第一把红宝石剑" fade_in: 10 stay: 70 fade_out: 20 ``` | 键 | 类型 | 默认值 | 描述 | | ---------- | --- | ------ | ---------------------------------------------------------------------------------------------- | | `title` | 字符串 | *(必填)* | 大标题文本。支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) 和 PlaceholderAPI | | `subtitle` | 字符串 | `""` | 标题下方较小的文本。支持 MiniMessage 和 PlaceholderAPI | | `fade_in` | 整数 | `10` | 淡入持续时间(以刻为单位,20 刻 = 1 秒) | | `stay` | 整数 | `70` | 标题在屏幕上停留的时间,以刻为单位 | | `fade_out` | 整数 | `20` | 淡出持续时间(以刻为单位) | *** ## actionbar [#actionbar] 向玩家的动作栏发送消息 ```yaml on_complete: actionbar: text: "获得了红宝石剑!" ``` | 键 | 类型 | 必填 | 描述 | | ------ | --- | -- | ------------------------------------- | | `text` | 字符串 | 是 | 动作栏文本。支持 MiniMessage 和 PlaceholderAPI | *** ## commands [#commands] 运行一个或多个命令。每个条目都是一个命名的子部分;名称是任意的,仅用于区分条目 ```yaml on_complete: commands: give_reward: command: "give {player} gold_ingot 4" as_console: true notify: command: "broadcast {player} 获得了红宝石剑成就!" as_console: true ``` | 键 | 类型 | 默认值 | 描述 | | ------------ | --- | ------- | -------------------------------------- | | `command` | 字符串 | *(必填)* | 要运行的命令。`{player}` 会被替换为玩家名称 | | `as_console` | 布尔值 | `false` | 以控制台发送者身份运行。当设为 `false` 时,玩家以其自身权限运行命令 | *** ## 完整示例 [#完整示例] ```yaml on_complete: sound: name: minecraft:entity.player.levelup volume: 1.0 pitch: 1.2 title: title: "成就达成!" subtitle: "获得了第一把红宝石剑" fade_in: 10 stay: 70 fade_out: 20 actionbar: text: "你获得了红宝石剑!" commands: reward_gold: command: "give {player} gold_ingot 4" as_console: true log: command: "say {player} 完成了「第一把红宝石剑」" as_console: true ``` # 配置参考 (/zh/docs/advancements/configuration) 每个进度条目都位于任意 ItemsAdder 内容文件的顶层 `advancements` 键下。IAA 会自动加载包含此键的文件 ```yaml info: namespace: my_pack advancements: <进度ID>: # ... 下方选项 ``` ## 顶层选项 [#顶层选项] | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `enabled` | 布尔值 | `true` | 设置为 `false` 可跳过此进度,而无需从文件中移除 | | `parent` | 字符串 | *(无)* | 父进度 ID。省略此项可使此进度成为根(标签)进度。参见[父进度](#父进度) | | `display` | 配置节 | *(必填)* | 视觉设置。参见[显示](#显示)。 | | `criteria` | 配置节 | *(无)* | 完成进度必须满足的准则。每个准则都有一个触发器、触发器特定的准则,以及可选的 `conditions.player` 谓词。参见[触发器](/zh/docs/advancements/triggers)和[玩家谓词](/zh/docs/advancements/player-predicates) | | `rewards` | 配置节 | *(无)* | 经验值、战利品表和配方解锁。参见[奖励](#奖励) | | `on_complete` | 配置节 | *(无)* | 进度完全完成时执行的动作。参见[完成动作](/zh/docs/advancements/completion-actions) | ## 父进度 [#父进度] ```yaml parent: root # 与此文件相同的命名空间,解析为 my_pack:root parent: otherns:someroot # 显式命名空间 ``` 如果 `parent` 不包含冒号,则会自动添加文件的命名空间作为前缀。如果完全省略 `parent`,此进度将成为根进度并在进度界面中创建一个新的标签 ## 显示 [#显示] ```yaml display: title: "第一把红宝石剑" description: "获得你的第一把自定义剑" icon: my_pack:ruby_sword frame: task background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: true announce_to_chat: true hidden: false ``` | 键 | 类型 | 默认值 | 描述 | | ------------------ | -------------- | ------------------- | ---------------------------------------------------------------------------- | | `title` | 字符串 | *(必填)* | 进度标题。支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) | | `description` | 字符串 | `""` | 提示框描述。支持 MiniMessage | | `icon` | `namespace:id` | `minecraft:barrier` | 用作图标的物品。接受 ItemsAdder 物品 ID、MMOItems ID 或原版材质 ID。不支持标签,因为图标必须解析为一个具体的物品 | | `frame` | 字符串 | `task` | 图标边框形状:`task`、`goal` 或 `challenge` | | `background` | 字符串 | *(无)* | **仅限根进度。** 标签背景的纹理路径(例如 `minecraft:gui/advancements/backgrounds/adventure`) | | `show_toast` | 布尔值 | `true` | 完成时显示弹窗通知 | | `announce_to_chat` | 布尔值 | `true` | 在聊天中向所有玩家广播完成消息 | | `hidden` | 布尔值 | `false` | 在完成之前隐藏此进度 | `background` 是使进度创建新标签的关键。它仅用于根进度(没有 `parent` 的进度) ## 准则 [#准则] 每个准则都有一个 `trigger` 和一个可选的 `conditions` 部分。触发器特定的选项直接放在 `conditions` 下。你还可以为任意运行时触发器添加 `player` 谓词,以要求在授予准则之前进行额外的玩家状态检查 ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true high_fall: trigger: fall_from_height conditions: distance: y: min: 30 ``` | 键 | 类型 | 默认值 | 描述 | | ------------------- | ------ | ------------ | ----------------------------------------------------------------------------------------- | | `trigger` | 字符串 | `impossible` | 此准则的触发器类型。参见完整的[触发器参考](/zh/docs/advancements/triggers) | | `conditions` | 配置节 | *(无)* | 触发器特定的选项,外加可选的 `player` 谓词 | | `conditions.player` | 配置节或列表 | *(任意玩家)* | 在即将授予准则时检查的额外玩家谓词。`impossible` 触发器会忽略此项。参见[玩家谓词](/zh/docs/advancements/player-predicates) | 子进度至少需要一个有效的准则。根进度可以省略 `criteria`;IAA 会创建一个内部根准则并自动授予,以便进度标签能够显示 ## 奖励 [#奖励] ```yaml rewards: experience: 50 loot: - minecraft:chests/simple_dungeon recipes: - my_pack:ruby_sword_recipe - minecraft:golden_apple ``` | 键 | 类型 | 默认值 | 描述 | | ------------ | ----- | ---- | ------------------------------------------- | | `experience` | 整数 | `0` | 完成时授予的经验点数 | | `loot` | 字符串列表 | `[]` | 完成时调用的战利品表键 | | `recipes` | 字符串列表 | `[]` | 要解锁的配方键。接受 `namespace:id` 或纯 `id`(使用文件命名空间) | ## 完整示例 [#完整示例] ```yaml info: namespace: my_pack advancements: root: display: title: "我的服务器" description: "我的服务器的自定义成就" icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false frame: task first_ruby_sword: parent: root display: title: "第一把红宝石剑" description: "获得你的第一把自定义剑" icon: my_pack:ruby_sword frame: task show_toast: true announce_to_chat: true criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword amount: 1 on_complete: sound: name: minecraft:entity.player.levelup title: title: "成就达成!" subtitle: "获得了第一把红宝石剑" commands: reward: command: "give {player} gold_ingot 4" as_console: true master_crafter: parent: my_pack:root display: title: "锻造大师" description: "制作剑、盾牌和药水" icon: minecraft:crafting_table frame: goal criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe craft_shield: trigger: craft_recipe conditions: recipe: my_pack:ruby_shield_recipe craft_potion: trigger: craft_recipe conditions: recipe: my_pack:ruby_potion_recipe rewards: experience: 100 loot: - minecraft:chests/simple_dungeon ``` 多准则进度(如上方的 `master_crafter`)需要完成所有准则。每个准则都会被独立追踪,进度由原版保存。从 ItemsAdderAdditions 1.0.12 起,如果进度定义未更改,`/iareload` 会保留现有注册和玩家进度;更改定义后可能需要重新注册该进度。 # 自定义进度 (/zh/docs/advancements) 直接在 ItemsAdder 内容 YML 文件中定义自定义 Minecraft 进度树,无需数据包,无需重启。添加一个 `advancements` 部分并运行 `/iareload` 即可 ## 功能 [#功能] * 使用自定义背景纹理创建**新的进度标签** * 通过将进度相互关联来构建**树状结构** * 使用 **49 种内置触发器类型**(获取物品、合成配方、击杀实体、进入生物群系、加入服务器、家具检查、玩家状态检查等) * 在进度完成时执行**完成动作**(标题、音效、命令、动作栏消息) * 为任意准则添加可选的**玩家谓词**,如潜行、游戏模式、等级、物品栏槽位、药水效果、位置等 * 授予**经验值、战利品表和配方解锁**作为奖励 * 玩家进度在重载后持久保留 ## 基本结构 [#基本结构] ```yaml info: namespace: my_pack advancements: root: # 根进度 display: title: "我的服务器" description: "我的服务器的成就" icon: minecraft:nether_star background: "minecraft:gui/advancements/backgrounds/adventure" show_toast: false announce_to_chat: false first_sword: parent: root display: title: "第一把红宝石剑" description: "获得你的第一把自定义剑" icon: my_pack:ruby_sword frame: task criteria: obtain: trigger: obtain_item conditions: items: - my_pack:ruby_sword on_complete: sound: name: minecraft:entity.player.levelup title: title: "成就达成!" subtitle: "获得了第一把红宝石剑" ``` ## 工作原理 [#工作原理] IAA 会加载每个包含 `advancements` 部分的内容文件。每个条目都会通过 NMS 在运行时注入为一个 Minecraft 进度。玩家进度由原版存储在世界的存档文件中,并在重载后持久保留。没有准则的根进度会被自动授予,以便玩家在加入或重载后能看到其标签 根进度(没有 `parent`)会在进度界面中创建一个新标签。子进度在树状结构中与其父进度在视觉上相连 同一文件中的所有进度共享相同的 `info.namespace`。支持使用 `namespace:id` 格式跨命名空间的父进度 # 玩家谓词 (/zh/docs/advancements/player-predicates) 玩家谓词允许你在触发器之外为准则添加额外的要求。将它们放置在 `conditions.player` 下。触发器必须首先触发,然后在授予准则之前立即检查玩家谓词 ```yaml criteria: sneaky_sleep: trigger: slept_in_bed conditions: player: flags: is_sneaking: true ``` `conditions.player` 适用于运行时触发器。`impossible` 触发器会忽略玩家谓词,因为它只能手动授予 ## 对象和列表格式 [#对象和列表格式] 当你只需要一个谓词时,使用单个对象。对象内的所有键都必须匹配 ```yaml conditions: player: type: minecraft:player flags: is_sneaking: true type_specific: type: minecraft:player gamemode: survival ``` 你也可以使用列表。列表中的每个条目都必须匹配。如果你偏好原版风格的谓词包装器,这种方式会很有用 ```yaml conditions: player: - condition: minecraft:entity_properties predicate: flags: is_sneaking: true - condition: minecraft:entity_properties predicate: type_specific: type: minecraft:player gamemode: survival ``` ## 范围语法 [#范围语法] 数值接受一个精确数字或 `min`/`max` 对象 ```yaml level: 10 level: min: 10 max: 30 ``` 此语法适用于玩家等级、饱食度、移动速度、药水持续时间、附魔等级、物品数量、耐久度、光照等级以及其他数值检查 ## 常用玩家检查 [#常用玩家检查] ```yaml conditions: player: flags: is_sneaking: true is_sprinting: false type_specific: type: minecraft:player gamemode: adventure level: min: 10 food: level: min: 16 saturation: min: 4.0 ``` | 键 | 类型 | 描述 | | ------------------------------- | ------ | ----------------------------------------------------------- | | `flags.is_baby` | 布尔值 | 当实体支持时,匹配幼年/成年状态 | | `flags.is_on_fire` | 布尔值 | 要求玩家着火或未着火 | | `flags.is_sneaking` | 布尔值 | 要求潜行状态 | | `flags.is_sprinting` | 布尔值 | 要求疾跑状态 | | `flags.is_swimming` | 布尔值 | 要求游泳状态 | | `flags.is_on_ground` | 布尔值 | 要求在地面上 | | `flags.is_flying` | 布尔值 | 匹配创造模式飞行或滑翔 | | `flags.is_fall_flying` | 布尔值 | 要求鞘翅滑翔状态 | | `type_specific.gamemode` | 字符串或列表 | 匹配一种或多种游戏模式:`survival`、`creative`、`adventure` 或 `spectator` | | `type_specific.level` | 数字或范围 | 匹配玩家的经验等级 | | `type_specific.food.level` | 数字或范围 | 匹配饱食度 | | `type_specific.food.saturation` | 数字或范围 | 匹配饱和度 | `gamemode`、`level`、`food`、`advancements`、`recipes`、`stats`、`input` 和 `looking_at` 也可以直接放在 `player` 内部,但 `type_specific` 更清晰,也更接近原版谓词结构 ## 输入检查 [#输入检查] 当服务器暴露这些信息时,输入谓词可以检查玩家当前的移动输入。当直接输入数据不可用时,`sneak` 和 `sprint` 会回退到 Bukkit 的玩家状态 ```yaml conditions: player: type_specific: type: minecraft:player input: forward: true jump: true sneak: false sprint: true ``` | 键 | 类型 | 描述 | | ---------------- | --- | ----------- | | `input.forward` | 布尔值 | 要求前进键状态 | | `input.backward` | 布尔值 | 要求后退键状态 | | `input.left` | 布尔值 | 要求左移键状态 | | `input.right` | 布尔值 | 要求右移键状态 | | `input.jump` | 布尔值 | 要求跳跃键状态 | | `input.sneak` | 布尔值 | 要求潜行输入或潜行状态 | | `input.sprint` | 布尔值 | 要求疾跑输入或疾跑状态 | ## 位置检查 [#位置检查] ```yaml conditions: player: location: dimension: minecraft:overworld world: world biomes: - minecraft:plains - minecraft:forest position: x: min: 100 max: 200 y: min: 60 z: 0 block: blocks: minecraft:grass_block light: min: 8 can_see_sky: true structures: - minecraft:village_plains - customstructures:ancient_temple ``` | 键 | 类型 | 描述 | | ----------------------------------- | ------ | ---------------------------------------------------------------------------- | | `location.dimension` / `dimensions` | 字符串或列表 | 匹配世界环境,例如 `minecraft:overworld`、`minecraft:the_nether` 或 `minecraft:the_end` | | `location.world` | 字符串 | 匹配 Bukkit 世界名称 | | `location.biome` / `biomes` | 字符串或列表 | 匹配生物群系键 | | `location.position.x` | 数字或范围 | 匹配 X 坐标 | | `location.position.y` | 数字或范围 | 匹配 Y 坐标 | | `location.position.z` | 数字或范围 | 匹配 Z 坐标 | | `location.block` | 方块谓词 | 匹配该位置的方块 | | `location.light` | 数字或范围 | 匹配方块光照等级 | | `location.can_see_sky` | 布尔值 | 要求天空可见性 | | `location.structure` / `structures` | 字符串或列表 | 匹配原版结构或 Custom Structures 结构;列表中任意一个结构匹配即可。 | 原版结构使用 `minecraft:village_plains` 等注册表键。自定义结构使用 `customstructures:`(也接受 `custom_structures:` 别名),并需要 ItemsAdderAdditions 1.0.12 或更高版本以及 Custom Structures 插件。请见 [Custom Structures 兼容性](/zh/docs/compatibility/customstructures)。 ## 方块谓词 [#方块谓词] 方块谓词由 `location.block`、`stepping_on` 和 `movement_affected_by` 使用 ```yaml conditions: player: stepping_on: block: blocks: minecraft:stone state: axis: y ``` | 键 | 类型 | 描述 | | --------------- | ------- | ------------------------- | | `block` | 字符串或配置节 | 单个方块的简写形式,或完整的方块谓词配置节 | | `blocks` / `id` | 字符串或列表 | 要匹配的方块 ID | | `state.` | 字符串或范围 | 精确匹配方块状态值,或使用 `min`/`max` | ItemsAdderAdditions 自定义方块标签会优先解析。如果没有对应自定义标签,`#minecraft:logs` 等方块标签语法会根据原版方块标签解析。原版标签仅匹配原版方块 ## 物品和装备谓词 [#物品和装备谓词] 物品谓词可用于 `equipment`、`slots` 和嵌套实体谓词。它们接受 ItemsAdder ID、MMOItems ID、原版物品 ID、原版物品标签(如 `#minecraft:planks`)以及受支持的自定义标签 ```yaml conditions: player: equipment: mainhand: items: my_pack:ruby_sword count: 1 durability: min: 100 components: minecraft:custom_model_data: 123 enchantments: - enchantment: minecraft:sharpness levels: min: 3 ``` | 键 | 类型 | 描述 | | ---------------------------------------- | ------ | --------------------------- | | `item` / `items` | 字符串或列表 | 要匹配的物品 ID。普通字符串可用作单个物品的简写形式 | | `count` | 数字或范围 | 匹配堆叠数量 | | `durability` | 数字或范围 | 匹配剩余耐久度 | | `components.minecraft:custom_model_data` | 整数 | 匹配自定义模型数据 | | `components.minecraft:custom_name` | 字符串 | 匹配物品的显示名称 | | `components.minecraft:damage` | 整数 | 匹配物品伤害值 | | `enchantments[].enchantment` / `id` | 字符串 | 附魔键 | | `enchantments[].levels` | 数字或范围 | 所需的附魔等级 | ItemsAdderAdditions 自定义物品标签会优先解析。如果没有对应自定义标签,原版物品标签会根据原版物品注册表解析。物品 `predicates` 部分仍然不受支持,并且会使物品谓词匹配失败,而不是意外匹配 ## 槽位 [#槽位] 当你需要检查玩家的物品栏而不仅仅是已装备的物品时,请使用 `slots` ```yaml conditions: player: slots: weapon.mainhand: items: minecraft:diamond_sword inventory.0: items: minecraft:apple count: 2 hotbar.2: items: my_pack:ruby_staff ``` | 槽位键 | 描述 | | ---------------------------------------------- | ----------------- | | `mainhand` 或 `weapon.mainhand` | 主手物品 | | `offhand` 或 `weapon.offhand` | 副手物品 | | `head` 或 `armor.head` | 头盔槽位 | | `chest` 或 `armor.chest` | 胸甲槽位 | | `legs` 或 `armor.legs` | 护腿槽位 | | `feet` 或 `armor.feet` | 靴子槽位 | | `*`、`inventory.*`、`container.*` | 任意玩家物品栏槽位 | | `hotbar.` | 快捷栏槽位,从 `0` 到 `8` | | `inventory.` 或 `inventory.-` | 主物品栏槽位,在快捷栏之后偏移 | | `container.` 或 `container.-` | 原始容器槽位编号 | ## 药水效果 [#药水效果] ```yaml conditions: player: effects: minecraft:speed: amplifier: min: 1 duration: min: 100 ambient: false visible: true ``` | 键 | 类型 | 描述 | | ---------------------------- | ----- | --------------- | | `effects..amplifier` | 数字或范围 | 匹配药水等级 | | `effects..duration` | 数字或范围 | 匹配剩余持续时间(以刻为单位) | | `effects..ambient` | 布尔值 | 匹配环境效果标志 | | `effects..visible` | 布尔值 | 匹配粒子可见性 | ## 进度、配方和统计 [#进度配方和统计] ```yaml conditions: player: type_specific: type: minecraft:player advancements: minecraft:story/mine_stone: true my_pack:custom_root: root_trigger: true recipes: minecraft:diamond_sword: true stats: - type: minecraft:custom stat: minecraft:jump value: min: 50 ``` | 键 | 类型 | 描述 | | ------------------- | ------- | ------------------------------------------------------------------------------------------------------- | | `advancements.` | 布尔值或配置节 | 要求另一个进度已完成或未完成。配置节检查命名的准则 | | `recipes.` | 布尔值 | 要求配方已发现或未发现 | | `stats[].type` | 字符串 | 统计组,例如 `minecraft:custom`、`minecraft:mined`、`minecraft:used`、`minecraft:killed` 或 `minecraft:killed_by` | | `stats[].stat` | 字符串 | 统计键、材质键或实体键,取决于统计类型 | | `stats[].value` | 数字或范围 | 所需的统计值 | ## 嵌套实体检查 [#嵌套实体检查] 相同的实体谓词系统可用于相关实体 ```yaml conditions: player: type_specific: type: minecraft:player looking_at: type: minecraft:zombie distance: absolute: max: 12 vehicle: type: minecraft:horse ``` | 键 | 类型 | 描述 | | -------------------------- | ---- | ----------------------------------------------------- | | `passenger` | 实体谓词 | 匹配玩家的一个乘客 | | `vehicle` | 实体谓词 | 匹配玩家正在骑乘的实体 | | `targeted_entity` | 实体谓词 | 对于生物,匹配其当前目标 | | `type_specific.looking_at` | 实体谓词 | 对于玩家,匹配其在 100 格范围内注视的实体 | | `distance` | 配置节 | 匹配玩家到相关实体的距离。支持 `absolute`、`horizontal`、`x`、`y` 和 `z` | ## 其他类型特定谓词 [#其他类型特定谓词] 嵌套实体谓词还可以使用一些特定于实体的检查 | 类型 | 键 | 描述 | | ------------------------------------------------------------- | ----------------------- | ----------------- | | `minecraft:sheep` | `sheared` | 匹配羊是否被剪毛 | | `minecraft:slime`、`minecraft:magma_cube`、`minecraft:cube_mob` | `size` | 使用数字或范围匹配史莱姆大小 | | `minecraft:raider` | `is_captain`、`has_raid` | 当可用时,匹配巡逻队队长和袭击状态 | | `minecraft:fishing_hook` | `in_open_water` | 当可用时,匹配鱼钩的开放水域状态 | ## 限制 [#限制] * 实体类型标签在语法上被接受但不会被解析。原版物品和方块标签在支持物品/方块谓词的地方会被解析 * 实体级别的 `components` 和 `predicates` 部分不受支持,并且会使谓词匹配失败 * NBT 匹配被有意限制;它仅支持 `nbt` 字符串内的简单记分板标签检查 # 触发器 (/zh/docs/advancements/triggers) 触发器定义了玩家必须执行的操作才能完成一个准则。每个准则都有一个触发器和一个可选的 `conditions` 块 ```yaml criteria: <准则ID>: trigger: <触发器类型> conditions: # 触发器特定选项 ``` 一个进度可以有多个准则。所有准则都必须完成,进度才会被授予。每个运行时触发器还支持可选的 `conditions.player` 谓词,用于额外的玩家状态要求;参见[玩家谓词](/zh/docs/advancements/player-predicates)。物品准则支持 ItemsAdder ID、MMOItems ID、原版物品 ID、原版标签以及受支持的自定义标签。方块、家具和配方准则在对应触发器支持时也可以使用自定义标签 ## obtain\_item [#obtain_item] 当玩家从地上捡起物品时触发 ```yaml criteria: get_sword: trigger: obtain_item conditions: items: - my_pack:ruby_sword - my_pack:iron_sword amount: 1 ``` | 键 | 类型 | 默认值 | 描述 | | -------- | ----- | ---- | ------------------------------------------------------------ | | `items` | 字符串列表 | `[]` | 物品 ID 或原版物品标签(IA、MMOItems、原版或 `#minecraft:tag`)。匹配任意一个即可触发准则 | | `amount` | 整数 | `1` | 玩家必须一次性捡起的最小堆叠数量 | *** ## consume\_item [#consume_item] 当玩家食用或饮用完一个物品时触发 ```yaml criteria: eat_ruby_apple: trigger: consume_item conditions: item: my_pack:ruby_apple ``` | 键 | 类型 | 必填 | 描述 | | ------ | --- | -- | ----------------------------------------------- | | `item` | 字符串 | 是 | 物品 ID 或原版物品标签(IA、MMOItems、原版或 `#minecraft:tag`) | *** ## using\_item [#using_item] 当玩家手持物品右键点击(对着空气或方块)时触发 ```yaml criteria: use_staff: trigger: using_item conditions: item: my_pack:ruby_staff ``` | 键 | 类型 | 必填 | 描述 | | ------ | --- | -- | ----------------------------------------------- | | `item` | 字符串 | 是 | 物品 ID 或原版物品标签(IA、MMOItems、原版或 `#minecraft:tag`) | *** ## place\_block [#place_block] 当玩家放置 ItemsAdder 自定义方块或原版方块时触发 ```yaml criteria: place_ruby_ore: trigger: place_block conditions: block: my_pack:ruby_ore ``` | 键 | 类型 | 必填 | 描述 | | ------- | --- | -- | ---------------------------------------------------- | | `block` | 字符串 | 是 | ItemsAdder 方块 ID、原版方块 ID 或原版方块标签,如 `#minecraft:logs` | *** ## break\_block [#break_block] 当玩家破坏 ItemsAdder 自定义方块或原版方块时触发 ```yaml criteria: mine_ruby_ore: trigger: break_block conditions: block: my_pack:ruby_ore ``` | 键 | 类型 | 必填 | 描述 | | ------- | --- | -- | ---------------------------------------------------- | | `block` | 字符串 | 是 | ItemsAdder 方块 ID、原版方块 ID 或原版方块标签,如 `#minecraft:logs` | *** ## place\_furniture [#place_furniture] 当玩家放置自定义家具物品时触发 ```yaml criteria: place_lamp: trigger: place_furniture conditions: furniture: my_pack:ruby_lamp ``` | 键 | 类型 | 必填 | 描述 | | ----------- | --- | -- | -------------------------------- | | `furniture` | 字符串 | 是 | ItemsAdder 家具 ID(`namespace:id`) | *** ## break\_furniture [#break_furniture] 当玩家破坏自定义家具物品时触发 ```yaml criteria: break_lamp: trigger: break_furniture conditions: furniture: my_pack:ruby_lamp ``` | 键 | 类型 | 必填 | 描述 | | ----------- | --- | -- | -------------------------------- | | `furniture` | 字符串 | 是 | ItemsAdder 家具 ID(`namespace:id`) | *** ## interact\_furniture [#interact_furniture] 当玩家右键点击自定义家具物品时触发 ```yaml criteria: use_workbench: trigger: interact_furniture conditions: furniture: my_pack:ruby_workbench ``` | 键 | 类型 | 必填 | 描述 | | ----------- | --- | -- | -------------------------------- | | `furniture` | 字符串 | 是 | ItemsAdder 家具 ID(`namespace:id`) | *** ## craft\_recipe [#craft_recipe] 当玩家使用特定的 IAA 配方合成物品时触发 ```yaml criteria: craft_sword: trigger: craft_recipe conditions: recipe: my_pack:ruby_sword_recipe ``` | 键 | 类型 | 必填 | 描述 | | -------- | --- | -- | ---------------------------------------- | | `recipe` | 字符串 | 是 | 配方键,格式为 `namespace:id` 或纯 `id`(使用文件命名空间) | *** ## kill\_entity\_with\_item [#kill_entity_with_item] 当玩家手持特定物品击杀实体时触发 ```yaml criteria: slay_zombie: trigger: kill_entity_with_item conditions: item: my_pack:ruby_sword entity_type: minecraft:zombie # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | ------------------------------------------- | | `item` | 字符串 | *(必填)* | 玩家必须手持的物品 ID 或原版物品标签 | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键(例如 `minecraft:zombie`)。如果省略,任意实体均匹配 | *** ## player\_hurt\_entity [#player_hurt_entity] 当玩家对实体造成伤害时触发。与 `kill_entity_with_item` 不同,此触发器在每次攻击时都会触发,而不仅仅是击杀的那一击 ```yaml criteria: hit_zombie: trigger: player_hurt_entity conditions: item: my_pack:ruby_sword # 可选 entity_type: minecraft:zombie # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | -------------------------------------- | | `item` | 字符串 | *(任意)* | 玩家必须手持的物品 ID 或原版物品标签。如果省略,任意物品(或空手)均匹配 | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意实体均匹配 | *** ## entity\_hurt\_player [#entity_hurt_player] 当实体对玩家造成伤害时触发 ```yaml criteria: hurt_by_zombie: trigger: entity_hurt_player conditions: entity_type: minecraft:zombie # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | --------------------- | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意攻击者均匹配 | *** ## player\_killed\_entity [#player_killed_entity] 当玩家击杀实体时触发(无论使用何种武器) ```yaml criteria: kill_creeper: trigger: player_killed_entity conditions: entity_type: minecraft:creeper # 可选 item: my_pack:ruby_sword # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | ------------------------- | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意实体均匹配 | | `item` | 字符串 | *(任意)* | 玩家必须手持的物品 ID。如果省略,任意物品均匹配 | *** ## entity\_killed\_player [#entity_killed_player] 当玩家被非玩家实体击杀时触发(弹射物击杀会解析为发射者) ```yaml criteria: killed_by_skeleton: trigger: entity_killed_player conditions: entity_type: minecraft:skeleton # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | ------------------------ | | `entity_type` | 字符串 | *(任意)* | 击杀者的原版实体类型键。如果省略,任意实体均匹配 | *** ## killed\_by\_arrow [#killed_by_arrow] 当玩家被箭矢击杀时触发。实体类型匹配箭矢的发射者,如果箭矢没有发射者,则匹配箭矢本身 ```yaml criteria: shot_by_skeleton: trigger: killed_by_arrow conditions: entity_type: minecraft:skeleton # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | -------------------------- | | `entity_type` | 字符串 | *(任意)* | 发射者的原版实体类型键。如果省略,任意箭矢来源均匹配 | *** ## tame\_animal [#tame_animal] 当玩家驯服动物时触发 ```yaml criteria: tame_wolf: trigger: tame_animal conditions: entity_type: minecraft:wolf # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | ----------------------- | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意可驯服动物均匹配 | *** ## bred\_animals [#bred_animals] 当玩家繁殖两只动物时触发 ```yaml criteria: breed_cows: trigger: bred_animals conditions: entity_type: minecraft:cow # 可选,后代的类型 parent_type: minecraft:cow # 可选 partner_type: minecraft:cow # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | -------------- | --- | ------ | ------- | | `entity_type` | 字符串 | *(任意)* | 后代的实体类型 | | `parent_type` | 字符串 | *(任意)* | 母方的实体类型 | | `partner_type` | 字符串 | *(任意)* | 父方的实体类型 | *** ## villager\_trade [#villager_trade] 当玩家与村民完成交易时触发 ```yaml criteria: buy_diamond: trigger: villager_trade conditions: item: minecraft:diamond # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ----------------------- | | `item` | 字符串 | *(任意)* | 交易结果的物品 ID。如果省略,任意交易均匹配 | *** ## enchanted\_item [#enchanted_item] 当玩家在附魔台上为物品附魔时触发 ```yaml criteria: enchant_ruby_sword: trigger: enchanted_item conditions: item: my_pack:ruby_sword # 可选 min_levels: 10 # 可选 max_levels: 30 # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------ | --- | ------- | ---------------------- | | `item` | 字符串 | *(任意)* | 物品 ID。如果省略,任意被附魔的物品均匹配 | | `min_levels` | 整数 | `0` | 附魔消耗的最低 XP 等级 | | `max_levels` | 整数 | *(无限制)* | 附魔消耗的最高 XP 等级 | *** ## shoot\_bow [#shoot_bow] 当玩家用弓射出弹射物时触发 ```yaml criteria: shoot_ruby_bow: trigger: shoot_bow conditions: item: my_pack:ruby_bow # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ------------------- | | `item` | 字符串 | *(任意)* | 弓的物品 ID。如果省略,任意弓均匹配 | *** ## shot\_crossbow [#shot_crossbow] 当玩家用弩射出弹射物时触发 ```yaml criteria: shoot_crossbow: trigger: shot_crossbow conditions: item: my_pack:ruby_crossbow # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ------------------- | | `item` | 字符串 | *(任意)* | 弩的物品 ID。如果省略,任意弩均匹配 | *** ## fishing\_rod\_hooked [#fishing_rod_hooked] 当玩家收回钓竿钓到鱼或钩住实体时触发 ```yaml criteria: hook_fish: trigger: fishing_rod_hooked conditions: rod: my_pack:ruby_rod # 可选 caught_entity_type: minecraft:cod # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | -------------------- | --- | ------ | ----------------------- | | `rod` | 字符串 | *(任意)* | 钓鱼竿的物品 ID。如果省略,任意钓鱼竿均匹配 | | `caught_entity_type` | 字符串 | *(任意)* | 被钩住的实体类型。如果省略,任意捕获物均匹配 | *** ## filled\_bucket [#filled_bucket] 当玩家用桶盛装液体时触发 ```yaml criteria: fill_lava: trigger: filled_bucket conditions: item: minecraft:lava_bucket # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ---------------------------------- | | `item` | 字符串 | *(任意)* | 盛装后桶的物品 ID 或原版物品标签。如果省略,任意已盛装的桶均匹配 | *** ## item\_durability\_changed [#item_durability_changed] 当玩家手中的物品消耗耐久度时触发 ```yaml criteria: damage_ruby_sword: trigger: item_durability_changed conditions: item: my_pack:ruby_sword # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ------------------------------- | | `item` | 字符串 | *(任意)* | 受损物品的物品 ID 或原版物品标签。如果省略,任意物品均匹配 | *** ## item\_used\_on\_block [#item_used_on_block] 当玩家手持物品右键点击方块时触发 ```yaml criteria: use_on_crafting_table: trigger: item_used_on_block conditions: item: my_pack:ruby_wand # 可选 block: minecraft:crafting_table # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------- | --- | ------ | -------------------------------- | | `item` | 字符串 | *(任意)* | 玩家必须手持的物品 ID 或原版物品标签 | | `block` | 字符串 | *(任意)* | ItemsAdder 方块 ID、原版方块 ID 或原版方块标签 | *** ## recipe\_crafted [#recipe_crafted] 当玩家使用原版合成系统合成任意物品时触发 ```yaml criteria: craft_diamond_sword: trigger: recipe_crafted conditions: recipe: minecraft:diamond_sword # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | -------- | --- | ------ | ------------------------------------- | | `recipe` | 字符串 | *(任意)* | 配方键,格式为 `namespace:id`。如果省略,任意合成操作均匹配 | *** ## recipe\_unlocked [#recipe_unlocked] 当玩家发现新配方时触发 ```yaml criteria: unlock_diamond_sword: trigger: recipe_unlocked conditions: recipe: minecraft:diamond_sword # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | -------- | --- | ------ | --------------------------------------- | | `recipe` | 字符串 | *(任意)* | 配方键,格式为 `namespace:id`。如果省略,任意已发现的配方均匹配 | *** ## player\_interacted\_with\_entity [#player_interacted_with_entity] 当玩家用主手右键点击实体时触发 ```yaml criteria: name_a_villager: trigger: player_interacted_with_entity conditions: entity_type: minecraft:villager # 可选 item: minecraft:name_tag # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | -------------------------------------- | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意实体均匹配 | | `item` | 字符串 | *(任意)* | 玩家必须手持的物品 ID 或原版物品标签。如果省略,任意物品(或空手)均匹配 | *** ## player\_sheared\_equipment [#player_sheared_equipment] 当玩家为实体剪毛时触发 ```yaml criteria: shear_sheep: trigger: player_sheared_equipment conditions: entity_type: minecraft:sheep # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | ----------------------- | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意可剪毛实体均匹配 | *** ## bee\_nest\_destroyed [#bee_nest_destroyed] 当玩家破坏蜂箱或蜂巢时触发 ```yaml criteria: break_beehive: trigger: bee_nest_destroyed conditions: block: minecraft:beehive # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------- | --- | ------ | -------------------------------------------------------------------------- | | `block` | 字符串 | *(任意)* | 方块 ID 或原版方块标签(`minecraft:beehive`、`minecraft:bee_nest` 或标签)。如果省略,任意蜂巢方块均匹配 | *** ## started\_riding [#started_riding] 当玩家骑乘实体时触发 ```yaml criteria: ride_horse: trigger: started_riding conditions: entity_type: minecraft:horse # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------------- | --- | ------ | -------------------- | | `entity_type` | 字符串 | *(任意)* | 原版实体类型键。如果省略,任意坐骑均匹配 | *** ## effects\_changed [#effects_changed] 当玩家获得药水效果或药水效果发生变化时触发 ```yaml criteria: get_speed: trigger: effects_changed conditions: effect: minecraft:speed # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | -------- | --- | ------ | ---------------------------------------------- | | `effect` | 字符串 | *(任意)* | 药水效果键(例如 `minecraft:speed`)。如果省略,任意效果的添加或更改均匹配 | *** ## changed\_dimension [#changed_dimension] 当玩家改变世界环境时触发 ```yaml criteria: enter_nether: trigger: changed_dimension conditions: to: nether # 可选 from: normal # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ------------------------------------------ | | `to` | 字符串 | *(任意)* | 目标 Bukkit 环境:`normal`、`nether` 或 `the_end` | | `from` | 字符串 | *(任意)* | 来源 Bukkit 环境:`normal`、`nether` 或 `the_end` | *** ## slept\_in\_bed [#slept_in_bed] 当玩家成功进入床时触发。无准则选项 ```yaml criteria: first_sleep: trigger: slept_in_bed ``` *** ## used\_totem [#used_totem] 当玩家被不死图腾从死亡中拯救时触发。无准则选项 ```yaml criteria: totem_pop: trigger: used_totem ``` *** ## fall\_from\_height [#fall_from_height] 当玩家受到摔落伤害时触发 ```yaml criteria: survived_fall: trigger: fall_from_height conditions: distance: y: min: 30 max: 320 ``` 你也可以使用单个数字作为最小摔落距离: ```yaml criteria: small_fall: trigger: fall_from_height conditions: distance: 8 ``` | 键 | 类型 | 默认值 | 描述 | | --------------------- | ------ | -------- | -------------------------------------------------------------------------- | | `distance` | 数字或配置节 | `0` 到无限制 | 摔落距离范围。一个数字表示最小距离。配置节可使用 `min`/`max`,或嵌套的 `y`、`absolute` 或 `horizontal` 范围 | | `distance.min` | 数字 | `0` | 最小摔落距离 | | `distance.max` | 数字 | *(无限制)* | 最大摔落距离 | | `distance.y` | 配置节 | *(无)* | 垂直摔落距离的首选范围形式。支持 `min` 和 `max` | | `distance.absolute` | 配置节 | *(无)* | 备选范围形式。支持 `min` 和 `max` | | `distance.horizontal` | 配置节 | *(无)* | 备选范围形式。支持 `min` 和 `max` | *** ## used\_ender\_eye [#used_ender_eye] 当玩家投掷末影之眼时触发。无准则选项 ```yaml criteria: use_ender_eye: trigger: used_ender_eye ``` *** ## held\_item [#held_item] IAA 自定义触发器。当玩家滚动到包含物品的快捷栏槽位时触发 ```yaml criteria: equip_ruby_sword: trigger: held_item conditions: item: my_pack:ruby_sword # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------ | --- | ------ | ---------------------- | | `item` | 字符串 | *(任意)* | 物品 ID。如果省略,滚动到的任意物品均匹配 | *** ## permission [#permission] 当玩家加入时,如果拥有指定的权限节点,则触发 ```yaml criteria: has_vip: trigger: permission conditions: permission: "myserver.rank.vip" ``` | 键 | 类型 | 必填 | 描述 | | ------------ | --- | -- | -------------------------- | | `permission` | 字符串 | 是 | 权限节点。在每次加入时检查;一旦玩家拥有该权限即触发 | *** ## in\_biome [#in_biome] 当玩家进入特定生物群系时触发 ```yaml criteria: visit_jungle: trigger: in_biome conditions: biome: minecraft:jungle world: world # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | ------- | --- | ------ | -------------------------------------------------- | | `biome` | 字符串 | *(必填)* | 生物群系键,格式为 `namespace:id`(例如 `minecraft:deep_dark`) | | `world` | 字符串 | *(任意)* | 将检查限制在单个世界的世界名称 | *** ## enter\_region [#enter_region] 当玩家通过移动或传送从外部进入 WorldGuard 区域时触发。 **版本要求:** 需要 **ItemsAdderAdditions 1.0.12 或更高版本**以及 WorldGuard。 ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # 可选 ``` | 键 | 类型 | 默认值 | 描述 | | -------- | --- | ------ | ------------------------ | | `region` | 字符串 | *(必填)* | WorldGuard 区域 ID,不区分大小写。 | | `world` | 字符串 | *(任意)* | 将检查限制在单个 Bukkit 世界名称。 | 该准则只在玩家跨过区域边界时触发。玩家已在区域内时继续移动不会再次触发。此触发器不受 ItemsAdderAdditions WorldGuard flag 开关影响。 安装与故障排除请见 [WorldGuard 兼容性](/zh/docs/compatibility/worldguard)。 *** ## sit\_furniture [#sit_furniture] 当玩家坐在 ItemsAdder 家具上时触发。 **版本要求:** 需要 **ItemsAdder 4.0.17 或更高版本**。 ```yaml criteria: sit_on_chair: trigger: sit_furniture conditions: furniture: my_pack:ruby_chair ``` | 键 | 类型 | 必填 | 描述 | | ----------- | --- | -- | ------------------------------ | | `furniture` | 字符串 | 是 | ItemsAdder 家具 ID 或受支持的自定义家具标签。 | *** ## unsit\_furniture [#unsit_furniture] 当玩家停止坐在 ItemsAdder 家具上时触发。 **版本要求:** 需要 **ItemsAdder 4.0.17 或更高版本**。 ```yaml criteria: leave_chair: trigger: unsit_furniture conditions: furniture: my_pack:ruby_chair ``` | 键 | 类型 | 必填 | 描述 | | ----------- | --- | -- | ------------------------------ | | `furniture` | 字符串 | 是 | ItemsAdder 家具 ID 或受支持的自定义家具标签。 | *** ## open\_trade\_machine [#open_trade_machine] 当玩家打开 ItemsAdder `trade_machine` 或 `block_trade_machine` 界面时触发。 ```yaml criteria: open_alchemy_station: trigger: open_trade_machine conditions: trade_machine: stations:alchemy_table ``` | 键 | 类型 | 必填 | 描述 | | --------------- | --- | -- | ----------------------- | | `trade_machine` | 字符串 | 是 | 交易机器内容 ID 或受支持的自定义家具标签。 | *** ## start\_emote [#start_emote] 当玩家开始 ItemsAdder 表情时触发。 ```yaml criteria: start_wave: trigger: start_emote conditions: emote: my_pack:wave ``` | 键 | 类型 | 默认值 | 描述 | | ------- | --- | ------ | -------------------- | | `emote` | 字符串 | *(任意)* | 表情 ID。省略时任意开始的表情都匹配。 | *** ## stop\_emote [#stop_emote] 当玩家停止 ItemsAdder 表情时触发。 ```yaml criteria: stop_wave: trigger: stop_emote conditions: emote: my_pack:wave ``` | 键 | 类型 | 默认值 | 描述 | | ------- | --- | ------ | -------------------- | | `emote` | 字符串 | *(任意)* | 表情 ID。省略时任意停止的表情都匹配。 | *** ## join\_server [#join_server] 玩家每次加入服务器时触发。无条件。 ```yaml criteria: joined: trigger: join_server ``` *** ## first\_join [#first_join] 根据 Bukkit 的 `hasPlayedBefore` 检查,在玩家第一次加入服务器时触发。无条件。 ```yaml criteria: first_join: trigger: first_join ``` *** ## tick [#tick] 每个服务器 tick 对每个在线玩家触发一次。请使用 `conditions.player` 缩小条件范围。 ```yaml criteria: sneaking_tick: trigger: tick conditions: player: flags: is_sneaking: true ``` *** ## impossible [#impossible] 自身永远不会触发。 ```yaml criteria: manual: trigger: impossible ``` 无 `conditions` 选项 # 床 (/zh/docs/behaviours/bed) 将任意自定义家具变为功能性床。支持在单件家具上设置多个睡眠槽位,因此一张双人床可以同时容纳两名玩家 适用于**自定义家具**和**复杂家具** ## 配置 [#配置] ```yaml behaviours: bed: slots: - "0,0,0" # 必填 - 至少一个槽位 - "1,0,0" # 第二个槽位,例如用于双人床 ``` `slots` 中的每个条目是一个 `"dx,dy,dz"` 整数偏移量,相对于家具的基础方块 偏移轴遵循**家具自身的朝向**,而非世界坐标轴: | 轴 | 含义 | | ---- | ----------- | | `dx` | 沿家具朝向的前方/后方 | | `dy` | 上/下 | | `dz` | 左/右(垂直于朝向) | `"1,0,0"` 始终在基础方块前方一格,无论家具朝向哪个方向 ### 单槽位(默认) [#单槽位默认] ```yaml behaviours: bed: slots: - "0,0,0" ``` 完全省略 `slots` 也会默认在 `0,0,0` 处设置单个槽位 ### 双人床(左右并排两个槽位) [#双人床左右并排两个槽位] ```yaml behaviours: bed: slots: - "0,0,0" - "0,0,1" ``` `dz: 1` 将第二个槽位放置在面向家具时基础方块右侧一格 ### 双人床(前后排列两个槽位) [#双人床前后排列两个槽位] ```yaml behaviours: bed: slots: - "0,0,0" - "1,0,0" ``` `dx: 1` 将第二个槽位放置在基础方块前方一格 ## 行为 [#行为] * 右键点击家具(或其屏障方块)会尝试让玩家在下一个可用槽位入睡 * 如果所有槽位都被占用,玩家会看到 **"这张床已被占用"** 的动作栏消息 * 在槽位处会放置一个临时的原版床方块,以便 Minecraft 的睡眠机制正常工作。当玩家醒来、断开连接或家具被破坏时,该方块会被移除 * 破坏家具会唤醒所有正在睡觉的玩家 * 潜行时右键点击会被忽略,因此玩家可以在蹲下时正常交互 床示例 ## 相关页面 [#相关页面] * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # 可连接家具 (/zh/docs/behaviours/connectable) ```yaml behaviours: connectable: type: stair # 可选(默认值:stair) ``` ```yaml behaviours: connectable: type: stair # 可选(默认值:stair) default: connectable_furniture straight: connectable_furniture_straight left: connectable_furniture_left right: connectable_furniture_right outer: connectable_furniture_outer inner: connectable_furniture_inner ``` 可连接家具楼梯类型示例 ```yaml behaviours: connectable: type: table ``` ```yaml behaviours: connectable: type: table default: connectable_furniture straight: connectable_furniture_straight middle: connectable_furniture_middle border: connectable_furniture_border corner: connectable_furniture_corner end: connectable_furniture_end ``` 可连接家具桌子类型示例 这些 ID 必须指向自定义家具 ## 默认 ID 解析 [#默认-id-解析] 所有家具类型 ID 均为可选。如果未指定,插件会自动查找匹配的家具 ID: * `default` 继承配置了该行为的家具 ID * 其他所有类型使用 `<家具名称>_<类型>` 例如,如果该行为配置在名为 `connectable_furniture` 的家具上: ### 楼梯类型自动查找 [#楼梯类型自动查找] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `left` → `connectable_furniture_left` * `right` → `connectable_furniture_right` * `outer` → `connectable_furniture_outer` * `inner` → `connectable_furniture_inner` ### 桌子类型自动查找 [#桌子类型自动查找] * `default` → `connectable_furniture` * `straight` → `connectable_furniture_straight` * `middle` → `connectable_furniture_middle` * `border` → `connectable_furniture_border` * `corner` → `connectable_furniture_corner` * `end` → `connectable_furniture_end` ## 最简配置 [#最简配置] ```yaml behaviours: connectable: type: stair # 或 table ``` 大多数情况下你只需要设置类型;自动 ID 解析会处理其余部分 # 接触效果 (/zh/docs/behaviours/contact-effect) 当玩家接触或站在自定义方块、家具或复杂家具上时施加效果。 提供四种效果组,全部可选。可在同一物品上任意组合。 | 效果组 | 效果 | | ---------------- | --------------- | | `damage` | 按间隔伤害玩家(负值改为治疗) | | `heal` | 按间隔治疗玩家(负值改为伤害) | | `potion_effects` | 接触期间反复施加一组药水效果 | | `attributes` | 接触期间施加临时属性修饰 | ## 配置 [#配置] ```yaml behaviours: contact_effect: damage: amount: 1.0 interval: 20 # 可选,默认:20 刻 cause: CACTUS # 可选,默认:CACTUS fire_duration: 0 # 可选,默认:0 刻 ``` ```yaml behaviours: contact_effect: heal: amount: 1.0 interval: 20 # 可选,默认:20 刻 ``` ```yaml behaviours: contact_effect: potion_effects: - type: POISON duration: 80 # 可选,默认:40 刻 amplifier: 0 # 可选,默认:0(0 = 等级 1) ambient: false # 可选,默认:false particles: true # 可选,默认:true icon: true # 可选,默认:true interval: 20 # 可选,默认:20 刻 - type: SLOWNESS duration: 80 ``` ```yaml behaviours: contact_effect: attributes: - attribute: MOVEMENT_SPEED amount: 0.05 operation: ADD_NUMBER # 可选,默认:ADD_NUMBER - attribute: STEP_HEIGHT amount: 0.5 ``` ```yaml behaviours: contact_effect: apply_when_sneaking: true # 可选,默认:true block_faces: # 可选 top: true # 可选,默认:true north: true # 可选,默认:true south: true # 可选,默认:true west: true # 可选,默认:true east: true # 可选,默认:true damage: amount: 1.0 interval: 40 cause: CACTUS heal: amount: 0.5 interval: 20 potion_effects: - type: SPEED amplifier: 1 duration: 60 interval: 10 attributes: - attribute: STEP_HEIGHT amount: 0.5 operation: ADD_NUMBER ``` ## 伤害 [#伤害] | 键 | 类型 | 默认值 | 说明 | | --------------- | ------ | -------- | ------------------ | | `amount` | Double | - | 伤害的半颗心数量。负值改为治疗。 | | `interval` | Int | `20` | 每次施加之间的刻数。 | | `cause` | String | `CACTUS` | 伤害类型,便于其他插件检测伤害原因。 | | `fire_duration` | Int | `0` | 受到伤害时玩家着火的刻数。 | `cause` 请使用 [DamageType](https://jd.papermc.io/paper/org/bukkit/damage/DamageType.html#field-summary) 中的值(不区分大小写,例如 `CACTUS`、`LAVA`、`MAGIC`)。未知的值会记录警告并回退为 `CACTUS`。 负的 `amount` 会治疗玩家而非伤害,并限制在玩家最大生命值以内。 ## 治疗 [#治疗] | 键 | 类型 | 默认值 | 说明 | | ---------- | ------ | ---- | ------------------ | | `amount` | Double | - | 治疗的半颗心数量。负值改为造成伤害。 | | `interval` | Int | `20` | 每次施加之间的刻数。 | 治疗永远不会超过玩家的最大生命值。负的 `amount` 会通过 `CACTUS` 伤害类型造成伤害。 ## 药水效果 [#药水效果] `potion_effects` 是一个列表。只要玩家保持接触,每个条目都会被反复施加。 | 键 | 类型 | 默认值 | 说明 | | ----------- | ------- | ------- | --------------- | | `type` | String | - | 必填。药水效果类型。 | | `duration` | Int | `40` | 效果持续时间(刻)。 | | `amplifier` | Int | `0` | 效果等级(0 = 等级 1)。 | | `ambient` | Boolean | `false` | 效果是否为环境效果。 | | `particles` | Boolean | `true` | 是否显示粒子。 | | `icon` | Boolean | `true` | 是否显示 HUD 图标。 | | `interval` | Int | `20` | 每次重新施加之间的刻数。 | `type` 请使用 [PotionEffectType](https://jd.papermc.io/paper/org/bukkit/potion/PotionEffectType.html#field-summary) 中的值。未知的类型会记录警告,且仅跳过该条目。 ## 属性 [#属性] `attributes` 是临时属性修饰的列表,在玩家接触期间施加,离开后立即移除。 | 键 | 类型 | 默认值 | 说明 | | ----------- | ------ | ------------ | ---------- | | `attribute` | String | - | 必填。要修改的属性。 | | `amount` | Double | - | 必填。修饰的数值。 | | `operation` | String | `ADD_NUMBER` | 数值的应用方式。 | `attribute` 请使用 [Attribute](https://jd.papermc.io/paper/org/bukkit/attribute/Attribute.html#field-summary) 中的值。旧的 `GENERIC_` 和 `PLAYER_` 前缀同样被接受(例如 `GENERIC_MOVEMENT_SPEED` 会解析为 `MOVEMENT_SPEED`)。 `operation` 的有效值来自 [AttributeModifier.Operation](https://jd.papermc.io/paper/org/bukkit/attribute/AttributeModifier.Operation.html):`ADD_NUMBER`、`ADD_SCALAR`、`MULTIPLY_SCALAR_1`。 属性修饰是临时的。当玩家离开方块、退出游戏,或插件重载或关闭时,它们会被自动移除。未知的属性、数值或操作会记录警告,且仅跳过该条目。 ## 接触检测 [#接触检测] 接触会按所有基于间隔的效果(`damage`、`heal` 以及每个 `potion_effects` 条目)所需的最小间隔进行检测。每种效果都有自己的冷却,因此不同的间隔相互独立。 如果配置了 `attributes`,则每刻都会检测接触,以便玩家离开方块时能迅速移除修饰。 ## 共享选项 [#共享选项] | 键 | 类型 | 默认值 | 说明 | | --------------------- | ------- | ------ | --------------------------------------------- | | `apply_when_sneaking` | Boolean | `true` | 玩家潜行时是否仍施加效果。 | | `block_faces` | Section | 全部开启 | 哪些面算作接触(`top`、`north`、`south`、`west`、`east`)。 | ## 相关页面 [#相关页面] * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # 可堆叠 (/zh/docs/behaviours/stackable) ```yaml behaviours: stackable: - my_block_2 - my_block_3 - my_block_4 ``` ```yaml behaviours: stackable: blocks: - my_block_2 - my_block_3 - my_block_4 items: # 可选,默认为此行为所在的物品 - my_item - BONE_MEAL sound: # 可选 name: entity.villager.ambient # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master decrement_amount: 2 # 可选,默认:1 ``` `name` 请使用 [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) 中的值,或使用 `namespace:value` 格式的自定义音效 ```yaml behaviours: stackable: first_step: block: my_block_2 items: # 可选,默认为此行为所在的物品 - my_item - BONE_MEAL sound: # 可选 name: entity.villager.ambient # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master decrement_amount: 2 # 可选,默认:1 another_step: ... ``` `name` 请使用 [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) 中的值,或使用 `namespace:value` 格式的自定义音效 方块 ID 必须指向自定义方块。支持的类型:`REAL`、`REAL_NOTE`、`REAL_TRANSPARENT` 和 `REAL_WIRE`。`items` 可以包含具体物品 ID 或受支持的物品标签。见 [ID](/zh/docs/compatibility/ids)。你可以根据需要添加任意多个步骤 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # 存储 (/zh/docs/behaviours/storage) 将任意自定义方块或家具变为存储容器。提供三种模式 | 类型 | 行为 | | ---------- | -------------------------- | | `STORAGE` | 共享容器 - 所有玩家看到的是同一个物品栏 | | `SHULKER` | 存储物品在方块被破坏时会保留在物品内,重新放置时恢复 | | `DISPOSAL` | 垃圾桶 - 关闭 GUI 时存储物品会被静默删除 | ## 配置 [#配置] ```yaml behaviours: storage: type: STORAGE rows: 3 # 可选,默认:3 inventory_type: furnace # 可选,设置后取代 rows title: "社区箱子" # 可选,默认为方块/家具的名称 open_variant: my_open_storage # 可选 open_sound: # 可选 name: entity.villager.celebrate # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master close_sound: # 可选 name: entity.villager.ambient # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master ``` ```yaml behaviours: storage: type: SHULKER rows: 3 # 可选,默认:3 inventory_type: furnace # 可选,设置后取代 rows title: "便携存储" # 可选,默认为方块/家具的名称 open_variant: my_open_storage # 可选 open_sound: # 可选 name: entity.villager.celebrate # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master close_sound: # 可选 name: entity.villager.ambient # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master ``` ```yaml behaviours: storage: type: DISPOSAL rows: 1 # 可选,默认:3 title: "垃圾桶" # 可选,默认为方块/家具的名称 open_variant: my_open_storage # 可选 open_sound: # 可选 name: entity.villager.celebrate # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master close_sound: # 可选 name: entity.villager.ambient # 或自定义音效 volume: 1.0 # 可选,默认:1.0 pitch: 1.0 # 可选,默认:1.0 source: master # 可选,默认:master ``` `name` 请使用 [Sounds.json](https://minecraft.wiki/w/Sounds.json/Java_Edition_values) 中的值,或使用 `namespace:value` 格式的自定义音效 支持 [MiniMessage](https://docs.papermc.io/adventure/minimessage/format/) 格式、[PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) 占位符和 [ItemsAdder](https://itemsadder.com/) 字体图片 ## 物品栏类型 [#物品栏类型] 默认情况下,存储会打开一个箱子风格的物品栏,其高度由 `rows` 控制(1-6,默认:3) 设置 `inventory_type` 可改为打开特定类型的物品栏 - 设置此项后 `rows` 将被忽略 | 值 | GUI 形状 | | --------------- | ------------------ | | `furnace` | 熔炉(输入 + 燃料 + 输出) | | `blast_furnace` | 高炉 | | `smoker` | 烟熏炉 | | `brewing_stand` | 酿造台(3 个瓶子 + 2 个槽位) | | `dispenser` | 发射器(3×3) | | `dropper` | 投掷器(3×3) | | `hopper` | 漏斗(1×5) | ```yaml behaviours: storage: type: STORAGE inventory_type: furnace title: "自定义熔炉" ``` ## 物品限制 [#物品限制] 从 1.0.14 开始,存储容器可以限制玩家能够放入的物品。使用 `allowed_items` 仅允许匹配的物品: ```yaml behaviours: storage: type: STORAGE allowed_items: - minecraft:book - "#minecraft:logs" - "#my_pack:building_materials" ``` 也可以使用 `denied_items` 拒绝匹配的物品,同时允许其他所有物品: ```yaml behaviours: storage: type: STORAGE denied_items: - minecraft:tnt - "#my_pack:portable_storage" ``` 列表项可以是原版或 ItemsAdder 物品 ID、Minecraft 物品标签,或 IAA 自定义物品标签。 `allowed_items` 和 `denied_items` 互斥。同时配置两者会导致该存储行为被拒绝。 空的 `allowed_items` 列表不允许放入任何物品,空的 `denied_items` 列表不会拒绝任何物品。两者都省略时, 存储保持无限制。限制仅适用于玩家新放入的物品;之前保存的内容不会被移除。 ## 开启变体 [#开启变体] 你可以选择设置 `open_variant`,使自定义方块、家具或复杂家具在至少有一名玩家打开存储时切换为另一个变体 示例: * 视觉上打开的箱子 * 拥有打开模型的木桶 * 具有不同活动状态的容器 ```yaml behaviours: storage: type: STORAGE open_variant: my_open_storage ``` `open_variant` 应为另一个自定义方块、家具或复杂家具的 ID,可以使用以下格式: * `id` * `namespace:id` ID 语法请见 [ID](/zh/docs/compatibility/ids)。 当所有玩家都关闭物品栏后,storage 会恢复为正常变体 ItemsAdderAdditions 1.0.12 及更高版本支持复杂家具 `open_variant`。方块 storage 必须使用方块变体;家具和复杂家具可以使用家具、复杂家具或 item display 模型。 ## 内容状态变体 [#内容状态变体] 从 1.0.13 开始,存储容器关闭时可根据物品栏的填充状态改变外观。 ```yaml behaviours: storage: type: STORAGE empty_variant: my_empty_storage # 可选;物品栏为空 filled_variant: my_filled_storage # 可选;物品栏中有任意物品 half_variant: my_half_storage # 可选;物品栏部分填充 full_variant: my_full_storage # 可选;每个槽位都达到对应物品的堆叠上限 ``` `filled_variant` 是简单的两状态选项:只要物品栏不为空就会使用它,除非配置了更具体的 `half_variant` 或 `full_variant`。缺少对应变体时会回退到 `filled_variant`,再回退到容器原本的外观。 玩家打开物品栏时,`open_variant` 始终优先。最后一名查看者关闭物品栏后,会恢复与内容状态对应的变体。 ID 以及方块/家具兼容规则与 `open_variant` 相同,切换变体时也会保留方向方块的旋转状态。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) * [CoreProtect 兼容性](/zh/docs/compatibility/coreprotect) * [PlaceholderAPI 兼容性](/zh/docs/compatibility/placeholderapi) # 文本展示 (/zh/docs/behaviours/text-display) 将一个或多个悬浮文本展示附加到自定义方块或家具上。支持 MiniMessage 格式、PlaceholderAPI 占位符和 ItemsAdder 字体图片 适用于**方块**、**家具**和**复杂家具** ## 基本配置 [#基本配置] ```yaml behaviours: text_display: text: "你好!" ``` 多行文本(每个列表条目为一行): ```yaml behaviours: text_display: text: - "存储" - "右键点击打开" ``` ## 多个展示实体 [#多个展示实体] 使用 `displays` 部分可将多个文本展示附加到同一物品上。每个条目可独立设置位置和样式 ```yaml behaviours: text_display: displays: label: text: "我的箱子" offset: "0, 0.5, 0" hint: text: "右键点击打开" offset: "0, 0.25, 0" ``` ## 选项 [#选项] | 键 | 类型 | 默认值 | 描述 | | ------------------ | ------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------- | | `text` | 字符串或列表 | *(必填)* | 要显示的文本。支持 MiniMessage、PlaceholderAPI 和 `:icon:` 字体图片 | | `offset` | `"x, y, z"` 或列表 | `"0, 0.25, 0"` | 相对于方块或家具中心的位置偏移 | | `billboard` | `FIXED` \| `VERTICAL` \| `HORIZONTAL` \| `CENTER` | `VERTICAL` | 展示实体如何旋转以面向玩家 | | `alignment` | `LEFT` \| `CENTER` \| `RIGHT` | `CENTER` | 展示实体内的文本对齐方式 | | `text_shadow` | 布尔值 | `true` | 文本是否有投影 | | `see_through` | 布尔值 | `false` | 文本是否可透视方块 | | `line_width` | 整数 ≥ 1 | `1403` | 换行前的最大行宽(像素) | | `background` | `#RRGGBB`、`#RRGGBBAA`、`false` 或 `null` | `null` | 背景颜色。`null` 或 `false` 使用原版默认的深色背景 | | `text_opacity` | 浮点数 0.0-1.0 | *(省略时为默认值)* | 文本不透明度。`0.0` 为完全透明,`1.0` 为完全不透明。完全省略此键则使用原版默认值(完全不透明) | | `scale` | 浮点数 > 0、`"x, y, z"` 或列表 | `1.0` | 文本大小倍率。单个值统一应用;使用 `"x, y, z"` 或包含 3 个元素的列表可进行非均匀缩放 | | `view_range` | 浮点数 > 0 | `16.0` | 展示实体可见的距离(方块) | | `refresh_interval` | 整数 ≥ 0 | `0` | 每位玩家的文本刷新频率(以刻为单位)。`0` 禁用自动刷新。使用会随时间变化的 PlaceholderAPI 占位符时,设置为正值 | | `brightness` | 整数 0-15、`[block, sky]` 或配置节 | *(省略时使用世界光照)* | 覆盖光照等级。单个整数会将方块光和天空光设为相同值。使用包含两个元素的列表 `[block, sky]` 或带有 `block:` 和 `sky:` 键的配置节可分别设置。省略则继承世界光照 | | `shadow_radius` | 浮点数 ≥ 0 | `0.0` | 文本后方投影的半径 | | `shadow_strength` | 浮点数 ≥ 0 | `1.0` | 投影的强度(不透明度) | | `yaw` | 浮点数 | `0.0` | 展示实体的水平旋转角度(度)。仅在 `billboard` 为 `FIXED` 时有意义 | | `pitch` | 浮点数 | `0.0` | 展示实体的垂直旋转角度(度)。仅在 `billboard` 为 `FIXED` 时有意义 | ## 完整示例 [#完整示例] ```yaml behaviours: text_display: text: - "" - "分数:%vault_eco_balance%" offset: "0, 0.6, 0" billboard: VERTICAL alignment: CENTER text_shadow: true see_through: false line_width: 1403 background: "#00000080" scale: 1.0 view_range: 16.0 refresh_interval: 20 ``` ## 备注 [#备注] * 文本支持 [MiniMessage](https://docs.advntr.dev/minimessage/format.html) 格式标签 * 如果安装了 PlaceholderAPI,PlaceholderAPI 占位符会按玩家解析 * 支持 ItemsAdder 字体图片(`:my_icon:`) * 使用会随时间更新的占位符时,请将 `refresh_interval` 设置为正值(例如 `20` 表示每秒刷新一次) ## 相关页面 [#相关页面] * [PlaceholderAPI 兼容性](/zh/docs/compatibility/placeholderapi) * [WorldGuard 兼容性](/zh/docs/compatibility/worldguard) # /iatrademachine (/zh/docs/commands/iatrademachine) ## `/iatrademachine` [#iatrademachine] 为玩家打开 ItemsAdder 的 `trade_machine` 或 `block_trade_machine` 的界面,无需在世界上放置一个实际的方块或家具 适用于通过菜单插件、NPC 或自定义命令流程打开交易界面 ## 语法 [#语法] ```text /iatrademachine <玩家> [-silent] ``` ## 参数 [#参数] ### `<玩家>` [#玩家] 要为其打开交易的在线玩家 ### `` [#namespaceid] 拥有 `trade_machine` 或 `block_trade_machine` 行为的自定义方块或家具的 ID 示例: ```text stations:alchemy_table ``` ### `-silent` [#-silent] 可选标志 如果添加此标志,命令将隐藏通常发送给命令执行者的确认消息 ## 示例 [#示例] ```text /iatrademachine twinkycome stations:alchemy_table ``` ```text /iatrademachine twinkycome stations:alchemy_table -silent ``` ## 权限 [#权限] ```text ia.admin.iatrademachine ``` ## 备注 [#备注] * 玩家和控制台均可执行此命令 * 要求目标 ID 拥有 `trade_machine` 或 `block_trade_machine` 行为 * 必须使用完整的命名空间 ID * 如果该 ID 没有支持的交易行为,命令将执行失败 ## 用例示例 [#用例示例] 将此命令与 DeluxeMenus 等菜单插件结合使用,可创建一个分类选择菜单,直接打开不同的交易界面,而无需让玩家在一个庞大的交易界面中来回翻找 # /itemsadderadditions (/zh/docs/commands/itemsadderadditions) ## `/itemsadderadditions` [#itemsadderadditions] ItemsAdderAdditions 的主管理员命令。 别名: ```text /iaadditions /iaa ``` ## 权限 [#权限] 基础权限: ```text itemsadderadditions.command.itemsadderadditions ``` ## 子命令 [#子命令] ### `/itemsadderadditions reload` [#itemsadderadditions-reload] 重载 ItemsAdderAdditions `config.yml`,并刷新插件级功能、动作、behaviour 和 component 开关。 ```text /itemsadderadditions reload ``` 权限: ```text itemsadderadditions.command.itemsadderadditions.reload ``` 该命令**不会**重载 ItemsAdder 内容 YAML 文件。 修改 ItemsAdderAdditions 内容 YAML 节后,请使用 `/iareload`,例如动作、behaviours、自定义标签、配方、进度、自定义画、Valhalla 元数据或世界生成条目。 修改 `components` 节或资源包资源后,请使用 `/iazip`。 ### `/itemsadderadditions debug` [#itemsadderadditions-debug] 开启或关闭 debug 模式。 ```text /itemsadderadditions debug ``` 权限: ```text itemsadderadditions.command.itemsadderadditions.debug ``` # CoreProtect (/zh/docs/compatibility/coreprotect) CoreProtect 支持是可选的。ItemsAdderAdditions 目前只使用 CoreProtect 将 storage behaviour 的打开操作记录为交互。 ## 要求 [#要求] * 已安装并启用 CoreProtect。 * 已启用 CoreProtect API。 * 正在使用 ItemsAdderAdditions storage behaviour。 ## 会记录什么 [#会记录什么] 当玩家打开 ItemsAdderAdditions storage 容器时,ItemsAdderAdditions 会调用 CoreProtect 的交互日志记录器,并传入: * 玩家名称 * storage 位置 当 CoreProtect 可用时,storage 打开操作会显示为 CoreProtect 交互。 ## 不会记录什么 [#不会记录什么] ItemsAdderAdditions 目前不会通过 CoreProtect 记录以下内容: * storage 物品栏内的物品移动 * 动作执行 * 自定义画放置 * stackable 放置 * contact effect 伤害 * 配方合成 * 进度完成 * 世界生成 ## 可选依赖行为 [#可选依赖行为] 如果未安装 CoreProtect、CoreProtect 被禁用或 API 不可用,ItemsAdderAdditions 会跳过日志调用。Storage 仍会正常工作。 ## 支持的功能 [#支持的功能] | 功能 | CoreProtect 行为 | | ------------------------------------------------ | ------------------- | | [Storage behaviour](/zh/docs/behaviours/storage) | 打开 storage 时记录一次交互。 | ## 限制 [#限制] CoreProtect 支持范围有意保持较窄。它只记录 storage 被打开,不提供完整的物品栏内容或物品转移审计日志。 ## 故障排查 [#故障排查] * 确认已安装并启用 CoreProtect。 * 确认 CoreProtect API 已启用且正常工作。 * 使用带 storage behaviour 的方块或家具测试,不要用无关动作或配方测试。 * 如果没有出现交互记录,请确认玩家确实成功打开了 storage。 ## 相关页面 [#相关页面] * [Storage behaviour](/zh/docs/behaviours/storage) * [WorldGuard](/zh/docs/compatibility/worldguard) # Custom Structures (/zh/docs/compatibility/customstructures) Custom Structures 支持是可选的,并从 ItemsAdderAdditions 1.0.12 起可用。它允许进度要求玩家位于 Custom Structures 插件生成的结构内。 ## 配置 [#配置] 在 `conditions.player.location.structure` 或 `structures` 下使用带 `customstructures:` 命名空间的结构名称。 ```yaml criteria: find_temple: trigger: tick conditions: player: location: structures: - customstructures:ancient_temple ``` 也接受 `custom_structures:` 别名。结构名称匹配不区分大小写。 ## 检测方式 [#检测方式] ItemsAdderAdditions 使用 Custom Structures 集成匹配结构边界。已有结构和新生成的结构均受支持;安装 ItemsAdderAdditions 后无需重新生成结构。 原版结构无需 Custom Structures,使用普通注册表键即可,例如 `minecraft:village_plains`。 ## 故障排除 [#故障排除] * 确认 Custom Structures 在 ItemsAdderAdditions 之前启用。 * 使用结构的配置名称;除非两者相同,否则不要使用 schematic 文件名。 * 在服务器日志中检查 `Enabled advancement structure predicate integration.`。 ## 相关页面 [#相关页面] * [玩家谓词](/zh/docs/advancements/player-predicates) * [进度配置](/zh/docs/advancements/configuration) # ID (/zh/docs/compatibility/ids) ItemsAdderAdditions 在匹配前会把 ID 统一转为小写。在示例和共享配置中,建议使用显式 ID,例如 `minecraft:diamond` 和 `my_pack:ruby_sword`。 大多数字段分为 **具体输出** 和 **运行时匹配** 两类: * 具体输出必须解析为一个物品堆叠,因此不能使用标签。 * 运行时匹配可以接受标签,因为插件只需要比较已有内容。 ## 快速参考 [#快速参考] | 内容 | 支持的格式 | 示例 | | ------------------------- | ----------------------------------------------- | ------------------------------------------ | | 原版物品 | `minecraft:id`、不带 `minecraft:` 的键或 Bukkit 材质名 | `minecraft:diamond`, `diamond`, `DIAMOND` | | 原版方块 | `minecraft:id`、不带 `minecraft:` 的键或 Bukkit 材质名 | `minecraft:oak_log`, `oak_log`, `OAK_LOG` | | ItemsAdder 物品 | `namespace:id` 或不带 namespace 的 `id` | `my_pack:ruby_sword`, `ruby_sword` | | ItemsAdder 方块 | `namespace:id` 或不带 namespace 的 `id` | `my_pack:ruby_ore`, `ruby_ore` | | ItemsAdder 家具 | `namespace:id` 或不带 namespace 的 `id` | `my_pack:ruby_lamp`, `ruby_lamp` | | MMOItems 物品 | `mmoitems:type:id` | `mmoitems:sword:flame_blade` | | 配方 ID | `namespace:id`、不带 namespace 的 `id`,或支持处的自定义配方标签 | `my_pack:ruby_sword`, `ruby_sword` | | 原版物品/方块标签 | `#minecraft:tag`,或接受原版标签处的不带 namespace 的 `#tag` | `#minecraft:planks`, `#logs` | | ItemsAdderAdditions 自定义标签 | `#namespace:tag`,或当前 namespace 内的 `#tag` | `#my_pack:ruby_tools`, `#ruby_tools` | | Namespaced key | `namespace:path` | `minecraft:strength`, `custom_pack:my_key` | ## 原版物品和方块 [#原版物品和方块] 原版物品和方块可以写成 namespaced ID、不带 `minecraft:` 的键,或 Bukkit 材质名。 ```yaml item: minecraft:diamond_sword item: diamond_sword item: DIAMOND_SWORD block: minecraft:oak_log block: oak_log block: OAK_LOG ``` 对于具体物品字段,不带 namespace 的 ID 会先按 ItemsAdder 内容检查,再按原版 Minecraft 物品检查。 ## ItemsAdder 物品、方块和家具 [#itemsadder-物品方块和家具] ItemsAdder 内容可以使用 `namespace:id`,也可以只使用内容 ID。 ```yaml item: my_pack:ruby_sword block: my_pack:ruby_ore furniture: my_pack:ruby_lamp ``` 很多字段也支持只写路径: ```yaml info: namespace: my_pack items: ruby_wand: events: interact: right: replace_item: item: ruby_sword ``` 不带 namespace 的 ID 可以工作,但当多个包使用相同内容 ID 时,`namespace:id` 更清晰。 ## MMOItems 物品 [#mmoitems-物品] MMOItems 引用必须使用以下格式: ```yaml item: mmoitems:type:id ``` 示例: ```yaml item: mmoitems:sword:flame_blade ``` 类型和 ID 会通过 MMOItems 元数据匹配。如果未安装或未启用 MMOItems,这些引用无法解析,也不会匹配。 ## 配方 [#配方] 配方 ID 是否可以省略 namespace 取决于具体功能。 ```yaml recipe: my_pack:ruby_sword recipe: ruby_sword ``` 在配方匹配中,不带 namespace 的配方 ID 可以匹配 namespaced 配方 ID 的 path 部分。自定义配方标签只在明确支持自定义标签的字段中可用。 ## 自定义标签 [#自定义标签] 自定义标签在顶层 `tags` 节中定义。 ```yaml info: namespace: my_pack tags: ruby_tools: type: item values: - ruby_pickaxe - ruby_axe - mmoitems:tool:ruby_hammer ``` 在同一 namespace 中用 `#tag` 引用标签,从其他 namespace 引用时使用 `#namespace:tag`。 ```yaml items: - "#ruby_tools" - "#my_pack:ruby_tools" ``` 自定义标签类型包括 `item`、`block`、`furniture` 和 `recipe`。嵌套规则和功能支持请见[自定义标签](/zh/docs/custom-tags)。 ## 原版标签 [#原版标签] 在匹配路径接受 Bukkit 物品或方块标签时,可以使用原版标签。 ```yaml item: "#minecraft:planks" block: "#minecraft:logs" ``` 对于物品和方块标签匹配,不带 namespace 的原版标签(如 `#logs`)会规范化为 `#minecraft:logs`,除非当前标签注册表中存在相同 ID 的自定义标签。 原版标签只匹配原版注册表条目,不会匹配 ItemsAdder 内容或 MMOItems 内容。 ## 具体物品输出 [#具体物品输出] 以下必须生成一个物品堆叠的字段应使用具体 ID: * 配方结果 * 营火、切石机和酿造结果 * `toast.icon` * `clear_item.item` * `replace_item.item` * 会创建存储物品堆叠的 component 字段,例如 `bundle_contents` 和 `charged_projectiles` 这些字段不能使用标签,因为一个标签可能包含多个值。 ## 旋转的 ItemsAdder 方块和家具 [#旋转的-itemsadder-方块和家具] 运行时方块和家具匹配会把方向后缀视为同一个基础内容: ```text my_pack:chair_north -> my_pack:chair my_pack:chair_south -> my_pack:chair my_pack:chair_east -> my_pack:chair my_pack:chair_west -> my_pack:chair my_pack:chair_up -> my_pack:chair my_pack:chair_down -> my_pack:chair ``` 这适用于进度触发器、自定义标签成员关系等匹配检查。你不需要列出每个旋转变体。 ## 常见错误 [#常见错误] * 在 `result.item`、`toast.icon`、`clear_item.item` 或 `replace_item.item` 等输出字段中使用标签。 * 期望原版标签匹配 ItemsAdder 或 MMOItems 物品。 * 在未安装 MMOItems 时使用 `mmoitems:type:id`。 * 标签引用忘记加 `#` 前缀。 * 写出包含多个冒号的无效 namespaced ID,例如 `namespace:path:extra`。 * 在多个包中复用相同的不带 namespace 的 ID,却不确定会匹配到哪个内容。 ## 相关页面 [#相关页面] * [兼容性概览](/zh/docs/compatibility) * [ItemsAdder](/zh/docs/compatibility/itemsadder) * [MMOItems](/zh/docs/compatibility/mmoitems) * [自定义标签](/zh/docs/custom-tags) * [合成配方](/zh/docs/recipes/crafting) * [进度触发器](/zh/docs/advancements/triggers) # 兼容性 (/zh/docs/compatibility) 兼容性页面说明 ItemsAdderAdditions 如何与 ItemsAdder 以及可选插件协作。当你需要确认某个集成是否必需、外部插件会怎样影响功能,或某个字段接受哪种 ID 语法时,请查看本节。 ## 支持的集成 [#支持的集成] **必需:** * [ItemsAdder](/zh/docs/compatibility/itemsadder) - 内容加载、自定义物品堆叠、自定义方块/家具、物品修改 hook 和重载事件。 **可选:** * [MMOItems](/zh/docs/compatibility/mmoitems) - `mmoitems:type:id` 物品引用和运行时物品匹配。 * [ValhallaMMO & ValhallaTrinkets](/zh/docs/compatibility/valhalla) - 写入 ItemsAdder 物品堆叠的 Valhalla 元数据。 * [WorldGuard](/zh/docs/compatibility/worldguard) - 用于受支持 behaviours、自定义画和动作的区域 flag。 * [Custom Structures](/zh/docs/compatibility/customstructures) - 在进度位置谓词中使用自定义结构边界。 * [CoreProtect](/zh/docs/compatibility/coreprotect) - storage 打开交互日志。 * [PlaceholderAPI](/zh/docs/compatibility/placeholderapi) - 在受支持文本字段中解析 placeholder。 * [MythicMobs](/zh/docs/compatibility/mythicmobs) - `mythic_mobs_skill` 动作。 ## ID 语法 [#id-语法] 物品、方块、家具、配方、标签和 namespaced ID 格式请见 [ID](/zh/docs/compatibility/ids)。 ## 相关页面 [#相关页面] * [配置](/zh/docs/configuration) * [自定义标签](/zh/docs/custom-tags) * [动作参数](/zh/docs/actions/parameters) * [Storage behaviour](/zh/docs/behaviours/storage) * [合成配方](/zh/docs/recipes/crafting) * [进度](/zh/docs/advancements) # ItemsAdder (/zh/docs/compatibility/itemsadder) ItemsAdder 是必需依赖。ItemsAdderAdditions 会从 ItemsAdder 内容 YAML 文件加载配置,并使用 ItemsAdder API 解析自定义物品堆叠、自定义方块、家具、字体图片和重载事件。 ## 要求 [#要求] * 支持 ItemsAdder v4;推荐使用最新版本。 * 受支持的 Paper 服务器版本,并带有匹配的 ItemsAdderAdditions NMS 适配器。 ItemsAdderAdditions 1.0.13 新增了对 ItemsAdder 4.0.18 的支持,其中包括更新后的运行时 patch 映射。 ## 支持的功能 [#支持的功能] ItemsAdderAdditions 使用 ItemsAdder 来: * 从内容 YAML 中读取物品、方块、家具、配方、behaviour、动作、component、自定义标签、进度、画和世界生成配置 * 将 ItemsAdder 物品 ID 解析为 `ItemStack` * 匹配已放置的自定义方块和家具 * 为 components 和 Valhalla 元数据应用物品修改 hook * 监听 ItemsAdder 加载/重载事件 * 在渲染文本中处理 ItemsAdder 字体图片 * 在需要时为 ItemsAdder 冷却、属性要求、切石机行为、trade machine 和合成行为应用运行时 patch ## 重载行为 [#重载行为] 大多数仅 YAML 的 ItemsAdderAdditions 配置会通过 ItemsAdder 重载和 `/iareload` 重新加载。 Components 会通过 ItemsAdder 的物品修改流水线修改生成的物品堆叠。修改 components 后,请运行 `/iazip`,让 ItemsAdder 重新生成资源包和物品数据。 ## ID 语法 [#id-语法] ItemsAdder 内容通常可以用 `namespace:id` 或不带 namespace 的 `id` 引用。 具体格式和常见错误请见 [ID](/zh/docs/compatibility/ids)。 ## 故障排查 [#故障排查] * 如果自定义 ID 无法解析,请确认内容已被 ItemsAdder 加载,并且 namespace 正确。 * 当不同包可能使用相同的不带 namespace 的 ID 时,建议使用 `namespace:id`。 * 修改生成的物品数据后运行 `/iazip`;修改运行时 YAML 节后运行 `/iareload`。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [配置](/zh/docs/configuration) * [Components](/zh/docs/components) * [自定义标签](/zh/docs/custom-tags) # MMOItems (/zh/docs/compatibility/mmoitems) MMOItems 支持是可选的。如果已安装并启用 MMOItems,ItemsAdderAdditions 可以通过 `mmoitems:type:id` 引用创建和匹配 MMOItems 物品堆叠。 ## 要求 [#要求] * 只有使用 `mmoitems:type:id` 引用的服务器才需要安装并启用 MMOItems。 * MMOItems 类型和物品 ID 必须存在于 MMOItems 中。 ## 支持的功能 [#支持的功能] 共享的物品解析路径支持 MMOItems 物品引用,包括: * 创建物品堆叠的配方原料和具体配方输出 * `clear_item`、`replace_item`、`toast.icon` 等物品动作 * 进度物品谓词和受支持的物品条件 * 自定义物品标签 * 创建物品堆叠的 component 字段,例如 `bundle_contents` 和 `charged_projectiles` ## 语法 [#语法] ```yaml item: mmoitems:sword:flame_blade ``` 格式为: ```text mmoitems:type:id ``` ItemsAdderAdditions 在匹配已有物品堆叠时读取 MMOItems 元数据键 `MMOITEMS_ITEM_TYPE` 和 `MMOITEMS_ITEM_ID`。 ## 可选依赖行为 [#可选依赖行为] 如果未安装或未启用 MMOItems: * `mmoitems:type:id` 引用无法创建物品堆叠。 * `mmoitems:type:id` 引用不会匹配已有物品。 * 其他原版和 ItemsAdder 引用仍会正常工作。 ## 限制 [#限制] * MMOItems 引用仅是物品引用,不是方块、家具或配方 ID。 * 原版标签不会匹配 MMOItems 物品。 * 即使自定义标签包含 MMOItems 值,标签在具体输出字段中仍然无效。 ## 故障排查 [#故障排查] * 检查 MMOItems 类型和 ID 拼写。 * 在前缀后准确使用两个分隔符:`mmoitems:type:id`。 * 测试 MMOItems 引用前,请先安装并启用 MMOItems。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [合成配方](/zh/docs/recipes/crafting) * [自定义标签](/zh/docs/custom-tags) * [Clear Item](/zh/docs/actions/clear-item) * [Replace Item](/zh/docs/actions/replace-item) # MythicMobs (/zh/docs/compatibility/mythicmobs) MythicMobs 支持是可选的。ItemsAdderAdditions 只在 `mythic_mobs_skill` 动作中使用 MythicMobs。 ## 要求 [#要求] * 已安装并启用 MythicMobs。 * 有效的 MythicMobs skill 名称。 * 在 ItemsAdderAdditions 配置中启用 `mythic_mobs_skill` 动作。 ## 支持的功能 [#支持的功能] | 功能 | MythicMobs 行为 | | ---------------------------------------------------------- | -------------------------------------- | | [Mythic Mobs Skill 动作](/zh/docs/actions/mythic-mobs-skill) | 以玩家为来源,用可配置 power 施放 MythicMobs skill。 | ## 示例 [#示例] ```yaml mythic_mobs_skill: skill: "mega_attack" power: 0.75 ``` 该动作会请求 MythicMobs 以玩家为来源施放 skill,并使用玩家位置和 MythicMobs 的目标实体辅助逻辑。 ## 可选依赖行为 [#可选依赖行为] 如果未安装或未启用 MythicMobs,该动作会直接返回,不会施放 skill。其他动作仍会正常工作。 ## 限制 [#限制] * 此集成不会添加新的 MythicMobs mechanics。 * 它只用于动作;MMO 风格物品引用由 [MMOItems](/zh/docs/compatibility/mmoitems) 处理,不由 MythicMobs 处理。 ## 故障排查 [#故障排查] * 确认 skill 名称存在于 MythicMobs 中。 * 确认动作键为 `mythic_mobs_skill`。 * 检查该动作是否已在 `config.yml` 中启用。 * 测试前确认 MythicMobs 已安装并启用。 ## 相关页面 [#相关页面] * [Mythic Mobs Skill 动作](/zh/docs/actions/mythic-mobs-skill) * [动作参数](/zh/docs/actions/parameters) * [配置](/zh/docs/configuration) # PlaceholderAPI (/zh/docs/compatibility/placeholderapi) PlaceholderAPI 支持是可选的。安装 PlaceholderAPI 后,ItemsAdderAdditions 会在受支持的文本字段中解析 placeholders。未安装时,原始文本会保持不变。 ## 支持的功能 [#支持的功能] 功能页面中记录的文本渲染路径会使用 PlaceholderAPI,包括: * message、actionbar、title、toast 和 open inventory 动作 * 进度完成文本动作 * storage 物品栏标题 * text display behaviour 文本 ## 示例 [#示例] ```yaml message: text: "Hello %player_name%!" ``` ```yaml behaviours: text_display: text: "Coins: %vault_eco_balance%" refresh_interval: 20 ``` 对于 text displays,如果 placeholders 需要随时间更新,请将 `refresh_interval` 设置为正数。 ## 可选依赖行为 [#可选依赖行为] 如果缺少 PlaceholderAPI,placeholders 不会被解析,会原样保留在渲染文本中。 ## 限制 [#限制] * ItemsAdderAdditions 本身不提供 PlaceholderAPI expansions。 * Placeholder 支持只适用于使用共享文本渲染器或明确说明支持 PlaceholderAPI 的字段。 ## 故障排查 [#故障排查] * 安装提供你所用 placeholder 的 PlaceholderAPI expansion。 * 对会变化的 text display placeholders 使用正数刷新间隔。 * 如果文本按 `%placeholder%` 原样显示,请确认 PlaceholderAPI 已安装并启用。 ## 相关页面 [#相关页面] * [Message 动作](/zh/docs/actions/message) * [Actionbar 动作](/zh/docs/actions/actionbar) * [Title 动作](/zh/docs/actions/title) * [Toast 动作](/zh/docs/actions/toast) * [Open Inventory 动作](/zh/docs/actions/open-inventory) * [Text Display behaviour](/zh/docs/behaviours/text-display) * [Storage behaviour](/zh/docs/behaviours/storage) # ValhallaMMO & Trinkets (/zh/docs/compatibility/valhalla) ItemsAdderAdditions 可以在 ItemsAdder 物品堆叠创建时写入 ValhallaMMO 和 ValhallaTrinkets 持久数据。请在 ItemsAdder 物品的 `valhalla` 节中配置这些数据。 元数据会直接写入物品堆叠。实际游戏效果需要服务器安装对应的 Valhalla 插件。 ## 要求 [#要求] * ItemsAdder 已加载的 ItemsAdder 物品内容。 * ValhallaMMO 用于 ValhallaMMO 属性、装备类型、物品 flag 和永久效果。 * ValhallaTrinkets 用于饰品元数据。 ## 可选依赖行为 [#可选依赖行为] 即使未安装 ValhallaMMO 或 ValhallaTrinkets,ItemsAdderAdditions 也会写入持久数据键。没有对应 Valhalla 插件时,数据仍保留在物品上,但不会产生游戏效果。 ## 基础结构 [#基础结构] ```yaml info: namespace: my_pack items: ruby_sword: display_name: "Ruby Sword" valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` ## 属性 [#属性] 当相同条目需要同时写入 Valhalla 的实际属性和默认属性时,使用 `stats`。 ```yaml valhalla: stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER hidden: false ``` 也可以分别写入两个属性容器: ```yaml valhalla: actual_stats: - stat: DAMAGE_BASE amount: 6.0 operation: ADD_NUMBER default_stats: - stat: DAMAGE_BASE amount: 4.0 operation: ADD_NUMBER ``` | 键 | 类型 | 默认值 | 描述 | | ----------- | ------- | ------- | ------------------------------------------------ | | `stat` | string | *(必填)* | Valhalla 属性键。未知属性键会被跳过。 | | `amount` | number | *(必填)* | 属性值。 | | `operation` | string | *(必填)* | `ADD_NUMBER`、`ADD_SCALAR` 或 `MULTIPLY_SCALAR_1`。 | | `hidden` | boolean | `false` | Valhalla 是否隐藏该属性行。 | ## 装备类型和 flags [#装备类型和-flags] ```yaml valhalla: equipment_class: SWORD item_flags: - DISPLAY_ATTRIBUTES - HIDE_QUALITY ``` 常见装备类型包括 `SWORD`、`BOW`、`CROSSBOW`、`TRIDENT`、`MACE`、`HELMET`、`CHESTPLATE`、`LEGGINGS`、`BOOTS`、`PICKAXE`、`AXE`、`SHOVEL`、`HOE`、`SHIELD`、`TRINKET` 和 `OTHER`。 支持的 item flags: ```text HIDE_TAGS, HIDE_QUALITY, DISPLAY_ATTRIBUTES, HIDE_DURABILITY, ATTRIBUTE_FOR_BOTH_HANDS, ATTRIBUTE_FOR_HELMET, INFINITY_EXPLOITABLE, UNCRAFTABLE, TEMPORARY_POTION_DISPLAY, UNENCHANTABLE, UNMENDABLE ``` ## 永久效果 [#永久效果] ```yaml valhalla: permanent_effects: effects: - type: minecraft:strength amplifier: 1 duration: 200 condition: constant cooldown_properties: cooldown: 1200 cdr_affected: true ``` 可以用 `effect` 代替 `type`。旧键 `permanent_potion_effects` 也可用于效果列表。 `cooldown_properties` 也可以作为顶层 `permanent_effects_cooldown_properties` 放置。`cdrAffected` 是 `cdr_affected` 的别名。 ## ValhallaTrinkets [#valhallatrinkets] ```yaml valhalla: trinkets: trinket_id: 1001 trinket_unique_id: 1001 unique: true unstackable: true ``` | 键 | 类型 | 默认值 | 描述 | | ------------------- | ------- | ----- | ----------------------------------- | | `trinket_id` | integer | *(无)* | ValhallaTrinkets ID。必须是非负 32 位整数。 | | `trinket_unique_id` | integer | *(无)* | 唯一饰品 ID。必须是非负 32 位整数。 | | `unique` | boolean | *(无)* | 写入或移除 ValhallaTrinkets unique flag。 | | `unstackable` | boolean | *(无)* | 为 `true` 时,每个生成的物品堆叠都会获得随机 UUID。 | ## 重载行为 [#重载行为] 修改 `valhalla` 节后运行 `/iareload`。数据会应用到重载后创建的物品堆叠;已有堆叠不会自动重写。 ## 故障排查 [#故障排查] * 未知 Valhalla 属性名会被跳过。 * `operation`、`equipment_class` 和 `item_flags` 的枚举值应使用上方所示的 Valhalla 风格大写名称。 * 玩家背包中的已有物品不会自动重写。 * 如果游戏效果没有生效,请确认已安装 ValhallaMMO 或 ValhallaTrinkets,并且它支持写入的元数据。 ## 相关页面 [#相关页面] * [ItemsAdder](/zh/docs/compatibility/itemsadder) * [ID](/zh/docs/compatibility/ids) * [配置](/zh/docs/configuration) # WorldGuard (/zh/docs/compatibility/worldguard) WorldGuard 支持是可选的。安装 WorldGuard 后,ItemsAdderAdditions 会注册区域 flag,用于允许或拒绝受支持的 behaviours、自定义画放置和内置动作。 如果未安装 WorldGuard,或在 ItemsAdderAdditions 配置中关闭了某项 WorldGuard 检查,则 ItemsAdderAdditions 会允许对应功能。 ## 要求 [#要求] * WorldGuard 需在 ItemsAdderAdditions 注册 flag 前安装。 * 添加 WorldGuard 或修改会定义冲突 flag 的插件后,请重启服务器。 ## 配置 [#配置] WorldGuard 检查默认启用。 ```yaml worldguard: enabled: true flags: storage_open: true contact_damage: true stackable_place: true bed_use: true custom_painting_place: true actions: true ``` 设置 `worldguard.enabled: false` 可关闭所有 ItemsAdderAdditions WorldGuard 检查。将单个 flag 选项设为 `false` 可停止检查该 flag,同时保留其他检查。 ## Flags [#flags] ItemsAdderAdditions 会注册默认值为 `allow` 的 WorldGuard `StateFlag`。 | Flag | 控制的行为 | | --------------------------- | ------------------------------- | | `iaa-storage-open` | 打开 storage behaviour 物品栏。 | | `iaa-contact-damage` | contact effect behaviour 造成的伤害。 | | `iaa-stackable-place` | stackable behaviour 处理的放置。 | | `iaa-bed-use` | 使用 bed behaviour。 | | `iaa-custom-painting-place` | 放置自定义画。 | ## 动作 flag [#动作-flag] ItemsAdderAdditions 还会为每个内置动作注册一个 flag。flag 名称为: ```text iaa-action- ``` 示例: | 动作键 | WorldGuard flag | | ------------------------- | ------------------------------------ | | `replace_biome` | `iaa-action-replace-biome` | | `iaa_replace_near_blocks` | `iaa-action-iaa-replace-near-blocks` | | `open_trade_machine` | `iaa-action-open-trade-machine` | | `mythic_mobs_skill` | `iaa-action-mythic-mobs-skill` | 当前内置动作 flag: ```text iaa-action-actionbar iaa-action-clear-item iaa-action-ignite iaa-action-message iaa-action-mythic-mobs-skill iaa-action-open-inventory iaa-action-open-trade-machine iaa-action-play-animation iaa-action-play-emote iaa-action-replace-biome iaa-action-iaa-replace-near-blocks iaa-action-replace-item iaa-action-shoot-fireball iaa-action-swing-hand iaa-action-teleport iaa-action-title iaa-action-toast iaa-action-veinminer ``` 所有 action executor 在运行前都会检查自己的动作 flag。检查位置来自 action context:目标实体、方块、家具实体,或作为 fallback 的玩家位置。 ## 进度区域触发器 [#进度区域触发器] ItemsAdderAdditions 1.0.12 新增 `enter_region` 进度触发器。当玩家通过移动或传送从外部进入配置的 WorldGuard 区域时,它会完成准则。 ```yaml criteria: enter_spawn: trigger: enter_region conditions: region: spawn world: world # 可选 ``` 区域 ID 匹配不区分大小写。可选的 `world` 值为 Bukkit 世界名称。该触发器只需要安装 WorldGuard;`worldguard.enabled` 和 `worldguard.flags.*` 控制保护检查,不会关闭进度的区域检测。 请见 [`enter_region` 触发器参考](/zh/docs/advancements/triggers#enter_region)。 ## 区域示例 [#区域示例] 拒绝在区域中打开 storage: ```text /rg flag spawn iaa-storage-open deny ``` 拒绝在区域中造成 contact effect 伤害: ```text /rg flag spawn iaa-contact-damage deny ``` 只拒绝区域中的 `replace_biome` 动作: ```text /rg flag spawn iaa-action-replace-biome deny ``` 显式允许放置自定义画: ```text /rg flag gallery iaa-custom-painting-place allow ``` ## 默认行为 [#默认行为] * Flags 默认值为 `allow`。 * 没有 WorldGuard 时,ItemsAdderAdditions 会允许功能。 * ItemsAdderAdditions 的 WorldGuard 配置关闭时,ItemsAdderAdditions 会允许功能。 * 如果 flag 名称与非 `StateFlag` 冲突,该 flag 会被禁用并记录警告。 ## 故障排查 [#故障排查] * 如果 flag 命令提示 flag 不存在,请在安装 WorldGuard 后重启,让 ItemsAdderAdditions 在启动时注册 flag。 * 如果功能仍然运行,请检查 `config.yml`,确认相关 `worldguard.flags.*` 选项为 `true`。 * 对动作使用带连字符的动作 flag 名称,不要使用下划线。 * 检查服务器日志中的 flag 冲突警告。 ## 相关页面 [#相关页面] * [配置](/zh/docs/configuration) * [Storage behaviour](/zh/docs/behaviours/storage) * [Contact effect behaviour](/zh/docs/behaviours/contact-effect) * [Stackable behaviour](/zh/docs/behaviours/stackable) * [Bed behaviour](/zh/docs/behaviours/bed) * [自定义画](/zh/docs/custom-paintings) * [动作参数](/zh/docs/actions/parameters) * [进度触发器](/zh/docs/advancements/triggers) # 酿造 (/zh/docs/recipes/brewing) ItemsAdderAdditions 为 brewing stands 添加了 `brewing` 配方类型。它会注册 Paper potion mix,并支持精确匹配 ItemsAdder、MMOItems 和原版物品。 ## 基础配方 [#基础配方] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 1 result: item: my_pack:ruby_elixir brew_time: 400 fuel_cost: 1 ``` `base` 是输入瓶的推荐 key。旧 key `input` 仍然可用。 ## 选项 [#选项] | 键 | 类型 | 默认值 | 描述 | | -------------------- | ------- | ------ | ------------------------------- | | `enabled` | boolean | `true` | 设为 `false` 可跳过该配方。 | | `base.item` | string | *(必填)* | 必需的输入瓶/物品。也接受旧路径 `input.item`。 | | `ingredient.item` | string | *(必填)* | 必需的酿造原料。 | | `ingredient.consume` | integer | `1` | 消耗的原料物品数量。必须大于 `0`。 | | `result.item` | string | *(必填)* | 输出物品。 | | `result.amount` | integer | `1` | 酿造输出会限制为每个瓶槽一个物品。 | | `brew_time` | integer | `400` | 酿造时间,单位为 tick。必须大于 `0`。 | | `fuel_cost` | integer | `1` | 消耗的 blaze powder 燃料单位。必须大于 `0`。 | | `on_complete` | section | *(无)* | 酿造完成后的可选声音和命令动作。 | ## 物品引用 [#物品引用] `base.item`、`ingredient.item` 和 `result.item` 可以使用: * `POTION` 或 `minecraft:awkward_potion` 等原版材质 * `my_pack:ruby_dust` 等 ItemsAdder 物品 * `mmoitems:material:ruby_dust` 等 MMOItems 物品 这里不能使用标签,因为酿造必须比较具体物品堆叠。支持的物品格式请见 [ID](/zh/docs/compatibility/ids)。 ## 完成动作 [#完成动作] `on_complete` 会在 brewing stand 完成且至少有一名玩家正在查看时运行。 ```yaml on_complete: sound: name: minecraft:block.brewing_stand.brew source: master volume: 1.0 pitch: 1.0 commands: reward: command: "say {player} brewed a ruby elixir" as_console: true ``` `{player}` 会替换为正在查看的玩家名称。命令默认以玩家身份运行,除非设置 `as_console: true`。 ## 完整示例 [#完整示例] ```yaml info: namespace: my_pack recipes: brewing: ruby_elixir: enabled: true base: item: minecraft:awkward_potion ingredient: item: my_pack:ruby_dust consume: 2 result: item: my_pack:ruby_elixir amount: 1 brew_time: 600 fuel_cost: 2 on_complete: sound: name: minecraft:entity.player.levelup source: master ``` ## 常见错误 [#常见错误] * 将 `result.amount` 设为大于 `1`。Brewing stands 每个瓶槽只能容纳一个结果物品,因此数量会被限制为 `1`。 * 使用 `#minecraft:*` 标签。Brewing 配方匹配精确物品堆叠,不匹配标签。 * 将 `fuel_cost` 设为高于 stand 当前燃料。燃料不足时配方不会完成。 ## 重载行为 [#重载行为] 修改 brewing 配方后运行 `/iareload`。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [MMOItems 兼容性](/zh/docs/compatibility/mmoitems) # 营火 (/zh/docs/recipes/campfire-cooking) 无需创建额外的配方文件即可添加营火配方 ## 参数 [#参数] ### `enabled` [#enabled] 可选。默认为 `true`。设置为 `false` 可跳过注册该配方 ### `ingredient.item` [#ingredientitem] 必填。配方的输入物品。可使用原版材质、ItemsAdder 物品或 MMOItems 物品。见 [ID](/zh/docs/compatibility/ids)。 ```yaml ingredient: item: BEEF ``` ```yaml ingredient: item: my_pack:raw_fish_fillet ``` ```yaml ingredient: item: mmoitems:consumable:raw_fish ``` ### `result.item` [#resultitem] 必填。烹饪后的输出物品 ```yaml result: item: COOKED_BEEF ``` ### `result.amount` [#resultamount] 可选。默认为 `1`。产出的物品数量 ### `cook_time` [#cook_time] 可选。默认为 `600` 刻。烹饪时间。20 刻 = 1 秒 ### `exp` [#exp] 可选。默认为 `0.0`。取出烹饪结果时授予的经验值 ## 完整示例 [#完整示例] ```yaml info: namespace: my_pack recipes: campfire_cooking: roasted_berry_skewer: ingredient: item: my_pack:berry_skewer_raw result: item: my_pack:berry_skewer_roasted amount: 1 cook_time: 160 exp: 0.25 ``` ## 备注 [#备注] * 支持原版、ItemsAdder 和 MMOItems 物品 * 此处不支持 `#minecraft:fishes` 等标签,因为营火配方需要一个具体的输入物品堆叠 * `roasted_berry_skewer` 等配方 ID 是内部标识符 * 命名空间来自 `info.namespace` ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [MMOItems 兼容性](/zh/docs/compatibility/mmoitems) # 合成 (/zh/docs/recipes/crafting) ItemsAdderAdditions 新增了一种高级合成配方类型,名为 `iaa_crafting_table`。它同时支持 3x3 合成台配方和 2x2 玩家背包合成配方。`iaa_crafting` 是它的别名 当你需要标准 `crafting_table` 类型不具备的额外原料验证功能时,可使用此类型: * 原版物品/方块标签 * ItemsAdder、MMOItems 和原版物品原料 * 原料数量 * 原料耐久度损耗 * 替换物品 * 忽略耐久度匹配 * 药水类型筛选 * 无序原料列表 ## 重要提示 [#重要提示] 使用这些额外功能的配方必须放置在: ```yaml recipes: iaa_crafting_table: ``` ```yaml recipes: iaa_crafting: ``` 新文件建议使用 `iaa_crafting_table`。`iaa_crafting` 行为相同,并作为别名存在。 如果你只需要普通的 ItemsAdder 合成功能,可以继续使用常规的 `crafting_table` 配方类型 ## 基础有序配方 [#基础有序配方] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: wooden_scythe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ## 基础无序配方 [#基础无序配方] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: mega_diamond: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 - item: COPPER_INGOT amount: 2 result: item: DIAMOND amount: 3 ``` ## 配置结构 [#配置结构] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: my_recipe: enabled: true permission: "my_pack.recipe.use" pattern: - "ABC" - "DEF" - "GHI" ingredients: A: STICK result: item: DIAMOND amount: 1 ``` ## 支持的标准配方功能 [#支持的标准配方功能] `iaa_crafting_table` 同样支持你可能已从 ItemsAdder 了解的常见合成功能,例如: * `enabled` * `permission` * 使用 `pattern` 的有序配方 * 无序配方 * 多个 `pattern...` 变体 * `potion_type` 原料筛选 ## ItemsAdderAdditions 的额外功能 [#itemsadderadditions-的额外功能] 使用 `iaa_crafting_table` 的主要原因在于它额外的原料谓词支持: * 使用 `#minecraft:tag` 的原版标签 * 使用 `mmoitems:type:id` 的 MMOItems 原料 * 单个原料的 `amount` * 单个原料的 `damage` * 单个原料的 `replacement` * `ignore_durability` * 无序列表式原料格式 ## 参数 [#参数] ### `enabled` [#enabled] 可选。默认为 `true` 如果设置为 `false`,该配方将不会被注册 ### `permission` [#permission] 可选 如果设置此项,玩家必须拥有此权限才能看到该配方的合成结果并进行合成 ```yaml permission: "my_pack.recipe.use" ``` ### `shapeless` [#shapeless] 可选。默认为 `false` 如果设置为 `true`,该配方将被视为无序配方 ## 合成完成动作 [#合成完成动作] 使用 `on_complete` 可在配方合成完成时播放音效和/或执行命令 ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # 可选,默认: master volume: 1.0 # 可选,默认: 1.0 pitch: 1.0 # 可选,默认: 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # 可选,默认: false ``` `{player}` 会被替换为进行合成的玩家名称。命令默认以玩家身份执行;设置 `as_console: true` 可从控制台执行 ## 结果 [#结果] ### `result.item` [#resultitem] 必填 输出物品 支持原版材质、ItemsAdder 物品和 MMOItems 物品。标签仅对原料有效,不能用于结果 ```yaml result: item: "my_pack:custom_sword" ``` ### `result.amount` [#resultamount] 可选。默认为 `1` ```yaml result: item: DIAMOND amount: 3 ``` ### `result.durability` [#resultdurability] 可选。从 1.0.13 开始可用于能够损耗的结果物品。 设置结果物品的**剩余耐久度**,而不是损坏值。该值必须在 `0` 与物品的最大耐久度之间。通过结果 components 设置的自定义最大耐久度同样会被正确使用。 ```yaml result: item: DIAMOND_PICKAXE durability: 250 ``` ## 有序配方 [#有序配方] 有序配方使用 `pattern` 和以字符为键的 `ingredients` 部分 ```yaml my_recipe: pattern: - "XPP" - "PXS" - "XXS" ingredients: P: "#minecraft:planks" S: STICK result: item: "my_pack:wooden_scythe" ``` ### 网格注意事项 [#网格注意事项] * 原料键必须是单个字符 * `X` 表示空槽位。不要将 `X` 定义为原料 * 其他未在 `ingredients` 中定义的字符同样被视为空槽位 * 支持使用 `pattern_1`、`pattern_2` 等键定义多个配方变体 ## 无序配方 [#无序配方] 无序配方使用: ```yaml shapeless: true ``` 并且可以使用原料列表: ```yaml my_recipe: shapeless: true ingredients: - item: IRON_INGOT amount: 2 - item: GOLD_INGOT amount: 2 result: item: DIAMOND ``` ## 原料格式 [#原料格式] 原料支持多种格式 ### 简单字符串 [#简单字符串] ```yaml ingredients: S: STICK P: "#minecraft:planks" C: "my_pack:custom_part" M: "mmoitems:material:ruby_shard" ``` ### 详细对象 [#详细对象] ```yaml ingredients: S: item: STICK amount: 2 damage: 5 replacement: STICK ignore_durability: true potion_type: minecraft:water ``` ### 无序列表格式 [#无序列表格式] ```yaml ingredients: - SNOWBALL - item: WATER_BUCKET replacement: BUCKET ``` ## 高级原料功能 [#高级原料功能] ### 标签 [#标签] 通过在值前添加 `#` 前缀来使用原版 Minecraft 物品或方块标签。标签仅匹配原版注册表条目,不会匹配 ItemsAdder 或 MMOItems 内容 ```yaml ingredients: P: "#minecraft:planks" ``` 该标签中的任何物品都会匹配 ### `amount` [#amount] 要求提供多个相同原料 ```yaml ingredients: I: item: IRON_INGOT amount: 3 ``` ### `damage` [#damage] 不消耗原料,而是按配置的数量损耗其耐久度 适用于在合成中使用的工具 ```yaml ingredients: H: item: IRON_PICKAXE damage: 10 ``` ### `replacement` [#replacement] 合成后将原料替换为另一物品 适用于桶、瓶子、模具和类似的容器 ```yaml ingredients: W: item: WATER_BUCKET replacement: BUCKET ``` ### `ignore_durability` [#ignore_durability] 匹配物品时忽略当前耐久度值 ```yaml ingredients: T: item: IRON_PICKAXE ignore_durability: true ``` ### `potion_type` [#potion_type] 将药水原料限定为特定的基础药水类型 ```yaml ingredients: P: item: POTION potion_type: minecraft:jump_boost ``` ## 完整有序配方示例 [#完整有序配方示例] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: reinforced_blade: enabled: true permission: "my_pack.recipes.reinforced_blade" pattern: - "XIT" - "XSI" - "SXX" ingredients: I: item: IRON_INGOT amount: 2 S: STICK T: item: IRON_PICKAXE damage: 8 ignore_durability: true result: item: "my_pack:reinforced_blade" amount: 1 ``` ## 完整无序配方示例 [#完整无序配方示例] ```yaml info: namespace: my_pack recipes: iaa_crafting_table: purified_bottle: shapeless: true ingredients: - item: POTION potion_type: minecraft:water - item: DIAMOND amount: 2 result: item: "my_pack:purified_bottle" ``` ## 支持的物品引用 [#支持的物品引用] 共享 ID 参考请见 [ID](/zh/docs/compatibility/ids)。 原料和结果物品可以使用: * 原版材质名,如 `STICK` 或 `DIAMOND` * 原版命名空间 ID,如 `minecraft:stick` * ItemsAdder ID,如 `namespace:item` * MMOItems ID,如 `mmoitems:type:id` 原料还可以额外使用原版标签(如 `#minecraft:planks`)和 ItemsAdderAdditions 自定义物品标签。标签不能用作结果或替换物品。 ## 备注 [#备注] * `replacement` 和 `damage` 在合成时生效 * 带有高级谓词的无序配方应使用列表格式 * `iaa_crafting_table` 是一个额外的高级配方类型,而非 ItemsAdder `crafting_table` 的替代品 * `iaa_crafting` 是 `iaa_crafting_table` 的别名 * 每个 `pattern...` 键都会作为 shaped pattern 变体加载。例如:`pattern`、`pattern_2`、`pattern_alt`。 * 匿名 shapeless 原料列表最多支持 26 个条目。 ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [MMOItems 兼容性](/zh/docs/compatibility/mmoitems) * [自定义标签](/zh/docs/custom-tags) # 切石机 (/zh/docs/recipes/stonecutter) 无需创建额外的配方文件即可添加切石机配方 ## 参数 [#参数] ### `enabled` [#enabled] 可选。默认为 `true`。设置为 `false` 可跳过注册该配方 ### `ingredient.item` [#ingredientitem] 必填。显示在切石机中的输入物品。可使用原版材质、ItemsAdder 物品或 MMOItems 物品。见 [ID](/zh/docs/compatibility/ids)。 ```yaml ingredient: item: STONE ``` ```yaml ingredient: item: my_pack:rough_marble ``` ```yaml ingredient: item: mmoitems:material:rough_marble ``` ### `result.item` [#resultitem] 必填。输出物品 ```yaml result: item: STONE_BRICKS ``` ### `result.amount` [#resultamount] 可选。默认为 `1`。产出的物品数量 ## 合成完成动作 [#合成完成动作] 使用 `on_complete` 可在配方合成完成时播放音效和/或执行命令 ```yaml on_complete: sound: name: "minecraft:entity.player.levelup" source: master # 可选,默认: master volume: 1.0 # 可选,默认: 1.0 pitch: 1.0 # 可选,默认: 1.0 commands: reward: command: "give {player} gold_ingot 4" as_console: true # 可选,默认: false ``` `{player}` 会被替换为进行合成的玩家名称。命令默认以玩家身份执行;设置 `as_console: true` 可从控制台执行 ## 完整示例 [#完整示例] ```yaml info: namespace: my_pack recipes: stonecutter: marble_tiles: ingredient: item: my_pack:rough_marble result: item: my_pack:marble_tiles amount: 2 on_complete: sound: name: "minecraft:block.stonecutter.use" commands: reward: command: "give {player} diamond 1" as_console: true ``` ## 备注 [#备注] * 支持原版、ItemsAdder 和 MMOItems 物品 * 此处不支持 `#minecraft:stone_tool_materials` 等标签,因为切石机需要一个具体的输入物品堆叠 * `marble_tiles` 等配方 ID 是内部标识符 * 命名空间来自 `info.namespace` ## 相关页面 [#相关页面] * [ID](/zh/docs/compatibility/ids) * [MMOItems 兼容性](/zh/docs/compatibility/mmoitems) # 世界生成 (/zh/docs/worldgen/world-generation) 两种世界生成模式可以在新生成的区块中生成自定义家具。二者都直接在 ItemsAdder 内容 YML 文件中定义。 | | World Populator | Surface Decorator | | -------- | ----------------------------- | -------------------- | | YAML key | `blocks_populators` | `surface_decorators` | | 放置方式 | Vein-based(成簇) | 表面散布 | | 密度控制 | `vein_blocks` + `chunk_veins` | `amount` | | 表面配置 key | `replaceable_blocks` | `bottom_blocks` | **World Populator** 适合成簇生成(蘑菇、类似矿脉的组合)。**Surface Decorator** 适合均匀散布在表面的物体(花、小石头)。 ## World Populator [#world-populator] 在区块生成期间以 vein 风格簇状生成家具。使用 `blocks_populators` key(也接受旧 key `worlds_populators`)。 ```yaml info: namespace: my_pack blocks_populators: big_mushroom: enabled: true furniture: "my_pack:big_mushroom" worlds: - world biomes: - minecraft:dark_forest replaceable_blocks: - GRASS_BLOCK - DIRT vein_blocks: 1 chunk_veins: 3 chunk_chance: 25.0 min_height: 60 max_height: 100 ``` | 键 | 类型 | 默认值 | 描述 | | ------------------------ | -------------- | ------- | ------------------------------------------------------ | | `enabled` | boolean | `true` | 设为 `false` 可跳过且不删除条目。 | | `furniture` | `namespace:id` | *(必填)* | 要生成的 ItemsAdder 家具。见 [ID](/zh/docs/compatibility/ids)。 | | `worlds` | list | *(全部)* | 限定世界名称。支持 `world_*` 等 wildcard pattern。 | | `biomes` | list | *(全部)* | 生物群系 ID(如 `minecraft:forest`)。所有 ID 都必须有效,否则跳过该条目。 | | `replaceable_blocks` | list | *(任意)* | 生成点正下方方块允许使用的材质。 | | `vein_blocks` | integer | `1` | 每次 vein 尝试生成的家具数量。 | | `chunk_veins` | integer | `4` | 每个区块的 vein 尝试次数。 | | `chunk_chance` | double | `-1` | 每个区块 0-100 的概率。`-1` = 总是生成。 | | `min_height` | integer | `60` | 最小 Y 高度。必须小于 `max_height`。 | | `max_height` | integer | `80` | 最大 Y 高度。 | | `allow_liquid_placement` | boolean | `false` | 允许生成在水或岩浆中。 | 仍接受旧别名:`worlds_populators` 对应 `blocks_populators`,`amount` 对应 `vein_blocks`,`iterations` 对应 `chunk_veins`,`chance` 对应 `chunk_chance`。 ## Surface Decorator [#surface-decorator] 将家具散布在新生成地形的表面。使用 `surface_decorators` key。 ```yaml info: namespace: my_pack surface_decorators: small_flower: enabled: true furniture: "my_pack:small_flower" worlds: - world biomes: - minecraft:plains - minecraft:sunflower_plains bottom_blocks: - GRASS_BLOCK amount: 4 chunk_chance: 50.0 min_height: 60 max_height: 120 ``` | 键 | 类型 | 默认值 | 描述 | | ------------------------ | -------------- | ------- | ------------------------------------------------------ | | `enabled` | boolean | `true` | 设为 `false` 可跳过且不删除条目。 | | `furniture` | `namespace:id` | *(必填)* | 要生成的 ItemsAdder 家具。见 [ID](/zh/docs/compatibility/ids)。 | | `worlds` | list | *(全部)* | 限定世界名称。支持 `world_*` 等 wildcard pattern。 | | `biomes` | list | *(全部)* | 生物群系 ID(如 `minecraft:plains`)。所有 ID 都必须有效,否则跳过该条目。 | | `bottom_blocks` | list | *(任意)* | 生成点正下方方块允许使用的材质。 | | `amount` | integer | `4` | 每个区块的放置尝试次数。 | | `chunk_chance` | double | `-1` | 每个区块 0-100 的概率。`-1` = 总是生成。 | | `min_height` | integer | `60` | 最小 Y 高度。必须小于 `max_height`。 | | `max_height` | integer | `80` | 最大 Y 高度。 | | `allow_liquid_surface` | boolean | `false` | 允许生成点下方的液体方块作为有效表面。 | | `allow_liquid_placement` | boolean | `false` | 允许生成在水或岩浆中。 | 旧别名 `chance` 可用于 `chunk_chance`。 ## 备注 [#备注] * 只有新生成的区块会触发生成。已有区块不受影响。 * 家具必须在条目加载前已由 ItemsAdder 注册。 * 无效生物群系 ID 会导致整个条目被跳过。 * Nether 中的 surface decorators 会从 `max_height` 向下扫描到 `min_height`。 * 启用 `allow_liquid_placement` 时,普通维度的表面装饰会使用 ocean-floor heightmap,以便找到水下表面。