From a39c8ff085b350457f6803988d3ba43bc9abab06 Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Tue, 9 Jul 2024 03:32:32 -0400 Subject: [PATCH] Validate configured statistic bundle namespaces Fixes #15 --- .../haykam821/withersweeper/game/WithersweeperConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/haykam821/withersweeper/game/WithersweeperConfig.java b/src/main/java/io/github/haykam821/withersweeper/game/WithersweeperConfig.java index 220851f..1251ba9 100644 --- a/src/main/java/io/github/haykam821/withersweeper/game/WithersweeperConfig.java +++ b/src/main/java/io/github/haykam821/withersweeper/game/WithersweeperConfig.java @@ -21,7 +21,7 @@ public class WithersweeperConfig { BoardConfig.CODEC.fieldOf("board").forGetter(WithersweeperConfig::getBoardConfig), PlayerConfig.CODEC.fieldOf("players").forGetter(WithersweeperConfig::getPlayerConfig), IntProvider.NON_NEGATIVE_CODEC.optionalFieldOf("ticks_until_close", ConstantIntProvider.create(SharedConstants.TICKS_PER_SECOND * 5)).forGetter(WithersweeperConfig::getTicksUntilClose), - Codec.STRING.optionalFieldOf("statistic_bundle_namespace").forGetter(WithersweeperConfig::getStatisticBundleNamespace), + GameStatisticBundle.NAMESPACE_CODEC.optionalFieldOf("statistic_bundle_namespace").forGetter(WithersweeperConfig::getStatisticBundleNamespace), ItemStack.CODEC.optionalFieldOf("flag_stack", new ItemStack(Items.RED_BANNER)).forGetter(WithersweeperConfig::getFlagStack), Codec.INT.optionalFieldOf("max_mistakes", 1).forGetter(WithersweeperConfig::getMaxMistakes) ).apply(instance, WithersweeperConfig::new);