File Details
fabric 0.2.2
- R
- Feb 10, 2026
- 1.65 MB
- 1.8K
- 1.21.1
- Fabric
File Name
blib-fabric-1.21.1-0.2.2.jar
Supported Versions
- 1.21.1
Curse Maven Snippet
v0.2.2
✍️ Developer Notes
- For help or other questions, concerns, etc. check out our Discord server: https://discord.gg/wp7mvmbkVb
✨ What's New
- Added Storage API (
api.common.storage.v1) for persistent data storage at three scopes:DataStoreinterface (extendsNBTSerializable) for storable dataDataStoreType<T>record with factory, registered to theDATA_STORE_TYPESregistryDataStoreManagerinterface withgetGlobal(),getLevel(), andgetChunk()methods- Global scope: server-wide data, saved on
MinecraftServer#saveEverything - Level scope: per-dimension data, saved on
ServerLevel#save - Chunk scope: per-chunk data with region-based file persistence (32x32 chunks per region)
- Data is stored per-mod under
{world}/blib/data_storage/{namespace}/:- Global:
global/{path}.nbt - Level:
levels/{dimension}/{path}.nbt - Chunk:
levels/{dimension}/chunks/r32.{rx}.{rz}.nbt
- Global:
- Region files encode the region size in both the filename and NBT data for forward compatibility
- Lazy loading: data is loaded from disk on first access
- Region reference counting: cached region data is released when the last tracked chunk in a region unloads
- Added
DATA_STORE_TYPESregistry toBLibRegistriesandBLibBuiltInRegistries - Added
BLibMod#storage()method to access storage through the mod facade - Added
BLibStorageAccessfor type-safe data store access - Added
BLibServerSaveEvent,BLibLevelSaveEvent,BLibChunkSaveEvent, andBLibChunkUnloadEvent - Added
BLibEventAccess#onServerSave(),onLevelSave(),onChunkSave(), andonChunkUnload()event accessors - Added Faction API (
api.common.faction.v1) for persistent, type-safe faction management:FactionManagerinterface for creating, accessing, and removing factionsFactionType<T>for defining custom faction data types, registered to theFACTION_TYPESregistryFactionKey<T>record for type-safe faction identification (couples faction ID with its type)FactionDatabase class for custom per-faction dataFactionRelationshipsfor tracking faction members and parent-faction relationshipsFactionMembersealed interface withEntityandSubFactionvariantsFactionDataErrorsealed interface withUnknownTypeandTypeMismatcherror variants- Type-validated data access returning
Result<T, FactionDataError>to prevent type mismatches - Shard-based persistence (1000 entries per shard, dirty-tracking for incremental saves)
- Reverse entity-to-faction index for efficient UUID-to-faction lookups via
FactionManager#getFactionIds(UUID) - Automatic faction membership cleanup when non-player entities are killed or discarded
- Added
FACTION_TYPESregistry toBLibRegistriesandBLibBuiltInRegistries - Added
BLibMod#factions()method to access factions through the mod facade - Added
BLibFactionAccessfor type-safe faction access - Added
BLibEntityRemoveEventfor entity removal events (providesEntityandRemovalReason) - Added
BLibEventAccess#onEntityRemove()event accessor - Added
BLibFactionRemoveEventfor faction removal events - Added
BLibEventAccess#onFactionRemove()event accessor - Added
Dirtyinterface (api.common.util.v1) for reusable dirty-tracking - Added Reputation API (
api.common.reputation.v1) for asymmetric reputation tracking:ReputationManagerinterface for reputation operationsReputationKeysealed interface withFaction(ResourceLocation)andEntity(UUID)variantsReputationDataclass for holding a subject's outgoing reputation map (implementsDirty)- Supports faction-to-faction, faction-to-entity, entity-to-faction, and entity-to-entity relationships
- Asymmetric design: A's reputation toward B is independent of B's reputation toward A
- Shard-based persistence (1000 entries per shard, dirty-tracking for incremental saves)
- Reverse incoming index for efficient cleanup when subjects are removed
- Added
BLibMod#reputation()method to access reputation through the mod facade - Added
BLibReputationAccessfor reputation access - Added
/bliboperator commands (permission level 2) for debugging and management:/blib factions create|remove|add-member|remove-member|list— faction management/blib reputation get|set|remove— reputation management between factions and entities
♻️ Changes
- Renamed server lifecycle event methods for consistency (prefixed with "on"):
onServerStarted()(replacesserverStarted())onServerStarting()(replacesserverStarting())onServerStopped()(replacesserverStopped())onServerStopping()(replacesserverStopping())
- Deprecated
serverStarted(),serverStarting(),serverStopped(),serverStopping()for removal
🔬 Technical Changes
- Split
BLibDataStoreManagerinto dedicated sub-managers:BLibGlobalDataStoreManagerfor server-wide storesBLibLevelDataStoreManagerfor per-dimension storesBLibChunkDataStoreManagerfor region-based chunk storesDataStoreIOfor shared file I/O utilities
- Added mixins for save and chunk event dispatch:
MixinMinecraftServer_SaveGlobalDatahooks intosaveEverything()MixinServerLevel_Eventshooks intosave()andunload()MixinChunkMap_SaveChunkDatahooks intoChunkMap#save()
- Added
BLibGlobalEvents.SERVER_SAVE,LEVEL_SAVE,CHUNK_SAVE, andCHUNK_UNLOADglobal event handles - Added
ShardUtilutility for shard index calculations and dirty shard detection - Added
BLibFactionManagerinternal implementation with shard-based IO and reverse entity index - Added
FactionDataIO,FactionRelationshipsIO, andFactionIOfor faction persistence - Added
FactionDataSerializerandFactionRelationshipsSerializerfor faction NBT serialization - Added
BLibGlobalEvents.ENTITY_REMOVEglobal event handle - Renamed mixin
MixinEntity_TickEventtoMixinEntity_Events(now handles both tick and remove events) - Added
BLibReputationManagerinternal implementation with shard-based IO and reverse incoming index - Added
ReputationDataIOandReputationIOfor reputation persistence - Added
ReputationDataSerializerfor reputation NBT serialization - Extracted
FactionMemberIndexfromBLibFactionManagerfor cleaner separation of concerns - Added
ShardManagerto generalize shard-based persistence across faction and reputation systems - Added
BLibCommandSuggestionsutility with suggestion providers for faction IDs and faction type IDs - Added
BLibFactionCommands,BLibReputationCommands, andBLibGOAPCommandscommand implementations - Added
BLibCommandsinit class for registering the/blibcommand tree

