Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Amrsatrio committed Sep 15, 2020
1 parent df4742b commit 82aba86
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'application'
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.72'
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
}

group 'com.tb24'
Expand Down Expand Up @@ -44,7 +44,7 @@ repositories {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
implementation 'com.google.code.gson:gson:2.8.6'
// implementation 'com.mojang:brigadier:1.0.17'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions src/main/java/com/tb24/blenderumap/AssetUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import me.fungames.jfortniteparse.ue4.assets.exports.UExport
import me.fungames.jfortniteparse.ue4.assets.exports.UObject
import me.fungames.jfortniteparse.ue4.assets.objects.FPropertyTag
import me.fungames.jfortniteparse.ue4.objects.core.misc.FGuid
import java.util.*
import kotlin.math.max

fun <T> getProp(properties: List<FPropertyTag>, name: String, clazz: Class<T>): T? {
for (prop in properties) {
if (name == prop.name.text) {
return prop.getTagTypeValue(clazz) as T?
return prop.getTagTypeValue(clazz)
}
}
return null
Expand All @@ -21,12 +21,12 @@ fun <T> getProps(properties: List<FPropertyTag>, name: String, clazz: Class<T>):
for (prop in properties) {
if (prop.name.text == name) {
collected.add(prop)
maxIndex = Math.max(maxIndex, prop.arrayIndex)
maxIndex = max(maxIndex, prop.arrayIndex)
}
}
val out = java.lang.reflect.Array.newInstance(clazz, maxIndex + 1) as Array<T?>
for (prop in collected) {
out[prop.arrayIndex] = prop.getTagTypeValue(clazz) as T?
out[prop.arrayIndex] = prop.getTagTypeValue(clazz)
}
return out
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/tb24/blenderumap/FetchFortniteAesKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class FetchFortniteAesKey {
public static void main(String[] args) {
try {
Reader reader = new OkHttpClient().newCall(new Request.Builder().url("https://benbotfn.tk/api/v1/aes").build()).execute().body().charStream();
System.out.println("Fetched, writing...");
AesResponse response = GSON.fromJson(reader, AesResponse.class);
reader.close();
File configFile = new File("config.json");
Expand Down Expand Up @@ -50,6 +51,8 @@ public static void main(String[] args) {
FileWriter fileWriter = new FileWriter(configFile);
GSON.toJson(configTree, fileWriter);
fileWriter.close();
System.out.println("Done");
System.exit(0);
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tb24/blenderumap/JWPSerializer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ object JWPSerializer {
addProperty("string", h.text)
when (h) {
is FTextHistory.Base -> {
addProperty("namespace", h.nameSpace)
addProperty("namespace", h.namespace)
addProperty("key", h.key)
}
is FTextHistory.StringTableEntry -> {
Expand Down

0 comments on commit 82aba86

Please sign in to comment.