Back to mods
ScreenAPI project artwork

Modrinth · Minecraft mod

ScreenAPI

Makes screen making easier for me

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which ScreenAPI release should I use?

Updated 7 days ago
alpha file 1.0.0-alpha.4+26.2
Game version 26.2
Loader Fabric

ScreenAPI 1.0.0-alpha.4+26.2 targets 26.2 with Fabric. It must be installed on the client. Do not install it on the dedicated server. No extra mods listed for this file.

Where it goes

Is ScreenAPI required on the client, server, or both?

It must be installed on the client. Do not install it on the dedicated server.

Client Required
Dedicated server Not supported
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked client-only.

What else does ScreenAPI 1.0.0-alpha.4+26.2 need?

1.0.0-alpha.4+26.2. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add ScreenAPI without breaking your instance.

Built for ScreenAPI 1.0.0-alpha.4+26.2. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.0.0-alpha.4+26.2. It targets 26.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    It must be installed on the client. Do not install it on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.0.0-alpha.4+26.2. It opens that exact file at the source.

About this project

What does ScreenAPI add?

ScreenAPI

Time

i got so upset trying to make the math mathing in scroll

build.gradle

repositories {
    maven { url "https://api.modrinth.com/maven" }
}

dependencies {
   implementation "maven.modrinth:screenapi:${project.screenapi_version}"
}

API usage

package me.you.yourprojectwhichusesscreens.screens;

import hu.jgj52.screenapi.screen.BetterScreen;
import net.minecraft.client.gui.Font;
import net.minecraft.client.gui.GuiGraphicsExtractor;
import net.minecraft.client.gui.components.StringWidget;
import net.minecraft.network.chat.Component;

public class YourScreen extends BetterScreen {
    @Override
    protected int getScrollSpeed() {
        return 10;
    }

    @Override
    public void render(GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick) {
        // just like render method in yarn
        StringWidget stringWidget = getWidget("widget id", StringWidget.class); // will return null if its not StringWidget
    }

    @Override
    protected void createWidgets(Font font) {
        widget(new StringWidget(
                10,
                20,
                font.width("cat"),
                font.lineHeight,
                Component.literal("cat"),
                font
        ), "widget id"); // with widget id you can later get that widget using getWidget(), just like in render
    }
}

Project description from Modrinth.

Pick your setup

ScreenAPI by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

7 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

ScreenAPI versions and loaders

16 of 16 releases match

Looking for an older file? The official Modrinth project page is in Resources.