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>> pRegistry) floatcalculate(int pLevel) com.mojang.serialization.MapCodec<? extends LevelBasedValue> codec()static LevelBasedValue.Constantconstant(float pValue) static LevelBasedValue.Lookuplookup(List<Float> pValues, LevelBasedValue pFallback) static LevelBasedValue.LinearperLevel(float pPerLevel) static LevelBasedValue.LinearperLevel(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>> pRegistry) -
constant
-
perLevel
-
perLevel
-
lookup
-
calculate
float calculate(int pLevel) -
codec
com.mojang.serialization.MapCodec<? extends LevelBasedValue> codec()
-