promotional bannermobile promotional banner

GlymeraSlothGuard

Place a Magic Sloth Guard cauldron - three Slothian warriors spawn, patrol the area and attack hostile mobs in a configurable radius. Owner-only block, auto-respawn after restarts, no commands needed.
Unbenannt_1.jpg

Unbenannt_1.jpg

Unbenannt_2.jpg

Unbenannt_2.jpg

Description

GlymeraSlothGuard - Magic Sloth Guard Cauldron

Place a Magic Sloth Guard cauldron and three loyal Slothian warriors spawn around it. They patrol the area and attack any hostile mob that wanders too close. The cauldron is owner-protected - only you can pick it back up.

Don't miss my other exciting projects — take a look at GlymeraCraft's Profile Discord: https://discord.gg/s5NRFWfxgy


What is GlymeraSlothGuard?

GlymeraSlothGuard adds a single craftable block - the Magic Sloth Guard cauldron - that turns any spot in your world into a defended zone. Place the cauldron, and a small team of Slothian warriors spawns and starts patrolling. They will detect hostile NPCs in a configurable radius, lock onto them, run them down and attack until the threat is gone. Break the cauldron and the warriors despawn instantly.

Designed as a stationary, low-maintenance defence: no taming, no commands, no upkeep. Place, defend, retrieve.

Includes its own asset pack with the custom Magic Sloth Guard block (a glowing alchemy cauldron with bubbling sound and particles) and the Slothian warrior NPC role.


Features

Stationary Guard System

  • Place a Magic Sloth Guard cauldron, three Slothian warriors spawn around it
  • Warriors continuously patrol within a small radius around the cauldron
  • Warriors are friendly to all players (they cannot be damaged by player attacks)
  • Warriors take normal damage from hostile NPCs and can be killed in combat
  • When all warriors die they automatically respawn while the cauldron is still placed

Combat AI

  • Hostile-mob scan every second within actionRadius blocks of the cauldron
  • Smart target selection: attacks mobs that are hostile toward players and able to fight - predators (saber-toothed tiger!), undead, trorks, goblins, outlanders, scaraks, void creatures. Harmless wildlife such as birds and fish is ignored
  • Tamed creatures, ridden mounts and companion/shop NPCs from other Glymera plugins are never attacked
  • Per-role overrides via alwaysAttackRoles / neverAttackRoles (wildcards supported)
  • Round-robin target distribution across all warriors of one cauldron
  • Warriors lock onto a target and run it down using native Hytale chase AI
  • Melee attacks at attackRange with configurable damage and swing interval
  • Built-in stuck-detection nudges any warrior that has not moved for 3 seconds
  • Warriors are leashed to their post: anything that displaces them beyond actionRadius + 5 blocks (teleporter gates included) snaps them right back to the cauldron

Owner-Only Block Protection

  • The cauldron block cannot be damaged, broken or interacted with by other players
  • Three layers of protection: DamageBlockEvent + BreakBlockEvent + UseBlockEvent.Pre
  • OPs can always interact (admin override)
  • Only the owner gets the cauldron back as an item when breaking it

Auto Spawn / Auto Despawn

  • Placing the cauldron auto-detects the placement on the next scan tick (~5 seconds) - no commands needed
  • Breaking the cauldron auto-despawns all spawned warriors
  • Warriors respawn automatically after a server restart while the cauldron is still placed
  • Warriors are never written to the world save (non-serialized entities) - they cannot multiply, duplicate or survive as strays under any chunk-load/restart sequence
  • Global anti-stray sweep every 10 seconds removes any warrior anywhere that is not tracked by an active cauldron - this also auto-cleans leftovers created by older plugin versions

Per-Player Limit

  • Each player can have a configurable number of active Magic Sloth Guard cauldrons (default: 3)
  • When the limit is reached, placing another shows a chat notice and the placement is reverted

Persistence

  • Cauldron data is stored as JSON under plugins/GlymeraSlothGuard/data/blocks.json
  • Owner UUID, world, coordinates of every active cauldron survive server restarts
  • Warriors are respawned on chunk-load after a restart

Crafting Recipe

  • Recipe is opt-in via config (craftingEnabled, default true)
  • Bench: Alchemy Bench, category: Alchemy
  • Inputs: 1 × Alchemy Cauldron Big + 50 × Ingredient Life Essence
  • Output: 1 × Magic Sloth Guard
  • Essence quantity is configurable

Configuration

config.json (plugins/GlymeraSlothGuard/config.json)

maxBlocksPerPlayer       : 3
maxSlothsPerBlock        : 3
actionRadius             : 20
attackNeutral            : false
alwaysAttackRoles        : []
neverAttackRoles         : []
debugLogging             : false
combatTickMs             : 1000
blockScanTickMs          : 5000
attackDamage             : 25.0
attackIntervalMs         : 1500
attackRange              : 2.5
craftingEnabled          : true
recipeEssenceQuantity    : 50
Field Description
maxBlocksPerPlayer Maximum simultaneous Magic Sloth Guards a single player may place
maxSlothsPerBlock Number of warriors that spawn per cauldron
actionRadius Range in blocks around the cauldron in which hostile NPCs are detected (square area)
attackNeutral If true, warriors also attack fight-capable NEUTRAL mobs. Careful: in Hytale that includes livestock (cow, horse, goat, ram) and Klops NPCs
alwaysAttackRoles Role names the warriors always attack, overriding the default selection. Exact names or trailing * wildcard (e.g. "Scarak_*")
neverAttackRoles Role names the warriors never attack, overriding everything else
debugLogging If true, prints targeting decisions, leash snaps, spawns and sweep removals to the console
combatTickMs How often the combat tick runs (target scan + melee attempt)
blockScanTickMs How often the block scan runs (auto-detect placements / removals)
attackDamage Damage per swing
attackIntervalMs Minimum delay between two swings of the same warrior
attackRange Distance in blocks at which a warrior can hit its target
craftingEnabled If true, generates the Alchemy-Bench recipe; if false, removes it
recipeEssenceQuantity How many Ingredient_Life_Essence are needed to craft one cauldron

Installation

  1. Place GlymeraSlothGuard-5.0.0.jar in your server's mods/ folder
  2. Start (or restart) the server
  3. Done. Config is auto-generated on first run.

How It Works

Placement Flow

  1. Player places a Magic Sloth Guard cauldron
  2. The block scan tick (every 5 seconds) finds the new block within 16 blocks of any online player
  3. Player limit is checked. If exceeded, the player is notified and the block is left untracked
  4. The block is registered with the player as owner and persisted to disk
  5. Three warriors are spawned in a circle 2 blocks around the cauldron at +1 Y

Removal Flow

  1. The owner (or an OP) breaks the cauldron - all other players are blocked by the 3-layer protection
  2. The block scan tick notices the block is gone and removes the entry
  3. All linked warriors are despawned in the same tick
  4. Persistence file is updated

Combat Flow

  1. Combat tick runs every 1 second
  2. For each cauldron with at least one warrior alive: scan every entity within actionRadius and collect hostile NPCs
  3. Hostiles are distributed round-robin across the warriors
  4. Each warrior gets its LockedTarget set to its assigned hostile and chases via native Hytale AI
  5. When the warrior is within attackRange, it deals attackDamage to the target via the ECS damage system
  6. When all hostiles are gone, locks are cleared and warriors return to patrolling

Anti-Duplication

Warriors are spawned as non-serialized entities - the engine never writes them into the world save, so they cannot be duplicated by chunk reloads or restarts in the first place. On top of that, a global sweep every 10 seconds removes any sloth-warrior NPC anywhere that is not tracked by an active cauldron (leftovers from older plugin versions included). Combined with the auto-respawn logic, the warrior count stays exactly at maxSlothsPerBlock per cauldron under all server-state transitions.


Good to Know

The GlymeraSlothGuard Team

profile avatar
  • 35
    Followers
  • 62
    Projects
  • 27.2K
    Downloads
Donate

More from GlymeraCraftView all

  • GlymeraBlueStone project image

    GlymeraBlueStone

    • 840
    • Mods

    A complete redstone-style automation system for Hytale — wires, pistons, hoppers, repeaters, observers, torches, pressure plates, ejectors, applicators and more.

    • 840
    • June 26, 2026
    • Mods
    • +2
  • GlymeraParticles project image

    GlymeraParticles

    • 22
    • Mods

    Player particle effects for Hytale: wear glowing auras on your body or decorate builds with particles on blocks. In-game shop, live previews, slider tuning, token economy. 136+283 curated effects. Server-side, no client mod.

    • 22
    • June 25, 2026
    • Mods
    • +3
  • GlymeraTrash project image

    GlymeraTrash

    • 25
    • Mods

    A craftable trash can block: right-click to open a 27-slot window and everything left inside is destroyed on close. Works in any gamemode; only the owner and operators can break it.

    • 25
    • June 24, 2026
    • Mods
    • +3
  • GlymeraFarmWater project image

    GlymeraFarmWater

    • 2.8K
    • Mods

    FarmWater brings Minecraft-style automatic crop watering to Hytale. Place water within 4 blocks of your farmland and it stays watered automatically. Works with source blocks and flowing water. No configuration needed – just install and farm!

    • 2.8K
    • June 21, 2026
    • Mods
    • +2
  • GlymeraBlueStone project image

    GlymeraBlueStone

    • 840
    • Mods

    A complete redstone-style automation system for Hytale — wires, pistons, hoppers, repeaters, observers, torches, pressure plates, ejectors, applicators and more.

    • 840
    • June 26, 2026
    • Mods
    • +2
  • GlymeraParticles project image

    GlymeraParticles

    • 22
    • Mods

    Player particle effects for Hytale: wear glowing auras on your body or decorate builds with particles on blocks. In-game shop, live previews, slider tuning, token economy. 136+283 curated effects. Server-side, no client mod.

    • 22
    • June 25, 2026
    • Mods
    • +3
  • GlymeraTrash project image

    GlymeraTrash

    • 25
    • Mods

    A craftable trash can block: right-click to open a 27-slot window and everything left inside is destroyed on close. Works in any gamemode; only the owner and operators can break it.

    • 25
    • June 24, 2026
    • Mods
    • +3
  • GlymeraFarmWater project image

    GlymeraFarmWater

    • 2.8K
    • Mods

    FarmWater brings Minecraft-style automatic crop watering to Hytale. Place water within 4 blocks of your farmland and it stays watered automatically. Works with source blocks and flowing water. No configuration needed – just install and farm!

    • 2.8K
    • June 21, 2026
    • Mods
    • +2