Skip to content

Latest commit

 

History

History
418 lines (352 loc) · 118 KB

README.md

File metadata and controls

418 lines (352 loc) · 118 KB

Minecraft-Programming-Language

This is not a compiler. The generator assumes that your code is valid before you run it. Doing something obviously wrong (like mispelling a function name) will trigger a python error, but minor mistakes will not be caught.

This is a project that, when finished, will allow for the creation of data packs and data pack tags through a simple programming language syntax that resembles object oriented languages such as Java. This is intended to be much more powerful and user friendly than typing a series of commands like you do in regular development. Here are the planned features (checked features are implemented, while unchecked are works in progress):

How To Use

Download both "main.py" and "tags.py" and put them in your chosen project root directory. Copy the "lib" directory to your root (contains necessary library files). Create a directory called "tags" (where your tags go) and create your files (files can be present in any subdirectory that does not have "." at the beginning of it). Copy the ".saved" directory into your root (you can delete any file that doesn't begin with "minecraft" in ".saved/tags") In your "main.mcscript" file (create one if you don't have it; must be in root directory), add the following line to specify your pack details:

pack-info: "[Pack name]" "[Pack ID (used for namespace)]" "[Pack short (used for score)]" "[Pack description]" [Use snapshots (true or false)] [Player Preference (single, multi, or both)];

The "Pack short" key is necessary to ensure your scores fit the 16 character limit while still avoiding conflicts. Should be only 2 or 3 characters long.

Run the "main.py" file using python 3.8.2 (the version this was developed in), and your data pack will be created in ".generated/packs/{pack_name}". You can copy-paste the entire folder to your world's data pack directory and your data pack should load without problems (unless you have a syntax error in one of your literal commands).

Currently, only tags will be generated based on input, while the functions will be populated by generic statements.

Define a Tag

You may define a tag by creating a file with the "mctag" extension in the directory "./tags" relative to the main directory (the directory where you put "main.py" and "tags.py"). All subdirectories of "./tags" will be checked for files, and the resulting data pack will preserve subdirectories (so if you put a file in the "internal" folder, the tag name will be "#internal/[tag_name]").

On the first line of your file, you should specify the type of tag you are creating. Offically, you can create these tag types in data packs:

  • blocks
  • items
  • entity_types
  • fluids
  • functions

Defining the type ensures that the correct data file is used for filtering and that the tag is put in the correct directory of the data pack.

Each subsequent line of the file defines the entries you are placing in your tag and must be prefixed by either "+" or "-" unless it's a comment or one of the special operation functions (sort, limit, and reverse). All whitespace is ignored in every line.

Comment lines are ignored by the generator and may be prefixed by "#". You may also add a comment to the end of a line using the same character.

Format example:

type: entity_types
#This is a comment.
+ minecraft:armor_stand #This is also a comment.

There is an alternate way to define tags that can be used if you have a list of all entries that should be included. You may insert a "txt" file in the directory "./.saved/tags/[type]" that contains either a line separated or comma separated list of the specific entries that should be included (default namespace is "minecraft"). You may not specify other tags or filter entries - This format only accepts literal entry specifications.

Format example:

minecraft:armor_stand
minecraft:potion

Add Entries

You may add an entry to your tag using a line that starts with "+". You have multiple choices for how to determine which entries to add. The most basic option is to specify the name of an entry such as "minecraft:arrow". If you would like, you may omit the namespace and "minecraft:" will automatically be prepended to your entry.

Format Example:

+ minecraft:arrow
+ armor_stand

Remove Entries

You may remove entries from a tag in a similar way that you add entries to it, just with a "-" at the beginning of the line instead of a "+". Anything that can be added can also be removed.

Format Example:

- minecraft:arrow
- armor_stand

Tag Comments

A comment is used by the programmer to communicate stuff about their code, but it is not used in any way by the interpreter and will not appear anywhere in the generated pack. Lines that begin with "#" are considered comments. You may also trail a line with "#{text}..." and that will be considered a comment as well.

Format Example:

#This is a comment
+ minecraft:arrow
+ armor_stand #This is also a comment

Specify Other Tags

You may specify another tag instead of a literal entry when adding or subtracting. When you do so, the operation will be performed on each entry defined in the tag in the order in which they appear. The tags that Minecraft includes by default are all included as txt files (WIP). If you would like to specify your own, you must either create an mctag file or export it to the "tags/{type}" folder as text. Tags that are not found in the generator are appended as literals when generated in the datapack.

To specify another tag, use "all(#{path-to-tag})". You may also specify all entries that are not part of a tag using "all(!#{path-to-tag})"

Format example:

+ all(#minecraft:arrows)
#All entries that are unused in the game
+ all(!#used)

All

You may specify all available entries using the word "all". This will look in the csv file specified as the type of the tag and append every entry found.

Format Example:

type: items
#Add Every item the generator knows of
+ all

Filter By Name

You may add entries based on their name by adding arguments to the "all" function. The full syntax is "all({args})" where "args" is a list of arguments separated by commas. To specify that the name must contain a segment you may specify a single argument "{segment}" or (if you would like to use other arguments as well) you can specify "in={segment}" Only entries containing the specified segment will be added or removed.

You may also specify anything that doesn't contain the segment in the single argument "!{segment}" or "notin={segment}"

Format Example:

#Add all entries containing "ball"
+ all(ball)
# Remove all entries not containing "fire"
- all(!fire)

Filter by value

The generator not only stores a list of all valid entries, it also stores certain data about those entries, such as the height of each entity (WIP). You may use these to filter your values in a more detailed manner.

To specify that a key must be equal to a value, use the argument "{key}=={value}". You may also specify that a key must not equal a value using "{key}!={value}". You can specify, less than, grater than, less than or equal to, or greater than or equal to using "<", ">", "<=", and ">=" respectively.

Format Example:

#Add all entries with the namespace "minecraft" that are taller than 1 block
+ all(namespace=="minecraft",height>1)

Sort

The "all" function has an option to sort your entries either alphabetically or by a certain value instead of in the order it is seen. To use it, use the argument "sort=alphabetical" or "sort={key}". The first will sort alphabetically by name, while the second will sort based on the value of the key of each entry. Entries that are not found in the file are sorted alphabetically before entries that are, and entries that have integer values are sorted before entries with string values (which are sorted alphabetically by value).

Alternatively, you can sort an entire tag using the "sort" function that does not require a "+" or "-" at the beginning of the line. The syntax is either "sort(alphabetical)" or "sort(key)".

Format Example:

+ all(sort=height) #Add all sorted by height
sort(alphabetical) #Sort the entire tag alphabetically

Limit Count

You may limit the number of entries a function receives using either the "limit" argument or (to limit the entire tag) the "limit" function. The syntax for the argument is "limit={number}" and the function is "limit({number})". The number should be an integer. This will splice the list so that only the first {number} entries are included (so "limit=5" will only include the first 5 entries). If there are not that many entries, all entries will be included.

Format Example:

+ all(sort=height,limit=5) #The 5 entities with the lowest height
limit(5) #Limit the length of this tag to 5

Reverse List

You may specify to perform operations on the entries in reverse order or reverse the order of the entire tag. This is particularly useful for sorting things greatest to least rather than least to greatest. You may use the argument syntax "reverse={true or false}" or the function syntax "reverse".

Format Example:

+ all(sort=height,reverse=true) #All entries from tallest to shortest
reverse #Reverse the order of the entire tag

Entity Data

The following information is stored for every entity in the ".saved/data/entity_types.csv" file:

key description possible values
namespace The namespace the entity is defined in string, no spaces or ":"
name The name of the entry string, no spaces
category The entity category this entity fits in.
Hostile entities attack targets on sight.
Passive entities do not attack.
Neutral entities attack under certain conditions.
Projectile entities are fired for attacking.
Utility entities are used as tools rather than living creatures.
neutral, hostile, passive, utility, or projectile
subcategory A subcategory for the entity (if any)
Arthropods are insects that are affected by the "bane of arthropods" enchantment.
Undead entities burn in daylight and are harmed by healing potions.
Illagers are used in raid events.
n/a, arthropod, undead, or illager
width The witdth of the entities hitbox in blocks decimal number
height The height of the entities hitbox in blocks decimal number
length The height of the entities hitbox in blocks (for most entities this is eqwual to the width) decimal number
volume The total amount of space in blocks the entity takes up. Calculated using the formula "length * width * height" decimal number
health The maximum amount of health points this entity can have. "n/a" for entities that do not have health. n/a or integer
environment The preferred environment for this entity land, air, or water
dimension The dimension(s) this entity may be found naturally. all, none, overworld, nether, end, or overworld/nether
snapshot Whether this entry is only available in snapshots or not true or false

Default Entity Tags

The following entity tags are implemented into Minecraft by default and provided in the ".saved/tags/entity_types" directory of the generator:

name contents
arrows arrow, spectral_arrow
beehive_inhabitors bee
impact_projectiles arrow, spectral_arrow, snowball, fireball, small_fireball, egg, trident, dragon_fireball, wither_skull
raiders evoker, illusioner, pillager, ravager, vindicator, witch
skeletons skeleton, stray, wither_skeleton
powder_snow_walkable_mobs‌ rabbit, endermite, silverfish
This data has been extrapolated from the Minecraft Wiki.

Function Data

Each function you create using mcscript files will be added to the ".saved/data/functions.csv" file. You can also define external functions to be included within your mcscript file using 'def {namespace}:{function name};". The following information is stored:

key description possible values
namespace The namespace the entry is defined in. string, no spaces or ":"
name The name of the function as well as the data pack path it is stored in. string, no spaces

Default Function Tags

Minecraft doesn't implement functions by default, so there are no default tags for functions.

Block Data

The following information is stored for every block in the ".saved/data/blocks.csv" file:

key description possible values
namespace The namespace the entry is defined in. string, no spaces or ":"
name The name of the block. string, no spaces
harvestLevel Represents the tool required to break this block.
0 is wood and gold.
1 is stone
2 is iron
3 is diamond and netherite
-1 means it can be broken by hand.
Integer [-1,3] or "unbreakable"
conductive Whether this block may be used to conduct a redstone signal true or false
jumpFactor The factor that modifies jumping on blocks like slime. decimal number
speedFactor The factor that modifies speed on blocks like soul sand decimal number
slipperiness The factor that modifies slipperiness on blocks like ice. decimal number
explosionResistance How resistant the block is to explosions. decimal number
sticky Whether the block is sticky like slime and honey. true or false
transparent Whether the block is transparent. This property is used in redstone. true or false
snapshot Whether this entry is only available in snapshots or not true or false

This data has been extrapolated from Minecraft Forge 1.16.4.

Default Block Tags

The following block tags are implemented into Minecraft by default and provided in the ".saved/tags/blocks" directory of the generator:

Tag name Values
acacia_logs acacia_log, acacia_wood, stripped_acacia_log, stripped_acacia_wood
anvil anvil, chipped_anvil, damaged_anvil
bamboo_plantable_on bamboo, bamboo_sapling, gravel, #sand, dirt, grass_block, podzol, coarse_dirt, mycelium
banners white_banner, orange_banner, magenta_banner, light_blue_banner, yellow_banner, lime_banner, pink_banner, gray_banner, light_gray_banner, cyan_banner, purple_banner, blue_banner, brown_banner, green_banner, red_banner, black_banner, white_wall_banner, orange_wall_banner, magenta_wall_banner, light_blue_wall_banner, yellow_wall_banner, lime_wall_banner, pink_wall_banner, gray_wall_banner, light_gray_wall_banner, cyan_wall_banner, purple_wall_banner, blue_wall_banner, brown_wall_banner, green_wall_banner, red_wall_banner, black_wall_banner
base_stone_nether netherrack, basalt, blackstone
base_stone_overworld stone, granite, diorite, andesite
beacon_base_blocks netherite_block, emerald_block, diamond_block, gold_block, iron_block
beds red_bed, black_bed, blue_bed, brown_bed, cyan_bed, gray_bed, green_bed, light_blue_bed, light_gray_bed, lime_bed, magenta_bed, orange_bed, pink_bed, purple_bed, white_bed, yellow_bed
beehives bee_nest, beehive
bee_growables #crops, sweet_berry_bush
birch_logs birch_log, birch_wood, stripped_birch_log, stripped_birch_wood
buttons #wooden_buttons, stone_button, polished_blackstone_button
campfires campfire, soul_campfire
candle_cakes candle_cake, white_candle_cake, orange_candle_cake, magenta_candle_cake, light_blue_candle_cake, yellow_candle_cake, lime_candle_cake, pink_candle_cake, gray_candle_cake, light_gray_candle_cake, cyan_candle_cake, purple_candle_cake, blue_candle_cake, brown_candle_cake, green_candle_cake, red_candle_cake, black_candle_cake
candles candle, white_candle, orange_candle, magenta_candle, light_blue_candle, yellow_candle, lime_candle, pink_candle, gray_candle, light_gray_candle, cyan_candle, purple_candle, blue_candle, brown_candle, green_candle, red_candle, black_candle
carpets white_carpet, orange_carpet, magenta_carpet, light_blue_carpet, yellow_carpet, lime_carpet, pink_carpet, gray_carpet, light_gray_carpet, cyan_carpet, purple_carpet, blue_carpet, brown_carpet, green_carpet, red_carpet, black_carpet
cauldrons cauldron, water_cauldron, lava_cauldron, powder_snow_cauldron
climbable ladder, vine, scaffolding, weeping_vines, weeping_vines_plant, twisting_vines, twisting_vines_plant
corals #coral_plants, tube_coral_fan, brain_coral_fan, bubble_coral_fan, fire_coral_fan, horn_coral_fan
coral_blocks tube_coral_block, brain_coral_block, bubble_coral_block, fire_coral_block, horn_coral_block
coral_plants tube_coral, brain_coral, bubble_coral, fire_coral, horn_coral
crimson_stems crimson_stem, stripped_crimson_stem, crimson_hyphae, stripped_crimson_hyphae
crops beetroots, carrots, potatoes, wheat, melon_stem, pumpkin_stem
crystal_sound_blocks‌ amethyst_block, budding_amethyst
dark_oak_logs dark_oak_log, dark_oak_wood, stripped_dark_oak_log, stripped_dark_oak_wood
doors #wooden_doors, iron_door
dragon_immune barrier, bedrock, end_portal, end_portal_frame, end_gateway, command_block, repeating_command_block, chain_command_block, structure_block, jigsaw, moving_piston, obsidian, crying_obsidian, end_stone, iron_bars, respawn_anchor
enderman_holdable #small_flowers, grass_block, dirt, coarse_dirt, podzol, sand, red_sand, gravel, brown_mushroom, red_mushroom, tnt, cactus, clay, pumpkin, carved_pumpkin, melon, mycelium, crimson_fungus, crimson_nylium, crimson_roots, warped_fungus, warped_nylium, warped_roots
fence_gates acacia_fence_gate, birch_fence_gate, dark_oak_fence_gate, jungle_fence_gate, oak_fence_gate, spruce_fence_gate, crimson_fence_gate, warped_fence_gate
fences #wooden_fences, nether_brick_fence
fire fire, soul_fire
flowers #small_flowers, #tall_flowers
flower_pots flower_pot, potted_poppy, potted_blue_orchid, potted_allium, potted_azure_bluet, potted_red_tulip, potted_orange_tulip, potted_white_tulip, potted_pink_tulip, potted_oxeye_daisy, potted_dandelion, potted_oak_sapling, potted_spruce_sapling, potted_birch_sapling, potted_jungle_sapling, potted_acacia_sapling, potted_dark_oak_sapling, potted_red_mushroom, potted_brown_mushroom, potted_dead_bush, potted_fern, potted_cactus, potted_cornflower, potted_lily_of_the_valley, potted_wither_rose, potted_bamboo, potted_crimson_fungus, potted_warped_fungus, potted_crimson_roots, potted_warped_roots
gold_ores gold_ore, nether_gold_ore
guarded_by_piglins gold_block, barrel, chest, ender_chest, gilded_blackstone, trapped_chest, #shulker_boxes, #gold_ores
hoglin_repellents warped_fungus, potted_warped_fungus, nether_portal, respawn_anchor
ice ice, packed_ice, blue_ice, frosted_ice
impermeable glass, white_stained_glass, orange_stained_glass, magenta_stained_glass, light_blue_stained_glass, yellow_stained_glass, lime_stained_glass, pink_stained_glass, gray_stained_glass, light_gray_stained_glass, cyan_stained_glass, purple_stained_glass, blue_stained_glass, brown_stained_glass, green_stained_glass, red_stained_glass, black_stained_glass
infiniburn_end #infiniburn_overworld, bedrock
infiniburn_nether #infiniburn_overworld
infiniburn_overworld netherrack, magma_block
jungle_logs jungle_log, jungle_wood, stripped_jungle_log, stripped_jungle_wood
leaves jungle_leaves, oak_leaves, spruce_leaves, dark_oak_leaves, acacia_leaves, birch_leaves
logs #logs_that_burn, #crimson_stems, #warped_stems
logs_that_burn #dark_oak_logs, #oak_logs, #acacia_logs, #birch_logs, #jungle_logs, #spruce_logs
mushroom_grow_block mycelium, podzol, crimson_nylium, warped_nylium
non_flammable_wood warped_stem, stripped_warped_stem, warped_hyphae, stripped_warped_hyphae, crimson_stem, stripped_crimson_stem, crimson_hyphae, stripped_crimson_hyphae, crimson_planks, warped_planks, crimson_slab, warped_slab, crimson_pressure_plate, warped_pressure_plate, crimson_fence, warped_fence, crimson_trapdoor, warped_trapdoor, crimson_fence_gate, warped_fence_gate, crimson_stairs, warped_stairs, crimson_button, warped_button, crimson_door, warped_door, crimson_sign, warped_sign, crimson_wall_sign, warped_wall_sign
nylium crimson_nylium, warped_nylium
oak_logs oak_log, oak_wood, stripped_oak_log, stripped_oak_wood
piglin_repellents soul_fire, soul_torch, soul_lantern, soul_wall_torch, soul_campfire
planks oak_planks, spruce_planks, birch_planks, jungle_planks, acacia_planks, dark_oak_planks, crimson_planks, warped_planks
portals nether_portal, end_portal, end_gateway
pressure_plates light_weighted_pressure_plate, heavy_weighted_pressure_plate, #wooden_pressure_plates, #stone_pressure_plates
prevent_mob_spawning_inside #rails
rails rail, powered_rail, detector_rail, activator_rail
sand sand, red_sand
saplings oak_sapling, spruce_sapling, birch_sapling, jungle_sapling, acacia_sapling, dark_oak_sapling
shulker_boxes shulker_box, black_shulker_box, blue_shulker_box, brown_shulker_box, cyan_shulker_box, gray_shulker_box, green_shulker_box, light_blue_shulker_box, light_gray_shulker_box, lime_shulker_box, magenta_shulker_box, orange_shulker_box, pink_shulker_box, purple_shulker_box, red_shulker_box, white_shulker_box, yellow_shulker_box
signs #standing_signs, #wall_signs
slabs #wooden_slabs, stone_slab, smooth_stone_slab, stone_brick_slab, sandstone_slab, purpur_slab, quartz_slab, red_sandstone_slab, brick_slab, cobblestone_slab, nether_brick_slab, petrified_oak_slab, prismarine_slab, prismarine_brick_slab, dark_prismarine_slab, polished_granite_slab, smooth_red_sandstone_slab, mossy_stone_brick_slab, polished_diorite_slab, mossy_cobblestone_slab, end_stone_brick_slab, smooth_sandstone_slab, smooth_quartz_slab, granite_slab, andesite_slab, red_nether_brick_slab, polished_andesite_slab, diorite_slab, cut_sandstone_slab, cut_red_sandstone_slab, blackstone_slab, polished_blackstone_brick_slab, polished_blackstone_slab
small_flowers dandelion, poppy, blue_orchid, allium, azure_bluet, red_tulip, orange_tulip, white_tulip, pink_tulip, oxeye_daisy, cornflower, lily_of_the_valley, wither_rose
snow_step_sound_blocks‌ snow, powder_snow
soul_fire_base_blocks soul_sand, soul_soil
soul_speed_blocks soul_sand, soul_soil
spruce_logs spruce_log, spruce_wood, stripped_spruce_log, stripped_spruce_wood
stairs #wooden_stairs, nether_brick_stairs, stone_brick_stairs, brick_stairs, purpur_stairs, quartz_stairs, red_sandstone_stairs, prismarine_brick_stairs, prismarine_stairs, dark_prismarine_stairs, polished_granite_stairs, smooth_red_sandstone_stairs, mossy_stone_brick_stairs, polished_diorite_stairs, mossy_cobblestone_stairs, end_stone_brick_stairs, stone_stairs, smooth_sandstone_stairs, smooth_quartz_stairs, granite_stairs, andesite_stairs, red_nether_brick_stairs, polished_andesite_stairs, diorite_stairs, blackstone_stairs, polished_blackstone_brick_stairs, polished_blackstone_stairs
standing_signs oak_sign, spruce_sign, birch_sign, acacia_sign, jungle_sign, dark_oak_sign, crimson_sign, warped_sign
stone_bricks stone_bricks, mossy_stone_bricks, cracked_stone_bricks, chiseled_stone_bricks
stone_pressure_plates stone_pressure_plate, polished_blackstone_pressure_plate
strider_warm_blocks lava
tall_flowers sunflower, lilac, peony, rose_bush
trapdoors #wooden_trapdoors, iron_trapdoor
underwater_bonemeals seagrass, #corals, #wall_corals
unstable_bottom_center #fence_gates
valid_spawn grass_block, podzol
walls cobblestone_wall, mossy_cobblestone_wall, brick_wall, prismarine_wall, red_sandstone_wall, mossy_stone_brick_wall, granite_wall, stone_brick_wall, nether_brick_wall, andesite_wall, red_nether_brick_wall, sandstone_wall, end_stone_brick_wall, diorite_wall, blackstone_wall, polished_blackstone_brick_wall, polished_blackstone_wall
wall_corals tube_coral_wall_fan, brain_coral_wall_fan, bubble_coral_wall_fan, fire_coral_wall_fan, horn_coral_wall_fan
wall_post_override torch, soul_torch, redstone_torch, tripwire, #signs, #banners, #pressure_plates
wall_signs oak_wall_sign, spruce_wall_sign, birch_wall_sign, acacia_wall_sign, jungle_wall_sign, dark_oak_wall_sign, crimson_wall_sign, warped_wall_sign
warped_stems warped_stem, stripped_warped_stem, warped_hyphae, stripped_warped_hyphae
wart_blocks nether_wart_block, warped_wart_block
wither_immune barrier, bedrock, end_portal, end_portal_frame, end_gateway, command_block, repeating_command_block, chain_command_block, structure_block, jigsaw, moving_piston
wither_summon_base_blocks soul_sand, soul_soil
wooden_buttons oak_button, spruce_button, birch_button, jungle_button, acacia_button, dark_oak_button, crimson_button, warped_button
wooden_doors oak_door, spruce_door, birch_door, jungle_door, acacia_door, dark_oak_door, crimson_door, warped_door
wooden_fences oak_fence, acacia_fence, dark_oak_fence, spruce_fence, birch_fence, jungle_fence, crimson_fence, warped_fence
wooden_pressure_plates oak_pressure_plate, spruce_pressure_plate, birch_pressure_plate, jungle_pressure_plate, acacia_pressure_plate, dark_oak_pressure_plate, crimson_pressure_plate, warped_pressure_plate
wooden_slabs oak_slab, spruce_slab, birch_slab, jungle_slab, acacia_slab, dark_oak_slab, crimson_slab, warped_slab
wooden_stairs oak_stairs, spruce_stairs, birch_stairs, jungle_stairs, acacia_stairs, dark_oak_stairs, crimson_stairs, warped_stairs
wooden_trapdoors acacia_trapdoor, birch_trapdoor, dark_oak_trapdoor, jungle_trapdoor, oak_trapdoor, spruce_trapdoor, crimson_trapdoor, warped_trapdoor
wool white_wool, orange_wool, magenta_wool, light_blue_wool, yellow_wool, lime_wool, pink_wool, gray_wool, light_gray_wool, cyan_wool, purple_wool, blue_wool, brown_wool, green_wool, red_wool, black_wool

This data has been extrapolated from the Minecraft Wiki.

Fluid Data

The following information is stored in the ".saved/data/fluids.csv" file:

key description possible values
namespace The namespace the entry is defined in. string, no spaces or ":"
name The name of the liquid. string, no spaces

Default Fluid Tags

The following fluid tags are implemented into Minecraft by default and provided in the ".saved/tags/fluids" directory of the generator:

Tag Name Values
lava lava, flowing_lava
water water, flowing_water

Item Data

key description possible values
namespace The namespace the entry is defined in. string, no spaces or ":"
name The name of the item. string, no spaces
maxStackSize The maximum number of this item a single stack can have. integer
enchantability The enchantability of this item.
0 means this item cannot be enchanted
higher values indicate a higher chance of better enchantments.
integer
durability The maximum durability for items like tools.
0 means the item has no durability.
integer
creativeTab The creative inventory tab this item appears in.
"None" indicates that the item is only obtainable through commands.
Building blocks, Decoration blocks, Redstone, Transportation, Miscellaneous, Foodstuffs, Tools, Combat, Brewing, or None
fuelTime The amount of time, in ticks, that a single instance of this item can be used as fuel in a furnace. Blast furnaces and smokers cut this time in half. There are 20 ticks in a second. integer
harvestLevel The harvest level this item grants the player using it.
-1 is equivalent to hand.
0 is equivalent to wooden pickaxe
1 is equivalent to stone pickaxe
2 is equivalent to iron pickaxe
3 is equivalent to diamond pickaxe.
integer [-1,3]
fireproof Whether this item is immune to fire. True for all netherite items. true or false
food Whether this item is consumable as a food. True for all buckets, potions, and foodstuffs. true or false
block Whether this item can be placed down as a block. true or false
snapshot Whether this entry is only available in snapshots or not true or false

This data has been extrapolated from Minecraft Forge 1.16.4.

Default Item Tags

The following block tags are implemented into Minecraft by default and provided in the ".saved/tags/items" directory of the generator:

Tag name Values
acacia_logs acacia_log, acacia_wood, stripped_acacia_log, stripped_acacia_wood
anvil anvil, chipped_anvil, damaged_anvil
arrows arrow, tipped_arrow, spectral_arrow
banners white_banner, orange_banner, magenta_banner, light_blue_banner, yellow_banner, lime_banner, pink_banner, gray_banner, light_gray_banner, cyan_banner, purple_banner, blue_banner, brown_banner, green_banner, red_banner, black_banner
beacon_payment_items netherite_ingot, emerald, diamond, gold_ingot, iron_ingot
beds red_bed, black_bed, blue_bed, brown_bed, cyan_bed, gray_bed, green_bed, light_blue_bed, light_gray_bed, lime_bed, magenta_bed, orange_bed, pink_bed, purple_bed, white_bed, yellow_bed
birch_logs birch_log, birch_wood, stripped_birch_log, stripped_birch_wood
boats oak_boat, spruce_boat, birch_boat, jungle_boat, acacia_boat, dark_oak_boat
buttons #wooden_buttons, stone_button, polished_blackstone_button
candles candle, white_candle, orange_candle, magenta_candle, light_blue_candle, yellow_candle, lime_candle, pink_candle, gray_candle, light_gray_candle, cyan_candle, purple_candle, blue_candle, brown_candle, green_candle, red_candle, black_candle
carpets white_carpet, orange_carpet, magenta_carpet, light_blue_carpet, yellow_carpet, lime_carpet, pink_carpet, gray_carpet, light_gray_carpet, cyan_carpet, purple_carpet, blue_carpet, brown_carpet, green_carpet, red_carpet, black_carpet
coals coal, charcoal
creeper_drop_music_discs music_disc_13, music_disc_cat, music_disc_blocks, music_disc_chirp, music_disc_far, music_disc_mall, music_disc_mellohi, music_disc_stal, music_disc_strad, music_disc_ward, music_disc_11, music_disc_wait
crimson_stems crimson_stem, stripped_crimson_stem, crimson_hyphae, stripped_crimson_hyphae
dark_oak_logs dark_oak_log, dark_oak_wood, stripped_dark_oak_log, stripped_dark_oak_wood
doors #wooden_doors, iron_door
fences #wooden_fences, nether_brick_fence
fishes cod, cooked_cod, salmon, cooked_salmon, pufferfish, tropical_fish
flowers #small_flowers, #tall_flowers
gold_ores gold_ore, nether_gold_ore
ignored_by_piglin_babies leather
jungle_logs jungle_log, jungle_wood, stripped_jungle_log, stripped_jungle_wood
leaves jungle_leaves, oak_leaves, spruce_leaves, dark_oak_leaves, acacia_leaves, birch_leaves
lectern_books written_book, writable_book
logs #logs_that_burn, #crimson_stems, #warped_stems
logs_that_burn #dark_oak_logs, #oak_logs, #acacia_logs, #birch_logs, #jungle_logs, #spruce_logs
music_discs #creeper_drop_music_discs, music_disc_pigstep
non_flammable_wood warped_stem, stripped_warped_stem, warped_hyphae, stripped_warped_hyphae, crimson_stem, stripped_crimson_stem, crimson_hyphae, stripped_crimson_hyphae, crimson_planks, warped_planks, crimson_slab, warped_slab, crimson_pressure_plate, warped_pressure_plate, crimson_fence, warped_fence, crimson_trapdoor, warped_trapdoor, crimson_fence_gate, warped_fence_gate, crimson_stairs, warped_stairs, crimson_button, warped_button, crimson_door, warped_door, crimson_sign, warped_sign
oak_logs oak_log, oak_wood, stripped_oak_log, stripped_oak_wood
piglin_food porkchop, cooked_porkchop
piglin_loved #gold_ores, gold_block, gilded_blackstone, light_weighted_pressure_plate, gold_ingot, bell, clock, golden_carrot, glistering_melon_slice, golden_apple, enchanted_golden_apple, golden_helmet, golden_chestplate, golden_leggings, golden_boots, golden_horse_armor, golden_sword, golden_pickaxe, golden_shovel, golden_axe, golden_hoe
piglin_repellents soul_torch, soul_lantern, soul_campfire
planks oak_planks, spruce_planks, birch_planks, jungle_planks, acacia_planks, dark_oak_planks, crimson_planks, warped_planks
rails rail, powered_rail, detector_rail, activator_rail
sand sand, red_sand
saplings oak_sapling, spruce_sapling, birch_sapling, jungle_sapling, acacia_sapling, dark_oak_sapling
signs oak_sign, spruce_sign, birch_sign, acacia_sign, jungle_sign, dark_oak_sign, crimson_sign, warped_sign
slabs #wooden_slabs, stone_slab, smooth_stone_slab, stone_brick_slab, sandstone_slab, purpur_slab, quartz_slab, red_sandstone_slab, brick_slab, cobblestone_slab, nether_brick_slab, petrified_oak_slab, prismarine_slab, prismarine_brick_slab, dark_prismarine_slab, polished_granite_slab, smooth_red_sandstone_slab, mossy_stone_brick_slab, polished_diorite_slab, mossy_cobblestone_slab, end_stone_brick_slab, smooth_sandstone_slab, smooth_quartz_slab, granite_slab, andesite_slab, red_nether_brick_slab, polished_andesite_slab, diorite_slab, cut_sandstone_slab, cut_red_sandstone_slab, blackstone_slab, polished_blackstone_brick_slab, polished_blackstone_slab
small_flowers dandelion, poppy, blue_orchid, allium, azure_bluet, red_tulip, orange_tulip, white_tulip, pink_tulip, oxeye_daisy, cornflower, lily_of_the_valley, wither_rose
soul_fire_base_blocks soul_sand, soul_soil
spruce_logs spruce_log, spruce_wood, stripped_spruce_log, stripped_spruce_wood
stairs #wooden_stairs, cobblestone_stairs, sandstone_stairs, nether_brick_stairs, stone_brick_stairs, brick_stairs, purpur_stairs, quartz_stairs, red_sandstone_stairs, prismarine_brick_stairs, prismarine_stairs, dark_prismarine_stairs, polished_granite_stairs, smooth_red_sandstone_stairs, mossy_stone_brick_stairs, polished_diorite_stairs, mossy_cobblestone_stairs, end_stone_brick_stairs, stone_stairs, smooth_sandstone_stairs, smooth_quartz_stairs, granite_stairs, andesite_stairs, red_nether_brick_stairs, polished_andesite_stairs, diorite_stairs, blackstone_stairs, polished_blackstone_brick_stairs, polished_blackstone_stairs
stone_bricks stone_bricks, mossy_stone_bricks, cracked_stone_bricks, chiseled_stone_bricks
stone_crafting_materials cobblestone, blackstone
stone_tool_materials cobblestone, blackstone
tall_flowers sunflower, lilac, peony, rose_bush
trapdoors #wooden_trapdoors, iron_trapdoor
walls cobblestone_wall, mossy_cobblestone_wall, brick_wall, prismarine_wall, red_sandstone_wall, mossy_stone_brick_wall, granite_wall, stone_brick_wall, nether_brick_wall, andesite_wall, red_nether_brick_wall, sandstone_wall, end_stone_brick_wall, diorite_wall, blackstone_wall, polished_blackstone_brick_wall, polished_blackstone_wall
warped_stems warped_stem, stripped_warped_stem, warped_hyphae, stripped_warped_hyphae
wooden_buttons oak_button, spruce_button, birch_button, jungle_button, acacia_button, dark_oak_button, crimson_button, warped_button
wooden_doors oak_door, spruce_door, birch_door, jungle_door, acacia_door, dark_oak_door, crimson_door, warped_door
wooden_fences oak_fence, acacia_fence, dark_oak_fence, spruce_fence, birch_fence, jungle_fence, crimson_fence, warped_fence
wooden_pressure_plates oak_pressure_plate, spruce_pressure_plate, birch_pressure_plate, jungle_pressure_plate, acacia_pressure_plate, dark_oak_pressure_plate, crimson_pressure_plate, warped_pressure_plate
wooden_slabs oak_slab, spruce_slab, birch_slab, jungle_slab, acacia_slab, dark_oak_slab, crimson_slab, warped_slab
wooden_stairs oak_stairs, spruce_stairs, birch_stairs, jungle_stairs, acacia_stairs, dark_oak_stairs, crimson_stairs, warped_stairs
wooden_trapdoors acacia_trapdoor, birch_trapdoor, dark_oak_trapdoor, jungle_trapdoor, oak_trapdoor, spruce_trapdoor, crimson_trapdoor, warped_trapdoor
wool white_wool, orange_wool, magenta_wool, light_blue_wool, yellow_wool, lime_wool, pink_wool, gray_wool, light_gray_wool, cyan_wool, purple_wool, blue_wool, brown_wool, green_wool, red_wool, black_wool

This data has been extrapolated from the Minecraft wiki.