본문으로 건너뛰기
버전: Minecraft 26.2

dev.polymodloader.api.tag

자동 생성

이 페이지는 소스의 Javadoc에서 ./gradlew apiReference로 만든 것입니다. 설명은 코드에 적힌 영어 그대로입니다. 직접 고치지 말고 소스의 주석을 고친 뒤 다시 만드세요.

형식종류설명
TagKey레코드Names a tag of one registry, for example the block tag #minecraft:mineable/pickaxe.
TagRegistry열거형The registries whose entries tags can group.
TagView인터페이스Reads the tags the game loaded: on the server from its data packs, on the client the copy the server sent.

TagKey​

레코드 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public record TagKey(TagRegistry registry, ResourceId id)

Names a tag of one registry, for example the block tag #minecraft:mineable/pickaxe. A key is only a name: the tag's entries come from data packs and mod jars ( data/<namespace>/tags/<registry>/<path>.json) and from ContentRegistrar.addToTag, and change on /reload. Query them through TagView (WorldView.tags()) or the isIn methods of the views. Create keys once and keep them in constants.

구성 요소타입설명
registryTagRegistrywhat the tag groups
idResourceIdthe tag's ID, without the #

block(ResourceId)​

public static TagKey block(ResourceId id)

추가된 버전 0.1.0-alpha.4 또는 그 이전

A block tag, for example TagKey.block(ResourceId.minecraft("mineable/pickaxe")).

인자타입설명
idResourceId—

반환 TagKey

item(ResourceId)​

public static TagKey item(ResourceId id)

추가된 버전 0.1.0-alpha.4 또는 그 이전

An item tag, for example TagKey.item(ResourceId.minecraft("logs")).

인자타입설명
idResourceId—

반환 TagKey

entityType(ResourceId)​

public static TagKey entityType(ResourceId id)

추가된 버전 0.1.0-alpha.4 또는 그 이전

An entity type tag, for example TagKey.entityType(ResourceId.minecraft("skeletons")).

인자타입설명
idResourceId—

반환 TagKey

toString()​

public String toString()

추가된 버전 0.1.0-alpha.4 또는 그 이전

The tag as written in commands and data files, for example #minecraft:logs.

반환 String

TagRegistry​

열거형 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public enum TagRegistry

The registries whose entries tags can group. A tag's file lives in data/<namespace>/tags/<directory>/<path>.json of a data pack or mod jar.

상수설명
BLOCKBlocks, such as #minecraft:mineable/pickaxe.
ITEMItems, such as #minecraft:logs.
ENTITY_TYPEEntity types, such as #minecraft:skeletons.

directory()​

public String directory()

추가된 버전 0.1.0-alpha.4 또는 그 이전

The folder under tags/ that holds this registry's tag files, for example block.

반환 String

TagView​

인터페이스 · 안정성 PREVIEW · 추가된 버전 0.1.0-alpha.4 또는 그 이전

public interface TagView

Reads the tags the game loaded: on the server from its data packs, on the client the copy the server sent. Obtained from WorldView.tags().

Thread: the thread of the world that handed it out. When: once a world is loaded; results change after /reload, so do not cache them across reloads.

contains(TagKey, ResourceId)​

boolean contains(TagKey tag, ResourceId entry)

추가된 버전 0.1.0-alpha.4 또는 그 이전

Whether entry (a block, item, or entity type ID, matching the tag's registry) is in the tag, including through nested tags. An unknown tag or entry is simply not contained.

인자타입설명
tagTagKey—
entryResourceId—

반환 boolean

entries(TagKey)​

List<ResourceId> entries(TagKey tag)

추가된 버전 0.1.0-alpha.4 또는 그 이전

Every entry of the tag, nested tags resolved, in the game's order; empty for an unknown tag.

인자타입설명
tagTagKey—

반환 List<ResourceId>

Buy me a coffee