diff options
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/registry')
3 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/registry/CommandRegistry.java b/src/main/java/dev/mayaqq/ygasi/registry/CommandRegistry.java index 1da9830..aa03f96 100644 --- a/src/main/java/dev/mayaqq/ygasi/registry/CommandRegistry.java +++ b/src/main/java/dev/mayaqq/ygasi/registry/CommandRegistry.java @@ -18,6 +18,7 @@ import net.minecraft.text.Text; import java.io.File; import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS; +import static dev.mayaqq.ygasi.registry.StatRegistry.SKILL_POINTS_TOTAL; import static net.minecraft.server.command.CommandManager.literal; public class CommandRegistry { @@ -57,6 +58,7 @@ public class CommandRegistry { .executes(context -> { ServerPlayerEntity player = EntityArgumentType.getPlayer(context, "target"); player.resetStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)); + player.resetStat(Stats.CUSTOM.getOrCreateStat(StatRegistry.SKILL_POINTS_TOTAL)); context.getSource().sendMessage(Text.literal("§aSkill Points reset to 0 for " + player.getEntityName() + ".")); return 1; }))) @@ -66,6 +68,7 @@ public class CommandRegistry { .executes(context -> { ServerPlayerEntity player = EntityArgumentType.getPlayer(context, "target"); player.increaseStat(SKILL_POINTS, IntegerArgumentType.getInteger(context, "amount")); + player.increaseStat(SKILL_POINTS_TOTAL, IntegerArgumentType.getInteger(context, "amount")); context.getSource().sendMessage(Text.literal("§aSkill Points increased by " + IntegerArgumentType.getInteger(context, "amount") + " for " + player.getEntityName() + ".")); return 1; })))) @@ -73,7 +76,7 @@ public class CommandRegistry { .then(CommandManager.argument("target", EntityArgumentType.player()) .executes(context -> { ServerPlayerEntity player = EntityArgumentType.getPlayer(context, "target"); - context.getSource().sendMessage(Text.literal("§a" + player.getEntityName() + " has " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) + " Unspent Skill Points.")); + context.getSource().sendMessage(Text.literal("§a" + player.getEntityName() + " has " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS)) + " Unspent Skill Points and " + player.getStatHandler().getStat(Stats.CUSTOM.getOrCreateStat(SKILL_POINTS_TOTAL)) + " Total Skill Points.")); return 1; }))) .then(literal("config") diff --git a/src/main/java/dev/mayaqq/ygasi/registry/ConfigRegistry.java b/src/main/java/dev/mayaqq/ygasi/registry/ConfigRegistry.java index 658f044..0b5cfa5 100644 --- a/src/main/java/dev/mayaqq/ygasi/registry/ConfigRegistry.java +++ b/src/main/java/dev/mayaqq/ygasi/registry/ConfigRegistry.java @@ -51,6 +51,7 @@ public class ConfigRegistry { public int pointsRewarded = 1; public int branchCost = 16; public Boolean enableSkillBook = true; + public int offence1Cost = 3; public Config() {} } diff --git a/src/main/java/dev/mayaqq/ygasi/registry/StatRegistry.java b/src/main/java/dev/mayaqq/ygasi/registry/StatRegistry.java index 5d6d165..4dbdbd3 100644 --- a/src/main/java/dev/mayaqq/ygasi/registry/StatRegistry.java +++ b/src/main/java/dev/mayaqq/ygasi/registry/StatRegistry.java @@ -7,6 +7,7 @@ import net.minecraft.util.Identifier; public class StatRegistry { public static Identifier SKILL_POINTS = PolymerStat.registerStat("skill_points", StatFormatter.DEFAULT); + public static Identifier SKILL_POINTS_TOTAL = PolymerStat.registerStat("skill_points_total", StatFormatter.DEFAULT); public static void skillRegister() {} } |