public static class VariableAmount.Fixed extends Object implements VariableAmount
getAmount(java.util.Random)
will always return
the same fixed value.VariableAmount.BaseAndAddition, VariableAmount.BaseAndVariance, VariableAmount.Fixed, VariableAmount.OptionalAmount
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
double |
getAmount(Random rand)
Gets an instance of the variable amount depending on the given random
object.
|
int |
getContentVersion()
Gets the content version of this
DataSerializable . |
int |
hashCode() |
DataContainer |
toContainer()
Serializes this object into a comprehensible
DataContainer . |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
baseWithOptionalAddition, baseWithOptionalAddition, baseWithOptionalVariance, baseWithOptionalVariance, baseWithRandomAddition, baseWithRandomAddition, baseWithVariance, baseWithVariance, fixed, getFlooredAmount, range
public double getAmount(Random rand)
VariableAmount
getAmount
in interface VariableAmount
rand
- The random objectpublic DataContainer toContainer()
DataSerializable
DataContainer
.toContainer
in interface DataSerializable
toContainer
in interface VariableAmount
public int getContentVersion()
DataSerializable
DataSerializable
. The version
may differ between instances of plugins and implementations such that
the DataView
from DataSerializable.toContainer()
may include different
information, or remove other information as they are no longer deemed
necessary. The version goes hand in hand with DataContentUpdater
as it is required when there exists any DataView
of this
DataSerializable
with an "older" version.getContentVersion
in interface DataSerializable
getContentVersion
in interface VariableAmount