Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings

Renderer

An easy to use library for rendering content

2,065
5
Library
Utility

Compatibility

Minecraft: Java Edition

1.20–1.20.4
1.19.x
1.18.2

Platforms

Fabric

Supported environments

Client-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source Visit wiki

Creators

0x3C50
0x3C50 Owner

Details

Licensed GPL-3.0-only
Published 3 years ago
Updated last year
DescriptionChangelogVersions

Renderer

An easy to use rendering library for modern fabric

Installing

You can install this library using Jitpack

To install the library, just add the jitpack repository to your repositories block as described on the website, and this to your dependencies block in build.gradle:

include modImplementation("com.github.0x3C50:Renderer:master-SNAPSHOT")

This will use the latest commit as build target, but will cache that build target every time. Use the latest short commit hash found on Jitpack (example: d2cc995ff4) as the version, to get that release instead.

Usage

The api has an extensive javadoc, which explains almost anything. The wiki also has some more insights and examples.

The two renderers

Renderer2d draws in 2 dimensions, on the hud. Renderer3d draws in 3 dimensions, in the world.

Events

This library has its own event system, which broadcasts some basic rendering events (hud render, world render, etc). You can find more information on the wiki

Suggestions

You can leave suggestions in the issues section

If this library helped you, please consider leaving a star, since this library took me a while to make as it is right now :)

Examples

More examples can be found in RendererClient.

class Listener {
    void main() {
        Events.manager.registerSubscribers(this);
    }
    @MessageSubscription
    void onWorldRendered(RenderEvent.World world) {
        // Quad at (0, 0, 0):
        Renderer3d.renderFilled(world.getMatrixStack(), Color.RED, Vec3d.ZERO, new Vec3d(1, 1, 1));
        // Quad outline at (0, 0, 0):
        Renderer3d.renderOutline(world.getMatrixStack(), Color.RED, Vec3d.ZERO, new Vec3d(1, 1, 1));
    }
    
    @MessageSubscription
    void onHudRendered(RenderEvent.Hud hud) {
        // Rounded quad at (50, 50 -> 100, 100), 5 px corner, 10 samples
        Renderer2d.renderRoundedQuad(RendererUtil.getEmptyMatrixStack(), Color.WHITE, 50, 50, 100, 100, 5, 10);
    }
}

Modrinth is open source.

feat/theseus/tauri-v2@c5403db

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.