ExcessiveAmountsOfZombies / Croptopia

Fabric and Forge mod that adds crops and food to the game.
https://www.curseforge.com/minecraft/mc-mods/croptopia-fabric
MIT License
85 stars 70 forks source link

Crash while generating new chunk with terralith #577

Closed Rikys closed 6 months ago

Rikys commented 6 months ago

Make sure you are not opening a duplicate.

Platform.

Forge

Minecraft version.

1.20.1

Croptopia version.

3.0.1

What happened?

The game crashes in the world generation stage

Relevant logs

Crash report on gist

Additional information

Mods:

On gist I've also published a crash-cyanide.txt file with the cyanide mod in addition (cyanide-forge-1.20.1-4.1.0) as it may help troubleshooting the issue

FoxMcloud5655 commented 6 months ago

Can confirm, this does crash my dedicated server and my single player world when loading areas with Croptopia trees.

Tursiops-G commented 6 months ago

Same here also. Had to downgrade croptopia to v2.3.2 in order to run w/Terralith

drakray commented 6 months ago

Got a similar crash after adding Terralith https://pastebin.com/eDZGKr6j

Description: Exception generating new chunk

com.alcatrazescapee.cyanide.codec.FeatureCycleDetector$FeatureCycleException: A feature cycle was found.

Cycle:
At step 9
Feature 'croptopia:apple_tree_placed'
  must be before 'croptopia:peach_tree_placed' (defined in 'minecraft:plains' at index 48, 49 and 4 others)
  must be before 'croptopia:apple_tree_placed' (defined in 'terralith:lavender_forest' at index 38, 44 and 3 others)
drakray commented 6 months ago

had the same kind of error with Cyclic, but someone made a fix some time ago https://modrinth.com/mod/cyclic-crash-fixer

ExcessiveAmountsOfZombies commented 6 months ago

idk how to fix this, in 2.3.2 croptopia trees just didn't generate in terralith biomes, now they cause a crash with my code changes

Apollounknowndev commented 6 months ago

Did some digging, I've determined this is most likely down to how the config stores the list of Croptopia trees to generate in a given biome not being stored in a consistent order. I got the game to output the list of Croptopia features in the two Terralith biomes listed in the crash, and the tree order is completely scrambled.


terralith:lavender_forest

[
  "croptopia:random_crop_placed",
  "croptopia:apple_tree_placed",
  "croptopia:nectarine_tree_placed",
  "croptopia:persimmon_tree_placed",
  "croptopia:lime_tree_placed",
  "croptopia:lemon_tree_placed",
  "croptopia:peach_tree_placed",
  "croptopia:starfruit_tree_placed",
  "croptopia:apricot_tree_placed",
  "croptopia:pear_tree_placed",
  "croptopia:cherry_tree_placed",
  "croptopia:avocado_tree_placed"
]

terralith:blooming_valley

[
  "croptopia:random_crop_placed",
  "croptopia:nectarine_tree_placed",
  "croptopia:lemon_tree_placed",
  "croptopia:peach_tree_placed",
  "croptopia:apricot_tree_placed",
  "croptopia:kumquat_tree_placed",
  "croptopia:pear_tree_placed",
  "croptopia:apple_tree_placed",
  "croptopia:persimmon_tree_placed",
  "croptopia:lime_tree_placed",
  "croptopia:starfruit_tree_placed",
  "croptopia:cherry_tree_placed",
  "croptopia:orange_tree_placed",
  "croptopia:avocado_tree_placed"
]
FoxMcloud5655 commented 6 months ago

Well, that's an easy fix. Create the list on boot, use the list for every biome. Don't regenerate it every time.

ExcessiveAmountsOfZombies commented 6 months ago

I think I have this fixed in 3.0.4, the 'tree order' was the hint I needed so using a treemap now to keep things sorted