Package net.glowstone.util.loot
Class LootRandomValues
java.lang.Object
net.glowstone.util.loot.LootRandomValues
-
Constructor Summary
ConstructorDescriptionLootRandomValues
(int min, int max) Creates an instance for a given range.LootRandomValues
(org.json.simple.JSONObject object) Reads an instance from its JSON form. -
Method Summary
-
Constructor Details
-
LootRandomValues
public LootRandomValues(int min, int max) Creates an instance for a given range.- Parameters:
min
- the minimum numbermax
- the maximum number
-
LootRandomValues
public LootRandomValues(org.json.simple.JSONObject object) Reads an instance from its JSON form.- Parameters:
object
- a LootRandomValues instance in JSON form
-
-
Method Details
-
generate
Selects a random value between min and max, inclusively.- Parameters:
random
- the random object to generate the number fromentity
- the entity- Returns:
- the random value
-
getMin
-
getMax
-
getReflectiveCount
-
getProbabilities
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-