AspectsLib

Library mod that adds data-driven Aspects from Thaumcraft, allowing to attach Aspects to entities and create unique interactions between them.

File Details

AspectsLib (1.1.5)

  • R
  • Oct 12, 2025
  • 306.25 KB
  • 8
  • 1.20.1
  • Fabric

File Name

aspectslib-1.1.5.jar

Supported Versions

  • 1.20.1

Curse Maven Snippet

Fabric

modImplementation "curse.maven:aspectslib-1320630:7097388"
Curse Maven does not yet support mods that have disabled 3rd party sharing

Learn more about Curse Maven

  • Added Aether Density

  • Created a registry for all Aspect Shard items organized by hierarchy and implemented a custom AspectShardItem class that automatically adds aspect data to the item stack

  • Created an ItemGroup that contains all aspect shards in order and properly sets the aspect data for each shard using the AspectsLib system.

  • Implemented Corruption logic.

  • Added the calculation of base biome density using BiomeAetherDensityManager.DENSITY_MAP and combined base density and dynamic modifications to calculate the total amounts.

I've also added a proper check to make sure corruption only starts when Vitium is truly dominant. The condition now is: totalVitium > totalOtherAspects where:

  • totalVitium = base vitium + dynamic vitium modifications

  • totalOtherAspects = sum of all other aspects (base + modifications)

  • Updated Sculk spread when Vitium is the dominant aspect

  • Fixed critical entrypoint stage main crash upon initializing game

  • Added aspectslib:aether_density report command with 3 sub-commands report, list, corrupt

  • Added proper rendering to the Aura Node entity (Pull Request #3 by Favouriteless

  • Gave Aura Nodes conditional transparency based on a condition similar to how aspects are shown on tooltips. I modifed the rendering code to make it transparent by default and only show fully when a condition is met. The Aura Node visibility should be completely configurable by other mods using the API now, with no default condition.

Usage Example for Other Mods

Other mods using your library would need to add their own visibility conditions:

// In another mod's client initialization
AspectsAPI.addAuraNodeVisibilityCondition((player, hasAspects) -> {
    // Example: Show nodes when player has a specific item
    return player.getMainHandStack().isOf(Items.NETHER_STAR);
});

// Or example: Show nodes when player is in creative mode
AspectsAPI.addAuraNodeVisibilityCondition((player, hasAspects) -> {
    return player.isCreative();
});

// Or example: Show nodes when player has a specific effect
AspectsAPI.addAuraNodeVisibilityCondition((player, hasAspects) -> {
    return player.hasStatusEffect(StatusEffects.NIGHT_VISION);
});

Default Behavior Now

  • By default: Aura nodes are semi-transparent (20% opacity) because no conditions are met
  • When conditions are added via API: Nodes become fully visible (100% opacity) when any condition returns true
  • Completely pluggable: No built-in logic - entirely driven by API consumers

This makes the library modular and allows each mod that uses it to define its own conditions for when Aura Nodes should be visible.

Made changes to hide aspects in tooltips by default while allowing developers to customize when they're shown.

Key Changes:

  1. Hidden by default: Aspects won't show in tooltips unless explicitly enabled
  2. Flexible conditions: Developers can add multiple visibility conditions
  3. Player context: Conditions have access to player state and inventory
  4. Easy to use: Simple API for adding custom conditions
  5. Non-intrusive: Doesn't require changes to existing item/entity code

Usage Examples:

  1. Always show aspects:
AspectsTooltipConfig.setAlwaysShow(true);
  1. Show only when holding a specific item:
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
    if (player == null) return false;
    return player.getMainHandStack().isOf(Items.GOLD_INGOT);
});
  1. Show only in creative mode:
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
    return player != null && player.isCreative();
});
  1. Show only when sneaking:
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
    return player != null && player.isSneaking();
});
  1. Complex condition (show when holding compass and in overworld):
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
    if (player == null) return false;
    return player.getMainHandStack().isOf(Items.COMPASS) && 
           player.getWorld().getRegistryKey() == World.OVERWORLD;
});