M.R.U

M.R.U

Mod

Mineblock's Repeated Utilities

Client and server LibraryUtility

573.3k downloads
224 followers
Created2 years ago
Updated21 days ago

Follow Save
Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

[1.20] M.R.U 0.2.0

Changelog

This release cleans up the library massively, and introduces some new features.

New Features

  • Generic Utils
    • Random String Generator
    • Unity Float Lerp

Automatic Compatability Entrypoints

MRU now automatically calls the mru-compat-x entrypoint (where X is the mod id) for all installed mods.

This is recursive, so for example, any jar-in-jar mods will also be considered an installed mod.

Usage

Create a class which implements the CompatabilityEntrypoint interface:

public class MyCompatEntrypoint implements CompatabilityEntrypoint {
    @Override
    public void initialize() {
        ...
    }
}

Next, add it to the mru-compat-x (where X is the mod id) entrypoint in your fabric.mod.json:

"entrypoints": {
    "mru-compat-x": [
      "my.mod.compat.MyCompatEntrypoint"
    ],
}

If the mod specified is installed, this entrypoint will run.

Color Standards

These standards are, and will be, used by any UI that my mods provide.

The Colors class provides methods and utilities related to colors:

Most of it is self explanatory.

public class Colors {
    public static final int BG = 0xFF1D1D1D;
    public static final int ELEVATED = 0xFF2D3134;
    public static final int ELEVATED_HOVER = 0xFF54585C;
    public static final int ACCENT_A = 0xFF16A5A0;
    public static final int ACCENT_B = 0xFFAC4312;

    public static final int ALPHA_100 = 0xFF;
    public static final int ALPHA_75 = 0xBF;
    public static final int ALPHA_50 = 0x7F;
    public static final int ALPHA_25 = 0x40;
    public static final int ALPHA_0 = 0x00;

    public static final int WHITE = 0xFFFFFFFF;
    public static final int DARK_GRAY = 0xFF5A5A5A;

    public static int withAlpha(int color, int alpha);

    public static int getAlpha(int color);
    public static int getRed(int color);
    public static int getGreen(int color);
    public static int getBlue(int color);

    public static int interpolateTwoColors(float tickDelta, int color1, int color2);
}

Full Changelog: https://github.com/mineblock11/MRU/compare/0.1.5+1.19.3...0.2.0+1.20 Full Documentation: https://docs.mineblock11.dev/

Dependencies

Files

mru-0.2.0+1.20.jar(122.47 KiB) Primary Download
mru-0.2.0+1.20-sources.jar(119.77 KiB) Download

Project members

mineblock11

Owner


Technical information

License
ARR
Client side
required
Server side
required
Project ID