From 36097d42daa1106c869ad4e87ebd7476ad76f7fe Mon Sep 17 00:00:00 2001 From: creeper123123321 <7974274+creeper123123321@users.noreply.github.com> Date: Mon, 31 May 2021 18:11:13 -0300 Subject: [PATCH] provide modmenu config for viafabric id --- ...vider.java => AbstractFabricVersionProvider.java} | 2 +- .../java/com/viaversion/fabric/mc114/ViaFabric.java | 4 ++-- .../mc114/platform/{VRLoader.java => VFLoader.java} | 6 +++--- ...rsionProvider.java => FabricVersionProvider.java} | 4 ++-- .../java/com/viaversion/fabric/mc115/ViaFabric.java | 4 ++-- .../viaversion/fabric/mc115/gui/ModMenuConfig.java | 8 ++++++++ .../mc115/platform/{VRLoader.java => VFLoader.java} | 6 +++--- ...rsionProvider.java => FabricVersionProvider.java} | 4 ++-- .../java/com/viaversion/fabric/mc116/ViaFabric.java | 4 ++-- .../viaversion/fabric/mc116/gui/ModMenuConfig.java | 12 ++++++++++-- .../mc116/platform/{VRLoader.java => VFLoader.java} | 6 +++--- ...rsionProvider.java => FabricVersionProvider.java} | 4 ++-- .../java/com/viaversion/fabric/mc117/ViaFabric.java | 4 ++-- .../viaversion/fabric/mc117/gui/ModMenuConfig.java | 12 ++++++++++-- .../mc117/platform/{VRLoader.java => VFLoader.java} | 6 +++--- ...rsionProvider.java => FabricVersionProvider.java} | 4 ++-- .../java/com/viaversion/fabric/mc18/ViaFabric.java | 4 ++-- .../mc18/platform/{VRLoader.java => VFLoader.java} | 6 +++--- ...rsionProvider.java => FabricVersionProvider.java} | 4 ++-- 19 files changed, 64 insertions(+), 40 deletions(-) rename src/main/java/com/viaversion/fabric/common/provider/{VFVersionProvider.java => AbstractFabricVersionProvider.java} (99%) rename viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/{VRLoader.java => VFLoader.java} (89%) rename viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/{VRVersionProvider.java => FabricVersionProvider.java} (83%) rename viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/{VRLoader.java => VFLoader.java} (89%) rename viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/{VRVersionProvider.java => FabricVersionProvider.java} (87%) rename viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/{VRLoader.java => VFLoader.java} (89%) rename viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/{VRVersionProvider.java => FabricVersionProvider.java} (87%) rename viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/{VRLoader.java => VFLoader.java} (89%) rename viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/{VRVersionProvider.java => FabricVersionProvider.java} (87%) rename viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/{VRLoader.java => VFLoader.java} (89%) rename viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/{VRVersionProvider.java => FabricVersionProvider.java} (83%) diff --git a/src/main/java/com/viaversion/fabric/common/provider/VFVersionProvider.java b/src/main/java/com/viaversion/fabric/common/provider/AbstractFabricVersionProvider.java similarity index 99% rename from src/main/java/com/viaversion/fabric/common/provider/VFVersionProvider.java rename to src/main/java/com/viaversion/fabric/common/provider/AbstractFabricVersionProvider.java index b67b0b4..4997b2a 100644 --- a/src/main/java/com/viaversion/fabric/common/provider/VFVersionProvider.java +++ b/src/main/java/com/viaversion/fabric/common/provider/AbstractFabricVersionProvider.java @@ -26,7 +26,7 @@ import java.util.concurrent.CompletableFuture; import java.util.logging.Logger; import java.util.stream.IntStream; -public abstract class VFVersionProvider extends BaseVersionProvider { +public abstract class AbstractFabricVersionProvider extends BaseVersionProvider { private int[] multiconnectSupportedVersions = null; { diff --git a/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/ViaFabric.java b/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/ViaFabric.java index 8c414a2..6daa57f 100644 --- a/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/ViaFabric.java +++ b/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/ViaFabric.java @@ -3,7 +3,7 @@ package com.viaversion.fabric.mc114; import com.viaversion.fabric.common.config.VFConfig; import com.viaversion.fabric.mc114.commands.VRCommandHandler; import com.viaversion.fabric.mc114.platform.FabricInjector; -import com.viaversion.fabric.mc114.platform.VRLoader; +import com.viaversion.fabric.mc114.platform.VFLoader; import com.viaversion.fabric.mc114.platform.FabricPlatform; import com.viaversion.fabric.common.protocol.HostnameParserProtocol; import com.viaversion.fabric.common.util.JLoggerToLog4j; @@ -65,7 +65,7 @@ public class ViaFabric implements ModInitializer { public void onInitialize() { Via.init(ViaManagerImpl.builder() .injector(new FabricInjector()) - .loader(new VRLoader()) + .loader(new VFLoader()) .commandHandler(new VRCommandHandler()) .platform(new FabricPlatform()).build()); diff --git a/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/VRLoader.java b/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/VFLoader.java similarity index 89% rename from viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/VRLoader.java rename to viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/VFLoader.java index 00eefd3..09799c8 100644 --- a/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/VRLoader.java +++ b/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/platform/VFLoader.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc114.platform; import com.viaversion.fabric.mc114.providers.VRHandItemProvider; -import com.viaversion.fabric.mc114.providers.VRVersionProvider; +import com.viaversion.fabric.mc114.providers.FabricVersionProvider; import net.fabricmc.api.EnvType; import net.fabricmc.loader.api.FabricLoader; import com.viaversion.viaversion.api.Via; @@ -11,11 +11,11 @@ import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; -public class VRLoader implements ViaPlatformLoader { +public class VFLoader implements ViaPlatformLoader { @Override public void load() { Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter()); - Via.getManager().getProviders().use(VersionProvider.class, new VRVersionProvider()); + Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider()); if (Via.getPlatform().getConf().isItemCache()) { VRHandItemProvider handProvider = new VRHandItemProvider(); diff --git a/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/VRVersionProvider.java b/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/FabricVersionProvider.java similarity index 83% rename from viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/VRVersionProvider.java rename to viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/FabricVersionProvider.java index 8c2c090..f1d55f6 100644 --- a/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/VRVersionProvider.java +++ b/viafabric-mc114/src/main/java/com/viaversion/fabric/mc114/providers/FabricVersionProvider.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc114.providers; import com.viaversion.fabric.common.config.VFConfig; -import com.viaversion.fabric.common.provider.VFVersionProvider; +import com.viaversion.fabric.common.provider.AbstractFabricVersionProvider; import com.viaversion.fabric.mc114.ViaFabric; import com.viaversion.fabric.mc114.service.ProtocolAutoDetector; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; @@ -10,7 +10,7 @@ import java.net.InetSocketAddress; import java.util.concurrent.CompletableFuture; import java.util.logging.Logger; -public class VRVersionProvider extends VFVersionProvider { +public class FabricVersionProvider extends AbstractFabricVersionProvider { @Override protected Logger getLogger() { return ViaFabric.JLOGGER; diff --git a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/ViaFabric.java b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/ViaFabric.java index 567b5b3..c46d6e3 100644 --- a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/ViaFabric.java +++ b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/ViaFabric.java @@ -10,7 +10,7 @@ import com.viaversion.fabric.common.protocol.HostnameParserProtocol; import com.viaversion.fabric.common.util.JLoggerToLog4j; import com.viaversion.fabric.mc115.commands.VRCommandHandler; import com.viaversion.fabric.mc115.platform.FabricInjector; -import com.viaversion.fabric.mc115.platform.VRLoader; +import com.viaversion.fabric.mc115.platform.VFLoader; import com.viaversion.fabric.mc115.platform.FabricPlatform; import com.viaversion.viaversion.ViaManagerImpl; import com.viaversion.viaversion.api.Via; @@ -65,7 +65,7 @@ public class ViaFabric implements ModInitializer { public void onInitialize() { Via.init(ViaManagerImpl.builder() .injector(new FabricInjector()) - .loader(new VRLoader()) + .loader(new VFLoader()) .commandHandler(new VRCommandHandler()) .platform(new FabricPlatform()).build()); diff --git a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/gui/ModMenuConfig.java b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/gui/ModMenuConfig.java index a53d861..e5794a6 100644 --- a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/gui/ModMenuConfig.java +++ b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/gui/ModMenuConfig.java @@ -1,8 +1,11 @@ package com.viaversion.fabric.mc115.gui; +import com.google.common.collect.ImmutableMap; import io.github.prospector.modmenu.api.ConfigScreenFactory; import io.github.prospector.modmenu.api.ModMenuApi; +import java.util.Map; + public class ModMenuConfig implements ModMenuApi { @Override public String getModId() { @@ -13,4 +16,9 @@ public class ModMenuConfig implements ModMenuApi { public ConfigScreenFactory getModConfigScreenFactory() { return ViaConfigScreen::new; } + + @Override + public Map> getProvidedConfigScreenFactories() { + return ImmutableMap.of("viafabric", getModConfigScreenFactory()); + } } \ No newline at end of file diff --git a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/VRLoader.java b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/VFLoader.java similarity index 89% rename from viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/VRLoader.java rename to viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/VFLoader.java index 89bf1c2..686511f 100644 --- a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/VRLoader.java +++ b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/platform/VFLoader.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc115.platform; import com.viaversion.fabric.mc115.providers.VRHandItemProvider; -import com.viaversion.fabric.mc115.providers.VRVersionProvider; +import com.viaversion.fabric.mc115.providers.FabricVersionProvider; import net.fabricmc.api.EnvType; import net.fabricmc.loader.api.FabricLoader; import com.viaversion.viaversion.api.Via; @@ -11,11 +11,11 @@ import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; -public class VRLoader implements ViaPlatformLoader { +public class VFLoader implements ViaPlatformLoader { @Override public void load() { Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter()); - Via.getManager().getProviders().use(VersionProvider.class, new VRVersionProvider()); + Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider()); if (Via.getPlatform().getConf().isItemCache()) { VRHandItemProvider handProvider = new VRHandItemProvider(); diff --git a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/VRVersionProvider.java b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/FabricVersionProvider.java similarity index 87% rename from viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/VRVersionProvider.java rename to viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/FabricVersionProvider.java index 9a3fb9c..5a031c6 100644 --- a/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/VRVersionProvider.java +++ b/viafabric-mc115/src/main/java/com/viaversion/fabric/mc115/providers/FabricVersionProvider.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc115.providers; import com.viaversion.fabric.common.config.VFConfig; -import com.viaversion.fabric.common.provider.VFVersionProvider; +import com.viaversion.fabric.common.provider.AbstractFabricVersionProvider; import com.viaversion.fabric.mc115.ViaFabric; import com.viaversion.fabric.mc115.service.ProtocolAutoDetector; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; @@ -12,7 +12,7 @@ import java.net.InetSocketAddress; import java.util.concurrent.CompletableFuture; import java.util.logging.Logger; -public class VRVersionProvider extends VFVersionProvider { +public class FabricVersionProvider extends AbstractFabricVersionProvider { @Override protected Logger getLogger() { diff --git a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/ViaFabric.java b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/ViaFabric.java index 9d6f858..8aaedfd 100644 --- a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/ViaFabric.java +++ b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/ViaFabric.java @@ -3,7 +3,7 @@ package com.viaversion.fabric.mc116; import com.viaversion.fabric.common.config.VFConfig; import com.viaversion.fabric.mc116.commands.VRCommandHandler; import com.viaversion.fabric.mc116.platform.FabricInjector; -import com.viaversion.fabric.mc116.platform.VRLoader; +import com.viaversion.fabric.mc116.platform.VFLoader; import com.viaversion.fabric.mc116.platform.FabricPlatform; import com.viaversion.fabric.common.protocol.HostnameParserProtocol; import com.viaversion.fabric.common.util.JLoggerToLog4j; @@ -66,7 +66,7 @@ public class ViaFabric implements ModInitializer { public void onInitialize() { Via.init(ViaManagerImpl.builder() .injector(new FabricInjector()) - .loader(new VRLoader()) + .loader(new VFLoader()) .commandHandler(new VRCommandHandler()) .platform(new FabricPlatform()).build()); diff --git a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/gui/ModMenuConfig.java b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/gui/ModMenuConfig.java index 0b6185d..17b9360 100644 --- a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/gui/ModMenuConfig.java +++ b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/gui/ModMenuConfig.java @@ -1,11 +1,19 @@ package com.viaversion.fabric.mc116.gui; -import io.github.prospector.modmenu.api.ConfigScreenFactory; -import io.github.prospector.modmenu.api.ModMenuApi; +import com.google.common.collect.ImmutableMap; +import com.terraformersmc.modmenu.api.ConfigScreenFactory; +import com.terraformersmc.modmenu.api.ModMenuApi; + +import java.util.Map; public class ModMenuConfig implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { return ViaConfigScreen::new; } + + @Override + public Map> getProvidedConfigScreenFactories() { + return ImmutableMap.of("viafabric", getModConfigScreenFactory()); + } } \ No newline at end of file diff --git a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/VRLoader.java b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/VFLoader.java similarity index 89% rename from viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/VRLoader.java rename to viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/VFLoader.java index 67f5176..9ddbc2d 100644 --- a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/VRLoader.java +++ b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/platform/VFLoader.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc116.platform; import com.viaversion.fabric.mc116.providers.VRHandItemProvider; -import com.viaversion.fabric.mc116.providers.VRVersionProvider; +import com.viaversion.fabric.mc116.providers.FabricVersionProvider; import net.fabricmc.api.EnvType; import net.fabricmc.loader.api.FabricLoader; import com.viaversion.viaversion.api.Via; @@ -11,11 +11,11 @@ import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; -public class VRLoader implements ViaPlatformLoader { +public class VFLoader implements ViaPlatformLoader { @Override public void load() { Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter()); - Via.getManager().getProviders().use(VersionProvider.class, new VRVersionProvider()); + Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider()); if (Via.getPlatform().getConf().isItemCache()) { VRHandItemProvider handProvider = new VRHandItemProvider(); diff --git a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/VRVersionProvider.java b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/FabricVersionProvider.java similarity index 87% rename from viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/VRVersionProvider.java rename to viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/FabricVersionProvider.java index 00fc0f1..4d6900c 100644 --- a/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/VRVersionProvider.java +++ b/viafabric-mc116/src/main/java/com/viaversion/fabric/mc116/providers/FabricVersionProvider.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc116.providers; import com.viaversion.fabric.common.config.VFConfig; -import com.viaversion.fabric.common.provider.VFVersionProvider; +import com.viaversion.fabric.common.provider.AbstractFabricVersionProvider; import com.viaversion.fabric.mc116.ViaFabric; import com.viaversion.fabric.mc116.service.ProtocolAutoDetector; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; @@ -12,7 +12,7 @@ import java.net.InetSocketAddress; import java.util.concurrent.CompletableFuture; import java.util.logging.Logger; -public class VRVersionProvider extends VFVersionProvider { +public class FabricVersionProvider extends AbstractFabricVersionProvider { @Override protected Logger getLogger() { diff --git a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/ViaFabric.java b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/ViaFabric.java index 1b8d6ef..bc3bd12 100644 --- a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/ViaFabric.java +++ b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/ViaFabric.java @@ -3,7 +3,7 @@ package com.viaversion.fabric.mc117; import com.viaversion.fabric.common.config.VFConfig; import com.viaversion.fabric.mc117.commands.VRCommandHandler; import com.viaversion.fabric.mc117.platform.FabricInjector; -import com.viaversion.fabric.mc117.platform.VRLoader; +import com.viaversion.fabric.mc117.platform.VFLoader; import com.viaversion.fabric.mc117.platform.FabricPlatform; import com.viaversion.fabric.common.protocol.HostnameParserProtocol; import com.viaversion.fabric.common.util.JLoggerToLog4j; @@ -66,7 +66,7 @@ public class ViaFabric implements ModInitializer { public void onInitialize() { Via.init(ViaManagerImpl.builder() .injector(new FabricInjector()) - .loader(new VRLoader()) + .loader(new VFLoader()) .commandHandler(new VRCommandHandler()) .platform(new FabricPlatform()).build()); diff --git a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ModMenuConfig.java b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ModMenuConfig.java index e5d57f7..7b25b4f 100644 --- a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ModMenuConfig.java +++ b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/gui/ModMenuConfig.java @@ -1,11 +1,19 @@ package com.viaversion.fabric.mc117.gui; -import io.github.prospector.modmenu.api.ConfigScreenFactory; -import io.github.prospector.modmenu.api.ModMenuApi; +import com.google.common.collect.ImmutableMap; +import com.terraformersmc.modmenu.api.ConfigScreenFactory; +import com.terraformersmc.modmenu.api.ModMenuApi; + +import java.util.Map; public class ModMenuConfig implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { return ViaConfigScreen::new; } + + @Override + public Map> getProvidedConfigScreenFactories() { + return ImmutableMap.of("viafabric", getModConfigScreenFactory()); + } } \ No newline at end of file diff --git a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/VRLoader.java b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/VFLoader.java similarity index 89% rename from viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/VRLoader.java rename to viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/VFLoader.java index 53057c7..1a7334b 100644 --- a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/VRLoader.java +++ b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/platform/VFLoader.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc117.platform; import com.viaversion.fabric.mc117.providers.VRHandItemProvider; -import com.viaversion.fabric.mc117.providers.VRVersionProvider; +import com.viaversion.fabric.mc117.providers.FabricVersionProvider; import net.fabricmc.api.EnvType; import net.fabricmc.loader.api.FabricLoader; import com.viaversion.viaversion.api.Via; @@ -11,11 +11,11 @@ import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; -public class VRLoader implements ViaPlatformLoader { +public class VFLoader implements ViaPlatformLoader { @Override public void load() { Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter()); - Via.getManager().getProviders().use(VersionProvider.class, new VRVersionProvider()); + Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider()); if (Via.getPlatform().getConf().isItemCache()) { VRHandItemProvider handProvider = new VRHandItemProvider(); diff --git a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/VRVersionProvider.java b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/FabricVersionProvider.java similarity index 87% rename from viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/VRVersionProvider.java rename to viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/FabricVersionProvider.java index fa0b227..38a72b4 100644 --- a/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/VRVersionProvider.java +++ b/viafabric-mc117/src/main/java/com/viaversion/fabric/mc117/providers/FabricVersionProvider.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc117.providers; import com.viaversion.fabric.common.config.VFConfig; -import com.viaversion.fabric.common.provider.VFVersionProvider; +import com.viaversion.fabric.common.provider.AbstractFabricVersionProvider; import com.viaversion.fabric.mc117.ViaFabric; import com.viaversion.fabric.mc117.service.ProtocolAutoDetector; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; @@ -12,7 +12,7 @@ import java.net.InetSocketAddress; import java.util.concurrent.CompletableFuture; import java.util.logging.Logger; -public class VRVersionProvider extends VFVersionProvider { +public class FabricVersionProvider extends AbstractFabricVersionProvider { @Override protected Logger getLogger() { return ViaFabric.JLOGGER; diff --git a/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/ViaFabric.java b/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/ViaFabric.java index 570abdc..8b17243 100644 --- a/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/ViaFabric.java +++ b/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/ViaFabric.java @@ -4,7 +4,7 @@ import com.viaversion.fabric.mc18.commands.NMSCommandImpl; import com.viaversion.fabric.mc18.commands.VRCommandHandler; import com.viaversion.fabric.common.config.VFConfig; import com.viaversion.fabric.mc18.platform.FabricInjector; -import com.viaversion.fabric.mc18.platform.VRLoader; +import com.viaversion.fabric.mc18.platform.VFLoader; import com.viaversion.fabric.mc18.platform.FabricPlatform; import com.viaversion.fabric.common.protocol.HostnameParserProtocol; import com.viaversion.fabric.common.util.JLoggerToLog4j; @@ -51,7 +51,7 @@ public class ViaFabric implements ModInitializer { public void onInitialize() { Via.init(ViaManagerImpl.builder() .injector(new FabricInjector()) - .loader(new VRLoader()) + .loader(new VFLoader()) .commandHandler(new VRCommandHandler()) .platform(new FabricPlatform()).build()); diff --git a/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/VRLoader.java b/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/VFLoader.java similarity index 89% rename from viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/VRLoader.java rename to viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/VFLoader.java index 21f245c..4f80645 100644 --- a/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/VRLoader.java +++ b/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/platform/VFLoader.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc18.platform; import com.viaversion.fabric.mc18.providers.VRHandItemProvider; -import com.viaversion.fabric.mc18.providers.VRVersionProvider; +import com.viaversion.fabric.mc18.providers.FabricVersionProvider; import net.fabricmc.api.EnvType; import net.fabricmc.loader.api.FabricLoader; import com.viaversion.viaversion.api.Via; @@ -11,11 +11,11 @@ import com.viaversion.viaversion.api.protocol.version.VersionProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.HandItemProvider; import com.viaversion.viaversion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider; -public class VRLoader implements ViaPlatformLoader { +public class VFLoader implements ViaPlatformLoader { @Override public void load() { Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter()); - Via.getManager().getProviders().use(VersionProvider.class, new VRVersionProvider()); + Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider()); if (Via.getPlatform().getConf().isItemCache()) { VRHandItemProvider handProvider = new VRHandItemProvider(); diff --git a/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/VRVersionProvider.java b/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/FabricVersionProvider.java similarity index 83% rename from viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/VRVersionProvider.java rename to viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/FabricVersionProvider.java index debf848..ff7adc4 100644 --- a/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/VRVersionProvider.java +++ b/viafabric-mc18/src/main/java/com/viaversion/fabric/mc18/providers/FabricVersionProvider.java @@ -1,7 +1,7 @@ package com.viaversion.fabric.mc18.providers; import com.viaversion.fabric.common.config.VFConfig; -import com.viaversion.fabric.common.provider.VFVersionProvider; +import com.viaversion.fabric.common.provider.AbstractFabricVersionProvider; import com.viaversion.fabric.mc18.ViaFabric; import com.viaversion.fabric.mc18.service.ProtocolAutoDetector; import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; @@ -10,7 +10,7 @@ import java.net.InetSocketAddress; import java.util.concurrent.CompletableFuture; import java.util.logging.Logger; -public class VRVersionProvider extends VFVersionProvider { +public class FabricVersionProvider extends AbstractFabricVersionProvider { @Override protected Logger getLogger() { return ViaFabric.JLOGGER;