
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.
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, aSupplierthat throwsIOExceptions. - 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_WORLDevent 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
STOPevent 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
L10nclass 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
.langfiles in versions 18w01a and below, and only.jsonfiles in 18w02a and above, the Localization API ensures both.langand.jsonfiles 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.langinstead ofen_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
visitmethods toTextComponentfor reading components with a visitor pattern.
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
Identifierclass implementing OSL'sNamespacedIdentifier.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
initentrypoint is now invoked beforeclient-initand -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
MinecraftandMinecraftServerclasses are made to implementExecutor. 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.BackgroundExecutorclass.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.TextComponentsclass. 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();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
findResourcesif the search directory does not exist.
Ornithe Standard Libraries 0.17.1
OSL 0.17.1 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.
Branding 0.4.1
Fixes crashes in the Snooper screen.
Ornithe Standard Libraries 0.17.0
OSL 0.17.0 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.
OSL is now on Gen2!
From this point forward, all OSL releases will be for Gen2. Information on how to install Gen2 instances can be found on the Wiki.
Core 0.7.0
Namespaced Identifiers
This update brings namespaced identifiers, an OSL alternative for Vanilla's
Identifier, available for all supported Minecraft versions. The base of this API is theNamespacedIdentifierinterface. It defines thenamespaceandidentifiercomponents, which are equivalent toIdentifiersnamespaceandpathrespectively.The valid chars for
namespacecomponents area-zA-Z0-9-_.. The valid chars foridentifiercomponents area-zA-Z0-9-_./.Factory methods for
NamespacedIdentifiers can be found in theNamespacedIdentifiersclass, along with validation methods. TheNamespacedIdentifiers.frommethods will throw exceptions if the constructed identifier is invalid.For improved interoperability with Vanilla,
Identifieris made to implementNamespacedIdentifier. This means you can passIdentifierobjects in places in OSL's APIs whereNamespacedIdentifieris expected.Entrypoints 0.5.0
Custom Run Arguments
The API for parsing custom run arguments has been unified across Minecraft versions as well as between the client and server.
JOptSimpleis now used everywhere.Keybinds 0.2.0
Minecraft versions below 1.3 are now supported.
Lifecycle Events 0.6.0
Minecraft game instance
Access to the
Minecraftgame instance is now provided through theMinecraftInstanceclass. An exception is thrown if the instance is not available (before initialization or after shutddown).Minecraft server instance
Access to the
MinecraftServerinstance is now provided through theMinecraftServerInstanceclass. An exception is thrown if the instance is not available (before initialization or after shutddown).Networking 0.9.0
The Networking API has been overhauled to be more consistent across Minecraft versions.
Custom payload channels
In previous versions, OSL relied entirely on Vanilla's definitions of custom payload channels. This meant
Strings were used before 1.13 andIdentifiers were used after 1.13. From this version on, the API usesNamespacedIdentifiers for channels, and OSL will handle the conversion internally.To create a channel, use the factory methods in
ChannelIdentifiersand register it inChannelRegistry. For example:NamespacedIdentifier COOKIE_CHANNEL = ChannelRegistry.register(ChannelIdentifiers.from("example", "cookie"))Packet serialization
In previous versions, OSL relied on serialization methods provided by Vanilla. This meant
DataInputandDataOutputwere used before 1.7, andPacketByteBuf, a wrapper around Netty'sByteBuf, were used after 1.7. From this version on, the API provides its ownByteBufimplementation:PacketBuffer. It contains many of the same convenience methodsPacketByteBufdoes, but is used for every Minecraft version supported by the Networking API.Packet listener context
Packet listeners are no longer given direct access to the game instance, network handler, or player instance. Instead, a context is provided though which these can be accessed. The context is also used to control asynchronous packet handling. For example:
ServerPlayNetworking.register(CookiePayload.CHANNEL, CookiePayload::new, (ctx, payload) -> { // ensure following code is only executed from the main thread ctx.ensureOnMainThread(); // access the current server, network handler, and player through the context MinecraftServer server = ctx.server(); ServerPlayNetworkHandler networkHandler = ctx.networkHandler(); ServerPlayerEntity player = ctx.player(); })Ornithe Standard Libraries 0.16.3
Fixes
Lifecycle Events API
- Fixes a crash in server versions prior to a0.2.0.
Ornithe Standard Libraries 0.16.3
Fixes
Lifecycle Events API
- Fixes a crash in server versions prior to a0.2.0.
Ornithe Standard Libraries 0.16.3
Fixes
Lifecycle Events API
- Fixes a crash in server versions prior to a0.2.0.
Ornithe Standard Libraries 0.16.2
Fixes
Lifecycle Events API
- Fixes a crash in server versions prior to b1.2.
Ornithe Standard Libraries 0.16.2
Fixes
Lifecycle Events API
- Fixes a crash in server versions prior to b1.2.
Ornithe Standard Libraries 0.16.2
Fixes
Lifecycle Events API
- Fixes a crash in server versions prior to b1.2.
Ornithe Standard Libraries 0.16.1
Fixes
Resource Loader API
- Fixes a bug in 17w43a and above that caused mod resources to be loaded incorrectly or not at all.
Ornithe Standard Libraries 0.16.1
Fixes
Resource Loader API
- Fixes a bug in 17w43a and above that caused mod resources to be loaded incorrectly or not at all.
Ornithe Standard Libraries 0.16.1
Fixes
Resource Loader API
- Fixes a bug in 17w43a and above that caused mod resources to be loaded incorrectly or not at all.
Ornithe Standard Libraries 0.16.0
Additions
Core API
- New convenience methods for getting and setting registry mappings.
Ornithe Standard Libraries 0.16.0
Additions
Core API
- New convenience methods for getting and setting registry mappings.
Ornithe Standard Libraries 0.16.0
Additions
Core API
- New convenience methods for getting and setting registry mappings.
Ornithe Standard Libraries 0.15.3
Fixes
Config API
- Crash in Beta versions due to the World config scope being destroyed upon game startup.
Resource Loader API
- Alternate language file formats are not loaded.
Ornithe Standard Libraries 0.15.3
Fixes
Config API
- Crash in Beta versions due to the World config scope being destroyed upon game startup.
Resource Loader API
- Alternate language file formats are not loaded.
