port some changes from 1.8 branch

This commit is contained in:
creeper123123321 2020-07-12 16:39:13 -03:00
parent 12daf60f95
commit df6430a127
5 changed files with 26 additions and 16 deletions

View File

@ -16,7 +16,7 @@ deploy:
on:
repo: ViaVersion/ViaFabric
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|ver\/.*)$
condition: $TRAVIS_BRANCH =~ ^(mc\-.*)$
install: true
script:
# Set up git user name and tag this commit

View File

@ -10,19 +10,27 @@
Allows the connection to/from different Minecraft versions on your Minecraft client/server (LAN worlds too)
This mod supports 1.14.4/1.15.x (on `ver/1.14` branch) and 1.16.x/snapshots (on `master` branch) with Fabric Loader. Check the Minecraft version in file name when downloading from GitHub Releases.
This mod supports 1.8.9 (in `mc-1.8` branch), 1.14.4/1.15.2 (in `mc-1.14-1.15` branch) and 1.16.x/snapshots (in `mc-1.16` branch) with Fabric Loader. Check the Minecraft version in file name when downloading from CurseForge/GitHub Releases.
Note: ViaVersion is not designed for modded Minecraft with registry synchronization (fabric-registry-sync mod).
**Dependencies:**
| Dependency | Download |
| --------------------------------- | --------------------------------------------------------------------- |
| ViaVersion 3.0.2+ | dev builds at https://ci.viaversion.com/job/ViaVersion/ |
| Fabric Textures v0 | https://www.curseforge.com/minecraft/mc-mods/fabric-api |
| Fabric Resource Loader v0 | https://www.curseforge.com/minecraft/mc-mods/fabric-api |
| Fabric Command API v1 | https://www.curseforge.com/minecraft/mc-mods/fabric-api |
| (Included) Cotton Client Commands | https://www.curseforge.com/minecraft/mc-mods/cotton-client-commands |
**1.14+ Dependencies:**
| Dependency | Download |
| ---------------------------------- | --------------------------------------------------------------------- |
| ViaVersion 3.0.2+ | dev builds at https://ci.viaversion.com/job/ViaVersion/ |
| Fabric Textures v0 | https://www.curseforge.com/minecraft/mc-mods/fabric-api |
| Fabric Resource Loader v0 | https://www.curseforge.com/minecraft/mc-mods/fabric-api |
| Fabric Command API v1 | https://www.curseforge.com/minecraft/mc-mods/fabric-api |
| (Included) Cotton Client Commands | https://www.curseforge.com/minecraft/mc-mods/cotton-client-commands |
**1.8.9 Dependencies:**
| Dependency | Download |
| -------------------------------------- | ------------------------------------------------------- |
| ViaVersion 3.0.2+ | dev builds at https://ci.viaversion.com/job/ViaVersion/ |
| Fabric Events Lifecycle v0 (mc 1.8.x) | unknown? (https://github.com/Legacy-Fabric/fabric) |
| Fabric Resource Loader v0 | unknown? (https://github.com/Legacy-Fabric/fabric) |
With ViaVersion:

View File

@ -8,12 +8,14 @@ plugins {
}
group = "com.github.creeper123123321.viafabric"
val gitVersion: groovy.lang.Closure<Any> by extra
version = "0.2.4-SNAPSHOT+" + try {
gitVersion()
val gitVersion: groovy.lang.Closure<String> by extra
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
version = "0.2.5-SNAPSHOT+" + try {
gitVersion() + "-" + versionDetails().branchName
} catch (e: Exception) {
e.printStackTrace()
"unknown"
} + "-mc-1.16"
}
extra.set("archivesBaseName", "ViaFabric")
description = "Client-side and server-side ViaVersion implementation for Fabric"

View File

@ -38,7 +38,7 @@ import us.myles.ViaVersion.api.protocol.ProtocolPipeline;
@Mixin(targets = "net.minecraft.server.ServerNetworkIo$1")
public class MixinServerNetworkIoChInit {
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At(value = "TAIL"), remap = false)
@Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false)
private void onInitChannel(Channel channel, CallbackInfo ci) {
if (channel instanceof SocketChannel) {
UserConnection user = new UserConnection(channel);

View File

@ -39,7 +39,7 @@ import us.myles.ViaVersion.api.protocol.ProtocolPipeline;
@Mixin(targets = "net.minecraft.network.ClientConnection$1")
public class MixinClientConnectionChInit {
@Inject(method = "initChannel(Lio/netty/channel/Channel;)V", at = @At(value = "TAIL"), remap = false)
@Inject(method = "initChannel", at = @At(value = "TAIL"), remap = false)
private void onInitChannel(Channel channel, CallbackInfo ci) {
if (channel instanceof SocketChannel) {
UserConnection user = new VRClientSideUserConnection(channel);