类 VanillaClassToKey
java.lang.Object
net.neoforged.neoforge.common.util.VanillaClassToKey
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ResourceLocation
Converts a vanilla class name into an identifier compliant with the rules set byResourceLocation
.
-
构造器详细资料
-
VanillaClassToKey
public VanillaClassToKey()
-
-
方法详细资料
-
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.
- 参数:
cls
- The class to convert.- 返回:
- A lower_snake_case representation of that class's original PascalCase name.
- 抛出:
IllegalArgumentException
- if the class is not from Minecraft, or if the class does not have asimple name
.
-