API
Service Registry
SpellbookConfig config = ServiceRegistry.get(SpellbookConfig.class);
CooldownManager cooldowns = ServiceRegistry.get(CooldownManager.class);
ManaManager mana = ServiceRegistry.get(ManaManager.class);
SpellHotbarManager hotbar = ServiceRegistry.get(SpellHotbarManager.class);
SpellCastHandler castHandler = ServiceRegistry.get(SpellCastHandler.class);
NodeRegistry nodes = ServiceRegistry.get(NodeRegistry.class);Interfaces
IManaManager
public interface IManaManager {
boolean hasMana(UUID playerId, int amount);
boolean consumeMana(UUID playerId, int amount);
void addMana(UUID playerId, int amount);
void setMana(UUID playerId, int amount);
void setMaxMana(UUID playerId, int maxMana);
int getCurrentMana(UUID playerId);
int getMaxMana(UUID playerId);
int calculateManaCost(String spellId);
void removePlayer(UUID playerId);
}ICooldownManager
ISpellExecutor
ISpellValidator
ISpellStorage
Spell Definition Schema
SpellDefinition
SpellGraph
SpellNode
NodeConnection
Node Types
Trigger Nodes
Type
Description
Action Nodes
Type
Description
Creating Custom Nodes
TriggerContext
Cast Results
CastResult
CastFailureReason
Validation
ValidationResult
Whitelists
Projectile Types
Effect Types
Damage Types
Events
Hytale Events
Event
Purpose
Components
Component
Purpose
Network Packets
EffectPacket
Example: Custom Spell Handler
Last updated