Iskandert's Library

A library of functions used primarily by Iskandert's Team mods

67

Iskandert's Library

Iskandert-Library — Features Overview

This library contains reusable building blocks used across projects in the Iskandert ecosystem. It focuses on developer utilities (structures, stages, markers, shops/teams) and developer utilities (parsing helpers, transfer bridging, debug tools).

Usage and licensing

The project is released under the MIT License. You are free to use it in your projects (including modifying, redistributing, and using it commercially), as long as the license notice is preserved.

What’s included

Structure system (JSON-driven)

Utilities for defining and placing structures using external JSON definitions:

- Undo history: patterns, block keys, replacement rules, and options like force/overwrite. - Undo history: discovery of structure JSON files and runtime registration. - Undo history: places structures in-world with validation, property application, and optional behaviors (e.g. “place as player”, refresh ticks). - Undo history: lightweight per-player placement history with undo support.

Key packages/classes: - `net.unfamily.iskalib.structure.StructureDefinition` - `net.unfamily.iskalib.structure.StructureLoader` - `net.unfamily.iskalib.structure.StructurePlacer` - `net.unfamily.iskalib.structure.StructurePlacementHistory`

Stage system (player / world / team)

A generic “stage” registry designed to gate content and track progression across different scopes:

- Hooks and listeners: persistent per-player stage flags. - Hooks and listeners: global flags stored in world saved data. - Hooks and listeners: stage flags shared by a team, stored in world saved data. - Hooks and listeners: integration points for reacting to stage changes.

Key packages/classes: - `net.unfamily.iskalib.stage.StageRegistry` - `net.unfamily.iskalib.stage.StageHooks` - `net.unfamily.iskalib.stage.StageActionHooks`

Team support (shared balances / membership)

Team management for grouping players and sharing balances:

- Create/delete teams - Manage membership and roles - Track and query per-team currency balances

Key packages/classes: - `net.unfamily.iskalib.team.ShopTeamManager`

Shop currency integration hooks

The library stores balances by currency id but does not hardcode a currency catalog. Consumers can provide metadata and suggestions:

- Currency display metadata for command autocompletion and UIs - Currency display metadata (translation key, symbol) when available

Key packages/classes: - `net.unfamily.iskalib.shop.ShopCurrencyHooks`

World marker utilities (client-side)

Developer-focused marker rendering and helpers, useful for debugging areas, selections, scans, and automation:

- Debug command for blocks - Debug command for positions - Debug command (non-persistent) for cleaning/reset behavior - Debug command entrypoint for creating/clearing markers

Key packages/classes: - `net.unfamily.iskalib.client.marker.MarkRenderer` - `net.unfamily.iskalib.client.marker.VanillaWorldMarkerClientHooks` - `net.unfamily.iskalib.marker.MarkerSession` - `net.unfamily.iskalib.command.MarkerCommand`

Progressive explosion system (server-side)

A modular, lag-friendlier explosion implementation that can run progressively over time:

- Elliptical/horizontal+vertical radius explosions - Tick-based processing (or instant execution when interval is zero) - Optional entity damage and “break unbreakable” mode - Central registry of active explosions with stop/introspection helpers

Key packages/classes: - `net.unfamily.iskalib.explosion.ExplosionSystem`

Item string parsing and conversion utilities

Helpers for converting “item argument” strings into `ItemStack` (and back), matching the shape accepted by `/give`:

- Parse `minecraft:item_id` as well as bracketed component syntax like `minecraft:item[component=value,...]` - Validate user-provided item strings for configs/commands - Format an `ItemStack` into an item-argument string (id + component patch)

Key packages/classes: - `net.unfamily.iskalib.item.ItemConverter`

Transfer bridging (automation compatibility)

Bridges legacy item handlers to NeoForge’s item transfer capability:

- Wraps `IItemHandler` as a transactional `ResourceHandler<ItemResource>` - Uses snapshot journals for rollback when possible (`IItemHandlerModifiable`)

Key packages/classes: - `net.unfamily.iskalib.transfer.LegacyItemHandlerResourceHandler`

Debug helpers and commands

Small, focused utilities intended for development and troubleshooting:

- Hand/item dump helpers - Debug commands for marker/stage workflows

Key packages/classes: - `net.unfamily.iskalib.debug.HandItemDump` - `net.unfamily.iskalib.command.IskaLibDebugCommand` - `net.unfamily.iskalib.command.StageCommand`

ADS