mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-22 16:28:12 +01:00
update metadata, use only cmd v1 for 1.16/17
This commit is contained in:
parent
745818e62b
commit
85a29989f5
@ -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": [
|
||||
|
@ -41,7 +41,7 @@
|
||||
"depends": {
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"minecraft": "1.14.x",
|
||||
"viaversion": ">3.0.1"
|
||||
"viafabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
"fabric-command-api-v1": "*",
|
||||
|
@ -41,7 +41,7 @@
|
||||
"depends": {
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"minecraft": "1.15.x",
|
||||
"viaversion": ">3.0.1"
|
||||
"viafabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
"fabric-command-api-v1": "*",
|
||||
|
@ -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,13 +82,8 @@ 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");
|
||||
}
|
||||
}
|
||||
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
@ -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")));
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
"depends": {
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"minecraft": "1.16.x",
|
||||
"viaversion": ">3.0.1"
|
||||
"viafabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
"fabric-command-api-v1": "*"
|
||||
|
@ -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,13 +82,8 @@ 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");
|
||||
}
|
||||
}
|
||||
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
@ -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")));
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
"depends": {
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"minecraft": ">1.16.50",
|
||||
"viaversion": ">3.0.1"
|
||||
"viafabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
"fabric-command-api-v1": "*"
|
||||
|
@ -38,7 +38,7 @@
|
||||
"depends": {
|
||||
"legacy-fabric-resource-loader-v1": "*",
|
||||
"minecraft": "1.8.x",
|
||||
"viaversion": ">3.0.1"
|
||||
"viafabric": "*"
|
||||
},
|
||||
"recommends": {
|
||||
"fabric-command-api-v0": "*"
|
||||
|
Loading…
Reference in New Issue
Block a user