mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2025-01-06 18:57:43 +01:00
/viaver command for 1.8
This commit is contained in:
parent
ae5ffaf711
commit
38cad3aa9f
@ -55,14 +55,14 @@ dependencies {
|
||||
implementation("us.myles:viaversion:3.0.2-SNAPSHOT") { isTransitive = false }
|
||||
|
||||
// Use 1.8.9 Legacy Fabric https://github.com/Legacy-Fabric/fabric-example-mod/blob/master/gradle.properties
|
||||
compile("com.google.guava:guava:23.5-jre")
|
||||
implementation("com.google.guava:guava:23.5-jre")
|
||||
minecraft("com.mojang:minecraft:1.8.9")
|
||||
mappings("net.fabricmc:yarn:1.8.9+build.202007011615:v2")
|
||||
modCompile("net.fabricmc:fabric-loader-1.8.9:0.8.2+build.202004131640") {
|
||||
exclude(module = "guava")
|
||||
}
|
||||
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:0.2.2-1.8.9")
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:0.2.7-1.8.9")
|
||||
|
||||
//modImplementation("io.github.cottonmc:cotton-client-commands:1.0.0+1.15.2")
|
||||
//include("io.github.cottonmc:cotton-client-commands:1.0.0+1.15.2")
|
||||
@ -70,7 +70,7 @@ dependencies {
|
||||
|
||||
minecraft {
|
||||
this.intermediaryUrl = JavaFunction {
|
||||
"https://dl.bintray.com/legacy-fabric/Legacy-Fabric-Maven/net/fabricmc/intermediary/" + it + "/intermediary-" + it + "-v2.jar";
|
||||
"https://dl.bintray.com/legacy-fabric/Legacy-Fabric-Maven/net/fabricmc/intermediary/$it/intermediary-$it-v2.jar"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
package com.github.creeper123123321.viafabric;
|
||||
|
||||
import com.github.creeper123123321.viafabric.commands.NMSCommandImpl;
|
||||
import com.github.creeper123123321.viafabric.commands.VRCommandHandler;
|
||||
import com.github.creeper123123321.viafabric.config.VRConfig;
|
||||
import com.github.creeper123123321.viafabric.platform.VRInjector;
|
||||
@ -36,6 +37,7 @@ import io.netty.channel.local.LocalEventLoopGroup;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.event.server.ServerStartCallback;
|
||||
import net.fabricmc.fabric.api.event.server.ServerStopCallback;
|
||||
import net.fabricmc.fabric.api.registry.FabricCommandRegistry;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -82,9 +84,7 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
ServerStartCallback.EVENT.register(it -> server = it);
|
||||
ServerStopCallback.EVENT.register(it -> server = it);
|
||||
//CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> dispatcher.register(command("viaversion")));
|
||||
//CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> dispatcher.register(command("viaver")));
|
||||
//CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> dispatcher.register(command("vvfabric")));
|
||||
FabricCommandRegistry.INSTANCE.register(new NMSCommandImpl(Via.getManager().getCommandHandler()));
|
||||
|
||||
config = new VRConfig(FabricLoader.getInstance().getConfigDirectory().toPath().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
@ -27,14 +27,15 @@ package com.github.creeper123123321.viafabric.commands;
|
||||
import net.minecraft.command.AbstractCommand;
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import us.myles.ViaVersion.commands.ViaCommandHandler;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class NMSCommandImpl extends AbstractCommand {
|
||||
private VRCommandHandler handler;
|
||||
private ViaCommandHandler handler;
|
||||
|
||||
public NMSCommandImpl(VRCommandHandler handler) {
|
||||
public NMSCommandImpl(ViaCommandHandler handler) {
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
@ -50,7 +51,7 @@ public class NMSCommandImpl extends AbstractCommand {
|
||||
|
||||
@Override
|
||||
public String getUsageTranslationKey(CommandSource commandSource) {
|
||||
return "/viaversion help";
|
||||
return "/viaversion [help|subcommand]";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -21,6 +21,7 @@
|
||||
},
|
||||
"depends": {
|
||||
"fabricloader": ">=0.4.0",
|
||||
"fabric-commands-v0": "*",
|
||||
"fabric-events-lifecycle-v0": "*",
|
||||
"fabric-resource-loader-v0": "*",
|
||||
"minecraft": "<1.13",
|
||||
|
Loading…
Reference in New Issue
Block a user