diff --git a/src/main/java/mekanism/client/render/MekanismRenderer.java b/src/main/java/mekanism/client/render/MekanismRenderer.java index 67b319da432..0e660d0c3d1 100644 --- a/src/main/java/mekanism/client/render/MekanismRenderer.java +++ b/src/main/java/mekanism/client/render/MekanismRenderer.java @@ -40,6 +40,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.texture.MissingTextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.core.BlockPos; @@ -104,6 +105,9 @@ public static TextureAtlasSprite getChemicalTexture(@NotNull Chemical chemical) } public static TextureAtlasSprite getSprite(ResourceLocation spriteLocation) { + if (spriteLocation == null) { // e.g. badly implemented fluids + spriteLocation = MissingTextureAtlasSprite.getLocation(); + } return Minecraft.getInstance().getTextureAtlas(TextureAtlas.LOCATION_BLOCKS).apply(spriteLocation); }