Skip to content

Commit

Permalink
Updates from main
Browse files Browse the repository at this point in the history
Co-authored-by: Kichura <68134602+kichura@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: gradle-update-robot <gradle-update-robot@regolo.cc>
Co-authored-by: Ampflower <ampflower@outlook.com>
  • Loading branch information
5 people committed Sep 17, 2024
1 parent ee2b864 commit 48b3415
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
custom: ['https://viaversion.com/donate', 'https://creeper123123321.github.io/#donate', 'https://florianmichael.de/donate']
github: FlorianMichael
github: [creeper123123321, FlorianMichael]
custom: ['https://creeper123123321.github.io/#donate', 'https://florianmichael.de/donate']
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
check-latest: true
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Cache Dependencies
uses: actions/cache@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
uses: gradle/actions/wrapper-validation@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
check-latest: true
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Build and Publish
env:
CURSEFORGE_API_KEY: ${{ secrets.CREEPER_CF }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Update Gradle Wrapper
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"

jobs:
update-gradle-wrapper:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
check-latest: true
- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Allows the connection to/from different Minecraft versions on your Minecraft client/server (LAN worlds too)

This mod can be installed on 1.14.4, 1.15.2, 1.16.5, 1.17.1, 1.18.2, 1.19.4, 1.20.1, 1.20.4, 1.20.6, 1.21 with Fabric Loader.
This mod can be installed on 1.14.4, 1.15.2, 1.16.5, 1.17.1, 1.18.2, 1.19.4, 1.20.1, 1.20.4, 1.20.6, 1.21.1 with Fabric Loader.

The `legacy` branch also supports Legacy Fabric 1.8.9 and 1.12.2 versions.

Expand Down Expand Up @@ -55,7 +55,7 @@ registry synchronization (fabric-registry-sync mod).
| | 1.8.x | 1.9.x | 1.10-1.20.x | 1.21.x |
|-----------------------|-------|-------|-------------|--------|
| 1.14.4-1.20.6 clients ||||| ⟲ ⟲ |||||
| 1.21 client |||||||||||
| 1.21.1 client |||||||||||

✓ = [ViaVersion](https://viaversion.com) ⟲ = [ViaBackwards](https://viaversion.com/backwards)
= [ViaRewind](https://viaversion.com/rewind)
Expand Down Expand Up @@ -149,4 +149,4 @@ registry synchronization (fabric-registry-sync mod).
## Disclaimer

It cannot be guaranteed that this mod is allowed on specific servers as it can possibly cause problems with anti-cheat plugins.\
***(USE ONLY WITH CAUTION!)***
***(USE ONLY WITH CAUTION!)***
17 changes: 16 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,23 @@ allprojects {
}

subprojects {
loom {
runs {
named("client") {
client()
ideConfigGenerated(true)
runDir("run")
}
named("server") {
server()
ideConfigGenerated(true)
runDir("run")
}
}
}

dependencies {
implementation(rootProject) {
implementation(project(path: ":", configuration: "namedElements")) {
exclude group: "net.fabricmc", module: "fabric-loader" // prevent duplicate fabric-loader on run
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xms32M -Xmx4G -XX:+UseG1GC -XX:+UseStringDeduplication

loader_version=0.16.0
viaver_version=5.0.3-SNAPSHOT
viaver_version=5.0.4-SNAPSHOT

publish_mc_versions=1.12.2, 1.8.9
# example: 1.19.1-rc1. Can be a blank value
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionSha256Sum=5b9c5eb3f9fc2c94abaea57d90bd78747ca117ddbbf96c859d3741181a12bf2a
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.protocols.base.ServerboundHandshakePackets;
Expand All @@ -32,7 +31,7 @@ public class HostnameParserProtocol extends AbstractSimpleProtocol {

@Override
protected void registerPackets() {
registerServerbound(State.HANDSHAKE, ServerboundHandshakePackets.CLIENT_INTENTION.getId(), ServerboundHandshakePackets.CLIENT_INTENTION.getId(), new PacketHandlers() {
registerServerbound(State.HANDSHAKE, ServerboundHandshakePackets.CLIENT_INTENTION, new PacketHandlers() {
@Override
protected void register() {
map(Types.VAR_INT); // Protocol version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
import com.viaversion.viaversion.api.protocol.packet.State;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import com.viaversion.viaversion.api.type.Type;
import com.viaversion.viaversion.api.type.Types;
import com.viaversion.viaversion.exception.CancelException;
import com.viaversion.viaversion.protocol.version.BaseVersionProvider;
import com.viaversion.viaversion.protocols.base.BaseProtocol1_16;
import com.viaversion.viaversion.protocols.base.BaseProtocol1_7;
import com.viaversion.viaversion.protocols.base.ClientboundStatusPackets;
import com.viaversion.viaversion.protocols.base.v1_7.ClientboundBaseProtocol1_7;
import io.netty.channel.ChannelPipeline;
import net.fabricmc.loader.api.FabricLoader;

Expand Down Expand Up @@ -78,7 +76,7 @@ private void multiconnectIntegration() {
multiconnectSupportedVersions = vers.stream().mapToInt(Integer::intValue).toArray();
getLogger().info("ViaFabric will integrate with multiconnect");
} catch (ClassNotFoundException | IllegalAccessException | InvocationTargetException | NoSuchMethodException
| ClassCastException ignored) {
| ClassCastException ignored) {
}
}

Expand Down Expand Up @@ -147,7 +145,7 @@ && isMulticonnectHandler(connection.getChannel().pipeline())
getLogger().info("Sending " + multiconnectSuggestion + " for multiconnect version detector");
PacketWrapper newAnswer = PacketWrapper.create(ClientboundStatusPackets.STATUS_RESPONSE, null, connection);
newAnswer.write(Types.STRING, "{\"version\":{\"name\":\"viafabric integration\",\"protocol\":" + multiconnectSuggestion.getVersion() + "}}");
newAnswer.send(info.getPipeline().contains(BaseProtocol1_16.class) ? BaseProtocol1_16.class : BaseProtocol1_7.class);
newAnswer.send(ClientboundBaseProtocol1_7.class);
throw CancelException.generate();
}
}
Expand Down

0 comments on commit 48b3415

Please sign in to comment.