API reference / @jsprismarine/prismarine / entity/regionalDifficulty / RegionalDifficultyView
Class: RegionalDifficultyView
Defined in: packages/prismarine/src/entity/regionalDifficulty.ts:78
The difficulty view Bedrock's equipment tables read, answering for one place while a roll for it runs and as DEFAULT_DIFFICULTY otherwise.
The loot package asks the view on every evaluation, so a roll sees the region set around it.
Implements
Constructors
Constructor
new RegionalDifficultyView():
RegionalDifficultyView
Returns
RegionalDifficultyView
Methods
during()
during<
Result>(inputs,roll):Result
Defined in: packages/prismarine/src/entity/regionalDifficulty.ts:97
Runs roll with the view answering for one place.
Type Parameters
Result
Result
Parameters
inputs
The place's difficulty, world time, inhabited time and moon.
roll
() => Result
The roll to run, which reads the view.
Returns
Result
What roll returns.
level()
level():
"normal"|"peaceful"|"easy"|"hard"
Defined in: packages/prismarine/src/entity/regionalDifficulty.ts:82
The world difficulty of the place a roll runs for, or normal outside a roll.
Returns
"normal" | "peaceful" | "easy" | "hard"
Implementation of
scale()
scale():
number
Defined in: packages/prismarine/src/entity/regionalDifficulty.ts:87
The place's clamped regional difficulty, Java's special multiplier, or 1 outside a roll.
Returns
number