Interface LevelBasedValue
- All Known Implementing Classes:
LevelBasedValue.Clamped
,LevelBasedValue.Constant
,LevelBasedValue.Fraction
,LevelBasedValue.LevelsSquared
,LevelBasedValue.Linear
,LevelBasedValue.Lookup
public interface LevelBasedValue
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
static final record
static final record
static final record
static final record
static final record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<LevelBasedValue> static final com.mojang.serialization.Codec
<LevelBasedValue> -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.MapCodec
<? extends LevelBasedValue> bootstrap
(Registry<com.mojang.serialization.MapCodec<? extends LevelBasedValue>> p_345955_) float
calculate
(int pLevel) com.mojang.serialization.MapCodec
<? extends LevelBasedValue> codec()
static LevelBasedValue.Constant
constant
(float pValue) static LevelBasedValue.Lookup
lookup
(List<Float> pValues, LevelBasedValue pFallback) static LevelBasedValue.Linear
perLevel
(float pPerLevel) static LevelBasedValue.Linear
perLevel
(float pBase, float pPerLevelAfterFirst)
-
Field Details
-
DISPATCH_CODEC
-
CODEC
-
-
Method Details
-
bootstrap
static com.mojang.serialization.MapCodec<? extends LevelBasedValue> bootstrap(Registry<com.mojang.serialization.MapCodec<? extends LevelBasedValue>> p_345955_) -
constant
-
perLevel
-
perLevel
-
lookup
-
calculate
float calculate(int pLevel) -
codec
com.mojang.serialization.MapCodec<? extends LevelBasedValue> codec()
-