Null pointer translation fix
This commit is contained in:
parent
8eba063b40
commit
3efa71b08a
5 changed files with 5 additions and 5 deletions
|
@ -3,7 +3,7 @@ package ru.bclib.complexmaterials.entry;
|
|||
import net.minecraft.resources.ResourceLocation;
|
||||
import ru.bclib.complexmaterials.ComplexMaterial;
|
||||
import ru.bclib.config.PathConfig;
|
||||
import ru.bclib.util.TriConsumer;
|
||||
import ru.bclib.interfaces.TriConsumer;
|
||||
|
||||
public class RecipeEntry extends ComplexMaterialEntry {
|
||||
final TriConsumer<ComplexMaterial, PathConfig, ResourceLocation> initFunction;
|
||||
|
|
|
@ -3,7 +3,7 @@ package ru.bclib.gui.gridlayout;
|
|||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import ru.bclib.util.TriConsumer;
|
||||
import ru.bclib.interfaces.TriConsumer;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.client.gui.components.AbstractWidget;
|
||||
import ru.bclib.gui.gridlayout.GridLayout.GridValueType;
|
||||
import ru.bclib.util.Pair;
|
||||
import ru.bclib.util.TriConsumer;
|
||||
import ru.bclib.interfaces.TriConsumer;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ru.bclib.util;
|
||||
package ru.bclib.interfaces;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface TriConsumer<A, B, C> {
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue