Class VanillaClassToKey
java.lang.Object
net.neoforged.neoforge.common.util.VanillaClassToKey
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
VanillaClassToKey
public VanillaClassToKey()
-
-
Method Details
-
convert
Converts a vanilla class name into an identifier compliant with the rules set byResourceLocation
.This conversion is done by translating all uppercase characters into an underscore plus the lowercase version of the original character.
- Parameters:
cls
- The class to convert.- Returns:
- A lower_snake_case representation of that class's original PascalCase name.
- Throws:
IllegalArgumentException
- if the class is not from Minecraft, or if the class does not have asimple name
.
-