TagCore

版本 v1.1.8·更新於 2026-08-27

A unified tagging API for items, blocks, and entities, enabling cross-mod compatibility

模組介紹 作者原文

TagCore

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.

Features

  • Define tags in JSON
  • Support for these tag types:
  • item
  • block
  • entity
  • biome
  • effect
  • fluid
  • damage_type
  • Reference one tag from another with #namespace:path
  • Resolve fully flattened tag contents at startup
  • Detect invalid values, missing references, wrong-type references, and circular references
  • Load tags from:
  • bundled classpath resources under tags/
  • external.zip and.jar packs from the server mods/ directory
  • Easy-to-use TagService API for other mods/plugins

Installation via Gradle

Add the AzureDoom Maven repository and dependency to your build.gradle.kts:

repositories {

maven("

}

dependencies {

implementation("com.azuredoom.tagcore:TagCore:1.0.0")

}

For Groovy DSL:

repositories {

maven {

url = uri("

}

}

dependencies {

implementation("com.azuredoom.tagcore:TagCore:1.0.0")

}

Maven browser/index:

How Tag IDs Work

Tag IDs use a namespace:path format.

Examples:

  • hytale:logs
  • tagcore:starter_weapons
  • mymod:undead

If 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

Defining Tags

Tag files are JSON files placed under a tags/ directory.

A tag definition contains:

  • id - the tag ID
  • type - the tag type
  • values - a list of concrete IDs and/or tag references

Example item tag

{

"id": "tagcore:starter_weapons",

"type": "item",

"values": [

"Weapon_Sword_Wood",

"Weapon_Shortbow_Crude",

"#tagcore:starter_ammo"

]

}

Example block tag

{

"id": "tagcore:logs",

"type": "block",

"values": [

"Wood_Amber_Trunk",

"Wood_Ash_Trunk",

"Wood_Aspen_Trunk"

]

}

Example entity tag

{

"id": "tagcore:undead",

"type": "entity",

"values": [

"Zombie",

"Skeleton",

"#tagcore:boss_undead"

]

}

Referencing Other Tags

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:

  • referenced tags must exist
  • referenced tags must be the same type
  • circular references are rejected

Where Tags Are Loaded From

TagCore loads tags from two places, in this order:

  • Classpath resources under tags/
  • External.zip or.jar packs in the server mods/ directory

External packs can override built-in tags with the same ID.

Using the API

TagCore exposes a shared TagService for querying tags.

Get the shared service

import com.azuredoom.tagcore.api.TagService;

var tagServiceOptional = TagService.getTagService();

if (tagServiceOptional.isEmpty()) {

return;

}

TagService tagService = tagServiceOptional.get();

Check whether a tag exists

boolean exists = tagService.hasTag("tagcore:starter_weapons");

Resolve a typed tag

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());

}

}

Check membership in a tag

var result = tagService.isInItemTag("tagcore:starter_weapons", "Sword_Wooden");

if (result.isSuccess() && result.value()) {

System.out.println("Sword_Wooden is in the tag.");

}

Resolve a block tag

var logs = tagService.resolveBlockTag("tagcore:logs");

if (logs.isSuccess()) {

System.out.println("Resolved block IDs: " + logs.value());

}

Generic membership check

var result = tagService.isInTag("tagcore:starter_weapons", "Sword_Wooden");

if (result.isSuccess()) {

System.out.println("Contained: " + result.value());

}

Understanding Query Res

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

檔案與校驗

檔案名稱
TagCore-1.1.8.zip
檔案大小
326.0 KiB
SHA-256
0604e03bebfbbded1baea6ed0f0045089d3ada710c09d28f585a040bbd9efc5a
入庫時間
2026-10-10 17:36