#3446: Fix < 1.19 support
This commit is contained in:
parent
76673f02a4
commit
f4534c8273
@ -582,176 +582,167 @@ public class Commands extends DefinedPacket
|
|||||||
register( "minecraft:item_enchantment", VOID );
|
register( "minecraft:item_enchantment", VOID );
|
||||||
register( "minecraft:entity_summon", VOID );
|
register( "minecraft:entity_summon", VOID );
|
||||||
register( "minecraft:dimension", VOID );
|
register( "minecraft:dimension", VOID );
|
||||||
register( "minecraft:time_legacy", VOID ); // 1.14
|
register( "minecraft:time", VOID ); // 1.14
|
||||||
register( "minecraft:resource_or_tag", RAW_STRING ); // 1.18.2
|
register( "minecraft:resource_or_tag", RAW_STRING ); // 1.18.2
|
||||||
register( "minecraft:resource", RAW_STRING ); // 1.18.2
|
register( "minecraft:resource", RAW_STRING ); // 1.18.2
|
||||||
register( "minecraft:template_mirror", VOID ); // 1.19
|
|
||||||
register( "minecraft:template_rotation", VOID ); // 1.19
|
|
||||||
register( "minecraft:uuid", VOID ); // 1.16
|
register( "minecraft:uuid", VOID ); // 1.16
|
||||||
|
|
||||||
register( "minecraft:gamemode", VOID ); // 1.19.3
|
|
||||||
register( "minecraft:resource_or_tag_key", RAW_STRING ); // 1.19.3
|
|
||||||
register( "minecraft:resource_key", RAW_STRING ); // 1.19.3
|
|
||||||
|
|
||||||
register( "minecraft:heightmap", VOID ); // 1.19.4
|
|
||||||
register( "minecraft:time", INTEGER ); // 1.19.4
|
|
||||||
|
|
||||||
register( "minecraft:nbt", VOID ); // 1.13 // removed
|
register( "minecraft:nbt", VOID ); // 1.13 // removed
|
||||||
IDS_1_19 = new ArgumentSerializer[]
|
IDS_1_19 = new ArgumentSerializer[]
|
||||||
{
|
{
|
||||||
get( "brigadier:bool" ),
|
get( "brigadier:bool", VOID ),
|
||||||
get( "brigadier:float" ),
|
get( "brigadier:float", FLOAT_RANGE ),
|
||||||
get( "brigadier:double" ),
|
get( "brigadier:double", DOUBLE_RANGE ),
|
||||||
get( "brigadier:integer" ),
|
get( "brigadier:integer", INTEGER_RANGE ),
|
||||||
get( "brigadier:long" ),
|
get( "brigadier:long", LONG_RANGE ),
|
||||||
get( "brigadier:string" ),
|
get( "brigadier:string", STRING ),
|
||||||
get( "minecraft:entity" ),
|
get( "minecraft:entity", BYTE ),
|
||||||
get( "minecraft:game_profile" ),
|
get( "minecraft:game_profile", VOID ),
|
||||||
get( "minecraft:block_pos" ),
|
get( "minecraft:block_pos", VOID ),
|
||||||
get( "minecraft:column_pos" ),
|
get( "minecraft:column_pos", VOID ),
|
||||||
get( "minecraft:vec3" ),
|
get( "minecraft:vec3", VOID ),
|
||||||
get( "minecraft:vec2" ),
|
get( "minecraft:vec2", VOID ),
|
||||||
get( "minecraft:block_state" ),
|
get( "minecraft:block_state", VOID ),
|
||||||
get( "minecraft:block_predicate" ),
|
get( "minecraft:block_predicate", VOID ),
|
||||||
get( "minecraft:item_stack" ),
|
get( "minecraft:item_stack", VOID ),
|
||||||
get( "minecraft:item_predicate" ),
|
get( "minecraft:item_predicate", VOID ),
|
||||||
get( "minecraft:color" ),
|
get( "minecraft:color", VOID ),
|
||||||
get( "minecraft:component" ),
|
get( "minecraft:component", VOID ),
|
||||||
get( "minecraft:message" ),
|
get( "minecraft:message", VOID ),
|
||||||
get( "minecraft:nbt_compound_tag" ),
|
get( "minecraft:nbt_compound_tag", VOID ),
|
||||||
get( "minecraft:nbt_tag" ),
|
get( "minecraft:nbt_tag", VOID ),
|
||||||
get( "minecraft:nbt_path" ),
|
get( "minecraft:nbt_path", VOID ),
|
||||||
get( "minecraft:objective" ),
|
get( "minecraft:objective", VOID ),
|
||||||
get( "minecraft:objective_criteria" ),
|
get( "minecraft:objective_criteria", VOID ),
|
||||||
get( "minecraft:operation" ),
|
get( "minecraft:operation", VOID ),
|
||||||
get( "minecraft:particle" ),
|
get( "minecraft:particle", VOID ),
|
||||||
get( "minecraft:angle" ),
|
get( "minecraft:angle", VOID ),
|
||||||
get( "minecraft:rotation" ),
|
get( "minecraft:rotation", VOID ),
|
||||||
get( "minecraft:scoreboard_slot" ),
|
get( "minecraft:scoreboard_slot", VOID ),
|
||||||
get( "minecraft:score_holder" ),
|
get( "minecraft:score_holder", BYTE ),
|
||||||
get( "minecraft:swizzle" ),
|
get( "minecraft:swizzle", VOID ),
|
||||||
get( "minecraft:team" ),
|
get( "minecraft:team", VOID ),
|
||||||
get( "minecraft:item_slot" ),
|
get( "minecraft:item_slot", VOID ),
|
||||||
get( "minecraft:resource_location" ),
|
get( "minecraft:resource_location", VOID ),
|
||||||
get( "minecraft:mob_effect" ),
|
get( "minecraft:mob_effect", VOID ),
|
||||||
get( "minecraft:function" ),
|
get( "minecraft:function", VOID ),
|
||||||
get( "minecraft:entity_anchor" ),
|
get( "minecraft:entity_anchor", VOID ),
|
||||||
get( "minecraft:int_range" ),
|
get( "minecraft:int_range", VOID ),
|
||||||
get( "minecraft:float_range" ),
|
get( "minecraft:float_range", VOID ),
|
||||||
get( "minecraft:item_enchantment" ),
|
get( "minecraft:item_enchantment", VOID ),
|
||||||
get( "minecraft:entity_summon" ),
|
get( "minecraft:entity_summon", VOID ),
|
||||||
get( "minecraft:dimension" ),
|
get( "minecraft:dimension", VOID ),
|
||||||
get( "minecraft:time_legacy" ),
|
get( "minecraft:time", VOID ),
|
||||||
get( "minecraft:resource_or_tag" ),
|
get( "minecraft:resource_or_tag", RAW_STRING ),
|
||||||
get( "minecraft:resource" ),
|
get( "minecraft:resource", RAW_STRING ),
|
||||||
get( "minecraft:template_mirror" ),
|
get( "minecraft:template_mirror", VOID ),
|
||||||
get( "minecraft:template_rotation" ),
|
get( "minecraft:template_rotation", VOID ),
|
||||||
get( "minecraft:uuid" )
|
get( "minecraft:uuid", VOID ),
|
||||||
};
|
};
|
||||||
|
|
||||||
IDS_1_19_3 = new ArgumentSerializer[]
|
IDS_1_19_3 = new ArgumentSerializer[]
|
||||||
{
|
{
|
||||||
get( "brigadier:bool" ),
|
get( "brigadier:bool", VOID ),
|
||||||
get( "brigadier:float" ),
|
get( "brigadier:float", FLOAT_RANGE ),
|
||||||
get( "brigadier:double" ),
|
get( "brigadier:double", DOUBLE_RANGE ),
|
||||||
get( "brigadier:integer" ),
|
get( "brigadier:integer", INTEGER_RANGE ),
|
||||||
get( "brigadier:long" ),
|
get( "brigadier:long", LONG_RANGE ),
|
||||||
get( "brigadier:string" ),
|
get( "brigadier:string", STRING ),
|
||||||
get( "minecraft:entity" ),
|
get( "minecraft:entity", BYTE ),
|
||||||
get( "minecraft:game_profile" ),
|
get( "minecraft:game_profile", VOID ),
|
||||||
get( "minecraft:block_pos" ),
|
get( "minecraft:block_pos", VOID ),
|
||||||
get( "minecraft:column_pos" ),
|
get( "minecraft:column_pos", VOID ),
|
||||||
get( "minecraft:vec3" ),
|
get( "minecraft:vec3", VOID ),
|
||||||
get( "minecraft:vec2" ),
|
get( "minecraft:vec2", VOID ),
|
||||||
get( "minecraft:block_state" ),
|
get( "minecraft:block_state", VOID ),
|
||||||
get( "minecraft:block_predicate" ),
|
get( "minecraft:block_predicate", VOID ),
|
||||||
get( "minecraft:item_stack" ),
|
get( "minecraft:item_stack", VOID ),
|
||||||
get( "minecraft:item_predicate" ),
|
get( "minecraft:item_predicate", VOID ),
|
||||||
get( "minecraft:color" ),
|
get( "minecraft:color", VOID ),
|
||||||
get( "minecraft:component" ),
|
get( "minecraft:component", VOID ),
|
||||||
get( "minecraft:message" ),
|
get( "minecraft:message", VOID ),
|
||||||
get( "minecraft:nbt_compound_tag" ),
|
get( "minecraft:nbt_compound_tag", VOID ),
|
||||||
get( "minecraft:nbt_tag" ),
|
get( "minecraft:nbt_tag", VOID ),
|
||||||
get( "minecraft:nbt_path" ),
|
get( "minecraft:nbt_path", VOID ),
|
||||||
get( "minecraft:objective" ),
|
get( "minecraft:objective", VOID ),
|
||||||
get( "minecraft:objective_criteria" ),
|
get( "minecraft:objective_criteria", VOID ),
|
||||||
get( "minecraft:operation" ),
|
get( "minecraft:operation", VOID ),
|
||||||
get( "minecraft:particle" ),
|
get( "minecraft:particle", VOID ),
|
||||||
get( "minecraft:angle" ),
|
get( "minecraft:angle", VOID ),
|
||||||
get( "minecraft:rotation" ),
|
get( "minecraft:rotation", VOID ),
|
||||||
get( "minecraft:scoreboard_slot" ),
|
get( "minecraft:scoreboard_slot", VOID ),
|
||||||
get( "minecraft:score_holder" ),
|
get( "minecraft:score_holder", BYTE ),
|
||||||
get( "minecraft:swizzle" ),
|
get( "minecraft:swizzle", VOID ),
|
||||||
get( "minecraft:team" ),
|
get( "minecraft:team", VOID ),
|
||||||
get( "minecraft:item_slot" ),
|
get( "minecraft:item_slot", VOID ),
|
||||||
get( "minecraft:resource_location" ),
|
get( "minecraft:resource_location", VOID ),
|
||||||
get( "minecraft:function" ),
|
get( "minecraft:function", VOID ),
|
||||||
get( "minecraft:entity_anchor" ),
|
get( "minecraft:entity_anchor", VOID ),
|
||||||
get( "minecraft:int_range" ),
|
get( "minecraft:int_range", VOID ),
|
||||||
get( "minecraft:float_range" ),
|
get( "minecraft:float_range", VOID ),
|
||||||
get( "minecraft:dimension" ),
|
get( "minecraft:dimension", VOID ),
|
||||||
get( "minecraft:gamemode" ),
|
get( "minecraft:gamemode", VOID ),
|
||||||
get( "minecraft:time_legacy" ),
|
get( "minecraft:time", VOID ),
|
||||||
get( "minecraft:resource_or_tag" ),
|
get( "minecraft:resource_or_tag", RAW_STRING ),
|
||||||
get( "minecraft:resource_or_tag_key" ),
|
get( "minecraft:resource_or_tag_key", RAW_STRING ),
|
||||||
get( "minecraft:resource" ),
|
get( "minecraft:resource", RAW_STRING ),
|
||||||
get( "minecraft:resource_key" ),
|
get( "minecraft:resource_key", RAW_STRING ),
|
||||||
get( "minecraft:template_mirror" ),
|
get( "minecraft:template_mirror", VOID ),
|
||||||
get( "minecraft:template_rotation" ),
|
get( "minecraft:template_rotation", VOID ),
|
||||||
get( "minecraft:uuid" )
|
get( "minecraft:uuid", VOID )
|
||||||
};
|
};
|
||||||
|
|
||||||
IDS_1_19_4 = new ArgumentSerializer[]
|
IDS_1_19_4 = new ArgumentSerializer[]
|
||||||
{
|
{
|
||||||
get( "brigadier:bool" ),
|
get( "brigadier:bool", VOID ),
|
||||||
get( "brigadier:float" ),
|
get( "brigadier:float", FLOAT_RANGE ),
|
||||||
get( "brigadier:double" ),
|
get( "brigadier:double", DOUBLE_RANGE ),
|
||||||
get( "brigadier:integer" ),
|
get( "brigadier:integer", INTEGER_RANGE ),
|
||||||
get( "brigadier:long" ),
|
get( "brigadier:long", LONG_RANGE ),
|
||||||
get( "brigadier:string" ),
|
get( "brigadier:string", STRING ),
|
||||||
get( "minecraft:entity" ),
|
get( "minecraft:entity", BYTE ),
|
||||||
get( "minecraft:game_profile" ),
|
get( "minecraft:game_profile", VOID ),
|
||||||
get( "minecraft:block_pos" ),
|
get( "minecraft:block_pos", VOID ),
|
||||||
get( "minecraft:column_pos" ),
|
get( "minecraft:column_pos", VOID ),
|
||||||
get( "minecraft:vec3" ),
|
get( "minecraft:vec3", VOID ),
|
||||||
get( "minecraft:vec2" ),
|
get( "minecraft:vec2", VOID ),
|
||||||
get( "minecraft:block_state" ),
|
get( "minecraft:block_state", VOID ),
|
||||||
get( "minecraft:block_predicate" ),
|
get( "minecraft:block_predicate", VOID ),
|
||||||
get( "minecraft:item_stack" ),
|
get( "minecraft:item_stack", VOID ),
|
||||||
get( "minecraft:item_predicate" ),
|
get( "minecraft:item_predicate", VOID ),
|
||||||
get( "minecraft:color" ),
|
get( "minecraft:color", VOID ),
|
||||||
get( "minecraft:component" ),
|
get( "minecraft:component", VOID ),
|
||||||
get( "minecraft:message" ),
|
get( "minecraft:message", VOID ),
|
||||||
get( "minecraft:nbt_compound_tag" ),
|
get( "minecraft:nbt_compound_tag", VOID ),
|
||||||
get( "minecraft:nbt_tag" ),
|
get( "minecraft:nbt_tag", VOID ),
|
||||||
get( "minecraft:nbt_path" ),
|
get( "minecraft:nbt_path", VOID ),
|
||||||
get( "minecraft:objective" ),
|
get( "minecraft:objective", VOID ),
|
||||||
get( "minecraft:objective_criteria" ),
|
get( "minecraft:objective_criteria", VOID ),
|
||||||
get( "minecraft:operation" ),
|
get( "minecraft:operation", VOID ),
|
||||||
get( "minecraft:particle" ),
|
get( "minecraft:particle", VOID ),
|
||||||
get( "minecraft:angle" ),
|
get( "minecraft:angle", VOID ),
|
||||||
get( "minecraft:rotation" ),
|
get( "minecraft:rotation", VOID ),
|
||||||
get( "minecraft:scoreboard_slot" ),
|
get( "minecraft:scoreboard_slot", VOID ),
|
||||||
get( "minecraft:score_holder" ),
|
get( "minecraft:score_holder", BYTE ),
|
||||||
get( "minecraft:swizzle" ),
|
get( "minecraft:swizzle", VOID ),
|
||||||
get( "minecraft:team" ),
|
get( "minecraft:team", VOID ),
|
||||||
get( "minecraft:item_slot" ),
|
get( "minecraft:item_slot", VOID ),
|
||||||
get( "minecraft:resource_location" ),
|
get( "minecraft:resource_location", VOID ),
|
||||||
get( "minecraft:function" ),
|
get( "minecraft:function", VOID ),
|
||||||
get( "minecraft:entity_anchor" ),
|
get( "minecraft:entity_anchor", VOID ),
|
||||||
get( "minecraft:int_range" ),
|
get( "minecraft:int_range", VOID ),
|
||||||
get( "minecraft:float_range" ),
|
get( "minecraft:float_range", VOID ),
|
||||||
get( "minecraft:dimension" ),
|
get( "minecraft:dimension", VOID ),
|
||||||
get( "minecraft:gamemode" ),
|
get( "minecraft:gamemode", VOID ),
|
||||||
get( "minecraft:time" ),
|
get( "minecraft:time", INTEGER ),
|
||||||
get( "minecraft:resource_or_tag" ),
|
get( "minecraft:resource_or_tag", RAW_STRING ),
|
||||||
get( "minecraft:resource_or_tag_key" ),
|
get( "minecraft:resource_or_tag_key", RAW_STRING ),
|
||||||
get( "minecraft:resource" ),
|
get( "minecraft:resource", RAW_STRING ),
|
||||||
get( "minecraft:resource_key" ),
|
get( "minecraft:resource_key", RAW_STRING ),
|
||||||
get( "minecraft:template_mirror" ),
|
get( "minecraft:template_mirror", VOID ),
|
||||||
get( "minecraft:template_rotation" ),
|
get( "minecraft:template_rotation", VOID ),
|
||||||
get( "minecraft:uuid" ),
|
get( "minecraft:uuid", VOID ),
|
||||||
get( "minecraft:heightmap" )
|
get( "minecraft:heightmap", VOID )
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -760,9 +751,9 @@ public class Commands extends DefinedPacket
|
|||||||
PROVIDERS.put( name, serializer );
|
PROVIDERS.put( name, serializer );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ArgumentSerializer get(String name)
|
private static ArgumentSerializer get(String name, ArgumentSerializer serializer)
|
||||||
{
|
{
|
||||||
return PROVIDERS.get( name );
|
return serializer;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ArgumentType<?> read(ByteBuf buf, int protocolVersion)
|
private static ArgumentType<?> read(ByteBuf buf, int protocolVersion)
|
||||||
|
Loading…
Reference in New Issue
Block a user