### ItemsAdder Item Configuration Example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Example of an ItemsAdder item configuration. ```yaml items: watering_can_1: display_name: display-name-watering_can_1 resource: generate: false material: WOODEN_SWORD model_path: item/wateringcans/watering_can_1 item_flags: - HIDE_ATTRIBUTES lore: - '1111111111' - '2222' - '333333' ``` -------------------------------- ### NBT Configuration Examples Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Three YAML examples showing how to configure NBT data: direct values, expressions, ItemsAdder integration, and Oraxen PublicBukkitValues. ```yaml nbt: int_value: 10 double_value: 1.0 byte_array: (ByteArray) [0, 1, 2] expression: (Int) 1 + 2 * 3 + 4 ``` ```yaml nbt: itemsadder: namespace: '(String) momirealms' id: 'rainbow_fish' ``` ```yaml nbt: PublicBukkitValues: oraxen:id: alchemist ``` -------------------------------- ### Configure /contents/util YAML example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example YAML for a util configuration under /contents/util. Shows the item part with material, display, and custom-model-data. ```yaml fishfinder: # Item part material: PAPER display: name: '<#1E90FF>Fish Finder' lore: - '' - '<#7FFFD4>Desciption:' - ' - Compact yet powerful, it scans the waters' - ' - with precision, revealing the variety of' - ' - fish species lurking below the surface.' - ' - Whether you''re in uncharted territories or' - ' - familiar waters, this device ensures you''re' - ' - always informed about your aquatic neighbors.' - '' custom-model-data: 50000 ``` -------------------------------- ### Configure Start and End Actions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/competition Placeholders for actions to be executed at the start and end of the competition. ```yaml start-actions: ... end-actions: ... ``` -------------------------------- ### Configure /contents/item YAML example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example YAML for an item configuration under /contents/item. Shows the item part (material, display, custom-model-data) and the loot part (nick, show-in-fishfinder, disable-stat, disable-game, instant-game, prevent-grabbing). ```yaml rubbish: # Item part material: cod display: name: <#00BFFF>Radioactive Fish lore: - Protect the environment... custom-model-data: 50000 # Loot part nick: <#00BFFF>Radioactive Fish show-in-fishfinder: false disable-stat: true disable-game: true instant-game: false prevent-grabbing: false ``` -------------------------------- ### Implementing LavaFishingMechanic Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/api/custom-hook-logics An example implementation of the HookMechanic interface for lava fishing, demonstrating how to handle hook state, start conditions, and periodic tasks. ```java package net.momirealms.customfishing.api.mechanic.fishing.hook; import net.momirealms.customfishing.api.BukkitCustomFishingPlugin; import net.momirealms.customfishing.api.event.FishingHookStateEvent; import net.momirealms.customfishing.api.mechanic.config.ConfigManager; import net.momirealms.customfishing.api.mechanic.context.Context; import net.momirealms.customfishing.api.mechanic.context.ContextKeys; import net.momirealms.customfishing.api.mechanic.effect.Effect; import net.momirealms.customfishing.api.mechanic.effect.EffectProperties; import net.momirealms.customfishing.api.util.EventUtils; import net.momirealms.customfishing.common.plugin.scheduler.SchedulerTask; import net.momirealms.customfishing.common.util.RandomUtils; import net.momirealms.sparrow.heart.SparrowHeart; import net.momirealms.sparrow.heart.feature.fluid.FluidData; import org.bukkit.*; import org.bukkit.block.BlockFace; import org.bukkit.entity.ArmorStand; import org.bukkit.entity.FishHook; import org.bukkit.entity.Player; import org.bukkit.persistence.PersistentDataType; import org.bukkit.util.Vector; import java.util.Objects; import java.util.concurrent.ThreadLocalRandom; public class LavaFishingMechanic implements HookMechanic { private final FishHook hook; private final Effect gearsEffect; private final Context context; private ArmorStand tempEntity; private SchedulerTask task; private int timeUntilLured; private int timeUntilHooked; private int nibble; private boolean hooked; private float fishAngle; private int currentState; private int jumpTimer; private boolean firstTime = true; private boolean freeze = false; public LavaFishingMechanic(FishHook hook, Effect gearsEffect, Context context) { this.hook = hook; this.gearsEffect = gearsEffect; this.context = context; } @Override public boolean canStart() { if (!(boolean) gearsEffect.properties().getOrDefault(EffectProperties.LAVA_FISHING, false)) { return false; } if (hook.isInLava()) { return true; } float lavaHeight = 0F; Location location = this.hook.getLocation(); FluidData fluidData = SparrowHeart.getInstance().getFluidData(location); if (fluidData.getFluidType() == Fluid.LAVA || fluidData.getFluidType() == Fluid.FLOWING_LAVA) { lavaHeight = (float) (fluidData.getLevel() * 0.125); } return lavaHeight > 0 && location.getY() % 1 <= lavaHeight; } @Override public boolean shouldStop() { if (hook.isInLava()) { return false; } return hook.isOnGround() || (hook.getLocation().getBlock().getType() != Material.LAVA && hook.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() != Material.LAVA); } @Override public void preStart() { this.context.arg(ContextKeys.SURROUNDING, EffectProperties.LAVA_FISHING.key()); } @Override public void start(Effect finalEffect) { EventUtils.fireAndForget(new FishingHookStateEvent(context.holder(), hook, FishingHookStateEvent.State.LAND)); this.setWaitTime(finalEffect); this.task = BukkitCustomFishingPlugin.getInstance().getScheduler().sync().runRepeating(() -> { Location location = this.hook.getLocation(); float lavaHeight = 0F; FluidData fluidData = SparrowHeart.getInstance().getFluidData(location); if (fluidData.getFluidType() == Fluid.LAVA || fluidData.getFluidType() == Fluid.FLOWING_LAVA) { lavaHeight = (float) (fluidData.getLevel() * 0.125); } if (this.nibble > 0) { --this.nibble; if (location.getY() % 1 <= lavaHeight) { this.jumpTimer++; if (this.jumpTimer >= 4) { this.jumpTimer = 0; this.hook.setVelocity(new Vector(0,0.24,0)); } } if (this.nibble <= 0) { ``` -------------------------------- ### Configure Start Weekdays Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/competition Specifies the days of the week the competition starts. ```yaml start-weekday: - 6 - 7 ``` -------------------------------- ### Configure /contents/entity YAML example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example YAML for an entity configuration under /contents/entity. Shows the loot part (show-in-fishfinder, disable-stat, disable-game, nick) and the entity part (entity, velocity). ```yaml magma_cube: # Loot part show-in-fishfinder: false disable-stat: true disable-game: true nick: Magma Cube # Entity Part entity: magma_cube velocity: horizontal: 1.1 vertical: 1.3 ``` -------------------------------- ### Enable Immediate Mini-Game Start Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/loot If true, the related mini-game starts immediately upon encountering the loot without delay. ```yaml instant-game: true ``` -------------------------------- ### Pack meta file (pack.yml) example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/add-new-contents Example of a pack.yml file with author, version, description, namespace, and enable fields. The namespace is used as default for unqualified names in YAML configs. ```yaml author: XiaoMoMi version: 0.0.1 description: Default Assets for CraftEngine namespace: default enable: true # set `false` to disable this pack ``` -------------------------------- ### Configure Start Times Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/competition Defines the specific times during the day when the competition starts. ```yaml start-time: - '9:30' - '14:30' - '20:00' ``` -------------------------------- ### Material configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Sets the base material of the item. Supported from 1.17 to latest. ```yaml material: paper ``` -------------------------------- ### Amount configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Sets the quantity of the item. Supported from 1.17 to latest. ```yaml amount: 1 ``` -------------------------------- ### Perform an HTTP GET request to the documentation index Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine Use this HTTP GET request to query the documentation by providing an 'ask' parameter for your question and an optional 'goal' parameter for context. ```http GET https://mo-mi.gitbook.io/xiaomomi-plugins/plugin-wiki/click-here-to-start-your-jounery.md?ask=&goal= ``` -------------------------------- ### Particle Options Configuration Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/totem Examples of configuration options for REDSTONE and DUST_COLOR_TRANSITION particle types. ```yaml # REDSTONE options: color: 186,85,211 scale: 0.8 (0.1~4) # DUST_COLOR_TRANSITION options: from: 255,255,255 to: 0,0,0 scale: 0.8 ``` -------------------------------- ### Configure /contents/hook YAML example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example YAML for a hook configuration under /contents/hook. Includes the item part, effect part, and the hook's unique property 'lore-on-rod'. The 'max-durability' property is required for a hook to work. ```yaml delicate_hook: # Item part material: SHEARS display: name: '<#1E90FF>Delicate hook' lore: - '' - '<#7FFFD4>Desciption:' - ' - An embodiment of craftsmanship and allure, the hook' - ' - is not your average piece of tackle. Polished to' - ' - perfection and intricately designed, it gleams in the' - ' - water, irresistibly drawing high-quality fish closer.' - '' - '<#FFD700>Effects:' - ' - Increase the chance of getting high quality fish' max-durability: 16 <- This property is required for a hook to work # Effect part effects: group: type: group-mod value: - silver_star:+1 - golden_star:+1 # Hook's unique property # Decides the lore on rod lore-on-rod: - '' - '<#7FFFAA>Equipped hook:' - ' - Delicate hook: {dur} times left' ``` -------------------------------- ### Configure /contents/enchant YAML example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example YAML for an enchant configuration under /contents/enchant. Uses the key format 'namespace:enchant:level' and defines effects with a group-mod type. ```yaml # namespace:enchant:level minecraft:luck_of_the_sea:1: requirements: {} effects: group: type: group-mod value: - silver_star:+2 - golden_star:+1 ``` -------------------------------- ### Configure background-text with shadow and margins Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/custom-placeholders/background-nameplate-bubble-text Example configuration for background-text showing the use of background, text, shadow, and margin options. ```yaml background-text: weather: background: bedrock_1 text: '%np_image_weather% %np_shift_weather%' shadow: false left-margin: 1 right-margin: 1 ``` -------------------------------- ### Configure switch-text mapping Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/custom-placeholders/switch-text Example configuration mapping the %player_world% variable to specific world names with a default fallback. ```yaml switch-text: world: switch: '%player_world%' case: 'world': "Overworld" 'world_nether': "The Nether" 'world_the_end': "The End" default: "Unknown world" ``` -------------------------------- ### Specify compatible planting pots Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/watering-can Lists the planting pot types the watering can can be used with. The example includes 'default'. ```yaml # Specify which types of planting pots the watering can can be used with pot-whitelist: - default # Default pot type allowed ``` -------------------------------- ### Configure seat position and rotation Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/add-new-contents/entities/furniture/furniture-placement Examples of seat configuration with and without rotation. ```text 0,0,0 0 ``` ```text 0,0,0 ``` -------------------------------- ### Configure fonts for 1.19.4 servers Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/common-questions Example configuration for 1.19.4 servers using the unicode font setting. ```yaml # config.yml shift-fonts: shift_0: - space - nonlatin_european:7 - accented:9 - ascii:7 - unicode ``` -------------------------------- ### Configure shift_2 for money display Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/custom-placeholders/shift-text Example of creating a minimal shift font configuration for numeric displays. ```yaml # config.yml shift-fonts: shift_2: - "space" - "ascii:-15" ``` ```yaml # /configs/custom-placeholder.yml shift-text: money: text: "%vault_eco_balance%" font: shift_2 ``` -------------------------------- ### Display lore configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Defines a list of descriptive lines for the item. Each line can be formatted and colored. Supported from 1.17 to latest. ```yaml display: lore: - '' - '<#7FFFD4>Description:' - 'Made from natural ingredients...' - '...' ``` -------------------------------- ### Unbreakable configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Dictates whether the item is unbreakable. Supported from 1.17 to latest. ```yaml unbreakable: false ``` -------------------------------- ### Define multiple custom groups Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/weight-system-must-read Example showing how to define multiple custom group names instead of the default global-group. ```yaml river-group: list: [] conditions: {} sub-groups: {} ocean-group: list: [] conditions: {} sub-groups: {} nether-group: list: [] conditions: {} sub-groups: {} the-end-group: list: [] conditions: {} sub-groups: {} ``` -------------------------------- ### Configure Fishing Bait Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example configuration for magnetic bait, defining its appearance and specific hook-time and game-time effects. ```yaml magnetic_bait: # Item part material: paper display: name: 'Magnetic lures' lore: - '' - '<#7FFFD4>Desciption:' - 'Its radiant shimmer and unique energy pulse' - 'prove irresistible to curious fish, drawing' - 'them in with unprecedented speed. This is ' - 'not just a bait, it''s a spectacle that fish' - 'can''t help but investigate.' - '' - '<#FFD700>Effects:' - ' - Reduce hook time' - ' - More time for fishing' - '' custom-model-data: 50002 # Effect part effects: hooktime: type: hook-time value: 0.9 gametime: type: game-time value: 2 ``` -------------------------------- ### BattlePass Quest Configuration Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/compatibility/battlepass Example configuration for BattlePass quests using customfishing_loot and customfishing_group types. ```yaml quests: 1: # Any loot type: customfishing_loot variable: none name: 'Any loot' required-progress: 5 points: 10 item: material: FISHING_ROD name: '&eAny loot' lore: - '&7To complete this quest, you must' - '&7Catch 5 fish.' - '' - '&7(&a%percentage_progress%&7)' 2: # Specific loot type: customfishing_loot variable: tuna_fish name: 'Tuna' required-progress: 5 points: 10 item: material: FISHING_ROD name: '&bTuna Fish' lore: - '&7To complete this quest, you must' - '&7Catch 5 Tuna Fish.' - '' - '&7(&a%percentage_progress%&7)' 3: # Loot Group type: customfishing_group variable: river name: 'Catch fish is river' required-progress: 5 points: 10 item: material: FISHING_ROD name: '&cCatch fish is river' lore: - '&7To complete this quest, you must' - '&7Catch 5 river fish.' - '' - '&7(&a%percentage_progress%&7)' ``` -------------------------------- ### Configure bubble-text for chat Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/custom-placeholders/background-nameplate-bubble-text Example configuration for bubble-text defining a chat bubble style and text content. ```yaml bubble-text: chat: bubble: chat_1 text: 'Nice to meet you!' left-margin: 1 right-margin: 1 ``` -------------------------------- ### Get plugin instance Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/api/basic-operations Retrieves the BukkitCustomFishingPlugin instance, which is the main API entry point for CustomFishing. ```APIDOC ## Get plugin instance ### Description Retrieves the BukkitCustomFishingPlugin instance, which is the main API entry point for CustomFishing. ### Code Example ```java BukkitCustomFishingPlugin api = BukkitCustomFishingPlugin.getInstance() ``` ``` -------------------------------- ### Components Example 2: minecraft:tool Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Configures the tool component with block breaking rules, including speed and correct_for_drops. ```yaml components: minecraft:tool: rules: - blocks: "#minecraft:mineable/axe" speed: 300.0 correct_for_drops: true ``` -------------------------------- ### config.yml Example Configuration Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/config.yml A sample configuration showing crop settings, season sync, vanilla farmland options, hologram offset correction, override blocks, and other settings. Includes comments explaining each option. ```yaml # You can use a list of IDs here; vanilla blocks are also supported id: 'greenhouse_glass' type: CHORUS range: 5 # Synchronize seasons with another world sync-season: enable: false reference: world # Vanilla farmland mechanics vanilla-farmland: # Disable the moisture mechanics of vanilla farmland # This is useful if you prefer vanilla farmland but the water system conflicts with vanilla mechanics disable-moisture-mechanic: false # Prevent entities from trampling farmland prevent-trampling: false # Set hologram offset correction for different blocks hologram-offset-correction: "crop_stage_death": 0 # Specify block types that should be overridden by the plugin # Some common crops: WHEAT/CARROTS/POTATOES/BEETROOTS/SWEET_BERRY_BUSH override-vanilla-blocks: [] other-settings: # It is recommended to use MiniMessage format. If you want to use legacy color codes ("&"), enable support below. # Disabling this can improve performance legacy-color-code-support: true # Requires PlaceholderAPI to function placeholder-register: '{skill-level}': '%levelplugin_farming%' # To use items from other plugins item-detection-order: [] # Whether to protect the original lore of items # Uses the scoreboard component to identify the plugin's lore, # which may conflict with some plugins still using SpigotAPI#ItemMeta protect-original-lore: false # Whether to verify if a block/furniture matches the data in CustomCrops # Enable this if using Oraxen, as its API is more reliable double-check: false ``` -------------------------------- ### Version-based config block merging Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/add-new-contents Example of a versioned block that gets merged into the parent section, overriding existing keys and adding new ones. ```yaml # other_config.yml server_properties: motd: "A generic server" online_mode: true # This is a normal map, but contains a versioned block # It's not a value selector because it has regular keys (motd, online_mode) $$1.21.4: # This block gets merged into server_properties motd: "A 1.21.4 Server!" # Overrides the generic motd new_feature_enabled: true # Adds a new key ``` -------------------------------- ### Tag configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Adds a Custom Fishing tag to the item. Disabling this might cause issues. Supported from 1.17 to latest. ```yaml tag: false ``` -------------------------------- ### Configure weight distribution using group placeholders Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/weight-system-must-read Example showing how to add weight to a group and distribute that total weight to another group using the {group_xxx} placeholder. ```yaml global-group: list: - group_for_each:ocean:+10 - group_total:river:={group_ocean} conditions: {} sub-groups: {} ``` -------------------------------- ### Configure a Fishing Rod Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/how-to-configure-each-file Example configuration for a beginner fishing rod, including item display properties, custom model data, and hook-time/difficulty effects. ```yaml beginner_rod: # Item part material: fishing_rod display: name: "<#EEE9E9>Beginner's Fishing Rod" lore: - '' - '<#7FFFD4>Desciption:' - ' - Specially designed for those new to the art ' - ' - of fishing, the Beginner''s Fishing Rod is a' - ' - novice angler''s best friend.' - '' - '<#FFD700>Effects:' - ' - Increase the hook time' - ' - Reduces the challenge of fishing' custom-model-data: 50001 max-durability: 64 # Effect part effects: time_effect: type: hook-time value: 1.8 difficulty: type: difficulty value: -8 ``` -------------------------------- ### Get CustomCrops world Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Retrieves the CustomCrops world manager and gets the world for a Bukkit world. ```java BukkitCustomCropsPlugin.getInstance().getWorldManager().getWorld(Bukkit.getWorld("world")); ``` -------------------------------- ### Get built-in block/item type from Registry Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Gets built-in block and item mechanics from BuiltInBlockMechanics and BuiltInItemMechanics. ```java PotBlock potBlock = (PotBlock) BuiltInBlockMechanics.POT.mechanic(); SeedItem seedItem = (SeedItem) BuiltInItemMechanics.SEED.mechanic(); ``` -------------------------------- ### Get the block type from blockstate Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Retrieves the block type from a blockstate and checks if it is a CropBlock to get its config. ```java CustomCropsBlock block = blockState.type(); if (block instanceof CropBlock cropBlock) { CropConfig cropConfig = cropBlock.config(blockState); } ``` -------------------------------- ### Complete item configuration example (common_bait) Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/item Shows a full item configuration with material, display name and lore, and custom model data. The key 'common_bait' is the identifier for the item. ```yaml common_bait: material: paper display: name: '<#00BFFF>Common lures' lore: - '' - '<#7FFFD4>Desciption:' - 'Made from natural ingredients, it attracts' - "fish in a calm and steady manner. It's the" - 'go-to choice for those who prefer a ' - 'straightforward and reliable fishing experience.' - '' - '<#FFD700>Effects:' - ' - Reduce fishing difficulty' - '' custom-model-data: 50001 ``` -------------------------------- ### Totem Pattern Example 1 Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/totem A basic example of a totem pattern definition using layers and specific block types. ```yaml pattern: core: 4,2,2 # layer:4 line:2 index:2 -> DAYLIGHT_DETECTOR layer: 1: - 'AIR GOLD_BLOCK AIR' - 'GOLD_BLOCK GOLD_BLOCK GOLD_BLOCK' - 'AIR GOLD_BLOCK AIR' 2: - 'AIR AIR AIR' - 'AIR GOLD_BLOCK AIR' - 'AIR AIR AIR' 3: - 'AIR AIR AIR' - 'AIR LIGHTNING_ROD AIR' - 'AIR AIR AIR' 4: - 'AIR AIR AIR' - 'AIR DAYLIGHT_DETECTOR AIR' - 'AIR AIR AIR' ``` -------------------------------- ### Configure Ground Placement for Furniture Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/add-new-contents/entities/furniture/furniture-placement Example configuration for a bench using the ground placement mode, defining rotation rules, display elements, and interaction hitboxes. ```yaml furniture: default:bench: placement: ground: # create offsets for the drops so they won't spawn in blocks loot-spawn-offset: 0,0,0 # Supports External Models Here # model-engine: blueprint_id # better-model: blueprint_id rules: # ANY / FOUR / EIGHT / SIXTEEN / NORTH / EAST / WEST / SOUTH rotation: EIGHT # ANY / CENTER / HALF / QUARTER / CORNER alignment: CENTER elements: - item: default:bench display-transform: NONE billboard: FIXED position: 0.5,0,0 translation: 0,0.5,0 apply-dyed-color: true # default: true hitboxes: - type: interaction # non-collision hitbox can-use-item-on: false # default: false can-be-hit-by-projectile: false # default: false blocks-building: false # default: true position: 0,0,0 width: 1 height: 2 # 'width'/'height' can be simplified to 'scale' # scale: 1,2 interactive: true # whether the interaction entity is interactive seats: - 0,0,-0.1 0 ``` -------------------------------- ### Totem Pattern Example 2 with Block Data and OR Logic Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/totem An advanced pattern example demonstrating the use of block data, wildcards, and the OR operator. ```yaml pattern: core: 3,1,2 layer: 4: - '*_STAIRS{face=east} OBSERVER{face=south} *_STAIRS{face=west}' 3: - 'AIR CRYING_OBSIDIAN AIR' 2: - 'AIR *_LOG{axis=y}||*_PILLAR{axis=y} AIR' 1: - 'AIR ANVIL AIR' ``` -------------------------------- ### Calculate entry weights based on other entries Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/weight-system-must-read Example demonstrating how to set specific item weights as a percentage of another entry's weight using the {entry_xxx} placeholder. ```yaml global-group: list: - tuna_fish:+10 - 'tuna_fish_silver_star:={entry_tuna_fish}*0.3' - 'tuna_fish_golden_star:={entry_tuna_fish}*0.1' conditions: {} sub-groups: {} ``` -------------------------------- ### Full Totem Particle Example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/totem A comprehensive example showing multiple particle definitions using various polar coordinate formulas to create complex shapes. ```yaml particles: particle_0: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '{radius}' vertical: '-1.5' theta: draw-interval: 0.2 range: - 0~360 task: period: 4 delay: 0 particle_1: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '{radius}/(2*cos({theta}))' vertical: '-1.5' theta: draw-interval: 0.2 range: - 0~60 - 120~180 task: period: 4 delay: 0 particle_2: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '-{radius}/(2*cos({theta}))' vertical: '-1.5' theta: draw-interval: 0.2 range: - 0~60 - 120~180 task: period: 4 delay: 0 particle_3: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '({radius})/(cos({theta}) + sqrt(3) * sin({theta}))' vertical: '-1.5' theta: draw-interval: 0.2 range: - 0~120 task: period: 4 delay: 0 particle_4: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '-({radius})/(cos({theta}) + sqrt(3) * sin({theta}))' vertical: '-1.5' theta: draw-interval: 0.2 range: - 0~120 task: period: 4 delay: 0 particle_5: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '-({radius})/(cos({theta}) - sqrt(3) * sin({theta}))' vertical: '-1.5' theta: draw-interval: 0.2 range: - 60~180 task: period: 4 delay: 0 particle_6: type: REDSTONE options: color: 178,34,34 scale: 1 polar-coordinates-formula: horizontal: '({radius})/(cos({theta}) - sqrt(3) * sin({theta}))' vertical: '-1.5' theta: draw-interval: 0.2 range: - 60~180 task: period: 4 delay: 0 ``` -------------------------------- ### Implement Game Logic and Configuration Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/api/custom-games This snippet demonstrates how to define success conditions for a game and configure basic game parameters like difficulty and time using the GameBasics builder. ```java @Override public boolean isSuccessful() { if (isTimeOut) return false; return currentIndex + 1 <= successPosition + successWidth - 1 && currentIndex + 1 >= successPosition; } }; } }; }); } private GameBasics getGameBasics(Section section) { return GameBasics.builder() .difficulty(MathValue.auto(section.get("difficulty", "20~80"), false)) .time(MathValue.auto(section.get("time", 15), false)) .build(); } } ``` -------------------------------- ### config.yml full configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/config.yml Complete YAML configuration for the CustomCrops plugin. Includes settings for config version, debug, metrics, update checker, locale, world-specific overrides, and mechanics like scarecrow and greenhouse. Comments explain each option and its behavior. ```yaml # Do not change this value config-version: '${config_version}' # Enable or disable debugging mode debug: false # Enable or disable metrics collection using BStats metrics: true # Enable automatic update checks update-checker: true # Force the locale (e.g., zh_cn) force-locale: '' # World settings worlds: # Some servers use separate directories for player worlds, which may not be in the server's root directory. # This option allows you to specify a custom path to these world folders. This is only applicable for Bukkit worlds. absolute-world-folder-path: '' # Specifies which worlds the plugin's mechanisms should apply to # Options: whitelist/blacklist/regex mode: blacklist list: - blacklist_world # A world that doesn't exist settings: # Default settings that apply to all worlds _DEFAULT_: # Whether to enable the plugin's pre-configured systems # Disabling this stops all mechanisms from ticking unless fully managed via the API. # If you're not familiar with using CustomCropsAPI, keep this set to true as it meets the needs of 99% of users. enable: true # Seasonal settings season: enable: true # Automatically cycle through seasons auto-alternation: true # Duration of each season in game days duration: 28 # This is different from the vanilla RandomTickSpeed. # "Random tick" here means randomly selecting n blocks within a 16x16x16 section every second for ticking, unlike Minecraft's per-tick approach. # Therefore, CustomCrops' random ticks have minimal impact on the server and run on multiple threads. random-tick-speed: 20 # The minimum tick interval in seconds when using scheduled tick mode # A value of 180s means a crop is guaranteed to tick at least once every 180 seconds # For crops, growth rates are nearly uniform under the same conditions # Sprinklers and pots operate periodically within this interval. min-tick-unit: 180 # Settings for ticking while the world is offline # Allows crops to grow even if the world is unloaded or the server is down # This might cause issues with time-dependent conditions like seasons offline-tick: enable: false # Maximum offline time recorded in seconds # Avoid setting this too high, as it may cause long-unloaded chunks to take a long time to load max-offline-seconds: 1200 # Maximum time allowed for loading a chunk # Sometimes, chunks with large amounts of data that have been unloaded for a long time can take a while to load, # potentially causing unexpected issues # This setting allows the plugin to forcibly interrupt the tick process if loading time exceeds a set threshold max-loading-time: 100 #ms # Crop settings crop: # [RANDOM_TICK] # Random tick mode mirrors vanilla behavior, where crops grow randomly # This randomness can cause significant stage differences among crops grown under identical conditions # [SCHEDULED_TICK] # Scheduled tick mode provides more predictable growth management, # ensuring crops grow at nearly the same rate mode: RANDOM_TICK # Tick interval determines how many times a block is ticked before its logic is executed tick-interval: 1 # Limit the number of crops per chunk (-1 means no limit) max-per-chunk: -1 # Pot settings pot: # RANDOM_TICK or SCHEDULED_TICK mode: SCHEDULED_TICK tick-interval: 3 max-per-chunk: -1 # Sprinkler settings sprinkler: # RANDOM_TICK or SCHEDULED_TICK mode: SCHEDULED_TICK tick-interval: 2 max-per-chunk: -1 # Override default settings for specific worlds here _WORLDS_: world_nether: enable: false world_the_end: enable: false # Mechanics settings mechanics: # Create additional ranks by adding more slashes, e.g., x/x/x/x/x # "x" represents weight, which determines the probability proportion # 17/2/1 = 85%/10%/5% # 85% is calculated as 17/(17+2+1) * 100% default-quality-ratio: 17/2/1 # Scarecrow settings to prevent crops from being attacked by crows scarecrow: enable: true id: 'scarecrow' type: ITEM_FRAME range: 7 # If enabled, the scarecrow's range will not be limited # It will protect all crops within the same chunk protect-chunk: false # Greenhouse glass prevents crops from withering due to seasonal changes greenhouse: enable: true ``` -------------------------------- ### Item event example: give mending on successful fishing Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/event Example from #contents/item/default.yml showing how to configure an event for a fish item. On successful fishing, it triggers the 'mending' action with value 5 and chance 1.0. ```yaml #contents/item/default.yml tuna_fish: events: success: # trigger action_mending: # actions type: mending value: 5 chance: 1.0 ``` -------------------------------- ### Full Furniture YAML Configuration Example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/add-new-contents/entities/furniture Complete YAML configuration for a furniture item named 'default:bench'. Includes settings for item and sounds, placement rules with rotation and alignment, elements with display transform and billboard, hitboxes with interactive seats, and loot template with arguments. Note that reloading the plugin will not affect already placed furniture; a server restart or chunk reload is required to apply changes. ```yaml furniture: default:bench: settings: item: default:bench sounds: break: minecraft:block.bamboo_wood.break place: minecraft:block.bamboo_wood.place placement: ground: rules: # ANY / FOUR / EIGHT / SIXTEEN / NORTH / EAST / WEST / SOUTH rotation: EIGHT # ANY / CENTER / HALF / QUARTER / CORNER alignment: CENTER elements: - item: default:bench display-transform: NONE billboard: FIXED position: 0.5,0,0 translation: 0,0.5,0 hitboxes: - position: 0,0,0 width: 1 height: 1 interactive: true seats: - 0,0,-0.1 0 - position: 1,0,0 width: 1 height: 1 interactive: true seats: - 1,0,-0.1 0 loot: template: loot_table:normal arguments: item: default:bench ``` -------------------------------- ### shift-fonts Registration Example in config.yml Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/customnameplates-update-version-2.4-to-3.0-overview Example of registering shift-fonts in config.yml. The colon followed by a number is an offset value: for bitmap fonts, larger number means higher y; for TrueType fonts, larger number means lower y. ```yaml shift-fonts: shift_0: - space - nonlatin_european:7 - accented:9 - ascii:7 - unifont_jp - unifont shift_2: - space - ascii:-15 ``` -------------------------------- ### Configure crop events for planting and breaking Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/crop Customizes events for actions like planting or breaking. The example plays a sound and swings the hand when planting, and shows an action bar when reaching the crop limit. Available events: reach_limit, plant, break, interact, death. ```yaml events: break: {} interact: {} death: {} reach_limit: actionbar_action: type: actionbar value: '[X] You are not allowed to plant more crops' plant: # Swing the main hand swing_hand_action: type: swing-hand value: true # Send sound while planting sound_action: type: sound value: source: player key: minecraft:item.hoe.till volume: 1 pitch: 1 ``` -------------------------------- ### Custom block configuration example Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/block Example configuration for a custom block named 'apple_crate'. It sets the block type to barrel, defines horizontal and vertical velocity, and enables directional placement. The storage property defines two apple entries with item, amount range, and chance. ```yaml apple_crate: block: barrel velocity: horizontal: 1.07 vertical: 1.5 properties: directional: true storage: apple_1: item: APPLE amount: 1~2 chance: 0.8 apple_2: item: APPLE amount: 1~2 chance: 0.8 ``` -------------------------------- ### Get plugin instance Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/api/basic-operations Retrieves the BukkitCustomFishingPlugin instance via getInstance(). ```java BukkitCustomFishingPlugin api = BukkitCustomFishingPlugin.getInstance() ``` -------------------------------- ### Configure shift-text in custom-placeholder.yml Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/custom-placeholders/shift-text Example of applying a shift font to a specific placeholder. ```yaml # /configs/custom-placeholder.yml shift-text: weather: text: "Weather: %np_conditional_weather%" font: shift_1 ``` -------------------------------- ### Version-based config value selection Source: https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine/plugin-wiki/craftengine/add-new-contents Example of using $$version keys to select values based on server version, with a $$fallback for unmatched versions. ```yaml # my_config.yml settings: status: $$1.21.4: "enabled" $$1.20.1: "disabled" max_players: $$1.19: 50 $$1.20~1.21.3: 80 $$>=1.21.4: 100 allowed_worlds: $$1.18: ["world", "world_nether"] $$fallback: ["default"] # Fallback if no version matches ``` -------------------------------- ### Get CustomNameplatesAPI instance Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customnameplates/plugin-wiki/customnameplates/api/basic-operations Retrieves the singleton instance of the CustomNameplatesAPI to access its methods. ```java CustomNameplatesAPI api = CustomNameplatesAPI.getInstance(); ``` -------------------------------- ### Configure vanilla block as a pot with mechanics Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/common-questions Use this configuration to enable water and fertilizer mechanics for a custom pot by defining its storage capacity and model states. ```yaml # Unique identifier for the pot default: # Maximum capacity for storing water in the pot max-water-storage: 5 # Basic settings for pot appearance and behavior base: # Models for the pot's appearance dry: minecraft:xxx[xxx=xxx] # Model ID when the pot is dry wet: minecraft:xxx[xxx=xxx] # Model ID when the pot is wet ``` -------------------------------- ### Get/Remove Blockstate Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/api/basic-operations Shows how to get and remove a blockstate from a CustomCropsWorld using a Pos3. ```java CustomCropsWorld world = ...; world.getBlockState(pos3); world.removeBlockState(pos3); ``` -------------------------------- ### Configure Participation Actions Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/format/competition Placeholder for actions to be executed when a player joins the competition. ```yaml participate-actions: ... ``` -------------------------------- ### Simple Biome Condition Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/condition A basic example of a biome condition containing only the necessary arguments. ```yaml biome: - minecraft:ocean - minecraft:deep_ocean - minecraft:cold_ocean - minecraft:deep_cold_ocean - minecraft:frozen_ocean - minecraft:deep_frozen_ocean - minecraft:lukewarm_ocean - minecraft:deep_lukewarm_ocean - minecraft:warm_ocean ``` -------------------------------- ### Configure requirements for pot usage Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customcrops/plugin-wiki/customcrops/format/pot Defines conditions players must meet before using the pot. The example shows empty use and place requirements, and a break requirement that requires a permission with value 'xxx.xxx'. ```yaml requirements: use: {} place: {} break: requirement_1: type: permission value: xxx.xxx ``` -------------------------------- ### Get the itemStack from FishingLootSpawnEvent Source: https://mo-mi.gitbook.io/xiaomomi-plugins/customfishing/plugin-wiki/customfishing/api/basic-operations Handles FishingLootSpawnEvent to retrieve the ItemStack from the spawned entity if it is an Item. ```APIDOC ## Get the itemStack from FishingLootSpawnEvent ### Description Handles FishingLootSpawnEvent to retrieve the ItemStack from the spawned entity if it is an Item. ### Code Example ```java @EventHandler public void onLootSpawn(FishingLootSpawnEvent event) { if (event.getEntity() instanceof Item item) { ItemStack itemStack = item.getItemStack(); } } ``` ```