RelativityMC / C2ME-fabric

A Fabric mod designed to improve the chunk performance of Minecraft.
MIT License
513 stars 42 forks source link

Conflict's with wilder wilds #282

Closed PixelSymbols closed 3 months ago

PixelSymbols commented 3 months ago

Describe the bug Crashes cuz of net.frozenblock.wilderwild.block.HangingTendrilBlock

To Reproduce Steps to reproduce the behavior:

  1. install wilder wilds
  2. install c2me
  3. install chunky
  4. run chunky like for 512c, and it will crash at some point before it reach 512c

Expected behavior not to crash

Screenshots image

Runtime info (please complete the following information):

Crash reports / logs https://pastebin.com/8ERuRfn1

Other mods https://pastebin.com/4hEnz1rd

Checklist

Additional context i made issue to wilder wilds, they said to check without c2me, i did, it didnt crash, they said to make issue here 🤷 issue: https://github.com/FrozenBlock/WilderWild/issues/358

ishland commented 3 months ago

Accessing world random on another thread isn't safe in vanilla as well and dropping experience on worldgen thread triggers that. This will eventually lead to Accessing LegacyRandomSource from multiple threads crash in vanilla. C2ME enforces this check to make sure that it doesn't end up in confusing crashes as the possibility of triggering this is much higher when the world generation is faster.

This should be fixed on their side.

AViewFromTheTop commented 3 months ago

This should be fixed on their side.

This issue directly conflicts with a feature of our mod, a block that stores XP. How should we fix this? Is there a way to actually tell when the world is still generating from the block's side? If not, have you considered perhaps fixing it with a mixin to alter the Random being used for XP creation? Could spare us from a lot of random and unfair crashes.

ishland commented 3 months ago

How should we fix this?

After a bit of investigation and this should be replaced with a scheduled tick: https://github.com/FrozenBlock/WilderWild/blob/d025fe044244dea6c49a7ffdd81b31067d2bbea1/src/main/java/net/frozenblock/wilderwild/block/HangingTendrilBlock.java#L140 Destroying blocks in this method causes undesirable side effects especially on worldgen threads.

AViewFromTheTop commented 3 months ago

Interesting, huh. Thanks for letting me know! I’ll change that once I get home.