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