mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-12-01 18:24:06 +00:00
DecorationStep describes itself and its steps (@Desc), so settings that list steps keep their studio descriptions
This commit is contained in:
1 parent
8676ebc328
commit
030cbbb8fc
2 files changed
+22
No files matched your search
@@ -1,19 +1,33 @@
|
|||||||
package com.volmit.vanilla;
|
package com.volmit.vanilla;
|
||||||
|
|
||||||
|
import com.volmit.config.Desc;
|
||||||
|
|
||||||
/** A decoration step of the platform's chunk generation, in the platform's order: the step in which it places a structure's
|
/** A decoration step of the platform's chunk generation, in the platform's order: the step in which it places a structure's
|
||||||
* pieces, or a placed feature such as an ore or a tree.
|
* pieces, or a placed feature such as an ore or a tree.
|
||||||
*/
|
*/
|
||||||
|
@Desc("A decoration step of the platform's chunk generation. Structures and placed features are grouped into these steps, which run in this order.")
|
||||||
public enum DecorationStep {
|
public enum DecorationStep {
|
||||||
|
@Desc("Raw generation - the earliest step, before lakes.")
|
||||||
RAW_GENERATION,
|
RAW_GENERATION,
|
||||||
|
@Desc("Lakes.")
|
||||||
LAKES,
|
LAKES,
|
||||||
|
@Desc("Local modifications such as amethyst geodes, icebergs and dripstone clusters.")
|
||||||
LOCAL_MODIFICATIONS,
|
LOCAL_MODIFICATIONS,
|
||||||
|
@Desc("Underground structures, and the features tagged to run with them.")
|
||||||
UNDERGROUND_STRUCTURES,
|
UNDERGROUND_STRUCTURES,
|
||||||
|
@Desc("Surface structures, and the features tagged to run with them.")
|
||||||
SURFACE_STRUCTURES,
|
SURFACE_STRUCTURES,
|
||||||
|
@Desc("Strongholds.")
|
||||||
STRONGHOLDS,
|
STRONGHOLDS,
|
||||||
|
@Desc("Underground ores. This is the step that carries vanilla and mod ore veins.")
|
||||||
UNDERGROUND_ORES,
|
UNDERGROUND_ORES,
|
||||||
|
@Desc("Underground decoration such as glow lichen, sculk patches and cave vegetation.")
|
||||||
UNDERGROUND_DECORATION,
|
UNDERGROUND_DECORATION,
|
||||||
|
@Desc("Fluid springs - the small water and lava spring features.")
|
||||||
FLUID_SPRINGS,
|
FLUID_SPRINGS,
|
||||||
|
@Desc("Vegetal decoration - trees, grass, flowers, kelp and most surface plant life.")
|
||||||
VEGETAL_DECORATION,
|
VEGETAL_DECORATION,
|
||||||
|
@Desc("Top layer modification - freezing and snow placement.")
|
||||||
TOP_LAYER_MODIFICATION;
|
TOP_LAYER_MODIFICATION;
|
||||||
|
|
||||||
/** Whether this is one of the steps the platform places its underground structures in. */
|
/** Whether this is one of the steps the platform places its underground structures in. */
|
||||||
|
|||||||
@@ -135,6 +135,14 @@ class VanillaStructureValuesTest {
|
|||||||
assertTrue(silent.generatesFeature(null, ResourceId.parse("minecraft:ore_diamond")));
|
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) {
|
private static List<String> names(Class<?> type) {
|
||||||
return OptionsMetadata.inspect(type).options().stream().map(OptionsMetadata.Option::name).toList();
|
return OptionsMetadata.inspect(type).options().stream().map(OptionsMetadata.Option::name).toList();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user