Gallery

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.
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
actionRadiusblocks 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
attackRangewith 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 + 5blocks (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
- Place
GlymeraSlothGuard-5.0.0.jarin your server'smods/folder - Start (or restart) the server
- Done. Config is auto-generated on first run.
How It Works
Placement Flow
- Player places a Magic Sloth Guard cauldron
- The block scan tick (every 5 seconds) finds the new block within 16 blocks of any online player
- Player limit is checked. If exceeded, the player is notified and the block is left untracked
- The block is registered with the player as owner and persisted to disk
- Three warriors are spawned in a circle 2 blocks around the cauldron at +1 Y
Removal Flow
- The owner (or an OP) breaks the cauldron - all other players are blocked by the 3-layer protection
- The block scan tick notices the block is gone and removes the entry
- All linked warriors are despawned in the same tick
- Persistence file is updated
Combat Flow
- Combat tick runs every 1 second
- For each cauldron with at least one warrior alive: scan every entity within
actionRadiusand collect hostile NPCs - Hostiles are distributed round-robin across the warriors
- Each warrior gets its
LockedTargetset to its assigned hostile and chases via native Hytale AI - When the warrior is within
attackRange, it dealsattackDamageto the target via the ECS damage system - 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 Magic Sloth Guard cauldron uses Hytale's existing
Cauldron_Bigmodel, so you'll see the familiar bubbling alchemy cauldron with the corrupted-bubbles particle and ambient sound - The warrior NPC reuses the Slothian Warrior appearance from Hytale's core assets - no custom skin work needed
- Warriors are immune to player damage so neighbours can't grief by attacking them, but they still take full damage from hostile mobs and can be killed
- Warriors only attack mobs that are hostile toward players and able to fight (predators, undead, trorks, goblins, outlanders, scaraks, void creatures). Set
attackNeutralto true if you want them to also engage fight-capable neutral mobs - but be aware that Hytale counts livestock (cow, horse, goat, ram) and Klops NPCs into that category, so use theneverAttackRoleslist alongside it - Tamed creatures, ridden mounts and Glymera companion/shop NPCs are never attacked, regardless of configuration
- Warriors cannot leave their post: anything that moves them out of range (teleporter gates!) snaps them back to the cauldron within a second
- Multiple cauldrons can safely overlap in radius. A hostile within range of two cauldrons will be engaged by warriors from both
- Removing the cauldron drops it back as an item only for the owner. The 3-layer protection means non-owners cannot pick up or destroy it at all
Made with care by Glymera for the Hytale community
Changelog
GlymeraSlothGuard - Changelog
v6.0.0 (2026-08-28) — Hytale 0.6.0 (Update 6)
- Rebuilt for Hytale 0.6.0 (Update 6). Requires server 0.6.0 or newer; this version does not run on 0.5.x, and older versions of this plugin do not run on 0.6.0.
- Migrated to the 0.6.0 APIs (network protocol hytale/3, new command-permission API, block/chunk/entity API changes). Everything that was open to players before is open to players again.
- Upgrade: delete the old jar from
mods/, drop in the new one and keep the plugin's data folder — configs and saved data carry over unchanged. Restart the server.
v5.0.0 (2026-06-11)
Fixes the two open CurseForge reports in one release.
Fixed: guards wander off through teleport gates and multiply (reported by Maklin_Deckard 2026-06-10)
"These guys seem drawn to teleport gates. [...] I go through it and find 10-20 of them milling about the gate terminus. [...] I go back to the farm, remove the spawner, it stops spawning... BUT the 10-20 guys milling about my terminus build are still there."
- Guards are now leashed to their cauldron. A warrior that ends up farther than
actionRadius + 5blocks from its cauldron - for example because it walked through a teleporter gate - is teleported back to the cauldron within a second. Guards can no longer leave their post, no matter what moves them. - Guards are no longer persisted by the engine. They are spawned as non-serialized entities: a guard whose chunk unloads simply despawns (and is respawned at the cauldron when needed) instead of piling up as a permanent stray. This removes the root cause of the endless reinforcements: previously, every runaway guard survived forever while the plugin lost track of it and spawned replacements.
- The stray sweep is now global. Any Slothian-warrior NPC anywhere in any world that is not tracked by an active cauldron is removed (previously only within 30 blocks of a cauldron). Existing worlds are cleaned up automatically after updating - the 10-20 guards at the gate terminus disappear as soon as the area is visited, no manual work needed.
- Breaking the cauldron now reliably removes all of its guards, including ones that were displaced far away.
Fixed: guards never attack (reported by mindfruit_02247 2026-05-16)
"Do the guards only work in zone 1? I'm in the Savannah and they do not attack any of the 'bad guys' or animals (such as the saber-toothed tiger). [...] another player on our server has them in Zone 1 and they are not fighting any of the hostile mobs there either."
- Cauldrons are now world-bound.
blocks.jsonstores the world of every cauldron. Previously, after a server restart every cauldron was re-attached to "the world of the first online player" - on servers with more than one world the tracking then pointed at the wrong world, the visible guards became orphans and never received a combat target again. Legacy entries without a world are adopted automatically by the world that actually contains the cauldron. - Combat targets are re-asserted every second instead of being set once and assumed to stick. The engine can drop a marked target on chunk or state changes; guards no longer idle next to enemies when that happens.
- Smarter target selection. A mob is attacked when its attitude toward players is HOSTILE and its role can actually fight. This covers all predators (including the saber-toothed tiger), undead, trorks, goblins, outlanders, scaraks and void creatures - while ignoring birds and fish, which technically report "Hostile" only because that is the engine default for roles without an explicit attitude.
attackNeutral=truenow targets fight-capable NEUTRAL mobs. Note that in Hytale this bucket includes livestock (cow, horse, goat, ram) and Klops NPCs - that is why it remainsfalseby default.- Hard safety exclusions (always active, regardless of config):
Tamed_*creatures (player property), ridden mounts, and Glymera plugin NPCs (pets, shop NPCs, ...) are never attacked.
New configuration
alwaysAttackRoles/neverAttackRoles: per-role overrides of the default target selection. Exact role names or a trailing*wildcard (e.g."Scarak_*").debugLogging(defaultfalse): prints targeting decisions, leash snaps, spawns and sweep removals to the console for troubleshooting.
Compatibility
- Existing
config.jsonandblocks.jsonfiles are upgraded automatically; no manual steps. - Detection ranges ("radius") are now measured as a square (Chebyshev distance), matching how block ranges feel in-game. The effective area grows slightly at the diagonals.
v4.0.0 (2026-05-29)
- Fix: Eliminated the
SEVERE Duplicate asset pack '...'error that appeared on every server boot after the first. The plugin generates its asset pack intomods/and Hytale's auto-scan already loads it at startup; the plugin then re-registered the same pack viaregisterPack(), which the engine flagged as a duplicate. The plugin now registers the pack only if it is not already loaded (AssetModule.getAssetPack(name) == null), mirroring the engine's own check. No functional change — assets load exactly as before, just without the log error. - Fix: The generated pack manifest now declares
"ServerVersion":"*"and is (re)written on every boot, clearing Hytale's "does not specify a target server version" warning (which Hytale states will become a hard error in a future version). Existing installs are upgraded automatically on the next start.
v2.0.0 (2026-05-16)
Bug Fixes
- Recipe is now actually visible in the Alchemy bench. Reported by
mindfruit_022472026-05-16 ("I ensured the config is set so that the magic cauldron is craftable but it is not showing in the Alchemy workbench. When I use Better Item Viewer I can see the item but it does not show it as craftable in any workbench even though config is set to true").
Root Cause
- v1.0.0's runtime-generated recipe JSON used the bench id
"Alchemy_Bench"and the category"Alchemy". Vanilla Hytale usesAlchemybench(one word, no underscore) as the actual bench id andAlchemy_Bombs/Alchemy_Potions/Alchemy_Potions_Misc/Alchemy_Seedsas the valid category set. With those wrong ids the recipe JSON was still written into the side asset pack (GlymeraSlothGuardCrafting/) andconfig.craftingEnabled=truedid exactly what it promised — but Hytale silently could not register the recipe against any bench at load time, so it never appeared in any crafting UI. Better Item Viewer correctly reflected that state (item exists, not craftable anywhere).
Changes
- Recipe
BenchRequirementcorrected: - Bench id
Alchemy_Bench→Alchemybench - Category
Alchemy→Alchemy_Potions(chosen because it is the largest alchemy category and thematically fits a magical cauldron block;_Bombs/_Seedsdid not fit) - Recipe now also sets
KnowledgeRequired: false, matching how GlymeraMegaChest already shipped it. This means Adventure-mode players can craft the Magic Sloth Guard without first finding a memory crystal to "learn" the recipe. - The side asset pack (
mods/GlymeraSlothGuardCrafting/) is regenerated on plugin start, so a pre-existing v1 pack with the wrong ids is overwritten automatically. The release deploy also removed the old pack folder for a clean state.
Compatibility
- No data migration is needed.
config.craftingEnabled,recipeEssenceQuantity, the block itself, the warrior NPC role, the 3-layer block protection and all save data are unchanged.
v1.0.0 (2026-04-30)
- Initial release.
- Magic Sloth Guard cauldron block (
Magic_Sloth_Guard, item id), Cauldron_Big model. - Owner-only 3-layer protection (DamageBlock / BreakBlock / UseBlock cancel).
- On place: 3 Slothian warrior NPCs spawn at the block and attack hostile mobs inside
actionRadius=20. - Configurable:
craftingEnabled,recipeEssenceQuantity,actionRadius, warrior count. - Recipe (v1, broken — see v2.0.0): meant to register at the Alchemy bench but wrote
Alchemy_Bench/Alchemyinstead ofAlchemybench/Alchemy_Potions, so it never appeared.
Only Marc can read this.