From 64b79663ef1336d6329f41aaf27d719ff538cca8 Mon Sep 17 00:00:00 2001 From: unurled Date: Tue, 27 Feb 2024 20:56:27 +0100 Subject: [PATCH] remove PersistentDataType in favor of everything is Double --- .../sr/components/attributes/Attribute.java | 33 +++++++------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java b/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java index 78f2dc1..c08b875 100644 --- a/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java +++ b/src/main/java/me/unurled/sacredrealms/sr/components/attributes/Attribute.java @@ -10,57 +10,50 @@ public enum Attribute { 100, 100000, 0, - PersistentDataType.DOUBLE, - new NamespacedKey("sr", "HEALTH")), + new NamespacedKey("sr", "health")), STRENGTH( "STRENGTH", "Strength", 10, 10000, 0, - PersistentDataType.DOUBLE, - new NamespacedKey("sr", "STRENGTH")), + new NamespacedKey("sr", "strength")), DEFENSE( "DEFENSE", "Defense", 10, 10000, 0, - PersistentDataType.DOUBLE, - new NamespacedKey("sr", "DEFENSE")), + new NamespacedKey("sr", "defense")), AGILITY( "AGILITY", "Agility", 100, 10000, - 100, - PersistentDataType.DOUBLE, - new NamespacedKey("sr", "AGILITY")), + 0, + new NamespacedKey("sr", "agility")), LUCK( "LUCK", "Luck", 100, 99999, -99999, - PersistentDataType.INTEGER, - new NamespacedKey("sr", "LUCK")), - MANA("MANA", "Mana", 100, 10000, 0, PersistentDataType.DOUBLE, new NamespacedKey("sr", "MANA")), + new NamespacedKey("sr", "luck")), + MANA("MANA", "Mana", 100, 10000, 0, new NamespacedKey("sr", "mana")), CHARISMA( "CHARISMA", "Charisma", 0, 10000, -10000, - PersistentDataType.INTEGER, - new NamespacedKey("sr", "CHARISMA")), + new NamespacedKey("sr", "charisma")), ; private final String name; private final String ID; - private final int defaultValue; + private final double defaultValue; private final int maxValue; private final int minValue; - private final PersistentDataType type; private final NamespacedKey key; Attribute( @@ -69,14 +62,12 @@ public enum Attribute { int defaultValue, int maxValue, int minValue, - PersistentDataType type, NamespacedKey key) { this.ID = ID; this.name = name; this.defaultValue = defaultValue; this.maxValue = maxValue; this.minValue = minValue; - this.type = type; this.key = key; } @@ -88,7 +79,7 @@ public enum Attribute { return ID; } - public int getDefaultValue() { + public double getDefaultValue() { return defaultValue; } @@ -100,8 +91,8 @@ public enum Attribute { return minValue; } - public PersistentDataType getType() { - return type; + public PersistentDataType getType() { + return PersistentDataType.DOUBLE; } public NamespacedKey getKey() {