mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-22 16:28:12 +01:00
21w41a + fix #157
This commit is contained in:
parent
a2693aafce
commit
2a5ba15209
@ -22,7 +22,7 @@ plugins {
|
||||
}
|
||||
|
||||
def ENV = System.getenv()
|
||||
def vvVer = "4.1.0-21w40a-SNAPSHOT"
|
||||
def vvVer = "4.1.0-21w41a-SNAPSHOT"
|
||||
def yamlVer = "1.29"
|
||||
|
||||
description = "Client-side and server-side ViaVersion implementation for Fabric"
|
||||
|
@ -32,17 +32,20 @@ import java.util.logging.Logger;
|
||||
|
||||
public abstract class AbstractFabricPlatform implements ViaPlatform<UUID> {
|
||||
private final Logger logger = new JLoggerToLog4j(LogManager.getLogger("ViaVersion"));
|
||||
private final FabricViaConfig config;
|
||||
private final File dataFolder;
|
||||
private FabricViaConfig config;
|
||||
private File dataFolder;
|
||||
private final ViaAPI<UUID> api;
|
||||
|
||||
{
|
||||
Path configDir = FabricLoader.getInstance().getConfigDir().resolve("ViaFabric");
|
||||
config = new FabricViaConfig(configDir.resolve("viaversion.yml").toFile());
|
||||
dataFolder = configDir.toFile();
|
||||
api = new FabricViaAPI();
|
||||
}
|
||||
|
||||
public void init() {
|
||||
Path configDir = FabricLoader.getInstance().getConfigDir().resolve("ViaFabric");
|
||||
dataFolder = configDir.toFile();
|
||||
config = new FabricViaConfig(configDir.resolve("viaversion.yml").toFile());
|
||||
}
|
||||
|
||||
protected abstract ExecutorService asyncService();
|
||||
|
||||
protected abstract EventLoop eventLoop();
|
||||
|
@ -57,11 +57,15 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
FabricPlatform platform = new FabricPlatform();
|
||||
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.injector(new FabricInjector())
|
||||
.loader(new VFLoader())
|
||||
.commandHandler(new VRCommandHandler())
|
||||
.platform(new FabricPlatform()).build());
|
||||
.platform(platform).build());
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
|
@ -57,11 +57,15 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
FabricPlatform platform = new FabricPlatform();
|
||||
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.injector(new FabricInjector())
|
||||
.loader(new VFLoader())
|
||||
.commandHandler(new VRCommandHandler())
|
||||
.platform(new FabricPlatform()).build());
|
||||
.platform(platform).build());
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
|
@ -59,11 +59,15 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
FabricPlatform platform = new FabricPlatform();
|
||||
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.injector(new FabricInjector())
|
||||
.loader(new VFLoader())
|
||||
.commandHandler(new VRCommandHandler())
|
||||
.platform(new FabricPlatform()).build());
|
||||
.platform(platform).build());
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
|
@ -59,11 +59,15 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
FabricPlatform platform = new FabricPlatform();
|
||||
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.injector(new FabricInjector())
|
||||
.loader(new VFLoader())
|
||||
.commandHandler(new VRCommandHandler())
|
||||
.platform(new FabricPlatform()).build());
|
||||
.platform(platform).build());
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
|
@ -59,11 +59,15 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
FabricPlatform platform = new FabricPlatform();
|
||||
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.injector(new FabricInjector())
|
||||
.loader(new VFLoader())
|
||||
.commandHandler(new VRCommandHandler())
|
||||
.platform(new FabricPlatform()).build());
|
||||
.platform(platform).build());
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
|
@ -43,11 +43,15 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
FabricPlatform platform = new FabricPlatform();
|
||||
|
||||
Via.init(ViaManagerImpl.builder()
|
||||
.injector(new FabricInjector())
|
||||
.loader(new VFLoader())
|
||||
.commandHandler(new VRCommandHandler())
|
||||
.platform(new FabricPlatform()).build());
|
||||
.platform(platform).build());
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user