▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Boris Lib
Boris Lib

Boris Lib

A library for my Server-Sided Fabric Mods. Contains a lot of very useful stuff for myself and other modders!

Оцените первым
2.7K
4

BorisLib

The server-side Fabric toolkit behind Arcana Novum and Ancestral Archetypes.
Build mods with real GUIs, configs, saved data and custom effects. Players don't need any mods.

Minecraft Version Server-side Requires Fabric API

Here because a mod told you to install this? Put the jar in your server's mods folder next to Fabric API and jump to Server Setup. That is all you need.

Making a mod? Read on.

Why BorisLib

Server-side mods work on vanilla clients, which also means that menus, configs, saved data and status effects all have to be built by hand. BorisLib is the set of systems I built for that while making Arcana Novum, a magic mod with 80+ items, boss fights and an in-game menu for everything. Each system is used on live servers, and you can use them in your mod with one Gradle line.

What You Get

  • Chest GUIs that page, sort and filter. Hand PagedGui a list and it handles the pages and the buttons. Over 60 textured, dyeable icons are included, and players without the resource pack see vanilla items in their place.
  • A config in a few lines. Declare typed settings and get a commented .properties file, a /yourmod config command with tab completion and validation, and a permission node for every setting.
  • Saved data for players, worlds and the server. Register one key and read or write your object anywhere. It works for offline players, and every scope has crash-safe backups.
  • Conditions: status effects that stack like attributes. Any number of sources can apply the same effect, opposing effects cancel out, and magnitudes can reach infinity for full immunity or a full root. 31 conditions are built in, from damage and speed to gravity, healing and mob detection range.
  • Cutscenes. Move a player's camera along a keyframed path with easing and splines, in their own dimension or another one, with a stand-in left where they were standing. Their state is restored even after a disconnect or a crash.
  • Timers and login callbacks. Run code after a delay, on an interval, or the next time a player logs in.
  • Particle shapes. Lines, circles, spheres and animated lightning bolts, visible at long range.
  • A large utility set. Multi-entity raycasts, weighted random, safe teleport checks, inventory and item data helpers, text markup, number formatting and sounds.

A Quick Look

A paged, sortable menu of any list:

PagedGui<Item> gui = new PagedGui<>(MenuType.GENERIC_9x6, player, items);
gui.itemElemBuilder((item, index) -> GuiElementBuilder.from(item.getDefaultInstance()));
gui.elemClickFunction((item, index, click) -> player.sendSystemMessage(Component.translatable(item.getDescriptionId())));
gui.curSort(ItemSort.ALPHABETICAL);
GuiHelper.outlineGUI(gui, 0x1155dd, Component.literal("Items"));
gui.buildPage();
gui.open();

A damage buff that stacks with every other source:

// +50% damage dealt for 10 seconds
Conditions.addCondition(server, player, new ConditionInstance(Conditions.MIGHT, id, 200, 0.5f));

Data that follows a player, online or not:

Wallet wallet = DataAccess.getPlayer(uuid, Wallet.KEY);
wallet.coins += 5;
DataAccess.setPlayer(uuid, Wallet.KEY, wallet);

A camera cutscene:

CameraPath path = CameraPath.builder()
      .add(CameraKeyframe.at(0.0).pos(0, 80, 0).rot(0, 20).build())
      .add(CameraKeyframe.at(1.0).pos(60, 80, 0).rot(90, 0).interp(InterpolationType.EASE_IN_OUT).build())
      .build();
SequenceManager.start(player, new CutsceneSequence(player.getUUID(), path, 200, true));

Add It to Your Mod

repositories {
    maven { url = "https://maven.borisshoes.net/releases" }
    maven { url = "https://maven.nucleoid.xyz" }
}

dependencies {
    implementation "net.borisshoes:BorisLib:4.0.0+26.3"
}

Use the version from the versions page that matches your Minecraft version. To ship BorisLib inside your own jar, so that server owners have nothing extra to install, wrap the line in include(...).

The API Guide on GitHub documents every system with examples, and the classes carry Javadoc throughout. If you get stuck, ask on Discord.

Mods Built with BorisLib

Install one of these to see what the library can do before you write any code.

Arcana Novum

Minecraft's biggest server-side magic mod: 80+ Arcana Items, multiblock altars, 190+ augmentations, research, achievements and boss fights. Its Tome and Compendium menus are BorisLib GUIs, its 400+ settings are a BorisLib config, and its item effects use Conditions.

Forging at the Starlight ForgeThe Starpath AltarLate-game gear

Ancestral Archetypes

An Origins-style mod where each player picks a mob-based Archetype and gains its abilities. It is highly configurable and balanced for competitive servers, and it runs on BorisLib's config, data storage and Conditions.

More Mods Built with BorisLib

All server-side Fabric mods — no client installation required.

ModDescriptionLinks
Ender NexusHighly configurable /home, /spawn, /warp, /tpa and /rtp commands all in one, and individually disablable.Modrinth
Fabric MailAn in-game virtual mailbox system for sending packages and messages between online and offline players.Modrinth
Fabric TradeAdds /trade, a secure player-to-player trading interface.Modrinth
Limited AFKAFK detection and management with configurable kick thresholds for servers.Modrinth

Made something with BorisLib? Tell me on Discord and I will add it here.

Server Setup

  1. Install Fabric Loader and Fabric API on your server, then put the BorisLib jar in the mods folder. Every other library is bundled, and players do not need to install anything.
  2. Launch the server once to generate the configs.
  3. Open config/polymer/auto-host.json and change "enabled": false to true. The server now generates the resource pack for BorisLib and the mods built on it, and sends it to players when they connect.
  4. (Optional) In the same file you can make the resource pack required, or set the "message" that players see when they are asked to download it.

Some mods, including Arcana Novum and Ancestral Archetypes, already include BorisLib in their own jar. You only need this download when a mod lists BorisLib as a separate requirement.

Admins can inspect and apply conditions with /borislib condition, and every command has a Fabric Permissions API node with a vanilla permission level fallback. The full reference is on GitHub: commands and permission nodes.

Support

Questions go to the Discord, and bug reports and suggestions go to GitHub Issues.

Translations: Russian by Reset1712 and Spanish by Llama303.

License Notice

By using this project in any form, you hereby give your "express assent" for the terms of the license of this project, and acknowledge that I, BorisShoes, have fulfilled my obligation under the license to "make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License."

Партнёрский материал

Как поиграть с друзьями с модом Boris Lib?

Мод Boris Lib куда интереснее в компании: поднимите сервер Майнкрафт с уже установленным модом, позовите друзей и играйте по своим правилам. Хостинг Майнкрафт для мода Boris Lib будет готов за пару минут - BungeeHost сделает всё за вас.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.3.x26.2.x26.1.x1.21.x

Платформы

Поддерживаемые окружения

Сервер

Ссылки

Создатели

Детали

Лицензия:
Опубликован:1 год назад
Обновлён:2 недели назад
Главная