use of com.viaversion.viaversion.ViaManagerImpl in project ViaFabric by ViaVersion.
the class ViaFabric method onInitialize.
@Override
public void onInitialize() {
FabricPlatform platform = new FabricPlatform();
Via.init(ViaManagerImpl.builder().injector(new FabricInjector()).loader(new VFLoader()).commandHandler(new VRCommandHandler()).platform(platform).build());
platform.init();
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
((ViaManagerImpl) Via.getManager()).init();
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
ProtocolVersion.register(-2, "AUTO");
FabricLoader.getInstance().getEntrypoints("viafabric:via_api_initialized", Runnable.class).forEach(Runnable::run);
registerCommandsV1();
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric").resolve("viafabric.yml").toFile());
INIT_FUTURE.complete(null);
}
use of com.viaversion.viaversion.ViaManagerImpl in project ViaFabric by ViaVersion.
the class ViaFabric method onInitialize.
@Override
public void onInitialize() {
FabricPlatform platform = new FabricPlatform();
Via.init(ViaManagerImpl.builder().injector(new FabricInjector()).loader(new VFLoader()).commandHandler(new VRCommandHandler()).platform(platform).build());
platform.init();
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
((ViaManagerImpl) Via.getManager()).init();
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
ProtocolVersion.register(-2, "AUTO");
FabricLoader.getInstance().getEntrypoints("viafabric:via_api_initialized", Runnable.class).forEach(Runnable::run);
registerCommandsV1();
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric").resolve("viafabric.yml").toFile());
INIT_FUTURE.complete(null);
}
use of com.viaversion.viaversion.ViaManagerImpl in project ViaFabric by ViaVersion.
the class ViaFabric method onInitialize.
@Override
public void onInitialize() {
FabricPlatform platform = new FabricPlatform();
Via.init(ViaManagerImpl.builder().injector(new FabricInjector()).loader(new VFLoader()).commandHandler(new VRCommandHandler()).platform(platform).build());
platform.init();
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
((ViaManagerImpl) Via.getManager()).init();
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
ProtocolVersion.register(-2, "AUTO");
FabricLoader.getInstance().getEntrypoints("viafabric:via_api_initialized", Runnable.class).forEach(Runnable::run);
registerCommandsV0();
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric").resolve("viafabric.yml").toFile());
INIT_FUTURE.complete(null);
}
use of com.viaversion.viaversion.ViaManagerImpl in project ViaFabric by ViaVersion.
the class ViaFabric method onInitialize.
@Override
public void onInitialize() {
FabricPlatform platform = new FabricPlatform();
Via.init(ViaManagerImpl.builder().injector(new FabricInjector()).loader(new VFLoader()).commandHandler(new VRCommandHandler()).platform(platform).build());
platform.init();
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
((ViaManagerImpl) Via.getManager()).init();
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
ProtocolVersion.register(-2, "AUTO");
FabricLoader.getInstance().getEntrypoints("viafabric:via_api_initialized", Runnable.class).forEach(Runnable::run);
registerCommandsV1();
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric").resolve("viafabric.yml").toFile());
INIT_FUTURE.complete(null);
}
use of com.viaversion.viaversion.ViaManagerImpl in project ViaFabric by ViaVersion.
the class ViaFabric method onInitialize.
@Override
public void onInitialize() {
FabricPlatform platform = new FabricPlatform();
Via.init(ViaManagerImpl.builder().injector(new FabricInjector()).loader(new VFLoader()).commandHandler(new VRCommandHandler()).platform(platform).build());
platform.init();
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
((ViaManagerImpl) Via.getManager()).init();
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
ProtocolVersion.register(-2, "AUTO");
FabricLoader.getInstance().getEntrypoints("viafabric:via_api_initialized", Runnable.class).forEach(Runnable::run);
registerCommandsV1();
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric").resolve("viafabric.yml").toFile());
INIT_FUTURE.complete(null);
}
Aggregations