Skip to content

Commit e56b23b

Browse files
committed
this is actually not necessary
1 parent 419b128 commit e56b23b

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/main/java/io/github/ImpactDevelopment/installer/target/targets/VanillaProfiles.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,14 @@ public void addOrMutate(String name, String version) {
6464

6565
Optional<String> id = findProfileIdFromName(name);
6666
if (!id.isPresent()) { // Create mode
67-
if (profiles.has(name)) {
68-
profiles.remove(name); // just in case (shouldn't happen)
69-
70-
}
71-
7267
profiles.add(name, profile = new JsonObject());
7368
profile.addProperty("name", name);
7469
} else { // Mutate mode
7570
profile = profiles.get(id.get()).getAsJsonObject();
7671
}
77-
if (profile.has("lastUsed")) {
78-
profile.remove("lastUsed");
79-
}
8072
profile.addProperty("lastUsed", dateFormat.format(new Date())); // always bump.
81-
82-
if (profile.has("lastVersionId")) {
83-
profile.remove("lastVersionId");
84-
}
8573
profile.addProperty("lastVersionId", version);
86-
87-
if (profile.has("icon")) {
88-
profile.remove("icon");
89-
}
9074
profile.addProperty("icon", ICON);
91-
92-
if (profile.has("type")) {
93-
profile.remove("type");
94-
}
9575
profile.addProperty("type", "custom");
9676
}
9777

0 commit comments

Comments
 (0)