Posted January 3, 20223 yr I am in 1.18.1 and trying to get a tree to generate at worldgen. I have a functioning ConfiguredFeature tree (saplings work properly) at "ModConfiguredFeatures.LEPIDODENDRON". When I add this to generation, on loading a world, the world crashes (the error is incorrect - the loot tables work perfectly without adding trees to worldgen). Is there a resource-loading issue here, with the tree placer trying to register something that does not exist to register yet? My placer definition in "ModPlacements": public static final PlacedFeature LEPIDODENDRON_TREE = PlacementUtils.register("lepidodendron_tree_placement", ModConfiguredFeatures.LEPIDODENDRON.placed(RarityFilter.onAverageOnceEvery(12), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())); My worldgen: @SubscribeEvent public static void biomeLoadingEvent(final BiomeLoadingEvent event) { event.getGeneration().addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, ModPlacements.LEPIDODENDRON_TREE); Error: https://pastebin.com/KUZ5gRYC Repository:https://github.com/AechtRob/Prehistoric_Nature Edited January 3, 20223 yr by Aecht_Rob Editing URL for repository
January 3, 20223 yr the error has nothing to do with the tree feature, you have an error in a LootTable Couldn't parse loot table prehistoricnature:blocks/lepidodendron_leaves update your repo, since there is no data folder
January 3, 20223 yr Author As I mentioned in the original post there is seems to be no error in the loot table and this seems to be a false diagnostic result. I think this because commenting out the worldgen everything runs perfectly, loot tables load fine and behave properly in-game; uncommenting the worldgen makes it error again with this error. (Also if I remove all loot tables entirely the game still falls over). (It is as if providing the reference to the tree in the worldgen forces it to go looking for things which are not yet registered at that moment in time?) I have re-synched the repository, to include all assets now (sorry). Edited January 3, 20223 yr by Aecht_Rob
January 4, 20223 yr Author Here you go. These are from the IntelliJ dev launcher environment: (1) This is a log from starting a new world: https://pastebin.com/8j23PUEW (2) This is from entering a world which was created previously without the mod: https://pastebin.com/31G1ma49 (3) And this is from entering the same world as (2) but with the single line of code in ModWorldEvents:biomeLoadingEvent commented out: https://pastebin.com/qnCLqM5T It feels like something is not registered properly somehow?
January 4, 20223 yr Author After two days of almost literally random trial-and-error I think I have it working. The bug was something to do with passing a ConfiguredFeature where a PlacedfFeature was wanted. I don't fully understand why what I have done works, but it works and that is good for me. My repository is linked above in case there is stuff in there to help anyone else.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.