mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-11-21 11:35:16 +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
|
org.gradle.jvmargs=-Xms32M -Xmx3G -XX:+UseG1GC -XX:+UseStringDeduplication
|
||||||
|
|
||||||
loader_version=0.14.12
|
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
|
yaml_version=1.33
|
||||||
|
|
||||||
# example: 1.19.1-rc2
|
# 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
|
@Override
|
||||||
public FutureTaskId runSync(Runnable runnable, long ticks) {
|
public FutureTaskId runSync(Runnable runnable, long ticks) {
|
||||||
// ViaVersion seems to not need to run delayed tasks on main thread
|
// 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.fabric.mc114.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.DefaultEventLoop;
|
import io.netty.channel.DefaultEventLoop;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
@ -67,9 +66,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -81,6 +79,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
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.fabric.mc115.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.DefaultEventLoop;
|
import io.netty.channel.DefaultEventLoop;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
@ -67,9 +66,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -81,6 +79,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
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.fabric.mc116.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.DefaultEventLoop;
|
import io.netty.channel.DefaultEventLoop;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
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.fabric.mc117.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.DefaultEventLoop;
|
import io.netty.channel.DefaultEventLoop;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
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.fabric.mc118.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.DefaultEventLoop;
|
import io.netty.channel.DefaultEventLoop;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
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.fabric.mc119.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.DefaultEventLoop;
|
import io.netty.channel.DefaultEventLoop;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
@ -69,9 +68,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -83,6 +81,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
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.fabric.mc18.platform.VFLoader;
|
||||||
import com.viaversion.viaversion.ViaManagerImpl;
|
import com.viaversion.viaversion.ViaManagerImpl;
|
||||||
import com.viaversion.viaversion.api.Via;
|
import com.viaversion.viaversion.api.Via;
|
||||||
import com.viaversion.viaversion.api.data.MappingDataLoader;
|
|
||||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.channel.local.LocalEventLoopGroup;
|
import io.netty.channel.local.LocalEventLoopGroup;
|
||||||
@ -53,9 +52,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
|
|
||||||
platform.init();
|
platform.init();
|
||||||
|
|
||||||
FabricLoader.getInstance().getModContainer("viabackwards").ifPresent(mod -> MappingDataLoader.enableMappingsCache());
|
ViaManagerImpl manager = (ViaManagerImpl) Via.getManager();
|
||||||
|
manager.init();
|
||||||
((ViaManagerImpl) Via.getManager()).init();
|
|
||||||
|
|
||||||
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
Via.getManager().getProtocolManager().registerBaseProtocol(HostnameParserProtocol.INSTANCE, Range.lessThan(Integer.MIN_VALUE));
|
||||||
ProtocolVersion.register(-2, "AUTO");
|
ProtocolVersion.register(-2, "AUTO");
|
||||||
@ -67,6 +65,8 @@ public class ViaFabric implements ModInitializer {
|
|||||||
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
config = new VFConfig(FabricLoader.getInstance().getConfigDir().resolve("ViaFabric")
|
||||||
.resolve("viafabric.yml").toFile());
|
.resolve("viafabric.yml").toFile());
|
||||||
|
|
||||||
|
manager.onServerLoaded();
|
||||||
|
|
||||||
INIT_FUTURE.complete(null);
|
INIT_FUTURE.complete(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user