public class CustomEntityUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private static ConcurrentHashMap<String,Integer> |
IDENTIFIER_MAP |
private static AtomicInteger |
RUNTIME_ID |
| Modifier | Constructor and Description |
|---|---|
private |
CustomEntityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getRuntimeId(String identifier)
根据实体标识符获取RuntimeId(NetworkID)
|
static boolean |
hasCustomEntity(String name)
是否已注册此实体标识符的自定义实体
|
static void |
registerCustomEntity(String identifier)
注册自定义实体标识符
|
private static final ConcurrentHashMap<String,Integer> IDENTIFIER_MAP
private static final AtomicInteger RUNTIME_ID
public static boolean hasCustomEntity(String name)
name - 实体标识符public static int getRuntimeId(String identifier)
identifier - 实体标识符public static void registerCustomEntity(String identifier)
identifier - 实体标识符Copyright © 2023. All rights reserved.