qualityapi-1.21.1-1.4.0
Curse Maven Snippet
What's new
1.4.0
- Name sets: the item data map
quality_api:name_setgives items their own words for each tier (food reads Poor, Common, Fine, Choice, Prime, Gourmet). NewQualities.displayName(id, nameSet),Qualities.displayName(stack, id)andQualities.nameSet(stack); tooltips and/quality setuse the item's set. Qualities.forLevel(int)returns a tier id for a level without needing a stack.- Food effects:
nutrition_multiplier,saturation_multiplier,eat_effect_duration_multiplierandeat_effectswork in tier files anditem_qualitiespatches. Tooltips list them, AppleSkin's preview matches, andQualityFoodEatenEventfires when a player eats a quality food. Shipped tiers stay neutral for food. - New
Qualities.applyFoodEffects(stack, food). - Entity quality: the synced, saved
quality_api:qualityattachment holds a tier id on any entity. NewQualities.getId,get,level,apply,remove,nameSetanddisplayNameoverloads for entities, and an entity type data mapquality_api:name_set(animalfor the#quality_api:animalstag,monsterfor the#quality_api:monsterstag,townsfolkfor the#quality_api:townsfolktag,playerfor players; add modded mobs to the tags). No inheritance; callers decide that. - Entity attributes: entity type data map
quality_api:entity_qualitiesgives entities attribute modifiers per tier. They are recomputed on apply, remove, load and reload, never saved, and max health changes keep the health percentage. Tier files do not apply to entities. - Entity quality survives player death and mob conversions; a converted mob uses its new type's attributes. Config
keepPlayerQualityOnDeath(default true) clears a player's quality on death when off. - Loot function
quality_api:copy_entity_quality(optionallevel_offset, fraction rolled) gives drops the dropping entity's quality, and loot conditionquality_api:entity_min_quality(min_level) gates drops on it. QualityLootEventfires whenevercopy_entity_qualitydecides a drop's tier, with the killing player, the entity, its level and the proposed tier;setQualitychanges the result, so a skill mod can decide drop quality. It fires for entities without quality too./quality entity <targets> set <tier>and/quality entity <targets> remove. Set messages show the tier id next to the display word, e.g. "Set Steve to Legendary (quality_api:masterwork)".Qualities.forLevel(double, random)rolls the fraction without a stack.
1.3.3
- Add silverlib requirement.
This mod has no additional files

