Add 1.21.5 resource_selector command argument parser

This commit is contained in:
booky10 committed 2025-03-25 21:03:35 +01:00
1 parent 5280f26e00
commit 5b214e4187
2 files changed
+65

No files matched your search

@@ -214,6 +214,14 @@ public class Parsers {
public static final Parser LOOT_MODIFIER = define("loot_modifier", null, null);
public static final Parser UUID = define("uuid", null, null);
/**
* Added with 1.21.5
*/
public static final Parser RESOURCE_SELECTOR = define("resource_selector",
wrapper -> Collections.singletonList(wrapper.readIdentifier()),
(wrapper, value) -> wrapper.writeIdentifier((ResourceLocation) value.get(0))
);
static {
TYPES_BUILDER.unloadFileMappings();
}
@@ -1,4 +1,61 @@
{
"V_1_21_5": [
"brigadier:bool",
"brigadier:float",
"brigadier:double",
"brigadier:integer",
"brigadier:long",
"brigadier:string",
"entity",
"game_profile",
"block_pos",
"column_pos",
"vec3",
"vec2",
"block_state",
"block_predicate",
"item_stack",
"item_predicate",
"color",
"component",
"style",
"message",
"nbt_compound_tag",
"nbt_tag",
"nbt_path",
"objective",
"objective_criteria",
"operation",
"particle",
"angle",
"rotation",
"scoreboard_slot",
"score_holder",
"swizzle",
"team",
"item_slot",
"item_slots",
"resource_location",
"function",
"entity_anchor",
"int_range",
"float_range",
"dimension",
"gamemode",
"time",
"resource_or_tag",
"resource_or_tag_key",
"resource",
"resource_key",
"resource_selector",
"template_mirror",
"template_rotation",
"heightmap",
"loot_table",
"loot_predicate",
"loot_modifier",
"uuid"
],
"V_1_20_5": [
"brigadier:bool",
"brigadier:float",