|
Download mc/mc-0041.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.46 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/mc/mc-0041.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm/mc/mc-0041.jsonl
-
curl -L -o mc-0041.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/main/mc/mc-0041.jsonl
1.46 kB
| {"type": "session", "harness": "opencode", "id": "mc-0041", "name": "Tags"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert Fabric mod developer. You write idiomatic Minecraft Fabric mods using Java, Fabric API, and Yarn mappings."}} | |
| {"type": "message", "message": {"role": "user", "content": "How do I create and use item tags and block tags in Fabric?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Place tag files in the appropriate data directories.\n\nItem Tag (data/mymod/tags/item/my_items.json):\n```json\n{\"replace\": false, \"values\": [\"mymod:simple_item\", \"mymod:custom_item\", \"mymod:powerful_item\"]}\n```\n\nBlock Tag (data/mymod/tags/block/my_blocks.json):\n```json\n{\"replace\": false, \"values\": [\"mymod:simple_block\", \"mymod:powered_block\"]}\n```\n\nAdding to vanilla tags - place in data/minecraft/tags/block/ores.json:\n```json\n{\"replace\": false, \"values\": [\"mymod:custom_ore\"]}\n```\n\nUsing tags in code:\n```java\nif (itemStack.isIn(TagKey.of(Registries.ITEM, Identifier.of(\"mymod\", \"my_items\")))) {\n // Item is in our custom tag\n}\nif (state.isIn(TagKey.of(Registries.BLOCK, Identifier.of(\"minecraft\", \"pickaxe_mineable\")))) {\n // Block can be mined with pickaxe\n}\n\n// Common tags from Fabric API\nimport net.fabricmc.fabric.api.tag.client.v1.CommonItemTags;\nif (itemStack.isIn(CommonItemTags.IRON_ORES)) { /* It is an iron ore */ }\n```"}} | |