public enum Difficulty extends Enum<Difficulty>
| 列挙型定数と説明 |
|---|
EASY
Hostile mobs spawn, enemies deal less damage than on normal difficulty,
the hunger bar does deplete and starving deals up to 5 hearts of
damage.
|
HARD
Hostile mobs spawn, enemies deal greater damage than on normal
difficulty, the hunger bar does deplete and starving can kill players.
|
NORMAL
Hostile mobs spawn, enemies deal normal amounts of damage, the hunger
bar does deplete and starving deals up to 9.5 hearts of damage.
|
PEACEFUL
Players regain health over time, hostile mobs don't spawn, the hunger
bar does not deplete.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static Difficulty |
getByValue(int value)
非推奨です。
Magic value
|
int |
getValue()
非推奨です。
Magic value
|
static Difficulty |
valueOf(String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static Difficulty[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final Difficulty PEACEFUL
public static final Difficulty EASY
public static final Difficulty NORMAL
public static final Difficulty HARD
public static Difficulty[] values()
for(Difficulty c: Difficulty.values()) System.out.println(c);
public static Difficulty valueOf(String name)
name - 返される列挙型定数の名前。IllegalArgumentException - この列挙型に、指定した名前の定数がない場合NullPointerException - 引数がnullの場合@Deprecated public int getValue()
@Deprecated public static Difficulty getByValue(int value)
value - Value to checkDifficulty with the given value, or null if
it doesn't existCopyright © 2016. All rights reserved.