Expose attribute sentiment (#12974)
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user