PrismarineJS / minecraft-data

Language independent module providing minecraft data for minecraft clients, servers and libraries.
https://prismarinejs.github.io/minecraft-data
669 stars 222 forks source link

Support groups of tags #343

Open dzikoysk opened 4 years ago

dzikoysk commented 4 years ago

Hey,

It could be quite useful to have a file with tags grouped by a standardized collections such as:

[22:25:29] [main/WARN] (Minecraft) Incomplete server tags, disconnecting. Missing: {minecraft:item=[minecraft:banners, 
minecraft:soul_fire_base_blocks, minecraft:stone_crafting_materials, minecraft:wooden_fences, minecraft:piglin_repellents, 
minecraft:beacon_payment_items, minecraft:wooden_slabs, minecraft:small_flowers, minecraft:wooden_trapdoors, 
minecraft:jungle_logs, minecraft:lectern_books, minecraft:wooden_stairs, minecraft:spruce_logs, minecraft:signs, minecraft:carpets, 
minecraft:wool, minecraft:wooden_buttons, minecraft:stairs, minecraft:fishes, minecraft:logs, minecraft:stone_bricks, 
minecraft:creeper_drop_music_discs, minecraft:arrows, minecraft:slabs, minecraft:wooden_doors, minecraft:warped_stems, 
minecraft:trapdoors, minecraft:crimson_stems, minecraft:buttons, minecraft:flowers, minecraft:stone_tool_materials, 
minecraft:planks, minecraft:boats, minecraft:dark_oak_logs, minecraft:rails, minecraft:non_flammable_wood, minecraft:leaves, 
minecraft:walls, minecraft:coals, minecraft:wooden_pressure_plates, minecraft:acacia_logs, minecraft:anvil, minecraft:piglin_loved, 
minecraft:music_discs, minecraft:birch_logs, minecraft:tall_flowers, minecraft:sand, minecraft:gold_ores, minecraft:logs_that_burn, 
minecraft:fences, minecraft:saplings, minecraft:beds, minecraft:oak_logs, minecraft:doors], minecraft:block=
[minecraft:enderman_holdable, minecraft:banners, minecraft:soul_fire_base_blocks, minecraft:campfires, minecraft:infiniburn_nether,
minecraft:flower_pots, minecraft:infiniburn_overworld, minecraft:wooden_fences, minecraft:piglin_repellents, 
minecraft:wall_post_override, minecraft:wooden_slabs, minecraft:portals, minecraft:small_flowers, minecraft:bamboo_plantable_on, 
minecraft:wooden_trapdoors, minecraft:pressure_plates, minecraft:jungle_logs, minecraft:wooden_stairs, minecraft:spruce_logs, 
minecraft:signs, minecraft:carpets, minecraft:base_stone_overworld, minecraft:wool, minecraft:wooden_buttons, minecraft:stairs, 
minecraft:wither_summon_base_blocks, minecraft:logs, minecraft:stone_bricks, minecraft:hoglin_repellents, minecraft:fire, 
minecraft:beehives, minecraft:ice, minecraft:base_stone_nether, minecraft:dragon_immune, minecraft:crops, minecraft:wall_signs, 
minecraft:slabs, minecraft:valid_spawn, minecraft:mushroom_grow_block, minecraft:guarded_by_piglins, minecraft:wooden_doors, 
minecraft:warped_stems, minecraft:standing_signs, minecraft:infiniburn_end, minecraft:trapdoors, minecraft:crimson_stems, 
minecraft:buttons, minecraft:flowers, minecraft:corals, minecraft:prevent_mob_spawning_inside, minecraft:wart_blocks, 
minecraft:climbable, minecraft:planks, minecraft:soul_speed_blocks, minecraft:dark_oak_logs, minecraft:rails, minecraft:coral_plants,
minecraft:non_flammable_wood, minecraft:leaves, minecraft:walls, minecraft:coral_blocks, minecraft:beacon_base_blocks, 
minecraft:strider_warm_blocks, minecraft:fence_gates, minecraft:bee_growables, minecraft:shulker_boxes, 
minecraft:wooden_pressure_plates, minecraft:wither_immune, minecraft:acacia_logs, minecraft:anvil, minecraft:birch_logs, minecraft:tall_flowers, minecraft:wall_corals, minecraft:underwater_bonemeals, minecraft:stone_pressure_plates, 
minecraft:impermeable, minecraft:sand, minecraft:nylium, minecraft:gold_ores, minecraft:logs_that_burn, minecraft:fences, 
minecraft:saplings, minecraft:beds, minecraft:oak_logs, minecraft:unstable_bottom_center, minecraft:doors], minecraft:fluid=
[minecraft:lava, minecraft:water], minecraft:entity_type=[minecraft:skeletons, minecraft:raiders, minecraft:arrows, 
minecraft:beehive_inhabitors, minecraft:impact_projectiles]}

These groups are required in Tags packet and without them it is not really possible to communicate with a server. Do you think it could be achived by minecraft-data? :)

rom1504 commented 4 years ago

what is this supposed to be ? in what case is it useful ?

dzikoysk commented 4 years ago

The following tags are a part of a new standard used to communicate between server and client. The server prepares ids for all of the tags used by client and sends them during the login procedure:

To use it we need to send base tags, then and only then we can declare a new one. The standard vanilla server sends them using their internal data system based on IRegistry (PacketPlayOutTags -> ITagRegistry):

image

I'm using the minecraft-data as a tags source for my implementation of protocol, but it will be kinda painful in this case. I wonder if you ever encountered such an issue? I've send all of the tags provided by minecraft-data and as you can see the client requests only these damn groups xD