▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
🔥Тренд дняBlack Pvp Pack⚡Сейчас качаютBlack Pvp Pack🚪Сюда заходят чаще всегоBlack Pvp Pack🚀Взрывает трендыPvp Haimiya Anime Pack🆕Новый хитTheastralpvp🎮Сервер набирает популярностьHypixel🔻Теряет популярностьMarin Kitgawa🧲Самый липкий ресурсHaimiya Totem🔥Тренд дняBlack Pvp Pack⚡Сейчас качаютBlack Pvp Pack🚪Сюда заходят чаще всегоBlack Pvp Pack🚀Взрывает трендыPvp Haimiya Anime Pack🆕Новый хитTheastralpvp🎮Сервер набирает популярностьHypixel🔻Теряет популярностьMarin Kitgawa🧲Самый липкий ресурсHaimiya Totem🔥Тренд дняBlack Pvp Pack⚡Сейчас качаютBlack Pvp Pack🚪Сюда заходят чаще всегоBlack Pvp Pack🚀Взрывает трендыPvp Haimiya Anime Pack🆕Новый хитTheastralpvp🎮Сервер набирает популярностьHypixel🔻Теряет популярностьMarin Kitgawa🧲Самый липкий ресурсHaimiya Totem🔥Тренд дняBlack Pvp Pack⚡Сейчас качаютBlack Pvp Pack🚪Сюда заходят чаще всегоBlack Pvp Pack🚀Взрывает трендыPvp Haimiya Anime Pack🆕Новый хитTheastralpvp🎮Сервер набирает популярностьHypixel🔻Теряет популярностьMarin Kitgawa🧲Самый липкий ресурсHaimiya Totem🔥Тренд дняBlack Pvp Pack⚡Сейчас качаютBlack Pvp Pack🚪Сюда заходят чаще всегоBlack Pvp Pack🚀Взрывает трендыPvp Haimiya Anime Pack🆕Новый хитTheastralpvp🎮Сервер набирает популярностьHypixel🔻Теряет популярностьMarin Kitgawa🧲Самый липкий ресурсHaimiya Totem🔥Тренд дняBlack Pvp Pack⚡Сейчас качаютBlack Pvp Pack🚪Сюда заходят чаще всегоBlack Pvp Pack🚀Взрывает трендыPvp Haimiya Anime Pack🆕Новый хитTheastralpvp🎮Сервер набирает популярностьHypixel🔻Теряет популярностьMarin Kitgawa🧲Самый липкий ресурсHaimiya Totem
Моды/Ornithe Standard Libraries
Ornithe Standard Libraries

Ornithe Standard Libraries

Набор библиотек для моддинга Minecraft на загрузчике Ornithe. OSL предоставляет инструменты для событий, конфигов, клавиш, ресурсов и многого другого.

5/5(1)
139.0K
24
Все версии→Ornithe Standard Libraries 0.24.0

Ornithe Standard Libraries 0.24.0

Beta13.11.2026

Список изменений

Ornithe Standard Libraries 0.24.0

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

Core 0.13.0

Added MinecraftVersion::friendlyGameVersion, which returns a nicer looking version string as opposed to the version ID. See below for some comparisons

gameVersionfriendlyGameVersion
b1.7.3Beta 1.7.3
a1.2.6Alpha v1.2.6
inf-20100629Infdev 0.31.20100629
c0.29Classic 0.29

Crash Reports 0.1.0

Version agnostic API for throwing crash exceptions and populating crash reports. Also adds a mods list to crash reports.

Throwing Crash Exceptions

The CrashExceptions utility class provides a few methods for creating crash exceptions.

CrashExceptions {

	// creates a crash report from the given error and title and returns a new crash exception with that report
	RuntimeException from(String title, Throwable error);

	// creates a new crash report from the given error and title, then passing it to the given builder to populate it,
	// and returns a new crash exception with that report
	RuntimeException from(String title, Throwable error, Consumer<CrashReport> builder);

}

example usage:

try {
	cookieMonster.eatCookie(cookie);
} catch (Throwable error) {
	throw CrashExceptions.from("Cookie monster encountered an error while eating a cookie", error, report -> {
		CrashReportSection section = report.addSection("Cookie Monster");

		section.addDetail("Name", () -> cookieMonster.getName());
		section.addDetail("Cookie Recipe", () -> cookie.getRecipe());
	})
}

Populating Crash Reports

Several classes (Minecraft, MinecraftServer, World, WorldData) implement the new CrashReportPopulator interface, which allows modders to add crash listeners to objects of these types. When a crash happens these listeners are notified and given the opportunity to add more details to the given crash report section or add a new section to the crash report.

MinecraftClientEvents.START.register(minecraft -> {
	World world = minecraft.world;

	minecraft.addCrashListener((report, section) -> {
		CrashReportSection section = report.addSection("Cookie Management");
	
		section.addDetail("Cookies made", "Not enough!");
		section.addDetail("Cookies eaten", "All of them!");
	});
	world.addCrashListener((report, section) -> {
		section.addDetail("Cookie monsters", () -> world.cookieMonsters.size());
	});
});

Commands 0.1.0 (for 1.8+)

API for registering both server-side and client-side commands, including a Brigadier-based command framework in 1.12.2 and below.

Registering Commands

Command registration should be done in a listener to the REGISTER_COMMANDS event. The ServerCommands class provides utility methods for creating commands.

An example is shown below.

ServerCommandEvents.REGISTER_COMMANDS.register((commands, selection, context) -> {
	ExampleCommand.register(commands);
});
public final class ExampleCommand {

	public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
		dispatcher.register(ServerCommands
			.literal("example")
			.executes(context -> {
				context.getSource().sendSuccess(TextComponents.literal("Successfully ran example command!"), false);
				return SINGLE_SUCCESS
			}));
	}
}

Registering Client Commands

The Commands API provides its own framework for client commands, using Brigadier, though no custom argument types are provided in the API. Command registration should be done in a listener to the REGISTER_COMMANDS event. The ClientCommands class provides utility methods for creating commands.

An example is shown below.

ClientCommandEvents.REGISTER_COMMANDS.register((commands, selection, context) -> {
	ExampleClientCommand.register(commands);
});
public final class ExampleCommand {

	public static void register(CommandDispatcher<ClientCommandSource> dispatcher) {
		dispatcher.register(ClientCommands
			.literal("example")
			.executes(context -> {
				context.getSource().sendSuccess(TextComponents.literal("Successfully ran example command!"));
				return SINGLE_SUCCESS
			}));
	}
}

Registering Legacy Commands

In 1.12.2 and below, Minecraft used its own framework for commands. This framework is still usable if you prefer it over Brigadier. Command registration should be done in a listener to the REGISTER_LEGACY_COMMANDS event.

An example is shown below.

ServerCommandEvents.REGISTER_LEGACY_COMMANDS.register((commands, selection, context) -> {
	commands.accept(new ExampleCommand());
});
public class ExampleCommand extends AbstractCommand {

	@Override
	public String getName() {
		return "example";
	}

	@Override
	public String getUsage(CommandSource source) {
		return "/example";
	}

	@Override
	public void run(MinecraftServer server, CommandSource source, String[] args) throws CommandException {
		source.sendMessage(TextComponents.literal("Successfully ran example command!"));
	}
}

Datagen 0.1.0 (for 1.13+)

API for generating resource and data files, including integration with Loom's datagen features.

Registering Data Generators

Data generators are registered through the datagen entrypoint in your fabric.mod.json. The entrypoint class must implement DataGeneratorInitializer.

fabric.mod.json

{
	...
	"entrypoints": {
		...
		"datagen": [
			"com.example.ExampleDataGenerator"
		]
	},
	...
}
package com.example;

import net.ornithemc.osl.datagen.api.DataGeneratorInitializer;
import net.ornithemc.osl.datagen.api.ModDataGenerator;
import net.ornithemc.osl.datagen.api.PackGenerator;

public class ExampleDataGenerator implements DataGeneratorInitializer {

	@Override
	public void onDatagenInit(ModDataGenerator dataGenerator) {
		PackGenerator pack = dataGenerator.createPack();

		pack.addProvider(ExampleModelsProvider::new);
		pack.addProvider(ExampleLanguageProvider::new);
	}
}

Packs

Generated files are grouped into packs. A ModDataGenerator can create two kinds of packs:

  • createPack() creates a pack that is written directly to the output directory. This is the pack that ends up in your mod's resources.
  • createBundledResourcePack(NamespacedIdentifier id) creates a pack that is written to resourcepacks/<namespace>/<path>/ inside the output directory. Use this to generate bundled mod resource packs (see Resource Loader API).
PackGenerator pack = dataGenerator.createPack();
PackGenerator cookiePack = dataGenerator.createBundledResourcePack(NamespacedIdentifiers.from("example", "cookies"));

A pack.mcmeta file is generated for each pack automatically. The main pack uses your mod's description, bundled packs use their identifier.

Providers are added to a pack with PackGenerator.addProvider. It accepts both providers whose constructor takes only a PackGenerator, and providers whose constructor takes a PackGenerator and a ModContainer, so a constructor reference can be passed directly.

Builtin Providers

The API provides the following data providers. Extend them and implement their abstract method to generate data.

ProviderGeneratesPackageAvailability
ModModelsProviderBlock states, block and item modelsnet.ornithemc.osl.datagen.api.providerAll versions
ModLanguageProviderTranslationsnet.ornithemc.osl.datagen.api.providerAll versions
ModRecipesProviderRecipes and recipe advancementsnet.ornithemc.osl.datagen.api.providerAll versions
ModAdvancementsProviderAdvancementsnet.ornithemc.osl.datagen.api.providerAll versions
ModLootTablesProviderLoot tablesnet.ornithemc.osl.datagen.api.provider18w43a - 1.14.4
ModBlockTagsProviderBlock tagsnet.ornithemc.osl.datagen.api.provider.tagAll versions
ModItemTagsProviderItem tagsnet.ornithemc.osl.datagen.api.provider.tagAll versions
ModFluidTagsProviderFluid tagsnet.ornithemc.osl.datagen.api.provider.tagAll versions
ModEntityTypeTagsProviderEntity type tagsnet.ornithemc.osl.datagen.api.provider.tag18w43a - 1.14.4

Block States 0.3.0

  • Added StateDefinition::getProperty which returns the property with the given name.
  • Added Property::getValue which returns an optional value for the given name.
Property<?> property = stateDefinition.getProperty("facing");
Direction facing = property.getValue("west");

Registries 0.4.0

Events

  • Added INIT_REGISTRIES event. Registries should be created and registered in listeners to this event (in previous versions this would be done directly in your mod's entrypoint).
package com.example;

import net.ornithemc.osl.entrypoints.api.ModInitializer;
import net.ornithemc.osl.registries.api.RegistryEvents;

public class ExampleInitializer implements ModInitializer {

	@Override
	public void init() {
--		ExampleRegistries.init();
++		RegistryEvents.INIT_REGISTRIES.register(ExampleRegistries::init);
	}
}
  • Added REGISTRIES_FROZEN event, which is invoked after registries have been frozen.

Fixes

  • Crashes in 1.14 when registering content have been fixed.
  • Fixed Registry::iterator returning an iterator with unreliable ordering. The ordering is now based on the numerical ID.

Branding 0.4.4

Updated to use Core's MinecraftVersion::friendlyGameVersion internally.

Biomes 0.1.1, Block Entities 0.1.1, Blocks 0.3.1, Entities 0.1.3, Items 0.3.2

Updated to use Registries' INIT_REGISTRIES event internally.

Resource Loader 0.10.0

Pack Compatibility

Added PackCompatibility::isCompatible, which is shorthand for packCompatibility == PackCompatibility.COMPATIBLE.

Crash Reports

Improved resource pack information in crash reports. It now properly lists all selected packs, including the Vanilla pack, the mod resources pack, and any other virtual pack added through the API. In 1.6 and below it replaces the "skin" section that only lists a single selected texture pack.

Localization 0.2.1

Fixes

  • Fixed incorrect last update time for Locale.
  • Fixed translations not being read as UTF-8.
  • Fixed reloads using previous language code.
  • Fixed mod translations not loading in b1.0-b1.3.
  • Fixed translations loading twice in 1.10- if the language code is already lowercase.

Text Components 0.2.0

  • TextComponent now implements Brigadier's Message interface. TextComponent::getString returns the same result as TextComponent::buildString.
  • Formattings now have names. You can query the name throuh Formatting::getName or get the formatting for a given name through Formatting::byName. The names match those of equivalent Vanilla Formattings.

Файлы

ornithe-standard-libraries-0.24.0.jar(5.89 MiB)
Основной
Скачать

Метаданные

Канал релиза

Beta

Номер версии

0.24.0

Загрузчики

Ornithe

Версии игры

1.0–1.14.4, 19w14b

Загрузок

1.4K

Дата публикации

13.11.2026

Загрузил

ID версии

Главная