update metadata, use only cmd v1 for 1.16/17

This commit is contained in:
creeper123123321 2021-05-11 16:20:48 -03:00
parent 745818e62b
commit 85a29989f5
8 changed files with 9 additions and 34 deletions

View File

@ -13,7 +13,8 @@
},
"depends": {
"fabricloader": ">=0.10.0",
"minecraft": ["1.8.x", "1.14.x", "1.15.x", "1.16.x", "1.17.x"]
"minecraft": ["1.8.x", "1.14.x", "1.15.x", "1.16.x", "1.17.x"],
"viaversion": ">=4.0.0"
},
"environment": "*",
"authors": [

View File

@ -41,7 +41,7 @@
"depends": {
"fabric-resource-loader-v0": "*",
"minecraft": "1.14.x",
"viaversion": ">3.0.1"
"viafabric": "*"
},
"recommends": {
"fabric-command-api-v1": "*",

View File

@ -41,7 +41,7 @@
"depends": {
"fabric-resource-loader-v0": "*",
"minecraft": "1.15.x",
"viaversion": ">3.0.1"
"viafabric": "*"
},
"recommends": {
"fabric-command-api-v1": "*",

View File

@ -18,7 +18,6 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
import net.fabricmc.fabric.api.registry.CommandRegistry;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.command.CommandSource;
import org.apache.logging.log4j.LogManager;
@ -83,12 +82,7 @@ public class ViaFabric implements ModInitializer {
try {
registerCommandsV1();
} catch (NoClassDefFoundError ignored) {
try {
registerCommandsV0();
JLOGGER.info("Using Fabric Commands V0");
} catch (NoClassDefFoundError ignored2) {
JLOGGER.info("Couldn't register command as Fabric Commands isn't installed");
}
JLOGGER.info("Couldn't register command as Fabric Commands isn't installed");
}
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
@ -105,11 +99,4 @@ public class ViaFabric implements ModInitializer {
ClientCommandManager.DISPATCHER.register(command("viafabricclient"));
}
}
@SuppressWarnings("deprecation")
private void registerCommandsV0() {
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(command("viaversion")));
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(command("viaver")));
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(command("vvfabric")));
}
}

View File

@ -38,7 +38,7 @@
"depends": {
"fabric-resource-loader-v0": "*",
"minecraft": "1.16.x",
"viaversion": ">3.0.1"
"viafabric": "*"
},
"recommends": {
"fabric-command-api-v1": "*"

View File

@ -18,7 +18,6 @@ import net.fabricmc.api.EnvType;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.client.command.v1.ClientCommandManager;
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
import net.fabricmc.fabric.api.registry.CommandRegistry;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.command.CommandSource;
import org.apache.logging.log4j.LogManager;
@ -83,12 +82,7 @@ public class ViaFabric implements ModInitializer {
try {
registerCommandsV1();
} catch (NoClassDefFoundError ignored) {
try {
registerCommandsV0();
JLOGGER.info("Using Fabric Commands V0");
} catch (NoClassDefFoundError ignored2) {
JLOGGER.info("Couldn't register command as Fabric Commands isn't installed");
}
JLOGGER.info("Couldn't register command as Fabric Commands isn't installed");
}
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
@ -105,11 +99,4 @@ public class ViaFabric implements ModInitializer {
ClientCommandManager.DISPATCHER.register(command("viafabricclient"));
}
}
@SuppressWarnings("deprecation")
private void registerCommandsV0() {
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(command("viaversion")));
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(command("viaver")));
CommandRegistry.INSTANCE.register(false, dispatcher -> dispatcher.register(command("vvfabric")));
}
}

View File

@ -38,7 +38,7 @@
"depends": {
"fabric-resource-loader-v0": "*",
"minecraft": ">1.16.50",
"viaversion": ">3.0.1"
"viafabric": "*"
},
"recommends": {
"fabric-command-api-v1": "*"

View File

@ -38,7 +38,7 @@
"depends": {
"legacy-fabric-resource-loader-v1": "*",
"minecraft": "1.8.x",
"viaversion": ">3.0.1"
"viafabric": "*"
},
"recommends": {
"fabric-command-api-v0": "*"