Remove minecraft repo

This commit is contained in:
TheMode 2021-05-15 07:57:28 +02:00
parent 3bd389fb57
commit dfad9f2947
3 changed files with 4 additions and 6 deletions

View File

@ -33,7 +33,6 @@ switch (OperatingSystem.current()) {
allprojects { allprojects {
repositories { repositories {
mavenCentral() mavenCentral()
maven { url 'https://libraries.minecraft.net' }
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
maven { maven {
name 'sponge' name 'sponge'
@ -158,7 +157,7 @@ dependencies {
// https://search.maven.org/artifact/org.fusesource.jansi/jansi/2.3.2/jar // https://search.maven.org/artifact/org.fusesource.jansi/jansi/2.3.2/jar
implementation 'org.fusesource.jansi:jansi:2.3.2' implementation 'org.fusesource.jansi:jansi:2.3.2'
// Guava 21.0+ required for Mixin, but Authlib imports 17.0 // Guava 21.0+ required for Mixin
api 'com.google.guava:guava:30.1-jre' api 'com.google.guava:guava:30.1-jre'
// Code modification // Code modification

View File

@ -65,7 +65,7 @@ public class EncryptionResponsePacket implements ClientPreplayPacket {
InputStream gameProfileStream = new URL( InputStream gameProfileStream = new URL(
"https://sessionserver.mojang.com/session/minecraft/hasJoined?" "https://sessionserver.mojang.com/session/minecraft/hasJoined?"
+ "username=" + loginUsername + "&" + "username=" + loginUsername + "&"
+ "serverId=" + serverId + "serverId=" + serverId
// TODO: Add ability to add ip query tag. See: https://wiki.vg/Protocol_Encryption#Authentication // TODO: Add ability to add ip query tag. See: https://wiki.vg/Protocol_Encryption#Authentication
).openStream(); ).openStream();
@ -95,11 +95,11 @@ public class EncryptionResponsePacket implements ClientPreplayPacket {
ByteArrayData.encodeByteArray(writer, verifyToken); ByteArrayData.encodeByteArray(writer, verifyToken);
} }
public SecretKey getSecretKey() { private SecretKey getSecretKey() {
return MojangCrypt.decryptByteToSecretKey(MojangAuth.getKeyPair().getPrivate(), sharedSecret); return MojangCrypt.decryptByteToSecretKey(MojangAuth.getKeyPair().getPrivate(), sharedSecret);
} }
public byte[] getNonce() { private byte[] getNonce() {
return MojangAuth.getKeyPair().getPrivate() == null ? return MojangAuth.getKeyPair().getPrivate() == null ?
this.verifyToken : MojangCrypt.decryptUsingKey(MojangAuth.getKeyPair().getPrivate(), this.verifyToken); this.verifyToken : MojangCrypt.decryptUsingKey(MojangAuth.getKeyPair().getPrivate(), this.verifyToken);
} }

View File

@ -27,7 +27,6 @@ public final class MojangUtils {
.softValues() .softValues()
.build(); .build();
@Nullable @Nullable
public static JsonObject fromUuid(@NotNull String uuid) { public static JsonObject fromUuid(@NotNull String uuid) {