Search in sources :

Example 1 with FabricPlatform

use of com.viaversion.fabric.mc117.platform.FabricPlatform 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);
}
Also used : VFLoader(com.viaversion.fabric.mc114.platform.VFLoader) FabricInjector(com.viaversion.fabric.common.platform.FabricInjector) ViaManagerImpl(com.viaversion.viaversion.ViaManagerImpl) VRCommandHandler(com.viaversion.fabric.mc114.commands.VRCommandHandler) FabricPlatform(com.viaversion.fabric.mc114.platform.FabricPlatform) VFConfig(com.viaversion.fabric.common.config.VFConfig)

Example 2 with FabricPlatform

use of com.viaversion.fabric.mc117.platform.FabricPlatform 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);
}
Also used : VFLoader(com.viaversion.fabric.mc119.platform.VFLoader) FabricInjector(com.viaversion.fabric.common.platform.FabricInjector) ViaManagerImpl(com.viaversion.viaversion.ViaManagerImpl) VRCommandHandler(com.viaversion.fabric.mc119.commands.VRCommandHandler) FabricPlatform(com.viaversion.fabric.mc119.platform.FabricPlatform) VFConfig(com.viaversion.fabric.common.config.VFConfig)

Example 3 with FabricPlatform

use of com.viaversion.fabric.mc117.platform.FabricPlatform 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);
}
Also used : VFLoader(com.viaversion.fabric.mc18.platform.VFLoader) FabricInjector(com.viaversion.fabric.common.platform.FabricInjector) ViaManagerImpl(com.viaversion.viaversion.ViaManagerImpl) VRCommandHandler(com.viaversion.fabric.mc18.commands.VRCommandHandler) FabricPlatform(com.viaversion.fabric.mc18.platform.FabricPlatform) VFConfig(com.viaversion.fabric.common.config.VFConfig)

Example 4 with FabricPlatform

use of com.viaversion.fabric.mc117.platform.FabricPlatform 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);
}
Also used : VFLoader(com.viaversion.fabric.mc118.platform.VFLoader) FabricInjector(com.viaversion.fabric.common.platform.FabricInjector) ViaManagerImpl(com.viaversion.viaversion.ViaManagerImpl) VRCommandHandler(com.viaversion.fabric.mc118.commands.VRCommandHandler) FabricPlatform(com.viaversion.fabric.mc118.platform.FabricPlatform) VFConfig(com.viaversion.fabric.common.config.VFConfig)

Example 5 with FabricPlatform

use of com.viaversion.fabric.mc117.platform.FabricPlatform 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);
}
Also used : VFLoader(com.viaversion.fabric.mc117.platform.VFLoader) FabricInjector(com.viaversion.fabric.common.platform.FabricInjector) ViaManagerImpl(com.viaversion.viaversion.ViaManagerImpl) VRCommandHandler(com.viaversion.fabric.mc117.commands.VRCommandHandler) FabricPlatform(com.viaversion.fabric.mc117.platform.FabricPlatform) VFConfig(com.viaversion.fabric.common.config.VFConfig)

Aggregations

VFConfig (com.viaversion.fabric.common.config.VFConfig)7 FabricInjector (com.viaversion.fabric.common.platform.FabricInjector)7 ViaManagerImpl (com.viaversion.viaversion.ViaManagerImpl)7 VRCommandHandler (com.viaversion.fabric.mc114.commands.VRCommandHandler)1 FabricPlatform (com.viaversion.fabric.mc114.platform.FabricPlatform)1 VFLoader (com.viaversion.fabric.mc114.platform.VFLoader)1 VRCommandHandler (com.viaversion.fabric.mc115.commands.VRCommandHandler)1 FabricPlatform (com.viaversion.fabric.mc115.platform.FabricPlatform)1 VFLoader (com.viaversion.fabric.mc115.platform.VFLoader)1 VRCommandHandler (com.viaversion.fabric.mc116.commands.VRCommandHandler)1 FabricPlatform (com.viaversion.fabric.mc116.platform.FabricPlatform)1 VFLoader (com.viaversion.fabric.mc116.platform.VFLoader)1 VRCommandHandler (com.viaversion.fabric.mc117.commands.VRCommandHandler)1 FabricPlatform (com.viaversion.fabric.mc117.platform.FabricPlatform)1 VFLoader (com.viaversion.fabric.mc117.platform.VFLoader)1 VRCommandHandler (com.viaversion.fabric.mc118.commands.VRCommandHandler)1 FabricPlatform (com.viaversion.fabric.mc118.platform.FabricPlatform)1 VFLoader (com.viaversion.fabric.mc118.platform.VFLoader)1 VRCommandHandler (com.viaversion.fabric.mc119.commands.VRCommandHandler)1 FabricPlatform (com.viaversion.fabric.mc119.platform.FabricPlatform)1