Skip to content

Commit

Permalink
Release 2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianMichael committed Dec 8, 2023
1 parent d5b7f13 commit c04e44e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ loader_version=0.14.24
fabric_api_version=0.91.1+1.20.2

# Project Details
mod_version=2.10.1-SNAPSHOT
mod_version=2.10.1
maven_group=de.florianmichael
archives_base_name=viafabricplus

# ViaVersion Libraries
viaversion_version=4.9.2
viabackwards_version=4.9.1
viabackwards_version=4.9.2-SNAPSHOT
vialegacy_version=2.2.22-SNAPSHOT
viaaprilfools_version=2.0.11-SNAPSHOT
viabedrock_version=0.0.3-SNAPSHOT
vialoader_version=2.2.12
viabedrock_version=0.0.4-SNAPSHOT
vialoader_version=2.2.13-SNAPSHOT

# RaphiMC Libraries
minecraftauth_version=3.0.0
raknet_transport_version=1.0.0.CR1-SNAPSHOT

# Lenni0451 Libraries
reflect_version=1.3.0
reflect_version=1.3.1

# Misc Libraries
mod_menu_version=8.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,23 @@ public abstract class MixinProtocolVersion {
@Inject(method = "<clinit>", at = @At("HEAD"))
private static void initMaps(CallbackInfo ci) {
viafabricplus_remaps = new HashMap<>();
viafabricplus_remaps.put("1.7-1.7.5", new Pair<>("1.7.2-1.7.5", new VersionRange("1.7", 2, 5)));
viafabricplus_remaps.put("1.9.3/4", new Pair<>("1.9.3-1.9.4", null));
viafabricplus_remaps.put("1.11.1/2", new Pair<>("1.11.1-1.11.2", null));
viafabricplus_remaps.put("1.16.4/5", new Pair<>("1.16.4-1.16.5", null));
viafabricplus_remaps.put("1.18/1.18.1", new Pair<>("1.18-1.18.1", null));
viafabricplus_remaps.put("1.19.1/2", new Pair<>("1.19.1-1.19.2", null));
viafabricplus_remaps.put("1.20/1.20.1", new Pair<>("1.20-1.20.1", null));
viafabricplus_remaps.put("1.20.3", new Pair<>("1.20.3-1.20.4", null));
viafabricplus_remaps.put("1.20.3", new Pair<>("1.20.3-1.20.4", new VersionRange("1.20", 3, 4)));
}

@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;register(ILjava/lang/String;)Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;"))
private static ProtocolVersion unregisterAndRenameVersions(int version, String name) {
final Pair<String, VersionRange> remapEntry = viafabricplus_remaps.get(name);
if (remapEntry != null) {
if (remapEntry.key() != null) name = remapEntry.key();
if (remapEntry.value() != null) {
return ProtocolVersion.register(version, name, remapEntry.value());
}
}

return ProtocolVersion.register(version, name);
Expand All @@ -65,6 +67,9 @@ private static ProtocolVersion unregisterAndRenameVersions(int version, int snap
final Pair<String, VersionRange> remapEntry = viafabricplus_remaps.get(name);
if (remapEntry != null) {
if (remapEntry.key() != null) name = remapEntry.key();
if (remapEntry.value() != null) {
return ProtocolVersion.register(version, snapshotVersion, name, remapEntry.value());
}
}

return ProtocolVersion.register(version, snapshotVersion, name);
Expand Down

0 comments on commit c04e44e

Please sign in to comment.