Skip to content

Commit 28a21c4

Browse files
feat: jei + platform shim, fix map comments on configs
1 parent f1fb48d commit 28a21c4

22 files changed

Lines changed: 288 additions & 550 deletions

File tree

common/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ dependencies {
2222
// modCompileOnly("me.shedaniel:RoughlyEnoughItems-default-plugin:${rootProject.rei_version}") {
2323
// }
2424

25-
// compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
26-
// compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
25+
compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
26+
compileOnly("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
2727

2828
api("de.marhali:json5-java:${json5_version}")
2929

common/src/main/java/dev/ftb/mods/ftblibrary/client/FTBLibraryClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void onPlayerLogout(@Nullable LocalPlayer ignored) {
8686
KnownServerRegistries.client = null;
8787
}
8888

89-
public boolean areButtonsVisible(@Nullable Screen gui) {
89+
public static boolean areButtonsVisible(@Nullable Screen gui) {
9090
if (Minecraft.getInstance().level == null || Minecraft.getInstance().player == null) {
9191
return false;
9292
}

common/src/main/java/dev/ftb/mods/ftblibrary/config/serializer/Json5ConfigSerializer.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,10 @@ public <T> Map<String, T> getMap(String key, Map<String, T> defVal, Codec<T> cod
157157

158158
@Override
159159
public <T> void putMap(String key, AbstractMapValue<T> val, Codec<T> codec) {
160-
configJson.add(key, Util.make(new Json5Object(), o -> val.get().forEach((k, v) -> {
161-
o.setComment(val.getCommentString());
162-
codec.encodeStart(Json5Ops.INSTANCE, v).ifSuccess(el -> o.add(k, el));
163-
}))
164-
);
160+
configJson.add(key, Util.make(new Json5Object(), o -> {
161+
o.setComment(val.getCommentString());
162+
val.get().forEach((k, v) -> codec.encodeStart(Json5Ops.INSTANCE, v).ifSuccess(el -> o.add(k, el)));
163+
}));
165164
}
166165

167166
@Override

common/src/main/java/dev/ftb/mods/ftblibrary/config/serializer/SNBTConfigSerializer.java

Lines changed: 0 additions & 187 deletions
This file was deleted.

common/src/main/java/dev/ftb/mods/ftblibrary/integration/EMIIntegration.java

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)