cn.nukkit.item.customitem.data.ItemCreativeCategory Maven / Gradle / Ivy
package cn.nukkit.item.customitem.data;
import cn.nukkit.api.PowerNukkitXOnly;
import cn.nukkit.api.Since;
/**
* 控制自定义物品在创造栏的大分类,例如建材栏,材料栏
*
可选值:1 CONSTRUCTOR 2 NATURE 3 EQUIPMENT 4 ITEMS 5 NONE
*
* @return 自定义物品的在创造栏的大分类
* @see bedrock wiki
*/
@PowerNukkitXOnly
@Since("1.19.31-r1")
public enum ItemCreativeCategory {
CONSTRUCTOR,
NATURE,
EQUIPMENT,
ITEMS,
NONE;
public static ItemCreativeCategory fromID(int num) {
return switch (num) {
case 1 -> CONSTRUCTOR;
case 2 -> NATURE;
case 3 -> EQUIPMENT;
case 4 -> ITEMS;
default -> NONE;
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy