Перейти к содержимому
Mineforgian

Ornithe Standard Libraries

A set of libraries for modding with Ornithe.

75K загрузок21 подписчиковApache-2.0ornithe

Обновлён 26 июня 2026 г. · опубликован 4 июля 2023 г.

Ornithe Standard Libraries (OSL) provides tools for modding with Ornithe.

Libraries

Core API

The Core API provides common utilities used by other modules, such as an events system and registries.

Blocks API

The Blocks API provides events and utilities for creating custom blocks.

Branding API

This module patches the title screen with mod loader information in 16w05a and below, emulating what you would see in 16w05b and above. This is done by parsing the run args for the versionType option.

Config API

The Config API provides a framework for building and storing mod configs.

Entrypoints API

The Entrypoints API allows mod developers to submit entrypoints that are called before the game is initialized.

Executors API

This module patches the game instance so it can be used as an Executor, and provides a background executor service for background tasks.

Items API

The Items API provides events and utilities for creating custom items.

Keybinds API

The keybinds API provides events for registering keybinds.

Lifecycle Events API

The Lifecycle Events API provides events to track the lifecycle of the Minecraft client and server.

Localization

The Localization API provides utilities for localizing text and handles loading in mods' translation files.

Networking API

The Networking API provides a framework for client-server communication.

Resource Loader API

The Resource Loader API allows mods to load their own resources into the game.

Text Components API

This module provides an alternative to Minecraft's Text components.

Information for developers

Our Ploceus gradle plugin provides helper methods for adding OSL dependencies to your projects:

dependencies {
    ...
    ploceus.dependOsl('0.20.1')
}

You can also add dependencies on individual OSL modules:

dependencies {
    ...
    ploceus.dependOslModule('0.20.1', 'core')
    ploceus.dependOslModule('0.20.1', 'entrypoints')
}

Версии

ВерсияКаналИграЗагрузчикиДатаСкачать
0.20.1Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe26 июня 2026 г..jar (3.1 МБ)
0.20.0Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe25 июня 2026 г..jar (3.1 МБ)
0.19.3Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe23 июня 2026 г..jar (2.9 МБ)
0.19.2Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe22 июня 2026 г..jar (2.9 МБ)
0.19.1Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe13 июня 2026 г..jar (2.9 МБ)
0.19.0Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe12 июня 2026 г..jar (2.9 МБ)
0.18.0Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe2 мая 2026 г..jar (2.2 МБ)
0.17.2Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe17 марта 2026 г..jar (2.0 МБ)
0.17.1Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe16 февраля 2026 г..jar (2.0 МБ)
0.17.0Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe14 февраля 2026 г..jar (2.0 МБ)
0.16.3Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe15 февраля 2025 г..jar (15.6 МБ)
0.16.3-clientБета1.2.2, 1.2.3, 1.2.4, 1.2.5ornithe15 февраля 2025 г..jar (7.7 МБ)
0.16.3-serverБета1.2.2, 1.2.3, 1.2.4, 1.2.5ornithe15 февраля 2025 г..jar (6.1 МБ)
0.16.2Бета1.14.4-pre5, 1.14.4-pre6, 1.14.4-pre7, 1.14.4ornithe24 января 2025 г..jar (15.6 МБ)
0.16.2-clientБета1.2.2, 1.2.3, 1.2.4, 1.2.5ornithe24 января 2025 г..jar (7.7 МБ)

Показаны последние 15 из 105 версий. Все версии — на Modrinth.

Ченджлог

0.20.1Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 26 июня 2026 г.

Ornithe Standard Libraries 0.20.1

OSL 0.20.1 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Blocks 0.1.1

  • Fixed being unable to place blocks in air in Minecraft 1.1 and below.

Text Components 0.1 Alpha 3

Now supports Minecraft Alpha 1.0.1_01-1.0.17_04

0.20.0Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 25 июня 2026 г.

Ornithe Standard Libraries 0.20.0

OSL 0.20.0 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Core 0.9.0

Added new registry utilities for the Blocks and Items APIs.

Blocks 0.1.0

The Blocks API provides events and utilities for registering blocks.

Events

  • REGISTER_BLOCKS: this event is invoked right after Vanilla block registration is completed. Mods should register blocks in listeners to this event.

Block Registry

The BlockRegistry class provides public access to the block registry, including a helper method for registering blocks.

int getId(Block)
NamespacedIdentifier getKey(Block)

Block getBlock(int)
Block getBlock(NamespacedIdentifier)

Set<NamespacedIdentifier> keySet()

// 17w46a-
Block register(int, NamespacedIdentifier, Block)
// 17w47a+
Block register(NamespacedIdentifier, Block)

Block Extension

This API extends the Block class with some functionality from later Minecraft versions.

  • Added boolean isAir() method in 17w46a and below.
  • Added boolean is(Block) method in 1.6.4 and below.

Usage

package com.example;

import net.ornithemc.osl.blocks.api.BlockEvents;
import net.ornithemc.osl.entrypoints.api.ModInitializer;

public class ExampleInitializer implements ModInitializer {

	@Override
	public void init() {
		BlockEvents.REGISTER_BLOCKS.register(ExampleBlocks::init);
	}
}
package com.example;

import net.minecraft.block.Block;

import net.ornithemc.osl.blocks.api.BlockRegistry;
import net.ornithemc.osl.core.util.NamespacedIdentifiers;

public final class ExampleBlocks {

	public static final CookieBlock COOKIE = BlockRegistry.register(NamespacedIdentifiers.from("example", "cookie"), new CookieBlock());

	public static void init() {
	}
}

Items 0.1.0

The Items API provides events and utilities for registering items.

Events

  • REGISTER_ITEMS: this event is invoked right after Vanilla item registration is completed. Mods should register items in listeners to this event.
  • REGISTER_BLOCK_ITEMS (for 1.6.4 and below only): this event is invoked right after Vanilla block item registration is completed. Mods should register block items in listeners to this event.

Item Registry

The ItemRegistry class provides public access to the item registry, including helper methods for registering items.

int getId(Item)
NamespacedIdentifier getKey(Item)

Item getItem(int)
Item getItem(NamespacedIdentifier)

Set<NamespacedIdentifier> keySet()

Item register(Block)
Item register(Block, Item)
Item register(BlockItem)
// 17w46a-
Item register(int, NamespacedIdentifier, Item)
// 17w47a+
Item register(NamespacedIdentifier, Item)

Usage

package com.example;

import net.ornithemc.osl.entrypoints.api.ModInitializer;
import net.ornithemc.osl.items.api.ItemEvents;

public class ExampleInitializer implements ModInitializer {

	@Override
	public void init() {
		ItemEvents.REGISTER_ITEMS.register(ExampleItems::init);
	}
}
package com.example;

import net.minecraft.item.Item;

import net.ornithemc.osl.core.util.NamespacedIdentifiers;
import net.ornithemc.osl.items.api.ItemRegistry;

public final class ExampleItems {

	public static final CookieItem COOKIE = ItemRegistry.register(NamespacedIdentifiers.from("example", "cookie"), new CookieItem());

	public static void init() {
	}
}

Keybinds 0.3.0

Keybinds API V2 is a minor rewrite of the Keybinds API. The API V1 is still present, but deprecated.

Events

  • REGISTER_KEYBINDS: this event is invoked upon game start-up, right after Vanilla keybinds have been initialized. Mods should register keybinds in listeners to this event.

Keybind Registry

The KeybindRegistry class provides public access to the keybind registry, including helper methods for registering keybinds.

Set<String> getCategories()

register(
	String: name,
	int: defaultKeyCode,
	String: category
)
// 17w43a+
register(
	String: name,
	InputConstants.Type: type,
	int: defaultKeyCode,
	String: category
)

register(KeyBinding)

Usage

package com.example;

import net.ornithemc.osl.entrypoints.api.client.ClientModInitializer;
import net.ornithemc.osl.keybinds.api.KeybindEvents;

public class ExampleInitializer implements ClientModInitializer {

	@Override
	public void initClient() {
		KeybindEvents.REGISTER_KEYBINDS.register(ExampleKeybinds::init);
	}
}
package com.example;

import org.lwjgl.glfw.GLFW;

import net.minecraft.client.options.KeyBinding;

import net.ornithemc.osl.keybinds.api.KeybindRegistry;

public final class ExampleKeybinds {

	public static final KeyBinding COOKIE = KeybindRegistry.register("cookie", GLFW.GLFW_KEY_Z, "example");

	public static void init() {
	}
}
0.19.3Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 23 июня 2026 г.

Ornithe Standard Libraries 0.19.3

OSL 0.19.3 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Resource Loader 0.7.2

Fixes direct path resource access from the default resource pack not working in 1.6-1.12.

0.19.2Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 22 июня 2026 г.

Ornithe Standard Libraries 0.19.2

OSL 0.19.2 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Config 0.6.2

Fixes a crash in b13-b1.7 when joining a multiplayer server, caused by the crash fix from 0.19.0.

0.19.1Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 13 июня 2026 г.

Ornithe Standard Libraries 0.19.1

OSL 0.19.1 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Resource Loader 0.7.1

Fixes a bug where only one mod resource pack would be used for a resource even if other mod resource packs provided that same resource as well.

0.19.0Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 12 июня 2026 г.

Ornithe Standard Libraries 0.19.0

OSL 0.19.0 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Core 0.8.0

  • Added several internal utilities for other OSL APIs to use.
  • Added IOSupplier, a Supplier that throws IOExceptions.
  • Added Unit, a singleton object.

Branding 0.4.3

Refactored some things to make use of new Core utilities.

Config 0.6.1

Fixed CLOSE_WORLD event not firing if the world is closed due to a level save conflict. This would lead to crashes upon joining another world.

Entrypoints 0.6.1

Suppressed a Mixin warning that would appear in logs.

Lifecycle Events 0.6.1

Fixed server STOP event firing twice on dedicated servers.

Localization 0.1.0

The Localization API split off from the Resource Loader API. It provides utilities for localizing text, and handles loading in mods' translation files.

Localizing Text

The L10n class provides utilities for localizing text.

// localizing a translation key
String localizedText = L10n.get("example.translationKey");

// localizing a translation key with formatting arguments
String localizedTextWithArgs = L10n.get("example.translationKey", "Some Arg", 1);

// localizing a translation key with a default value in case no localization exists
String localizedTextOrDefault = L10n.getOrDefault("example.translationKey", "Example Text");

// checking whether a localization for a translation key exists
boolean localizedTextExists = L10n.has("example.translationKey");

Providing Translations

Translation files can be added to your mod's resources and will be loaded automatically. While Minecraft natively only supports .lang files in versions 18w01a and below, and only .json files in 18w02a and above, the Localization API ensures both .lang and .json files are supported in any Minecraft version.

The Localization API also adds support for all-lowercase translation file names in 1.10.2 and below (e.g. en_us.lang instead of en_US.lang).

Localization in Minecraft Alpha and Beta

While Minecraft supports localization in Minecraft Beta, the only supported language is English (US). OSL's Localization API implements support for other languages, but none are provided by default and no GUI screen for switching languages is added.

Minecraft Alpha does not natively support localization at all, but OSL's Localization API implements the necessities for mods to make use of. Do note that OSL will not modify any Vanilla Minecraft text to localize it.

Resource Loader 0.7.0

This update to the Resource Loader API is a major rewrite. All internals and code APIs have changed, and mods that make use of them will most likely need to be updated. See the pull request for a detailed overview of the changes and update paths for mods that depend on the Resource Loader API.

Text Components 0.1 Alpha 2

  • Added TextComponents.builder() method for constructing components with a builder pattern.
  • Added visit methods to TextComponent for reading components with a visitor pattern.
0.18.0Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 2 мая 2026 г.

Ornithe Standard Libraries 0.18.0

OSL 0.18.0 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Core 0.7.1

The Core API now provides a transitive injected interface for Vanilla's Identifier class implementing OSL's NamespacedIdentifier.

Branding 0.4.2

Fixes the version string used in Alpha 1.2.1_01 and earlier. The format now matches that used in following versions.

Entrypoints 0.6.0

The init entrypoint is now invoked before client-init and -server-init`. This change was made in order to match behavior from Fabric Loader's entrypoints.

Lifecycle Events

Now supports Beta 1.3.

Executors 0.1.0

This new API provides access to the main game instances as java.util.concurrent.Executors, and supplies a background executor for running tasks off the main game thread.

The Minecraft and MinecraftServer classes are made to implement Executor. Any tasks submitted are guaranteed to run on the main game thread. If called from a different thread, the task will be queued to be run at the start of the next tick. Instances can be acquired using the Lifecycle Events API.

MinecraftInstance.get().execute(
    // this code is guaranteed to be run on the main client thread!
);

The background executor can be acquired through the net.ornithemc.osl.executors.api.BackgroundExecutor class.

BackgroundExecutor.get().execute(
    // this code is guaranteed to be run on a background thread!
);

Networking Implementation 0.1.1

Fixes a crash due to a Mixin injection failure in late 1.7 snapshots.

Text Components 0.1 Alpha 1

This new API provides an alternative to Vanilla's chat component system. This is an Alpha release of this API and changes are very likely, so use with caution!

Text components can be made using factory methods in the net.ornithemc.osl.text.api.TextComponents class. Text components can be converted into legacy formatted strings as well.

TextComponent text = TextComponents.literal("this is a text component")
    .format(Formatting.BOLD)
    .append(" - and this is another one!");

String string = text.buildFormattedString();
0.17.2Бета1.14.4-pre6, 1.14.4-pre7, 1.14.4 · 17 марта 2026 г.

Ornithe Standard Libraries 0.17.2

OSL 0.17.2 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.

Resource Loader 0.6.1

  • Fixes crashes when mod resources are accessed before the game is done initializing.
  • Fixes crashes in findResources if the search directory does not exist.

Полная история изменений — на Modrinth.

Комментарии

Загружаем…