[1.19] Experimental worldgen features of data packs (structure sets, configured features, etc.) are not registering correctly
maityyy opened this issue ยท 2 comments
After 1.19 this code crashes. It seems that the experimental worldgen features of data packs are ignored during world creation, since all placed features are null. Of course this does not happen in vanilla, but I have not tried overwriting any biome via data pack in the mod (if I am right it will not change anything at all). It is noteworthy that there will be no crash if you go to the data pack menu before creating the world, as this will reload them.
public void onInitialize() {
registerResourcePack("modid:test_pack", FabricLoader.getInstance().getModContainer("modid").orElseThrow(), , ResourcePackActivationType.ALWAYS_ENABLED);
var somePlacedFeature = ResourceKey.create(Registry.PLACED_FEATURE_REGISTRY, new ResourceLocation("modid:some_placed_feature")); // always null
BiomeModifications.create(new ResourceLocation("modid:test")).add(
ModificationPhase.ADDITIONS,
selection -> selection.hasTag(ConventionalBiomeTags.FOREST),
modification -> modification.getGenerationSettings().addFeature(Decoration.VEGETAL_DECORATION, somePlacedFeature)
);
}
Yes, I am right. Try to overwrite and somehow change any biome via data pack in the mod and you will see that nothing has changed.
Duplicate of #2225