Null pointer translation fix

This commit is contained in:
paulevsGitch 2021-11-02 15:25:08 +03:00
parent 8eba063b40
commit 3efa71b08a
5 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,7 @@ public class TranslationHelper {
Gson gson = new Gson();
InputStream inputStream = TranslationHelper.class.getResourceAsStream("/assets/" + modID + "/lang/" + languageCode + ".json");
JsonObject translation = gson.fromJson(new InputStreamReader(inputStream), JsonObject.class);
JsonObject translation = inputStream == null ? new JsonObject() : gson.fromJson(new InputStreamReader(inputStream), JsonObject.class);
Registry.BLOCK.forEach(block -> {
if (Registry.BLOCK.getKey(block).getNamespace().equals(modID)) {

View file

@ -1,6 +0,0 @@
package ru.bclib.util;
@FunctionalInterface
public interface TriConsumer<A, B, C> {
void accept(A a, B b, C c);
}