DecorationStep describes itself and its steps (@Desc), so settings that list steps keep their studio descriptions

This commit is contained in:
piexel committed 2026-10-10 18:07:05 +02:00
1 parent 8676ebc328
commit 030cbbb8fc
2 files changed
+22

No files matched your search

@@ -135,6 +135,14 @@ class VanillaStructureValuesTest {
assertTrue(silent.generatesFeature(null, ResourceId.parse("minecraft:ore_diamond")));
}
@Test
void everyDecorationStepDescribesItselfForStudio() throws NoSuchFieldException {
assertNotNull(DecorationStep.class.getAnnotation(com.volmit.config.Desc.class));
for (DecorationStep step : DecorationStep.values()) {
assertNotNull(DecorationStep.class.getField(step.name()).getAnnotation(com.volmit.config.Desc.class), step.name());
}
}
private static List<String> names(Class<?> type) {
return OptionsMetadata.inspect(type).options().stream().map(OptionsMetadata.Option::name).toList();
}