mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-21 16:17:37 +01:00
Update ViaVersion
This commit is contained in:
parent
8100a1f463
commit
89b178dbd2
@ -3,7 +3,7 @@
|
||||
org.gradle.jvmargs=-Xms32M -Xmx3G -XX:+UseG1GC -XX:+UseStringDeduplication
|
||||
|
||||
loader_version=0.14.12
|
||||
viaver_version=4.5.2-SNAPSHOT
|
||||
viaver_version=4.6.0-1.19.4-rc2-SNAPSHOT
|
||||
yaml_version=1.33
|
||||
|
||||
# example: 1.19.1-rc2
|
||||
|
@ -76,6 +76,14 @@ public abstract class AbstractFabricPlatform implements ViaPlatform<UUID> {
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
public FutureTaskId runRepeatingAsync(Runnable runnable, long ticks) {
|
||||
return new FutureTaskId(eventLoop()
|
||||
.scheduleAtFixedRate(() -> runAsync(runnable), 0, ticks * 50, TimeUnit.MILLISECONDS)
|
||||
.addListener(errorLogger())
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FutureTaskId runSync(Runnable runnable, long ticks) {
|
||||
// ViaVersion seems to not need to run delayed tasks on main thread
|
||||
|
@ -14,7 +14,6 @@ import com.viaversion.fabric.mc114.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc114.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.DefaultEventLoop;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -67,9 +66,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -81,6 +79,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ import com.viaversion.fabric.mc115.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc115.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.DefaultEventLoop;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -67,9 +66,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -81,6 +79,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ import com.viaversion.fabric.mc116.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc116.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.DefaultEventLoop;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ import com.viaversion.fabric.mc117.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc117.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.DefaultEventLoop;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ import com.viaversion.fabric.mc118.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc118.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.DefaultEventLoop;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ import com.viaversion.fabric.mc119.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc119.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.DefaultEventLoop;
|
||||
import io.netty.channel.EventLoop;
|
||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ import com.viaversion.fabric.mc18.platform.FabricPlatform;
|
||||
import com.viaversion.fabric.mc18.platform.VFLoader;
|
||||
import com.viaversion.viaversion.ViaManagerImpl;
|
||||
import com.viaversion.viaversion.api.Via;
|
||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import io.netty.channel.EventLoop;
|
||||
import io.netty.channel.local.LocalEventLoopGroup;
|
||||
@ -53,9 +52,8 @@ public class ViaFabric implements ModInitializer {
|
||||
|
||||
platform.init();
|
||||
|
||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
||||
|
||||
((ViaManagerImpl) Via.getManager()).init();
|
||||
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||
manager.init();
|
||||
|
||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||
ProtocolVersion.register(-2, "AUTO");
|
||||
@ -67,6 +65,8 @@ public class ViaFabric implements ModInitializer {
|
||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||
.resolve("viafabric.yml").toFile());
|
||||
|
||||
manager.onServerLoaded();
|
||||
|
||||
INIT_FUTURE.complete(null);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user