public class LootRandomValues extends Object
| Constructor and Description |
|---|
LootRandomValues(int min,
int max)
Creates an instance for a given range.
|
LootRandomValues(org.json.simple.JSONObject object)
Reads an instance from its JSON form.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
int |
generate(Random random,
org.bukkit.entity.LivingEntity entity)
Selects a random value between min and max, inclusively.
|
Optional<Integer> |
getMax() |
Optional<Integer> |
getMin() |
Map<Integer,Double> |
getProbabilities() |
Optional<String> |
getReflectiveCount() |
int |
hashCode() |
String |
toString() |
public LootRandomValues(int min,
int max)
min - the minimum numbermax - the maximum numberpublic LootRandomValues(org.json.simple.JSONObject object)
object - a LootRandomValues instance in JSON formpublic int generate(Random random, org.bukkit.entity.LivingEntity entity)
random - the random object to generate the number fromentity - the entityprotected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.