
Nexus API
Bulk of common platform-agnostic utilities aimed at reducing boilerplate/compatibility issues, thereby streamlining mod development on MultiLoader and other platforms.
516
0
Nexus API Changelog (Forge)
v1.1.3 (1.20.1)
Bug Fixes
- Made
ForgeRegistrar#getDynamicRegistriesimpl consider dimension registries viaDataPackRegistriesHooks#getDataPackRegistriesWithDimensions. - Fixed misc. logical errors in recipe templates provided in
RecipeUtil. - (Not really a bug fix) Bumped log level for
StandardBlockStateProviderelements down todebugfrominfofor consistency with other providers. - Implemented
getNameforStandardSoundDefinitionProvider. - Patched
DefaultableMultiLayerPlantBlockto allow for custom levelIntegerPropertyspec without breaking due to superconstructor calls toBlock#createBaseDefinitiomrunning before the pertaining property gets initialized via a pre-constructor initializer hack. -
- Deleted leftover test code in
NexusRegistryDataManager.
- Deleted leftover test code in
- Made
Nexus API Changelog (Fabric)
v1.1.3 (1.20.1)
Bug Fixes
- Made
FabricRegistrar#getDynamicRegistriesimpl consider dimension registries via stream concatenation ofDynamicRegistries#getDynamicRegistriesandRegistryDataLoader#DIMENSION_REGISTRIES. - Fixed misc. logical errors in recipe templates provided in
RecipeUtil. - (Not really a bug fix) Bumped log level for
StandardBlockStateProviderelements down todebugfrominfofor consistency with other providers. - Implemented
getNameforStandardSoundDefinitionProvider. - Patched
DefaultableMultiLayerPlantBlockto allow for custom levelIntegerPropertyspec without breaking due to superconstructor calls toBlock#createBaseDefinitiomrunning before the pertaining property gets initialized via a pre-constructor initializer hack. - Deleted leftover test code in
NexusRegistryDataManager.
- Made
Nexus API Changelog (Forge)
v1.1.2 (1.20.1)
Bug Fixes
- Made
StandardSoundDefinitionProvideractually generatesounds.json. Added debug logging for entry generation.
- Made
Nexus API Changelog (Fabric)
v1.1.2 (1.20.1)
Bug Fixes
- Made
StandardSoundDefinitionProvideractually generatesounds.json. Added debug logging for entry generation.
- Made
Nexus API Changelog (Forge)
v1.1.1 (1.20.1)
New Features
- Added composition support for Property Wrapper Builders via
PropertyWrapperBuilder#compose, which allows for the chaining of builder methods that take the parent object as input for further context where needed (see the javadoc for more info). - Added
"_lump"toRegistryUtil#MATERIAL_SUFFIXES.
- Added composition support for Property Wrapper Builders via
Nexus API Changelog (Fabric)
v1.1.1 (1.20.1)
New Features
- Added composition support for Property Wrapper Builders via
PropertyWrapperBuilder#compose, which allows for the chaining of builder methods that take the parent object as input for further context where needed (see the javadoc for more info). - Added
"_lump"toRegistryUtil#MATERIAL_SUFFIXES.
- Added composition support for Property Wrapper Builders via
Nexus API Changelog (Forge)
v1.1.0 (1.20.1)
Bug Fixes
- Made BlockPropertyWrapperTemplates#registerBlockWithItem actually register an associated BlockItem.
- Fixed all ModelUtil methods that use multiple textures and models (such as ModelUtil#doublePlant) attempting to look for invalid textures/models.
- Minor cleanup in event blueprint classes.
- Fixed odd crash that appeared as of v1.0.9, where
MinecraftMixinwould fail to locate the obfuscation mapping for shadowed fieldtimer. For whatever reason, the jar passed intopublishModsand uploaded didn't properly remap mixins internally despite the refmap being present and properly populated. - (Not really a bug fix) bumped log level for
PropertyWrapper#getMappedPropertyWrappers(+ the container field variant) down totracefromdebug. - Fixed defaultable vegetation not working properly in general.
- Added DefaultableDirtPathBlock and ConfigurableSoil abstraction classes.
- (Also not really a bug) made
StandardTagProviderforce missing tags into existence by default instead of simply removing them if both provider validation and entry-specific validation are disabled, so as to conform to deterministic behaviour.
New Features
- Added
PostInitannotation, which allows for classes to be statically-initialized after mod-loading is complete. In Forge's case, this happens whenFMLLoadCompleteEventfires. - Added
StatTypePropertyWrapperandSoundEventPropertyWrapper+ associated builder and utility classes. - Added new event blueprints:
RegistryEventBlueprintandLevelDataEventBlueprint.RegistryEventBlueprintcan be used to listen toMissingRegistryEntriesEventBlueprint(MISSING_REGISTRY_ENTRIES), whereasLevelDataEventBlueprintcontains several hooks pertaining to different stages of level data loading and saving. - Added new DefaultableFlowerPotBlock, DefaultableMultiLayerPlantBlock, and DefaultableMultilayerFlowerBlock instance classes + associated helpers and templates in ModelUtil and BlockPropertyWrapperTemplates.
- Tweaked base method signature for
ModData#discoverAnnotatedClassesand added associated overloads inPlatformManager. The base method now accepts a Predicate to allow for class filtering before initialization. This filtering is applied after target classes are sorted, but before theirbeforeInitClassConsumerruns. - Added optional
initSideparameter toRegistrarEntry, which allows for specifying the physical side on which annotated classes should be initialized (usesModSideto allow for default spec,ModSide#COMMON). - Added missing javadocs for all def
PropertyWrapper. - Added new
RegistryHookManager(singleton instance can be accessed throughNexusServices#REGISTRAR|Registrar#getRegistryHookManager). This can be used to perform intrusive operations relatively safely, and adds some additional helper utilities, including methods to add/remove appellations (more on that below). - Added
NexusRegistryDataManager, which handles all registry op queries made through Nexus API and caches relevant data accordingly. - Added ability to specify appellations (aliases) for registry entries. Appellations can be used as fallbacks for when registry entries aren't present for one reason or another. Circular appellations are supported (i.e. appellating a registry entry, then appellating that appellation with said entry's ID).
- Added
onEventoverload inConcreteEventBlueprintthat allows for the consumption of the target event class for convenience. PassesEventResult#successin by default. - Changed stored data in
StoneBlockGroupandWoodenBlockGroupto use maps for lookups by registry entry ID in order to prevent accidental early resolution leading to exceptions being thrown.
Known Issues
- Cyclical appellations can cause world loading to softlock, or functionally not work. This is an easy patch into Forge's alias system, just wasn't done for this update cuz time constraints. In the meantime, if you encounter such an edge case, modify your level.dat using an nbt editor to remove either or both cyclical alias reference(s), and do the same with RegistryDataLock.dat.
- ID Blocking (saving/loading blocked IDs, specifically) isn't fully implemented, so it just does nothing (for now).
Nexus API Changelog (Fabric)
v1.1.0 (1.20.1)
Bug Fixes
- Made BlockPropertyWrapperTemplates#registerBlockWithItem actually register an associated BlockItem.
- Fixed all ModelUtil methods that use multiple textures and models (such as ModelUtil#doublePlant) attempting to look for invalid textures/models.
- Minor cleanup in event blueprint classes.
- (Not really a bug fix) bumped log level for
PropertyWrapper#getMappedPropertyWrappers(+ the container field variant) down totracefromdebug. - Fixed defaultable vegetation not working properly in general.
- (Also not really a bug) made
StandardTagProviderforce missing tags into existence by default instead of simply removing them if both provider validation and entry-specific validation are disabled, so as to conform to deterministic behaviour.
New Features
- Added
PostInitannotation, which allows for classes to be statically-initialized after mod-loading is complete. In Fabric's case, this happens afterHooks#startServerfires on the dedicated server, and afterHooks#startClientfires on the client. - Added
StatTypePropertyWrapperandSoundEventPropertyWrapper+ associated builder and utility classes. - Added new event blueprints:
RegistryEventBlueprintandLevelDataEventBlueprint.RegistryEventBlueprintcan be used to listen toMissingRegistryEntriesEventBlueprint(MISSING_REGISTRY_ENTRIES), whereasLevelDataEventBlueprintcontains several hooks pertaining to different stages of level data loading and saving. - Added new DefaultableFlowerPotBlock, DefaultableMultiLayerPlantBlock, and DefaultableMultilayerFlowerBlock instance classes + associated helpers and templates in ModelUtil and BlockPropertyWrapperTemplates.
- Tweaked base method signature for
ModData#discoverAnnotatedClassesand added associated overloads inPlatformManager. The base method now accepts a Predicate to allow for class filtering before initialization. This filtering is applied after target classes are sorted, but before theirbeforeInitClassConsumerruns. - Added optional
initSideparameter toRegistrarEntry, which allows for specifying the physical side on which annotated classes should be initialized (usesModSideto allow for default spec,ModSide#COMMON). - Added missing javadocs for all def
PropertyWrapper. - Added new
RegistryHookManager(singleton instance can be accessed throughNexusServices#REGISTRAR|Registrar#getRegistryHookManager). This can be used to perform intrusive operations relatively safely, and adds some additional helper utilities, including methods to add/remove appellations (more on that below). - Added
NexusRegistryDataManager, which handles all registry op queries made through Nexus API and caches relevant data accordingly. - Added ability to specify appellations (aliases) for registry entries. Appellations can be used as fallbacks for when registry entries aren't present for one reason or another. Circular appellations are supported (i.e. appellating a registry entry, then appellating that appellation with said entry's ID).
- Added
onEventoverload inConcreteEventBlueprintthat allows for the consumption of the target event class for convenience. PassesEventResult#successin by default. - Changed stored data in
StoneBlockGroupandWoodenBlockGroupto use maps for lookups by registry entry ID in order to prevent accidental early resolution leading to exceptions being thrown. - Added DefaultableDirtPathBlock and ConfigurableSoil abstraction classes.
Known issues
- ID Blocking (saving/loading blocked IDs, specifically) isn't fully implemented, so it just does nothing (for now).
Nexus API Changelog (Forge)
v1.0.9 (1.20.1)
Bug Fixes
- Fixed RecipeUtil materialPieceFrom not factoring all potential material suffixes in.
- Fixed dedicated server crash due to IntegratedServer type check in TickEvent.
New Features
- Added new BlockPropertyWrapper templates to BlockPropertyWrapperTemplates: 'BRICKS' (+ tool variants), 'PILLAR' (+ tool variants).
- Added utility methods to RecipeUtil for brick and pillar recipes (+ overloads).
- Added several new utility shortcut methods to RegistryUtil for stone block families.
Nexus API Changelog (Fabric)
v1.0.9 (1.20.1)
Bug Fixes
- Fixed RecipeUtil materialPieceFrom not factoring all potential material suffixes in.
- Fixed dedicated server crash due to IntegratedServer type check in TickEvent.
New Features
- Added new BlockPropertyWrapper templates to BlockPropertyWrapperTemplates: 'BRICKS' (+ tool variants), 'CHISELED_STONE' (+ tool variants), 'CHISELED_STONE_COBBLED' (+ tool variants), 'PILLAR' (+ tool variants).
- Added utility methods to RecipeUtil for brick, chiseled block, chiseled block cobbled, and pillar recipes (+ overloads).
- Added several new utility shortcut methods to RegistryUtil for stone block families.
Nexus API Changelog (Forge)
v1.0.8 (1.20.1)
Bug Fixes
- Fixed StandardTagProvider including missing tags by default when validateAllEntries is set to false for its corresponding ProviderType.
- Added new methods for resolving texture locations to RegistryUtil and replaced all usages (getTextureLocationOrDefaultWithSuffix -> getTextureLocationWithSuffixOrDefault) appropriately for proper texture resolution.
Nexus API Changelog (Fabric)
v1.0.8 (1.20.1)
Bug Fixes
- Fixed StandardTagProvider including missing tags by default when validateAllEntries is set to false for its corresponding ProviderType.
- Added new methods for resolving texture locations to RegistryUtil and replaced all usages (getTextureLocationOrDefaultWithSuffix -> getTextureLocationWithSuffixOrDefault) appropriately for proper texture resolution.
Nexus API Changelog (Forge)
v1.0.7 (1.20.1)
New Features
- Added new BlockPropertyWrapper template for leaves in BlockPropertyWrapperTemplates.
Nexus API Changelog (Fabric)
v1.0.7 (1.20.1)
New Features
- Added new BlockPropertyWrapper template for leaves in BlockPropertyWrapperTemplates.
Nexus API Changelog (Forge)
v1.0.6 (1.20.1)
Bug Fixes
- Fixed mining level check in DiggerItemMixin: Made it consistent with Vanilla logic by doing a >= check based on the specified minimum mining level in a BlockPropertyWrapper, instead of a hard-capped > check.
Nexus API Changelog (Fabric)
v1.0.6 (1.20.1)
Nexus API Changelog (Fabric)
v1.0.5 (1.20.1)
Bug Fixes
- (Not really a bug) Corrected naming of parameters in ItemPropertyWrapperTemplates.
- (Also not really a bug) Corrected javadocs in FabricModData with proper time complexity analysis (was an inaccurate mess and mainly just insanely-off guesstimates cuz I got lazy after finally optimizing tf out of it).
- Fixed FabricModData#filterDuplicates logic pruning paths that shouldn't be pruned (e.g., when a path wasn't a subdirectory of another path, so "block_texture.png.mcmeta" would wrongly filter out "block_texture.png" due to the basic substring check that was done).
- Updated PropertyWrapperContainer#MAPPED_PROPERTY_WRAPPERS to additionally compare wrapper/supplier values in its equality check.
- Updated PropertyWrapper#getMappedPropertyWrappers() HashStrategy implementation to match PropertyWrapperContainer#MAPPED_PROPERTY_WRAPPERS.
- Updated PropertyWrappersContainer#getWrapperFor(Supplier) to query a copy of the original map if the base lookup returns an empty Optional (see javadoc for further details).
New Features
- Added new template methods (+ overloads) for registering items and chaining them with custom property wrappers in ItemPropertyWrapperTemplates.
Nexus API Changelog (Forge)
v1.0.5 (1.20.1)
Bug Fixes
- (Not really a bug) Corrected naming of parameters in ItemPropertyWrapperTemplates.
- Updated PropertyWrapperContainer#MAPPED_PROPERTY_WRAPPERS to additionally compare wrapper/supplier values in its equality check.
- Updated PropertyWrapper#getMappedPropertyWrappers() HashStrategy implementation to match PropertyWrapperContainer#MAPPED_PROPERTY_WRAPPERS.
- Updated PropertyWrappersContainer#getWrapperFor(Supplier) to query a copy of the original map if the base lookup returns an empty Optional (see javadoc for further details).
New Features
- Added new template methods (+ overloads) for registering items and chaining them with custom property wrappers in ItemPropertyWrapperTemplates.
Nexus API Changelog (Forge)
v1.0.4 (1.20.1)
Bug Fixes
- Fixed incorrect configuration of #dropsLike for signs and hanging signs in RegistryUtil#registerStandardWoodFamily.
- Fixed atlas configuration for signs and hanging signs.
- Fixed BlockPropertyTemplates#WOODEN_PLANKS permitting pickaxes as a mining tool via wrongfully-tagging inheritors with "minecraft:blocks/mineable/pickaxe".
- Fixed wall sign and wall hanging sign particle textures not showing up due to missing blockstate configuration in BlockPropertyWrapperTemplates#WOODEN_WALL_SIGN and BlockPropertyWrapperTemplates#WOODEN_WALL_HANGING_SIGN.
- Made ModelUtil#sign(Supplier) look plank textures up rather than log textures by default for consistency.
Nexus API Changelog (Fabric)
v1.0.4 (1.20.1)
Bug Fixes
- Fixed incorrect configuration of #dropsLike for signs and hanging signs in RegistryUtil#registerStandardWoodFamily.
- Fixed atlas configuration for signs and hanging signs.
- Fixed BlockPropertyTemplates#WOODEN_PLANKS permitting pickaxes as a mining tool via wrongfully-tagging inheritors with "minecraft:blocks/mineable/pickaxe".
- Fixed wall sign and wall hanging sign particle textures not showing up due to missing blockstate configuration in BlockPropertyWrapperTemplates#WOODEN_WALL_SIGN and BlockPropertyWrapperTemplates#WOODEN_WALL_HANGING_SIGN.
- Made ModelUtil#sign(Supplier) look plank textures up rather than log textures by default for consistency.
1
Совместимость
GitHub
Исходный кодRaveTr/NexusАвторы
Сведения
Лицензия:
Опубликован:8 месяцев назад
Обновлён:1 месяц назад
ID проекта: