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 recordstatic final recordstatic final recordstatic final recordstatic final recordstatic 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>> registry) floatcalculate(int level) com.mojang.serialization.MapCodec<? extends LevelBasedValue> codec()static LevelBasedValue.Constantconstant(float value) static LevelBasedValue.Lookuplookup(List<Float> values, LevelBasedValue fallback) static LevelBasedValue.LinearperLevel(float p_perLevel) static LevelBasedValue.LinearperLevel(float base, float perLevelAfterFirst)
-
Field Details
-
DISPATCH_CODEC
-
CODEC
-
-
Method Details
-
bootstrap
static com.mojang.serialization.MapCodec<? extends LevelBasedValue> bootstrap(Registry<com.mojang.serialization.MapCodec<? extends LevelBasedValue>> registry) -
constant
-
perLevel
-
perLevel
-
lookup
-
calculate
float calculate(int level) -
codec
com.mojang.serialization.MapCodec<? extends LevelBasedValue> codec()
-