Expose attribute sentiment (#12974)

Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
This commit is contained in:
Strokkur24
2025-08-23 19:15:16 +02:00
committed by GitHub
parent a9e7674933
commit 5622c9dd73
5 changed files with 29 additions and 2 deletions
@@ -163,6 +163,12 @@ public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.
return Registry.ATTRIBUTE.getOrThrow(NamespacedKey.minecraft(key));
}
/**
* {@return the sentiment of this attribute}
*/
@NotNull
Sentiment getSentiment();
/**
* @param name of the attribute.
* @return the attribute with the given name.
@@ -185,4 +191,17 @@ public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.
static Attribute[] values() {
return Lists.newArrayList(Registry.ATTRIBUTE).toArray(new Attribute[0]);
}
/**
* An attribute sentiment describes the intent behind the attribute, meaning
* whether it is supposed to be a positive, neutral, or negative attribute.
*/
enum Sentiment {
// Start generate - AttributeSentiment
// @GeneratedFrom 1.21.8
POSITIVE,
NEUTRAL,
NEGATIVE;
// End generate - AttributeSentiment
}
}