Package net.glowstone.util.loot
Class ProbableValue<T>
java.lang.Object
net.glowstone.util.loot.ProbableValue<T>
Probability distribution with a list of possible values.
-
Constructor Summary
ConstructorDescriptionProbableValue
(org.json.simple.JSONObject json, @NonNls String type) Reads a distribution from a JSON object. -
Method Summary
-
Constructor Details
-
ProbableValue
Reads a distribution from a JSON object.- Parameters:
json
- a JSON objecttype
- the JSON property ofjson
to read, which is either an instance ofT
or an array of objects of the form{'chance': 0.123, 'value': T}
-
-
Method Details