This commit is contained in:
creeper123123321 2019-04-03 17:26:01 -03:00
parent 366cf10a24
commit e07a72ef6d
No known key found for this signature in database
GPG Key ID: 0AC57D54786721D1
5 changed files with 15 additions and 51 deletions

View File

@ -43,14 +43,14 @@ configurations.getByName("compile").extendsFrom(shade)
dependencies {
// transitive = false, viabackwards-core because Guava is conflicting on runClient
shade("us.myles:viaversion:2.0.0-19w13b") { isTransitive = false }
shade("us.myles:viaversion:2.0.0-19w14a") { isTransitive = false }
shade("de.gerrygames:viarewind-core:1.4.0") { isTransitive = false }
shade("nl.matsv:viabackwards-core:3.0.0-19w11b") { isTransitive = false } // todo update
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
minecraft("com.mojang:minecraft:3D Shareware v1.34")
mappings("net.fabricmc:yarn:3D Shareware v1.34.2")
minecraft("com.mojang:minecraft:19w14a")
mappings("net.fabricmc:yarn:19w14a.1")
modCompile("net.fabricmc:fabric-loader:0.3.7.109")
modCompile("net.fabricmc:fabric:0.2.6.117")
@ -63,15 +63,20 @@ tasks.named<Jar>("jar") {
exclude("us/myles/ViaVersion/SpongePlugin.class")
exclude("us/myles/ViaVersion/VelocityPlugin.class")
exclude("us/myles/ViaVersion/ViaVersionPlugin.class")
// exclude("us/myles/ViaVersion/sponge/**") needed for viabackwards version check
exclude("us/myles/ViaVersion/bukkit/**")
exclude("us/myles/ViaVersion/bungee/**")
exclude("us/viaversion/libs/javassist/**")
exclude("us/myles/ViaVersion/sponge/**")
exclude("us/myles/ViaVersion/velocity/**")
exclude("us/viaversion/libs/javassist/**") // Only used for bukkit
exclude("mcmod.info")
exclude("plugin.yml")
exclude("bungee.yml")
exclude("velocity-plugin.json")
}
from(project.zipTree(dep)) {
include("us/myles/ViaVersion/sponge/VersionInfo.class") // Used in ViaBackwards
include("us/myles/ViaVersion/bungee/providers/BungeeMovementTransmitter.class")
}
}
}

View File

@ -26,7 +26,6 @@ package com.github.creeper123123321.viafabric;
import com.github.creeper123123321.viafabric.commands.VRCommandHandler;
import com.github.creeper123123321.viafabric.platform.*;
import com.github.creeper123123321.viafabric.protocol.Protocol3DSharewareV1_34to1_14;
import com.github.creeper123123321.viafabric.protocol.protocol1_7_6_10to1_7_1_5.Protocol1_7_6_10to1_7_1_5;
import com.github.creeper123123321.viafabric.protocol.protocol1_8to1_7_6_10.Protocol1_8TO1_7_6_10;
import com.github.creeper123123321.viafabric.util.JLoggerToLog4j;
@ -54,9 +53,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.function.Consumer;
import java.util.logging.Logger;
public class ViaFabric implements ModInitializer {
public static final java.util.logging.Logger JLOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaFabric"));
public static final Logger JLOGGER = new JLoggerToLog4j(LogManager.getLogger("ViaFabric"));
public static final ExecutorService ASYNC_EXECUTOR;
public static final EventLoop EVENT_LOOP;
@ -92,7 +92,6 @@ public class ViaFabric implements ModInitializer {
Via.getManager().init();
ProtocolRegistry.registerProtocol(new Protocol1_7_6_10to1_7_1_5(), Collections.singletonList(ProtocolVersion.v1_7_6.getId()), ProtocolVersion.v1_7_1.getId());
ProtocolRegistry.registerProtocol(new Protocol1_8TO1_7_6_10(), Collections.singletonList(ProtocolVersion.v1_8.getId()), ProtocolVersion.v1_7_6.getId());
ProtocolRegistry.registerProtocol(new Protocol3DSharewareV1_34to1_14(), Collections.singletonList(1), ProtocolVersion.v1_14.getId());
new VRRewindPlatform().init();
// new VRBackwardsPlatform().init(); todo reenable when viabackwards is updated

View File

@ -27,14 +27,14 @@ package com.github.creeper123123321.viafabric.platform;
import com.github.creeper123123321.viafabric.providers.VRVersionProvider;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.platform.ViaPlatformLoader;
import us.myles.ViaVersion.bungee.providers.BungeeMovementTransmitter;
import us.myles.ViaVersion.protocols.base.VersionProvider;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.providers.MovementTransmitterProvider;
import us.myles.ViaVersion.velocity.providers.VelocityMovementTransmitter;
public class VRLoader implements ViaPlatformLoader {
@Override
public void load() {
Via.getManager().getProviders().use(MovementTransmitterProvider.class, new VelocityMovementTransmitter());
Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
Via.getManager().getProviders().use(VersionProvider.class, new VRVersionProvider());
}

View File

@ -52,8 +52,8 @@ import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.dump.PluginInfo;
import us.myles.ViaVersion.exception.CancelException;
import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.ChatRewriter;
import us.myles.ViaVersion.sponge.VersionInfo;
import us.myles.ViaVersion.util.GsonUtil;
import us.myles.ViaVersion.velocity.VersionInfo;
import us.myles.viaversion.libs.gson.JsonObject;
import javax.annotation.Nullable;

View File

@ -1,40 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2018 creeper123123321 and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.github.creeper123123321.viafabric.protocol;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.protocol.Protocol;
public class Protocol3DSharewareV1_34to1_14 extends Protocol {
@Override
protected void registerPackets() {
}
@Override
public void init(UserConnection userConnection) {
}
}