枚举类 LogicalSide
- 所有已实现的接口:
Serializable
,Comparable<LogicalSide>
,Constable
A logical side of the Minecraft game.
The client distribution has a copy of the logical client and the logical server, while the dedicated server distribution only holds the logical server.
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
枚举常量概要
枚举常量 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明boolean
isClient()
返回 if the logical side is the client。boolean
isServer()
返回 if this logical side is the server。static LogicalSide
返回带有指定名称的该类的枚举常量。static LogicalSide[]
values()
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
-
枚举常量详细资料
-
CLIENT
The logical client of the Minecraft game, which interfaces with the player's inputs and renders the player's viewpoint.The logical client is only shipped with the client distribution of the game.
- 另请参阅:
-
SERVER
The logical server of the Minecraft game, responsible for connecting to clients and running the simulation logic on the level.The logical server is shipped with both client and dedicated server distributions. The client distribution runs the logical server for singleplayer mode and LAN play.
- 另请参阅:
-
-
构造器详细资料
-
LogicalSide
private LogicalSide()
-
-
方法详细资料
-
values
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同- 返回:
- 包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
-
valueOf
返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类没有带有指定名称的常量NullPointerException
- 如果参数为空值
-
isServer
public boolean isServer()返回 if this logical side is the server。- 返回:
- if this logical side is the server
-
isClient
public boolean isClient()返回 if the logical side is the client。- 返回:
- if the logical side is the client
-