Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.17 support #27

Merged
merged 5 commits into from Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
3 changes: 2 additions & 1 deletion build.gradle
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '0.6-SNAPSHOT'
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'maven-publish'
}

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