Search in sources :

Example 1 with BungeeMovementTransmitter

use of com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter in project ViaFabric by ViaVersion.

the class VFLoader method load.

@Override
public void load() {
    Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
    Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider());
    if (Via.getPlatform().getConf().isItemCache()) {
        VRHandItemProvider handProvider = new VRHandItemProvider();
        if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
            handProvider.registerClientTick();
        }
        handProvider.registerServerTick();
        Via.getManager().getProviders().use(HandItemProvider.class, handProvider);
    }
}
Also used : BungeeMovementTransmitter(com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter) FabricVersionProvider(com.viaversion.fabric.mc18.providers.FabricVersionProvider) VRHandItemProvider(com.viaversion.fabric.mc18.providers.VRHandItemProvider)

Example 2 with BungeeMovementTransmitter

use of com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter in project ViaFabric by ViaVersion.

the class VFLoader method load.

@Override
public void load() {
    Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
    Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider());
    if (Via.getPlatform().getConf().isItemCache()) {
        VRHandItemProvider handProvider = new VRHandItemProvider();
        if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
            handProvider.registerClientTick();
        }
        handProvider.registerServerTick();
        Via.getManager().getProviders().use(HandItemProvider.class, handProvider);
    }
}
Also used : BungeeMovementTransmitter(com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter) FabricVersionProvider(com.viaversion.fabric.mc117.providers.FabricVersionProvider) VRHandItemProvider(com.viaversion.fabric.mc117.providers.VRHandItemProvider)

Example 3 with BungeeMovementTransmitter

use of com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter in project ViaFabric by ViaVersion.

the class VFLoader method load.

@Override
public void load() {
    Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
    Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider());
    if (Via.getPlatform().getConf().isItemCache()) {
        VRHandItemProvider handProvider = new VRHandItemProvider();
        if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
            handProvider.registerClientTick();
        }
        handProvider.registerServerTick();
        Via.getManager().getProviders().use(HandItemProvider.class, handProvider);
    }
}
Also used : BungeeMovementTransmitter(com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter) FabricVersionProvider(com.viaversion.fabric.mc114.providers.FabricVersionProvider) VRHandItemProvider(com.viaversion.fabric.mc114.providers.VRHandItemProvider)

Example 4 with BungeeMovementTransmitter

use of com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter in project ViaFabric by ViaVersion.

the class VFLoader method load.

@Override
public void load() {
    Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
    Via.getManager().getProviders().use(VersionProvider.class, new FabricVersionProvider());
    if (Via.getPlatform().getConf().isItemCache()) {
        VRHandItemProvider handProvider = new VRHandItemProvider();
        if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
            handProvider.registerClientTick();
        }
        handProvider.registerServerTick();
        Via.getManager().getProviders().use(HandItemProvider.class, handProvider);
    }
}
Also used : BungeeMovementTransmitter(com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter) FabricVersionProvider(com.viaversion.fabric.mc116.providers.FabricVersionProvider) VRHandItemProvider(com.viaversion.fabric.mc116.providers.VRHandItemProvider)

Example 5 with BungeeMovementTransmitter

use of com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter in project ViaVersion by ViaVersion.

the class BungeeViaLoader method load.

@Override
public void load() {
    // Listeners
    registerListener(plugin);
    registerListener(new UpdateListener());
    registerListener(new BungeeServerHandler());
    if (Via.getAPI().getServerVersion().lowestSupportedVersion() < ProtocolVersion.v1_9.getVersion()) {
        registerListener(new ElytraPatch());
    }
    // Providers
    Via.getManager().getProviders().use(VersionProvider.class, new BungeeVersionProvider());
    Via.getManager().getProviders().use(EntityIdProvider.class, new BungeeEntityIdProvider());
    if (Via.getAPI().getServerVersion().lowestSupportedVersion() < ProtocolVersion.v1_9.getVersion()) {
        Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
        Via.getManager().getProviders().use(BossBarProvider.class, new BungeeBossBarProvider());
        Via.getManager().getProviders().use(MainHandProvider.class, new BungeeMainHandProvider());
    }
    if (plugin.getConf().getBungeePingInterval() > 0) {
        tasks.add(plugin.getProxy().getScheduler().schedule(plugin, new ProtocolDetectorService(plugin), 0, plugin.getConf().getBungeePingInterval(), TimeUnit.SECONDS));
    }
}
Also used : ProtocolDetectorService(com.viaversion.viaversion.bungee.service.ProtocolDetectorService) BungeeMovementTransmitter(com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter) ElytraPatch(com.viaversion.viaversion.bungee.listeners.ElytraPatch) BungeeVersionProvider(com.viaversion.viaversion.bungee.providers.BungeeVersionProvider) UpdateListener(com.viaversion.viaversion.bungee.listeners.UpdateListener) BungeeBossBarProvider(com.viaversion.viaversion.bungee.providers.BungeeBossBarProvider) BungeeServerHandler(com.viaversion.viaversion.bungee.handlers.BungeeServerHandler) BungeeEntityIdProvider(com.viaversion.viaversion.bungee.providers.BungeeEntityIdProvider) BungeeMainHandProvider(com.viaversion.viaversion.bungee.providers.BungeeMainHandProvider)

Aggregations

BungeeMovementTransmitter (com.viaversion.viaversion.bungee.providers.BungeeMovementTransmitter)9 FabricVersionProvider (com.viaversion.fabric.mc114.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc114.providers.VRHandItemProvider)1 FabricVersionProvider (com.viaversion.fabric.mc115.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc115.providers.VRHandItemProvider)1 FabricVersionProvider (com.viaversion.fabric.mc116.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc116.providers.VRHandItemProvider)1 FabricVersionProvider (com.viaversion.fabric.mc117.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc117.providers.VRHandItemProvider)1 FabricVersionProvider (com.viaversion.fabric.mc118.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc118.providers.VRHandItemProvider)1 FabricVersionProvider (com.viaversion.fabric.mc119.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc119.providers.VRHandItemProvider)1 FabricVersionProvider (com.viaversion.fabric.mc18.providers.FabricVersionProvider)1 VRHandItemProvider (com.viaversion.fabric.mc18.providers.VRHandItemProvider)1 UserConnection (com.viaversion.viaversion.api.connection.UserConnection)1 BungeeServerHandler (com.viaversion.viaversion.bungee.handlers.BungeeServerHandler)1 ElytraPatch (com.viaversion.viaversion.bungee.listeners.ElytraPatch)1 UpdateListener (com.viaversion.viaversion.bungee.listeners.UpdateListener)1 BungeeBossBarProvider (com.viaversion.viaversion.bungee.providers.BungeeBossBarProvider)1