remove PersistentDataType in favor of everything is Double

This commit is contained in:
unurled 2024-02-27 20:56:27 +01:00
parent 83c5ed151f
commit 64b79663ef
Signed by: unurled
GPG key ID: FDBC9CBE1F82423F

View file

@ -10,57 +10,50 @@ public enum Attribute {
100, 100,
100000, 100000,
0, 0,
PersistentDataType.DOUBLE, new NamespacedKey("sr", "health")),
new NamespacedKey("sr", "HEALTH")),
STRENGTH( STRENGTH(
"STRENGTH", "STRENGTH",
"Strength", "Strength",
10, 10,
10000, 10000,
0, 0,
PersistentDataType.DOUBLE, new NamespacedKey("sr", "strength")),
new NamespacedKey("sr", "STRENGTH")),
DEFENSE( DEFENSE(
"DEFENSE", "DEFENSE",
"Defense", "Defense",
10, 10,
10000, 10000,
0, 0,
PersistentDataType.DOUBLE, new NamespacedKey("sr", "defense")),
new NamespacedKey("sr", "DEFENSE")),
AGILITY( AGILITY(
"AGILITY", "AGILITY",
"Agility", "Agility",
100, 100,
10000, 10000,
100, 0,
PersistentDataType.DOUBLE, new NamespacedKey("sr", "agility")),
new NamespacedKey("sr", "AGILITY")),
LUCK( LUCK(
"LUCK", "LUCK",
"Luck", "Luck",
100, 100,
99999, 99999,
-99999, -99999,
PersistentDataType.INTEGER, new NamespacedKey("sr", "luck")),
new NamespacedKey("sr", "LUCK")), MANA("MANA", "Mana", 100, 10000, 0, new NamespacedKey("sr", "mana")),
MANA("MANA", "Mana", 100, 10000, 0, PersistentDataType.DOUBLE, new NamespacedKey("sr", "MANA")),
CHARISMA( CHARISMA(
"CHARISMA", "CHARISMA",
"Charisma", "Charisma",
0, 0,
10000, 10000,
-10000, -10000,
PersistentDataType.INTEGER, new NamespacedKey("sr", "charisma")),
new NamespacedKey("sr", "CHARISMA")),
; ;
private final String name; private final String name;
private final String ID; private final String ID;
private final int defaultValue; private final double defaultValue;
private final int maxValue; private final int maxValue;
private final int minValue; private final int minValue;
private final PersistentDataType type;
private final NamespacedKey key; private final NamespacedKey key;
Attribute( Attribute(
@ -69,14 +62,12 @@ public enum Attribute {
int defaultValue, int defaultValue,
int maxValue, int maxValue,
int minValue, int minValue,
PersistentDataType type,
NamespacedKey key) { NamespacedKey key) {
this.ID = ID; this.ID = ID;
this.name = name; this.name = name;
this.defaultValue = defaultValue; this.defaultValue = defaultValue;
this.maxValue = maxValue; this.maxValue = maxValue;
this.minValue = minValue; this.minValue = minValue;
this.type = type;
this.key = key; this.key = key;
} }
@ -88,7 +79,7 @@ public enum Attribute {
return ID; return ID;
} }
public int getDefaultValue() { public double getDefaultValue() {
return defaultValue; return defaultValue;
} }
@ -100,8 +91,8 @@ public enum Attribute {
return minValue; return minValue;
} }
public PersistentDataType getType() { public PersistentDataType<Double, Double> getType() {
return type; return PersistentDataType.DOUBLE;
} }
public NamespacedKey getKey() { public NamespacedKey getKey() {