@@ -40,30 +40,32 @@ package ${package}.init;
4040
4141 private static final List<FeatureRegistration > FEATURE_REGISTRATIONS = new ArrayList<> ();
4242
43- <#list features as feature >
44- <#if feature.getModElement().getTypeString() == "block" >
43+ <#list w.getGElementsOfType("feature") as feature >
4544 public static final RegistryObject<Feature <? >> ${feature.getModElement().getRegistryNameUpper()} =
4645 register("${feature.getModElement().getRegistryName()} ", ${feature.getModElement().getName()} Feature::feature,
47- new FeatureRegistration(GenerationStep.Decoration.UNDERGROUND_ORES ,
46+ new FeatureRegistration(GenerationStep.Decoration.${generator.map(feature.generationStep, "generationsteps") } ,
4847 ${feature.getModElement().getName()} Feature.GENERATE_BIOMES,
4948 ${feature.getModElement().getName()} Feature::placedFeature)
5049 );
51- <#elseif feature.getModElement().getTypeString() == "plant" >
50+ </#list >
51+
52+ <#list w.getGElementsOfType("block")?filter(e - > e.generateFeature) as feature>
5253 public static final RegistryObject<Feature <? >> ${feature.getModElement().getRegistryNameUpper()} =
5354 register("${feature.getModElement().getRegistryName()} ", ${feature.getModElement().getName()} Feature::feature,
54- new FeatureRegistration(GenerationStep.Decoration.VEGETAL_DECORATION ,
55+ new FeatureRegistration(GenerationStep.Decoration.UNDERGROUND_ORES ,
5556 ${feature.getModElement().getName()} Feature.GENERATE_BIOMES,
5657 ${feature.getModElement().getName()} Feature::placedFeature)
5758 );
58- <#elseif feature.getModElement().getTypeString() == "feature" >
59+ </#list >
60+
61+ <#list w.getGElementsOfType("plant")?filter(e - > e.generateFeature) as feature>
5962 public static final RegistryObject<Feature <? >> ${feature.getModElement().getRegistryNameUpper()} =
6063 register("${feature.getModElement().getRegistryName()} ", ${feature.getModElement().getName()} Feature::feature,
61- new FeatureRegistration(GenerationStep.Decoration.${generator.map(feature.generationStep, "generationsteps") } ,
64+ new FeatureRegistration(GenerationStep.Decoration.VEGETAL_DECORATION ,
6265 ${feature.getModElement().getName()} Feature.GENERATE_BIOMES,
6366 ${feature.getModElement().getName()} Feature::placedFeature)
6467 );
65- </#if >
66- </#list >
68+ </#list >
6769
6870 private static RegistryObject<Feature <? >> register(String registryname, Supplier<Feature <? >> feature, FeatureRegistration featureRegistration) {
6971 FEATURE_REGISTRATIONS.add(featureRegistration);
0 commit comments