### Setup Development Environment Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Gradle commands for setting up the workspace, building the mod, and running test environments. ```bash # Clone the repository git clone https://github.com/CyclopsMC/EvilCraft cd EvilCraft/ # Setup workspace (NeoForge) ./gradlew setupDecompWorkspace # Generate IDE project files ./gradlew idea # For IntelliJ IDEA ./gradlew eclipse # For Eclipse # Run client for testing ./gradlew runClient # Run server for testing ./gradlew runServer # Build the mod JAR ./gradlew build # Run game tests ./gradlew runGameTestServer ``` -------------------------------- ### Setup Workspace and Generate Project Files Source: https://github.com/cyclopsmc/evilcraft/wiki/Development-Environment Execute the Gradle wrapper command to set up the development workspace, decompile Minecraft, and generate IntelliJ IDEA project files. ```bash ./gradlew setupDecompWorkspace idea genIntellijRuns ``` -------------------------------- ### Run Game Tests with Gradle Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Start a game test server to run game tests. Game tests are not run automatically during the build process and must be run manually before committing. ```bash ./gradlew runGameTestServer ``` -------------------------------- ### Setup Pre-Commit Git Hook Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Link the project's pre-commit script to the Git hooks directory. This ensures code formatting is applied automatically before each commit. ```bash ln -s ../../scripts/pre-commit .git/hooks/pre-commit ``` -------------------------------- ### Build Project with Gradle Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Compile all source code, run unit tests, and generate build artifacts. This command should be run before every commit to ensure the project builds successfully. ```bash ./gradlew build ``` -------------------------------- ### Apply Code Formatting with Spotless Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Format all code files in the project according to the defined style guidelines. This command is automatically executed by the pre-commit script. ```bash ./gradlew spotlessApply ``` -------------------------------- ### Build and Test Project Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Execute the build process and run game tests. This command is essential for validating changes before committing. For Minecraft 1.21 and later, `runGameTestServer` is required. ```bash ./gradlew build ./gradlew runGameTestServer # For MC 1.21+ ``` -------------------------------- ### Configure EvilCraft Settings Source: https://context7.com/cyclopsmc/evilcraft/llms.txt TOML configuration options for server and client-side behavior. ```toml # Server Configuration (evilcraft-server.toml) [general] # Enable farting mechanic farting = true # mB of fluid that can flow per tick from machines mbFlowRate = 100 # Enable broom smash modifier for block breaking broomSmashEnabled = true [worldgeneration] # Spawn extra silverfish blocks in all biomes extraSilverfish = false # Spawn chance for loot chests in dark temples (0 to disable) darkTempleChestChance = 0.15 # Client Configuration (evilcraft-client.toml) [general] # Render blood GUI overlay bloodGuiOverlay = true # Overlay position (0=NE, 1=SE, 2=SW, 3=NW) bloodGuiOverlayPosition = 1 # Overlay X/Y offset bloodGuiOverlayPositionOffsetX = -5 bloodGuiOverlayPositionOffsetY = -5 ``` -------------------------------- ### Run Unit Tests with Gradle Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Execute all unit tests for the project. Unit tests are automatically executed when running the `build` command. ```bash ./gradlew test ``` -------------------------------- ### Copy Gradle Properties Template Source: https://github.com/cyclopsmc/evilcraft/wiki/Development-Environment Create a copy of the gradle.properties_template file to configure build settings. ```bash cp gradle.properties_template gradle.properties ``` -------------------------------- ### Publish to Local Maven Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Publish the project artifacts to the local Maven repository. This is useful for testing integration with other projects. ```bash ./gradlew publishToMavenLocal ``` -------------------------------- ### Clone EvilCraft Repository Source: https://github.com/cyclopsmc/evilcraft/wiki/Development-Environment Clone the EvilCraft source code using git and navigate into the project directory. ```bash git clone https://github.com/rubensworks/EvilCraft cd EvilCraft/ ``` -------------------------------- ### Configure Library Path in Gradle Source: https://github.com/cyclopsmc/evilcraft/wiki/Development-Environment Edit the gradle.properties file to specify the absolute path to your mod dependencies library folder. ```properties libs_path=/home/user/mc_libs ``` -------------------------------- ### Define Blood Infuser Recipes Source: https://context7.com/cyclopsmc/evilcraft/llms.txt JSON format for defining Blood Infuser recipes, specifying input items, fluid requirements, and output results. ```json // Recipe JSON: data/evilcraft/recipe/blood_infuser/base/dark_power_gem.json { "type": "evilcraft:blood_infuser", "input_item": "evilcraft:dark_gem", "input_fluid": { "id": "evilcraft:blood", "amount": 250 }, "output_item": { "id": "evilcraft:dark_power_gem" }, "duration": 200, "xp": 0.5 } ``` -------------------------------- ### Define Environmental Accumulator Recipes Source: https://context7.com/cyclopsmc/evilcraft/llms.txt JSON format for Environmental Accumulator recipes, which require specific weather conditions for item transformation. ```json // Recipe JSON: data/evilcraft/recipe/environmental_accumulator/inverted_potentia_empowered.json { "type": "evilcraft:environmental_accumulator", "input_item": "evilcraft:inverted_potentia", "input_weather": "LIGHTNING", "output_item": { "id": "evilcraft:inverted_potentia_empowered" }, "output_weather": "RAIN" } ``` -------------------------------- ### EvilCraft Base Command Source: https://github.com/cyclopsmc/evilcraft/wiki/Available-Commands Overview of the base command structure and available subcommands for the EvilCraft mod. ```APIDOC ## COMMAND /evilcraft ### Description The base command for the EvilCraft mod. Aliases include `/evilCraft`, `/EvilCraft`, and `/ec`. ### Subcommands - **version**: Print the current MC and mod version. - **ignite [player] [duration]**: Light a player on fire for a given amount of seconds (default 2). - **recursion**: Recursion. - **config [config-key] [new-config-value]**: Change a configurable option at runtime. Use tab to cycle through available options. ``` -------------------------------- ### Execute EvilCraft Server Commands Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Administrative and debugging commands available via the /evilcraft base command. ```bash # Print mod version information /evilcraft version # Set a player on fire (duration in seconds, default 2) /evilcraft ignite [duration] /evilcraft ignite Steve 5 # Change runtime config options (tab-completion available) /evilcraft config /evilcraft config farting false /evilcraft config bloodGuiOverlay true /evilcraft config mbFlowRate 200 ``` -------------------------------- ### Register Broom Parts Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Use the IBroomPartRegistry to define custom broom components and assign base modifiers to them. ```java // Get the broom part registry IBroomPartRegistry registry = EvilCraft._instance .getRegistryManager() .getRegistry(IBroomPartRegistry.class); // Register a custom broom part IBroomPart customRod = registry.registerPart(new BroomPartBase( Identifier.fromNamespaceAndPath("mymod", "rod_custom"), IBroomPart.BroomPartType.ROD, // ROD, BRUSH, or CAP 1F // Length factor )); // Register base modifiers for the part registry.registerBaseModifiers(customRod, ImmutableMap.of( BroomModifiers.MODIFIER_COUNT, 5F, BroomModifiers.SPEED, 150F, BroomModifiers.MANEUVERABILITY, 100F, BroomModifiers.ACCELERATION, 75F, BroomModifiers.LEVITATION, 30F )); // Register an item that provides the part registry.registerPartItem(customRod, () -> new ItemStack(Items.BLAZE_ROD)); // Get parts from a broom ItemStack Collection parts = registry.getPartsFromBroom(broomStack); // Get all parts of a specific type Collection rods = registry.getParts(IBroomPart.BroomPartType.ROD); Collection brushes = registry.getParts(IBroomPart.BroomPartType.BRUSH); Collection caps = registry.getParts(IBroomPart.BroomPartType.CAP); ``` -------------------------------- ### Registering a custom Purifier action Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Use IPurifierActionRegistry to define purification recipes that consume blood and transform items. ```java // Get the purifier action registry IPurifierActionRegistry registry = EvilCraft._instance .getRegistryManager() .getRegistry(IPurifierActionRegistry.class); // Register a custom purifier action registry.register(new IPurifierAction() { @Override public boolean isItemValidForMainSlot(ItemStack itemStack) { return itemStack.is(Items.ROTTEN_FLESH); } @Override public boolean isItemValidForAdditionalSlot(ItemStack itemStack) { return itemStack.is(Items.GOLDEN_APPLE); } @Override public boolean canWork(BlockEntityPurifier tile) { // Check if purifier has required items and blood return tile.getTank().getFluidAmount() >= 500 && !tile.getItem(0).isEmpty(); } @Override public boolean work(BlockEntityPurifier tile) { // Perform the purification tile.getTank().drain(500, IFluidHandler.FluidAction.EXECUTE); tile.setItem(0, new ItemStack(Items.LEATHER)); return true; } }); ``` -------------------------------- ### Manage EvilCraft Environmental Accumulator Recipes with MineTweaker Source: https://github.com/cyclopsmc/evilcraft/wiki/MineTweaker These functions allow for adding, removing, or removing all recipes for the Environmental Accumulator. Pay close attention to input/output items, weather conditions, duration, cooldown, and processing speed. ```javascript mods.evilcraft.EnvironmentalAccumulator.addRecipe(, "RAIN", , "CLEAR", 10, 10, -1.0); ``` ```javascript mods.evilcraft.EnvironmentalAccumulator.removeRecipe(, "RAIN", , "CLEAR", 10, 10, -1.0); ``` ```javascript mods.evilcraft.EnvironmentalAccumulator.removeRecipesWithOutput(, "CLEAR"); ``` -------------------------------- ### Add EvilCraft as a Gradle Dependency Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Configuration for including EvilCraft in a mod project's build.gradle file. ```groovy // build.gradle repositories { maven { name "Cyclops Repo" url "https://maven.pkg.github.com/CyclopsMC/packages" credentials { username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USER") password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") } } } dependencies { // Required: Cyclops Core implementation "org.cyclops.cyclopscore:cyclopscore-26.1.1-neoforge:1.25.5" // EvilCraft API (compile-time dependency) compileOnly "org.cyclops.evilcraft:evilcraft-26.1.1-neoforge:1.2.85" // EvilCraft (runtime dependency for testing) runtimeOnly "org.cyclops.evilcraft:evilcraft-26.1.1-neoforge:1.2.85" } ``` -------------------------------- ### Run Gradle Command Offline Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Execute a Gradle command in offline mode. Use this if you encounter internet connection issues during builds. ```bash ./gradlew build --offline ``` -------------------------------- ### Generate Test Coverage Report Source: https://github.com/cyclopsmc/evilcraft/blob/master-26/AGENTS.md Generate a comprehensive test coverage report including unit and game tests. The report can be found in `build/reports/jacoco/test/`. ```bash ./gradlew test runGameTestServer jacocoTestReport ``` -------------------------------- ### Registering a custom Blood Chest repair action Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Implement IBloodChestRepairAction to define how specific items are repaired using blood in the Blood Chest. ```java // Get the repair action registry IBloodChestRepairActionRegistry registry = EvilCraft._instance .getRegistryManager() .getRegistry(IBloodChestRepairActionRegistry.class); // Register a custom repair action registry.register(new IBloodChestRepairAction() { @Override public boolean isItemValidForSlot(ItemStack itemStack) { // Return true if this action handles the item return itemStack.getItem() instanceof MyCustomRepairable; } @Override public boolean canRepair(ItemStack itemStack, int tick) { // Return true if the item can be repaired this tick return itemStack.isDamaged() && tick % 20 == 0; } @Override public Pair repair( ItemStack itemStack, RandomSource random, boolean doAction, boolean isBulk, HolderLookup.Provider holderLookup) { if (doAction) { // Perform actual repair itemStack.setDamageValue(itemStack.getDamageValue() - 10); } // Return blood usage multiplier and resulting stack return Pair.of(1.5F, itemStack); } }); // Check if an item can be placed in the blood chest boolean canInsert = registry.isItemValidForSlot(myItemStack); ``` -------------------------------- ### Manipulate Recipes with CraftTweaker Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Scripting methods for adding or removing recipes for the Blood Infuser and Environmental Accumulator. ```javascript // Blood Infuser recipe manipulation // Parameters: inputStack, inputFluid, tier, outputStack, duration, xp mods.evilcraft.BloodInfuser.addRecipe( , * 100, 0, , 10, 10 ); // Remove a specific recipe mods.evilcraft.BloodInfuser.removeRecipe( , * 100, 0, , 10, 10 ); // Remove all recipes that produce a specific output mods.evilcraft.BloodInfuser.removeRecipesWithOutput(); // Environmental Accumulator recipe manipulation // Parameters: inputStack, inputWeather, outputStack, outputWeather, duration, cooldownTime, processingSpeed mods.evilcraft.EnvironmentalAccumulator.addRecipe( , "RAIN", , "CLEAR", 10, 10, -1.0 ); // Remove environmental accumulator recipes by output mods.evilcraft.EnvironmentalAccumulator.removeRecipesWithOutput(, "CLEAR"); ``` -------------------------------- ### Manage EvilCraft Blood Infuser Recipes with MineTweaker Source: https://github.com/cyclopsmc/evilcraft/wiki/MineTweaker Use these functions to add, remove, or remove all recipes for the Blood Infuser. Ensure correct item, fluid, tier, duration, and XP values are provided. ```javascript mods.evilcraft.BloodInfuser.addRecipe(, * 100, 0, , 10, 10); ``` ```javascript mods.evilcraft.BloodInfuser.removeRecipe(, * 100, 0, , 10, 10); ``` ```javascript mods.evilcraft.BloodInfuser.removeRecipesWithOutput(); ``` -------------------------------- ### Registering a custom degradation effect Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Use the IDegradationRegistry to define custom effects that trigger within degradable areas based on weight and conditions. ```java // Get the degradation registry IDegradationRegistry registry = EvilCraft._instance .getRegistryManager() .getRegistry(IDegradationRegistry.class); // Register a custom degradation effect registry.registerDegradationEffect( "mymod:custom_effect", // Unique name ID new IDegradationEffect() { @Override public boolean canRun(IDegradable degradable) { return degradable.getDegradation() > 0.5; // Only run at >50% degradation } @Override public void run(IDegradable degradable) { Level world = degradable.getDegradationWorld(); BlockPos center = degradable.getLocation(); int radius = degradable.getRadius(); // Apply effect to entities in area for (Entity entity : degradable.getAreaEntities()) { if (entity instanceof LivingEntity living) { living.addEffect(new MobEffectInstance(MobEffects.GLOWING, 100)); } } } }, 10 // Weight (higher = more likely to be selected) ); // Get a random degradation effect (weighted selection) IDegradationEffect randomEffect = registry.getRandomDegradationEffect(); // Get all registered effects Set allEffects = registry.getDegradationEffects(); ``` -------------------------------- ### Register Broom Modifiers Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Use the IBroomModifierRegistry to define new modifiers, attach listeners, and associate them with items. ```java // Get the broom modifier registry IBroomModifierRegistry registry = EvilCraft._instance .getRegistryManager() .getRegistry(IBroomModifierRegistry.class); // Register a new broom modifier BroomModifier customModifier = registry.registerModifier(new BroomModifier( Identifier.fromNamespaceAndPath("mymod", "speed_boost"), BroomModifier.Type.ADDITIVE, // ADDITIVE or MULTIPLICATIVE 0F, // Default value 100F, // Tier value (per tier increase) 3, // Max tiers false, // Is base modifier ChatFormatting.AQUA, // Tooltip color 0x00AAFF // Model color (RGB) )); // Add tick listener for continuous effects customModifier.addTickListener((EntityBroom broom, float modifierValue) -> { if (modifierValue > 0) { // Apply speed boost based on modifier value broom.setLastPlayerSpeed(broom.getLastPlayerSpeed() * (1 + modifierValue / 100F)); } }); // Add collision listener for entity interactions customModifier.addCollisionListener((EntityBroom broom, Entity entity, float modifierValue) -> { if (modifierValue > 0 && entity instanceof LivingEntity) { // Apply damage on collision float damage = modifierValue * (float) broom.getLastPlayerSpeed() / 50F; entity.hurt(DamageSource.GENERIC, damage); } }); // Register items that provide the modifier registry.registerModifiersItem(customModifier, 10F, () -> new ItemStack(Items.DIAMOND)); registry.registerModifiersItem(customModifier, 5F, () -> new ItemStack(Items.EMERALD)); // Get modifiers from a broom ItemStack Map broomModifiers = registry.getModifiers(broomStack); // Set modifiers on a broom Map newModifiers = new HashMap<>(); newModifiers.put(BroomModifiers.SPEED, 150F); newModifiers.put(BroomModifiers.LEVITATION, 50F); registry.setModifiers(broomStack, newModifiers); ``` -------------------------------- ### Blood Chest Repair Action Registry Source: https://context7.com/cyclopsmc/evilcraft/llms.txt API for registering custom repair logic for items placed within the Blood Chest. ```APIDOC ## IBloodChestRepairActionRegistry ### Description Manages custom repair actions for items. Actions define validity, repair conditions, and the actual repair logic. ### Methods - **register(IBloodChestRepairAction action)**: Registers a new repair action. - **isItemValidForSlot(ItemStack itemStack)**: Checks if any registered action supports the provided item. ``` -------------------------------- ### Purifier Action Registry Source: https://context7.com/cyclopsmc/evilcraft/llms.txt API for registering custom purification recipes and logic for the Purifier block. ```APIDOC ## IPurifierActionRegistry ### Description Allows registration of custom purification actions that define item requirements and processing logic for the Purifier. ### Methods - **register(IPurifierAction action)**: Registers a new purification action. ``` -------------------------------- ### Define Custom Advancement Criteria Source: https://context7.com/cyclopsmc/evilcraft/llms.txt JSON structures for defining custom advancement triggers in EvilCraft, such as capturing spirits or using specific items. ```json // Advancement JSON: Box of Eternal Closure capture trigger { "criteria": { "capture_spirit": { "trigger": "evilcraft:box_of_eternal_closure_capture", "conditions": { "entity": { "type": "evilcraft:vengeance_spirit" } } } } } // Advancement JSON: Distort trigger (Mace of Distortion usage) { "criteria": { "distort_many": { "trigger": "evilcraft:distort", "conditions": { "min_entities": 10, "entity": { "type": "minecraft:zombie" } } } } } // Advancement JSON: Fart trigger { "criteria": { "first_fart": { "trigger": "evilcraft:fart" } } } // Advancement JSON: Necromance trigger (Necromancer Staff usage) { "criteria": { "raise_sheep": { "trigger": "evilcraft:necromance", "conditions": { "entity": { "type": "minecraft:sheep" } } } } } ``` -------------------------------- ### Box of Eternal Closure Capture Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player captures an entity using a Box of Eternal Closure. ```APIDOC ## evilcraft:box_of_eternal_closure_capture ### Description Triggered when a player captures an entity with a Box of Eternal Closure. ### Parameters - **entity** (object) - Optional - The entity type captured. ### Request Example { "criteria": { "criteria_0": { "trigger": "evilcraft:box_of_eternal_closure_capture", "entity": { "type": "minecraft:player" } } } } ``` -------------------------------- ### Necromance Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player uses a Necromancer Staff on an entity. ```APIDOC ## evilcraft:necromance ### Description Triggered when a player uses a Necromancer Staff on an Entity. ### Parameters - **entity** (object) - Optional - The entity type targeted. ### Request Example { "criteria": { "criteria_0": { "trigger": "evilcraft:necromance", "entity": { "type": "minecraft:sheep" } } } } ``` -------------------------------- ### Degradation Effect Registry Source: https://context7.com/cyclopsmc/evilcraft/llms.txt API for registering and managing degradation effects that trigger within specific areas based on degradation levels. ```APIDOC ## IDegradationRegistry ### Description Allows registration of custom degradation effects that can be triggered by degradable blocks or entities. ### Methods - **registerDegradationEffect(String id, IDegradationEffect effect, int weight)**: Registers a new effect with a unique ID and selection weight. - **getRandomDegradationEffect()**: Retrieves a random effect based on registered weights. - **getDegradationEffects()**: Returns a set of all registered effects. ``` -------------------------------- ### Box of Eternal Closure Capture Advancement Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player captures a specific entity type using the Box of Eternal Closure. ```json { ... "criteria": { "criteria_0": { "trigger": "evilcraft:box_of_eternal_closure_capture", "entity": { "type": "minecraft:player" } } } } ``` -------------------------------- ### Broom Part Registry API Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Register custom broom parts (rods, brushes, caps) and their associated base modifiers. ```APIDOC ## Broom Part Registry API ### Description The broom part system allows customizing broom components (rods, brushes, caps) with different base modifiers. ### Method ```java // Get the broom part registry IBroomPartRegistry registry = EvilCraft._instance.getRegistryManager().getRegistry(IBroomPartRegistry.class); // Register a custom broom part IBroomPart customRod = registry.registerPart(new BroomPartBase( Identifier.fromNamespaceAndPath("mymod", "rod_custom"), IBroomPart.BroomPartType.ROD, // ROD, BRUSH, or CAP 1F // Length factor )); // Register base modifiers for the part registry.registerBaseModifiers(customRod, ImmutableMap.of( BroomModifiers.MODIFIER_COUNT, 5F, BroomModifiers.SPEED, 150F, BroomModifiers.MANEUVERABILITY, 100F, BroomModifiers.ACCELERATION, 75F, BroomModifiers.LEVITATION, 30F )); // Register an item that provides the part registry.registerPartItem(customRod, () -> new ItemStack(Items.BLAZE_ROD)); // Get parts from a broom ItemStack Collection parts = registry.getPartsFromBroom(broomStack); // Get all parts of a specific type Collection rods = registry.getParts(IBroomPart.BroomPartType.ROD); Collection brushes = registry.getParts(IBroomPart.BroomPartType.BRUSH); Collection caps = registry.getParts(IBroomPart.BroomPartType.CAP); ``` ``` -------------------------------- ### Check Block Mobility Flag Source: https://github.com/cyclopsmc/evilcraft/wiki/Block-checklist-for-developers Use _getMobilityFlag()_ to determine if a block is movable. This is part of the basic checklist for new blocks. ```java boolean isMovable = _getMobilityFlag(); ``` -------------------------------- ### Distort Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player uses a Mace of Distortion. ```APIDOC ## evilcraft:distort ### Description Triggered when a player uses a Mace of Distortion. ### Parameters - **entity** (object) - Optional - The entity type affected. - **min_entities** (integer) - Optional - The minimum number of entities required. ### Request Example { "criteria": { "criteria_0": { "trigger": "evilcraft:distort", "min_entities": 10, "entity": { "type": "minecraft:player" } } } } ``` -------------------------------- ### Fart Advancement Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player performs the fart action. ```json { ... "criteria": { "criteria_0": { "trigger": "evilcraft:fart" } } } ``` -------------------------------- ### Necromance Advancement Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player uses a Necromancer Staff on a specific entity type. ```json { ... "criteria": { "criteria_0": { "trigger": "evilcraft:necromance", "entity": { "type": "minecraft:sheep" } } } } ``` -------------------------------- ### Distort Advancement Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player uses a Mace of Distortion, requiring a minimum number of entities to be affected. ```json { ... "criteria": { "criteria_0": { "trigger": "evilcraft:distort", "min_entities": 10, "entity": { "type": "minecraft:player" } } } } ``` -------------------------------- ### Fart Source: https://github.com/cyclopsmc/evilcraft/wiki/Advancements Triggered when a player performs a fart action. ```APIDOC ## evilcraft:fart ### Description Triggered when a player farts. ### Request Example { "criteria": { "criteria_0": { "trigger": "evilcraft:fart" } } } ``` -------------------------------- ### Broom Modifier Registry API Source: https://context7.com/cyclopsmc/evilcraft/llms.txt Register custom modifiers that affect broom behavior, including additive/multiplicative types, tick listeners, and collision listeners. ```APIDOC ## Broom Modifier Registry API ### Description The broom system allows registering custom modifiers that affect broom behavior. Modifiers can be additive or multiplicative and support tick and collision listeners. ### Method ```java // Get the broom modifier registry IBroomModifierRegistry registry = EvilCraft._instance.getRegistryManager().getRegistry(IBroomModifierRegistry.class); // Register a new broom modifier BroomModifier customModifier = registry.registerModifier(new BroomModifier( Identifier.fromNamespaceAndPath("mymod", "speed_boost"), BroomModifier.Type.ADDITIVE, // ADDITIVE or MULTIPLICATIVE 0F, // Default value 100F, // Tier value (per tier increase) 3, // Max tiers false, // Is base modifier ChatFormatting.AQUA, // Tooltip color 0x00AAFF // Model color (RGB) )); // Add tick listener for continuous effects customModifier.addTickListener((EntityBroom broom, float modifierValue) -> { if (modifierValue > 0) { // Apply speed boost based on modifier value broom.setLastPlayerSpeed(broom.getLastPlayerSpeed() * (1 + modifierValue / 100F)); } }); // Add collision listener for entity interactions customModifier.addCollisionListener((EntityBroom broom, Entity entity, float modifierValue) -> { if (modifierValue > 0 && entity instanceof LivingEntity) { // Apply damage on collision float damage = modifierValue * (float) broom.getLastPlayerSpeed() / 50F; entity.hurt(DamageSource.GENERIC, damage); } }); // Register items that provide the modifier registry.registerModifiersItem(customModifier, 10F, () -> new ItemStack(Items.DIAMOND)); registry.registerModifiersItem(customModifier, 5F, () -> new ItemStack(Items.EMERALD)); // Get modifiers from a broom ItemStack Map broomModifiers = registry.getModifiers(broomStack); // Set modifiers on a broom Map newModifiers = new HashMap<>(); newModifiers.put(BroomModifiers.SPEED, 150F); newModifiers.put(BroomModifiers.LEVITATION, 50F); registry.setModifiers(broomStack, newModifiers); ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.