Class NumberEstimate
java.lang.Object
com.petrolpark.core.data.loot.numberprovider.NumberEstimate
- Direct Known Subclasses:
NumberEstimate.Exact,NumberEstimate.Range,NumberEstimate.Unknown
public abstract sealed class NumberEstimate
extends Object
permits NumberEstimate.Exact, NumberEstimate.Range, NumberEstimate.Unknown
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanstatic final NumberEstimatestatic final NumberEstimatestatic final NumberEstimatestatic final NumberEstimate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract NumberEstimateadd(float value) abstract NumberEstimateadd(NumberEstimate estimate) static final NumberEstimateapproximately(float value) divide(NumberEstimate estimate) static final NumberEstimateexactly(float value) abstract NumberEstimateexp()static NumberEstimateget(net.minecraft.world.level.storage.loot.providers.number.NumberProvider numberProvider) static final NumberEstimategetBinomial(net.minecraft.world.level.storage.loot.providers.number.BinomialDistributionGenerator binomial) abstract net.minecraft.network.chat.Componentnet.minecraft.network.chat.Componentstatic floatgetMax(net.minecraft.world.level.storage.loot.LootContext context, net.minecraft.world.level.storage.loot.providers.number.NumberProvider provider) static floatgetMax(net.minecraft.world.level.storage.loot.LootContext context, net.minecraft.world.level.storage.loot.providers.number.NumberProvider provider, int rolls) abstract floatmax()abstract floatmin()abstract NumberEstimatemultiply(float value) abstract NumberEstimatemultiply(NumberEstimate estimate) abstract NumberEstimatenegative()abstract NumberEstimateor(NumberEstimate estimate) abstract NumberEstimatepow(float exponent) static final NumberEstimateranged(float min, float max) static final NumberEstimateranged(float min, float max, boolean approximate) static final NumberEstimateranged(NumberEstimate minEstimate, NumberEstimate maxEstimate) static final NumberEstimateranged(NumberEstimate minEstimate, NumberEstimate maxEstimate, boolean approximate) abstract NumberEstimatesubtract(NumberEstimate estimate) booleanunknown()
-
Field Details
-
ZERO
-
ONE
-
E
-
UNKNOWN
-
approximate
public final boolean approximate
-
-
Constructor Details
-
NumberEstimate
protected NumberEstimate(boolean approximate)
-
-
Method Details
-
getMax
public static float getMax(net.minecraft.world.level.storage.loot.LootContext context, net.minecraft.world.level.storage.loot.providers.number.NumberProvider provider) -
getMax
public static float getMax(net.minecraft.world.level.storage.loot.LootContext context, net.minecraft.world.level.storage.loot.providers.number.NumberProvider provider, int rolls) -
get
public static NumberEstimate get(net.minecraft.world.level.storage.loot.providers.number.NumberProvider numberProvider) -
getBinomial
public static final NumberEstimate getBinomial(net.minecraft.world.level.storage.loot.providers.number.BinomialDistributionGenerator binomial) -
exactly
-
approximately
-
ranged
-
ranged
public static final NumberEstimate ranged(NumberEstimate minEstimate, NumberEstimate maxEstimate, boolean approximate) -
ranged
-
ranged
-
getIntComponent
public net.minecraft.network.chat.Component getIntComponent() -
getComponent
-
min
public abstract float min() -
max
public abstract float max() -
add
-
subtract
-
add
-
multiply
-
divide
-
multiply
-
reciprocal
-
negative
-
pow
-
exp
-
or
-
unknown
public boolean unknown()
-