Tags
Creators
Details
0.25.0
Compatibility
Changes
Ornithe Standard Libraries 0.25.0
OSL 0.25.0 supports Minecraft versions between Alpha 1.0.1_01 and Release 1.14.4.
Resource Loader 0.11.0
Server Resources In 1.12.2 And Below
Server-side resource loading works much the same as client-side resource loading. Server resources should be placed in /data/<namespace>/ directories, from where they will be loaded automatically. You can retrieve server resources through the server resource manager.
ResourceManager resourceManager = ResourceManager.server();
// this gets the top resource at /data/example/cookies/chocolate_chip_cookie.json
Optional<Resource> resource = resourceManager.getResource(ResourceLocation.of("example", "cookies/chocolate_chip_cookie.json"));
Similarly, you can query all loaded data packs through the server pack repository.
ResourcePackRepository packRepository = ResourcePackRepository.server();
// this gets all data packs that are currently enabled
Collection<ResourcePack> datapacks = packRepository.openSelectedPacks();
Data Packs
Data packs will be loaded from the datapacks/ directory. Similarly to 1.13+, any data packs found will be enabled by default. At this time there is no /datapacks command in 1.3-1.12 where users can control which data packs are enabled, but the level.dat file is extended to include lists of enabled and disabled packs, and packs can of course be enabled/disabled programmatically.
Loot Tables, Advancements, and Command Functions
In 1.9-1.12 loot tables, advancements, and command functions, are loaded from the data/ directory. This is not changed, and resources discovered from there have priority over resources loaded from data packs. In a way, the data/ directory acts as a data pack that is fixed at the top of the list.
Ordering Pack Sources
There is now a way to specify a preferred ordering (either FIRST or LAST) when adding resource pack repository sources. LAST is the default value, and is equivalent to the previous behavior. If FIRST is specified instead, the pack source will be placed before OSL's bundled mod resources, but after the Vanilla pack source.
This can be useful because it changes the default position of the resource packs loaded in by those pack sources. With previous behavior mod provided resource packs are always placed above OSL's bundled mod resource packs. With this feature it's possible to have resource packs placed below OSL's bundled mod resource packs by default. Of course the user can still re-order the resource packs in any way they like in the GUI.
ClientResourceLoaderEvents.INIT_PACK_REPOSITORY.register(packRepository -> {
packRepository.addSource(new ExamplePackSource1()); // uses default ordering LAST
packRepository.addSource(new ExamplePackSource2(), PackSourcePosition.FIRST);
});
// final pack source order: Vanilla, ExamplePackSource2, OSL Bundled Mod Resources, ExamplePackSource1
Additions
- Added
SimpleJsonResourceReloader, aResourceReloaderimplementation that parses all JSON files in a given directory into GsonJsonObjects.
Fixes
- Fixed OSL bundled data packs always enabled, even if disabled through the
/datapackscommand. - Fixed crashes when selecting a texture pack from the main menu after leaving a game (affected versions around b1.0).
Commands 0.2.0
The client-side /help command has been separated from the server-side /help command, and is now /osl-client-commands help or /occ help.
Networking 0.12.1
The networking-impl library has been removed and merged into the Networking API directly. As a result, several other modules have been updated to drop their dependency on the networking-impl library.
Biomes 0.1.2, Block Entities 0.1.2, Blocks 0.3.2, Block States 0.4.0, Datagen 0.1.1, Entities 0.1.4, Items 0.3.3, Lifecycle Events 0.7.0
Dropped dependency on networking-impl
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:EHGtwpJv:GUqPszNL"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:EHGtwpJv:GUqPszNL"
}

