Package net.minecraft.world
Class DifficultyInstance
java.lang.Object
net.minecraft.world.DifficultyInstance
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Difficulty
private static final float
private final float
private static final float
private static final float
-
Constructor Summary
ConstructorsConstructorDescriptionDifficultyInstance
(Difficulty base, long levelTime, long chunkInhabitedTime, float moonPhaseFactor) -
Method Summary
Modifier and TypeMethodDescriptionprivate float
calculateDifficulty
(Difficulty difficulty, long levelTime, long chunkInhabitedTime, float moonPhaseFactor) float
float
boolean
isHard()
boolean
isHarderThan
(float difficulty)
-
Field Details
-
DIFFICULTY_TIME_GLOBAL_OFFSET
private static final float DIFFICULTY_TIME_GLOBAL_OFFSET- See Also:
-
MAX_DIFFICULTY_TIME_GLOBAL
private static final float MAX_DIFFICULTY_TIME_GLOBAL- See Also:
-
MAX_DIFFICULTY_TIME_LOCAL
private static final float MAX_DIFFICULTY_TIME_LOCAL- See Also:
-
base
-
effectiveDifficulty
private final float effectiveDifficulty
-
-
Constructor Details
-
DifficultyInstance
public DifficultyInstance(Difficulty base, long levelTime, long chunkInhabitedTime, float moonPhaseFactor)
-
-
Method Details
-
getDifficulty
-
getEffectiveDifficulty
public float getEffectiveDifficulty() -
isHard
public boolean isHard() -
isHarderThan
public boolean isHarderThan(float difficulty) -
getSpecialMultiplier
public float getSpecialMultiplier() -
calculateDifficulty
private float calculateDifficulty(Difficulty difficulty, long levelTime, long chunkInhabitedTime, float moonPhaseFactor)
-