Skip to content

Commit

Permalink
Updated to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Jun 7, 2023
1 parent 69e2263 commit 65bef4f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "fabric-loom" version "1.1-SNAPSHOT"
id "fabric-loom" version "1.2-SNAPSHOT"
id "maven-publish"
}

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.jvmargs=-Xmx8G
org.gradle.parallel=true

# minecraft and fabric
minecraft_version=1.20-rc1
yarn_mappings=1.20-rc1+build.2
minecraft_version=1.20
yarn_mappings=1.20+build.1
loader_version=0.14.21
fabric_api_version=0.83.0+1.20

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public void init() {
file.delete();
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
} catch (IOException ignored) {
}

try (final FileWriter fw = new FileWriter(file)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class ProtocolHack {
public final static AttributeKey<VersionEnum> FORCED_VERSION = AttributeKey.newInstance("viafabricplus-forced-version");

private final static Map<InetSocketAddress, VersionEnum> forcedVersions = new HashMap<>();
public static VersionEnum targetVersion = VersionEnum.r1_19_4;
public static VersionEnum targetVersion = VersionEnum.r1_20;

public static VersionEnum getTargetVersion() {
if (MinecraftClient.getInstance() == null || MinecraftClient.getInstance().getNetworkHandler() == null) {
Expand All @@ -75,7 +75,7 @@ public static VersionEnum getTargetVersion(final Channel channel) {
return channel.attr(FORCED_VERSION).get();
}

if (MinecraftClient.getInstance() == null || MinecraftClient.getInstance().isInSingleplayer()) return VersionEnum.r1_19_4;
if (MinecraftClient.getInstance() == null || MinecraftClient.getInstance().isInSingleplayer()) return VersionEnum.r1_20;

return targetVersion;
}
Expand Down

0 comments on commit 65bef4f

Please sign in to comment.