Tags
Creators
Details
All versions
1.0.5
Release
AspectsLib (1.0.5)last year 94
Compatibility
Minecraft: Java Edition
1.20.1
Platform
Fabric
Supported environments
Client and server
Required content
Any compatible version
Changes
Made changes to hide aspects in tooltips by default while allowing developers to customize when they're shown.
Key Changes:
- Hidden by default: Aspects won't show in tooltips unless explicitly enabled
- Flexible conditions: Developers can add multiple visibility conditions
- Player context: Conditions have access to player state and inventory
- Easy to use: Simple API for adding custom conditions
- Non-intrusive: Doesn't require changes to existing item/entity code
Usage Examples:
- Always show aspects:
AspectsTooltipConfig.setAlwaysShow(true);
- Show only when holding a specific item:
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
if (player == null) return false;
return player.getMainHandStack().isOf(Items.GOLD_INGOT);
});
- Show only in creative mode:
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
return player != null && player.isCreative();
});
- Show only when sneaking:
AspectsTooltipConfig.addVisibilityCondition((stack, player) -> {
return player != null && player.isSneaking();
});
- 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;
});
Optional dependencies
Any compatible version
Supplementary resources
| File | Type | Size | |
|---|---|---|---|
| AspectsLib-1.0.5-sources.jar | Unknown | 120.6 KiB |
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:zWaybCf1:U5kQNXkO"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:zWaybCf1:U5kQNXkO"
}

