[Fabric] 26.1.2-5.5.0
Curse Maven Snippet
What's new
26.1.2 - 5.5.0
New Features
blocks/family/BlockFamily— declare a base block'sBlockConfigonce and register whichever of its stairs/slab/wall variants you need, each with a derivedBlockConfig(ingredient set to the base block; materialName/texture/tool/flammable/translucent/renderType inherited unless overridden). VanillaStairBlock/SlabBlock/WallBlockare used by default; a per-variant factory override lets a mod substitute its own subclass. Derivation is deferred to registration time, so a family can be declared against a base block'sRegistrySupplierbefore that supplier resolves.fabric/blocks/family/StairsBlockDataGenerator,SlabBlockDataGenerator,WallBlockDataGenerator— recipes, mineable/#wallstags, loot tables, blockstate/item models, and translations for each family variant.BlockFamilyDataGenerators.of(family)wraps whichever variants aBlockFamilyregistered into the matching generators, ready to fold into a mod's own datagen aggregator.fabric/blocks/family/FamilyBlockModelsholds the shared model registration, including aregisterStairsBlock(BlockModelGenerators, StairBlock, TextureMapping)overload that uses the default inner/straight/outer stair model templates.blocks/FallingUpwardBlock,blocks/Risable,entities/FallingUpwardBlockEntity— the inverse of vanilla's falling block/Fallable: blocks that rise toward the sky instead of falling, despawning past the top of the world instead of the bottom, and carrying block-entity NBT with them.util/ChimericLibParticleUtils#spawnParticleAbove— spawns a particle just above a block position, used byFallingUpwardBlock's dust animation.util/ProfileUtils#makeGameProfile— builds aGameProfilewith a texture property from a UUID-encoding int array and base64 texture payload, for custom player-head skins.commands/ChimericCommand,commands/ChimericCommands— a small per-mod command-registration framework: implementChimericCommand#buildto return a command tree, then callChimericCommands.register(...)during your mod's init. Wraps Architectury'sCommandRegistrationEventso consuming mods don't need to touch it directly, and multiple commands that share a root literal (e.g. several features all registering underchimericlib) merge together automatically via Brigadier's own node-merging.commands/blockstate/BlockStateCommand—/chimericlib blockstate get|set|modify <pos>(requires permission level 2).getmirrors vanilla's/data get block;setmirrors/setblock, replacing the block viaBlockStateArgument/BlockInput;modifyis new — it merges only the given properties (e.g.[facing=east]) onto whatever block is already there, via the newcommands/blockstate/BlockPropertiesArgument.commands/PlatformCommandArgumentTypes— the platform hook a custom BrigadierArgumentTypeneeds to sync to the client (vanilla's own reverse class-to-info lookup used for that sync is private and only self-populated for its built-ins). Fabric and NeoForge each get their ownProviderimplementation; register a custom argument type throughPlatformCommandArgumentTypes.registerByClass(...).trims/TrimMaterialConfig,trims/TrimMaterialRegistryHelper, andtrims/ArmorTrimAtlasProvider— a loader-agnostic datagen layer for custom armor trim materials.TrimMaterialRegistryHelper.bootstrapregisters a mod'sTrimMaterialConfiglist into thetrim_materialdynamic registry (usable from both Fabric'sbuildRegistryand NeoForge'sRegistrySetBuilder);ArmorTrimAtlasProvidergenerates the mod'sassets/minecraft/atlases/armor_trims.json/items.jsonoverrides from that same list, so a consuming mod only has to hand-author the palette texture and its own material definitions instead of restating vanilla's full trim-pattern texture list per material.fabric/trims/TrimmedArmorItemModelandfabric/trims/TrimmedArmorModelLoadingPlugin— a Fabric port of NeoForge's ownneoforge:trimmed_armoritem model type, fixing a Fabric-only gap: vanilla's armor item icon only recognizes its own hardcoded trim materials, so a modded material renders correctly on the worn 3D layer (which reads theArmorTrimcomponent directly) but falls back to the untrimmed 2D inventory icon.TrimmedArmorModelLoadingPluginregisters a Fabric Model Loading APImodifyItemModelBeforeBakehook that wraps every item's model withTrimmedArmorItemModel, which no-ops unless the live stack actually carries both anArmorTrimand an armor-slotEquippablecomponent, then resolves the trim overlay sprite from whateverTrimMaterialis on the stack — the same source vanilla's own entity layer reads — instead of a fixed list of cases baked into a model JSON. (The wrap has to be unconditional and the check deferred to render time: Minecraft doesn't bind items' default components until aReloadableServerResourcesreload, which hasn't happened yet during the client's very first resource/model reload, so checking a default component at bake time throwsNullPointerException: Components not bound yet— seedocs/TESTING.md.) Reaching the two private vanilla classes needed to bake a flat icon layer (CuboidItemModelWrapper,ItemModelGenerator.ItemLayerKey) is done via reflection, not an access widener — widening a private constructor on a private nested class compiled fine but still threwIllegalAccessErrorat actual game runtime. This needs no resource pack override, runs automatically for any mod's armor and any mod's trim materials (not just chimeric-lib's), and is wired into chimeric-lib's own Fabric client init, so a consuming mod doesn't need to call anything — registering trim materials throughTrimMaterialRegistryHelperis enough for their icons to render correctly on both loaders.blocks/model/ModelUtils— vanilla-block-shaped datagen helpers generalized out of Minekea:registerBlockWithAxis/registerBlockWithWallSide/registerBlockWithHorizontalFacing/registerBlockWithFacing(rotation dispatch for pillar/wall-mounted/facing block shapes),registerLanternBlock,registerCrop(vanilla age-property crop dispatch),registerGeneratedItem, andmakeInvalidVariant(bedrock-textured placeholder for illegal blockstate combinations).blocks/model/CustomBlockModel— aModelTemplatethat also emits arender_typefield (vanilla's own template has no render-type support);CustomCropModelis the cutout-rendered crop preset built on it.blocks/RecipeUtils#unlockedByHas— the.unlockedBy(RecipeProvider.getHasName(x), generator.has(x))idiom as a one-line wrapper around anyRecipeBuilder.fabric/blocks/TranslationUtils#addBlockAndItem— the block+item translation-pair idiom in one call.fabric/blocks/TagUtils#applyMineableTag— the tool-tag-application idiom (with aTool/default-tool overload), now also used by the family generators above to remove their own copy of it.fabric/data/TextureGenerator,fabric/data/JarAccess— programmatic PNG datagen and safe vanilla-jar asset reading, generalized out of Minekea.TextureGeneratornow takes the consuming mod's ID so its<modId>.datagen.resource-pathenvironment variable andassets/<modId>/texturesbase path are mod-specific rather than hardcoded.BlockConfig.getTextureOrDefault()— returns a named texture, falling back to the config's own default texture (or to an explicitly supplied one) instead of null.- chimeric-lib now ships its own access widener (
chimericlib.accesswidener) — needed forCustomBlockModel's use ofModelTemplate's internals. Previously commented-out scaffolding in bothcommon/build.gradleandfabric/build.gradleis now active. - Added
GameTestPlayersto thetestFixturesGameTest helpers (alongsideGameTestContainers/GameTestEntities/GameTestMenus):makeFacingPlayercreates a mock server player positioned and oriented at a target block, anduseItemcalls an item'suse()and applies the resultingInteractionResult.Success#heldItemTransformedTo()to the held item — both needed for any GameTest simulating an item that overrides the generalItem#usedispatch (buckets doing their own reach-limited raycast, e.g.) rather thanuseOn/useWithoutItem, whichGameTestHelper#useBlockalready covers.makeFacingPlayeralso works around aNullPointerExceptionmock players hit callingServerPlayer#lookAtdirectly (it tries to send a look-rotation packet over a connection mock players don't have). On 26.1.2 it builds its own mockServerPlayer:GameTestHelperhere has onlymakeMockPlayer(GameType)(a plainPlayer) and amakeMockServerPlayerInLevel()hardcoded to creative mode, so the helper constructs aServerPlayerdirectly and overridesgameMode(), the accessor the game reads a player's game type back through.
Changes
blocks/BlockDataGenerator#configureRecipesnow takes aRecipeProviderparameter, and#configureBlockLootTablesnow takes aHolderLookup.Providerparameter. Nothing in this suite implemented the old signatures.
This mod has no additional files