Skip to content

Commit

Permalink
Merge pull request #27 from turikhay/1_17
Browse files Browse the repository at this point in the history
1.17 support
  • Loading branch information
james58899 committed Jun 9, 2021
2 parents bbbe90e + 20a0e33 commit 8b98d1e
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:11-jdk
- image: cimg/openjdk:16.0.0

working_directory: ~/repo

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Expand Up @@ -11,10 +11,10 @@ jobs:
- name: Validation
uses: gradle/wrapper-validation-action@v1

- name: JDK 11
- name: JDK 16
uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '16'

- name: cache
uses: actions/cache@v2
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
@@ -1,10 +1,10 @@
plugins {
id 'fabric-loom' version '0.6-SNAPSHOT'
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = project.archives_base_name
version = project.mod_version
Expand Down Expand Up @@ -32,6 +32,7 @@ dependencies {
}

processResources {
duplicatesStrategy DuplicatesStrategy.INCLUDE
inputs.property "version", project.version

from(sourceSets.main.resources.srcDirs) {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Expand Up @@ -2,12 +2,12 @@
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.16.5
yarn_mappings=1.16.5+build.5
minecraft_version=1.17
yarn_mappings=1.17+build.1
loader_version=0.11.3
# Mod Properties
mod_version=1.4.7
maven_group=one.oktw
archives_base_name=FabricProxy
# Dependencies
fabric_version=0.32.0+1.16
fabric_version=0.34.9+1.17
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Expand Up @@ -8,7 +8,7 @@

@Mixin(HandshakeC2SPacket.class)
public abstract class HandshakeC2SPacketMixin {
@ModifyConstant(method = "read", constant = @Constant(intValue = 255))
@ModifyConstant(method = "<init>(Lnet/minecraft/network/PacketByteBuf;)V", constant = @Constant(intValue = 255))
private int readStringSize(int i) {
if (FabricProxy.config.getBungeeCord()) {
return Short.MAX_VALUE;
Expand Down
@@ -1,7 +1,6 @@
package one.oktw.mixin.velocity;

import com.mojang.authlib.GameProfile;
import net.fabricmc.fabric.mixin.networking.accessor.LoginQueryRequestS2CPacketAccessor;
import net.fabricmc.fabric.mixin.networking.accessor.LoginQueryResponseC2SPacketAccessor;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.PacketByteBuf;
Expand Down Expand Up @@ -61,11 +60,11 @@ private void sendVelocityPacket(LoginHelloC2SPacket loginHelloC2SPacket, Callbac
loginPacket = loginHelloC2SPacket;
}
this.velocityLoginQueryId = java.util.concurrent.ThreadLocalRandom.current().nextInt();
LoginQueryRequestS2CPacket packet = new LoginQueryRequestS2CPacket();
((LoginQueryRequestS2CPacketAccessor) packet).setQueryId(velocityLoginQueryId);
((LoginQueryRequestS2CPacketAccessor) packet).setChannel(VelocityLib.PLAYER_INFO_CHANNEL);
((LoginQueryRequestS2CPacketAccessor) packet).setPayload(new PacketByteBuf(EMPTY_BUFFER));

LoginQueryRequestS2CPacket packet = new LoginQueryRequestS2CPacket(
velocityLoginQueryId,
VelocityLib.PLAYER_INFO_CHANNEL,
new PacketByteBuf(EMPTY_BUFFER)
);
connection.send(packet);
ci.cancel();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/bungee.mixins.json
@@ -1,7 +1,7 @@
{
"required": true,
"package": "one.oktw.mixin.bungee",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"plugin": "one.oktw.FabricProxy",
"mixins": [
"ClientConnectionMixin",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/common.mixins.json
@@ -1,7 +1,7 @@
{
"required": true,
"package": "one.oktw.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"mixins": [
"ClientConnectionAccessor",
"ServerConfigHandlerMixin",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Expand Up @@ -22,7 +22,7 @@
"velocity.mixins.json"
],
"depends": {
"fabricloader": ">=0.4.0",
"fabricloader": ">=0.11.3",
"fabric": "*"
},
"suggests": {}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/velocity.mixins.json
@@ -1,7 +1,7 @@
{
"required": true,
"package": "one.oktw.mixin.velocity",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_16",
"plugin": "one.oktw.FabricProxy",
"mixins": [
"ServerLoginNetworkHandlerMixin"
Expand Down

0 comments on commit 8b98d1e

Please sign in to comment.