ItemUtils
基本信息
| 属性 | 值 |
|---|---|
| 类名 | myessentials.utils.ItemUtils |
| 用途 | 物品名与物品栈互转 |
| public 方法 | 3 |
| 启用版本 | Minecraft 1.7.10 |
功能
物品的字符串表示与实际物品之间的双向转换。
实现要点
itemFromName- 名称 → ItemitemStackFromName- 名称(含数量)→ ItemStacknameFromItemStack- ItemStack → 名称- 1.7.10 无原生的物品字符串解析,故需自建双向映射
utils包共 11 个类(10 个工具类 + 本类 DelayedThread)。- 全部为静态工具方法,不注册任何游戏内容。
相关条目
- PlayerUtils - 同包,玩家相关
- WorldUtils - 同包,世界相关
- EntityUtils - 同包,实体相关
- ItemUtils - 同包,物品相关
- StringUtils - 同包,字符串相关
- ClassUtils - 同包,类加载相关
- ChatUtils - 同包,聊天相关
- MathUtils - 同包,数学相关
- BlockUtils - 同包,方块相关
- ColorUtils - 同包,颜色相关
- DelayedThread - 同包,线程相关