![]()
TagCore is a Hytale server mod/plugin that adds a simple, reusable tag system for game content.
It lets you define named groups of IDs such as items, blocks, entities, biomes, effects, fluids, and damage types, then query those groups through a clean Java API.
itemblockentitybiomeeffectfluiddamage_type#namespace:pathtags/.zip and .jar packs from the server mods/ directoryTagService API for other mods/pluginsTag IDs use a namespace:path format.
Examples:
hytale:logstagcore:starter_weaponsmymod:undeadIf a tag ID is written without a namespace, TagCore normalizes it to the default namespace:
hytale
So a bare tag like:
starter_weapons
is treated as:
hytale:starter_weapons
Tag files are JSON files placed under a tags/ directory.
A tag definition contains:
id - the tag IDtype - the tag typevalues - a list of concrete IDs and/or tag references{
"id": "tagcore:starter_weapons",
"type": "item",
"values": [
"Weapon_Sword_Wood",
"Weapon_Shortbow_Crude",
"#tagcore:starter_ammo"
]
}
{
"id": "tagcore:logs",
"type": "block",
"values": [
"Wood_Amber_Trunk",
"Wood_Ash_Trunk",
"Wood_Aspen_Trunk"
]
}
{
"id": "tagcore:undead",
"type": "entity",
"values": [
"Zombie",
"Skeleton",
"#tagcore:boss_undead"
]
}
You can include one tag inside another by prefixing the referenced tag ID with #.
{
"id": "tagcore:all_logs",
"type": "block",
"values": [
"#tagcore:logs",
"#tagcore:modded_logs"
]
}
Rules:
TagCore loads tags from two places, in this order:
tags/.zip or .jar packs in the server mods/ directoryExternal packs can override built-in tags with the same ID.
TagCore exposes a shared TagService for querying tags.
import com.azuredoom.tagcore.api.TagService;
var tagServiceOptional = TagService.getTagService();
if (tagServiceOptional.isEmpty()) {
return;
}
TagService tagService = tagServiceOptional.get();
boolean exists = tagService.hasTag("tagcore:starter_weapons");
var result = tagService.resolveItemTag("tagcore:starter_weapons");
if (result.isSuccess()) {
for (String itemId : result.value()) {
System.out.println(itemId);
}
} else {
System.out.println("Failed to resolve tag: " + result.status());
for (var issue : result.issues()) {
System.out.println(issue.detail());
}
}
var result = tagService.isInItemTag("tagcore:starter_weapons", "Sword_Wooden");
if (result.isSuccess() && result.value()) {
System.out.println("Sword_Wooden is in the tag.");
}
var logs = tagService.resolveBlockTag("tagcore:logs");
if (logs.isSuccess()) {
System.out.println("Resolved block IDs: " + logs.value());
}
var result = tagService.isInTag("tagcore:starter_weapons", "Sword_Wooden");
if (result.isSuccess()) {
System.out.println("Contained: " + result.value());
}
Most TagCore API calls return a TagQueryResult.
This gives you:
status() - overall outcomevalue() - returned valuedefinition() - matching tag definition, when availableissues() - validation or resolution issuesCommon statuses:
SUCCESSEMPTYNOT_FOUNDWRONG_TYPEINVALID_TAG_IDINVALID_CONTENTCIRCULAR_REFERENCEExample:
var result = tagService.resolveBlockTag("tagcore:logs");
switch (result.status()) {
case SUCCESS, EMPTY -> {
System.out.println("Resolved values: " + result.value());
}
case NOT_FOUND -> {
System.out.println("Tag not found.");
}
default -> {
System.out.println("Tag resolution failed: " + result.status());
for (var issue : result.issues()) {
System.out.println(issue.type() + ": " + issue.detail());
}
}
}
Example bundled resource layout:
src/main/resources/
└── tags/
├── items/
│ └── starter_weapons.json
├── blocks/
│ └── logs.json
└── entities/
└── undead.json
The exact subfolder structure under tags/ is flexible. What matters is that the files are discoverable under the tags/ root.
You can ship a default tag in your mod, then override it from an external pack in mods/.
Bundled tag:
{
"id": "tagcore:starter_weapons",
"type": "item",
"values": [
"Sword_Wooden"
]
}
External override:
{
"id": "tagcore:starter_weapons",
"type": "item",
"values": [
"Sword_Wooden",
"Bow_Basic",
"Dagger_Rusty"
]
}
hytale.Looking for a reliable server to run LevelingCore and other Hytale mods?
BisectHosting offers pre-configured game servers, fast setup, and solid performance for modded environments.
Use code azuredoom for 25% off your first month.