mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 01:55:47 +01:00
Add new default command parser
This commit is contained in:
parent
28bd50a105
commit
82ada0bcd8
@ -79,7 +79,7 @@ public class ProtocolVersion {
|
||||
public static final ProtocolVersion v1_17 = register(755, "1.17");
|
||||
public static final ProtocolVersion v1_17_1 = register(756, "1.17.1");
|
||||
public static final ProtocolVersion v1_18 = register(757, "1.18/1.18.1", new VersionRange("1.18", 0, 1));
|
||||
public static final ProtocolVersion v1_18_2 = register(758, 70, "1.18.2");
|
||||
public static final ProtocolVersion v1_18_2 = register(758, 72, "1.18.2");
|
||||
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
|
||||
|
||||
public static ProtocolVersion register(int version, String name) {
|
||||
|
@ -67,6 +67,12 @@ public abstract class CommandRewriter {
|
||||
this.parserHandlers.put("minecraft:score_holder", wrapper -> {
|
||||
wrapper.passthrough(Type.BYTE); // Flags
|
||||
});
|
||||
this.parserHandlers.put("minecraft:resource", wrapper -> {
|
||||
wrapper.passthrough(Type.STRING); // Resource location
|
||||
});
|
||||
this.parserHandlers.put("minecraft:resource_or_tag", wrapper -> {
|
||||
wrapper.passthrough(Type.STRING); // Resource location/tag
|
||||
});
|
||||
}
|
||||
|
||||
public void handleArgument(PacketWrapper wrapper, String argumentType) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user