Lib39

Useful mixins, events, and utilities originating in Yttr.

26,99k

Lib39

Lib39 is a loose collection of utilities, mixins, events, etc originating in our content mod Yttr — people constantly talk about "stealing" mixins from Yttr since it has so many random useful things in it, so we decided it'd be a good thing to split it up into a library.

39 is the atomic number of Yttrium. You can pronounce it as "lib thirty nine", "lib three nine", "lib miku", whatever you want.

Getting Started

Lib39 is distributed on the Sleeping Town Maven. Merge the following with your build.gradle: ```gradle repositories { maven { url 'https://repo.sleeping.town' content { includeGroup 'com.unascribed' } } }

dependencies { modApi include("com.unascribed:lib39-core:2.0.7+1.20.1") // put any other modules you want here // loom won't JiJ transitive deps, so you need to include all of them } ``` Lib39 is also distributed on strongly, but you are strongly encouraged to JiJ the modules. They're small.

Exact module sizes when JIJ'd if you care

<!-- zipinfo -l lib39-*-all.jar |grep 'META-INF/jars/lib39-' |awk '{ print ($6 / 1024) "/" $10 }' |cut -d/ -f1,4 |tr / - |cut -d- -f1,3 |sort -n |sed -E 's/^([0-9]+.[0-9][0-9])[0-9]*-(.)(.*)$/| U2L3E | 1KiB |/' |sed 's/Aqi/AQI/' |wl-copy -->

| Module | Size | | ----------- | ---------- | | Lockpick | 4.38KiB | | AQI | 5.20KiB | | Util | 5.58KiB | | Ripple | 6.06KiB | | Sandman | 6.56KiB | | Deferral | 6.57KiB | | Crowbar | 6.83KiB | | Dessicant | 9.23KiB | | Wrangle | 9.62KiB | | Recoil | 9.79KiB | | Phantom | 12.10KiB | | Mesh | 13.99KiB | | Weld | 16.69KiB | | Waypoint | 22.33KiB | | Core | 26.12KiB | | Tunnel | 27.85KiB | | Machination | 33.06KiB | | Keygen | 34.88KiB | | 257KiB | 257KiB |

Replace `core` with whatever the module (or module*s*) you want is/are.

Lib39 1.4 and earlier only support 1.19-1.19.2. Lib39 1.5 adds 1.18.2 and 1.19.3 support, and a series of "experimental" builds provide 1.20.1 support. Lib39 2.0 is API-compatible with 1.x and is presently only available for 1.20.1, and is developed in tandem with Yttr.

Modules

- Wrangle Random utility classes such as AutoRegistry, AutoMixin, and shared classes with the other modules. Also contains random small tidbits, such as crafting sounds. - %%MD1%% Mixins to allow removing artificial limits, such as model rotation angles, crafting recipe sizes, and more. Various other related utilities as well, such as the ability to inherit elements from parent models. - %%MD2%% Allows customizing splash texts. - %%MD3%% Adds a convenient networking system based on Concrete Network from 1.12. - %%MD4%% Adds the ability to "phase" blocks out of the world temporarily. The blocks are never removed from the world, simply hidden. - %%MD5%% Adds an additional baked world layer with additive blending for rendering various kinds of glowy effects. - %%MD6%% Adds a "big blocks" system for creating "prefab" blocks like vanilla beds, but way nicer and with theoretically no size limit. - %%MD7%% Adds the ability to make items "always tick", leveraging random ticks. - %%MD8%% Adds events for low-level world generation phases, such as constructing surface rules, and raw access to chunks during the surface and population phases for invoking custom generators. - %%MD9%% Adds the ability to load music in XM, S3M, and MOD format via IBXM2. - %%MD10%% Implements "logical defaults" for loot tables, and automatically manages recipe unlocks based on a "discovered_by" key in recipe JSONs. Blockstates and block/item models soon. - %%MD11%% Adds new recipe types, such as a "soaking" recipe for throwing items in a fluid and a "smashing" recipe for crushing a block between two others with a piston. Comes with EMI support. - %%MD12%% Events to let you mess with the camera and FOV, and a way to suppress vanilla behavior and catch raw attack/use. Everything you need to make a satisfying gun mod, basically. - Wrangle Random utility classes. No docs yet. - Wrangle Fixes vanilla particle rendering behind translucent blocks on Fancy/Fast graphics by rendering in two passes, like pre-1.14. - Wrangle Adds an efficient graph-based block network system, for pipes and the like. No docs yet. - Wrangle Adds a "control hints" system. No docs yet.

Former modules

- Fractal Adds a "subgroup" system for splitting up creative tabs even further. Now maintained by DaFuqs as a standalone library.

Future modules

Yttr has a lot of weird mixins and utilities in it, and I'd be here a while were I to factor them all out at once. Here's some things I want to separate out but haven't gotten around to yet:

- Conflagration Adds a "substitutes" system, for making items functionally the same as others in recipe ingredients and tags. - Conflagration Adds a CSS-based configuration system and a framework for making GUIs that interact with it.

ADS