Fixed a NPE where an attribute name would start with minecraft:

This commit is contained in:
Focusvity
2023-10-02 12:15:59 +11:00
parent d806ad56f2
commit 7254ddcce3
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ public enum Attributes
{
for (Attributes attr : values())
{
if (attr.name().equalsIgnoreCase(name) || attr.mcName.equalsIgnoreCase(name))
if (attr.name().equalsIgnoreCase(name) || attr.mcName.equalsIgnoreCase(name.replace("minecraft:", "")))
{
return attr;
}