public class StatHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected it.unimi.dsi.fastutil.objects.Object2IntMap<Stat<?>> |
statMap |
Constructor and Description |
---|
StatHandler() |
Modifier and Type | Method and Description |
---|---|
int |
getStat(Stat<?> stat) |
<T> int |
getStat(StatType<T> type,
T stat) |
void |
increaseStat(PlayerEntity player,
Stat<?> stat,
int value) |
void |
setStat(PlayerEntity player,
Stat<?> stat,
int value) |
protected final it.unimi.dsi.fastutil.objects.Object2IntMap<Stat<?>> statMap
public void increaseStat(PlayerEntity player, Stat<?> stat, int value)
public void setStat(PlayerEntity player, Stat<?> stat, int value)
@Environment(value=CLIENT) public <T> int getStat(StatType<T> type, T stat)
public int getStat(Stat<?> stat)