Friends & Foes (Fabric/Quilt) (Copper Golem,Glare,Crab,Moobloom,Iceologer,Rascal,Tuff Golem,Wildfire,Illusioner)

[C2ME] ThreadLocalRandom accessed from a different thread

Nicolol1234 opened this issue ยท 3 comments

commented

Minecraft version information

1.20.1

Mod loader information

Fabric

Mod loader version information

fabric-server-mc.1.20.1-loader.0.14.22-launcher.0.11.2.jar

Mod version information

1.9.5

Expected Behavior

Nothing should happen

Actual Behavior

While exploring with friends & foes and c2me, an error happened in console saying this:

This is usually NOT a bug in C2ME, but a bug in another mod or in vanilla code. 
Possible solutions: 
  - Find possible causes in the stack trace below and 
    - if caused by another mod, report this to the corresponding mod authors 
    - if no other mods are involved, report this to C2ME```

(entire bug report down below)


### Reproduction Steps

1: Install friends & foes with c2me
2: explore


### Screenshots & files

error report:

(i'm not 100% sure, but it seems to be an issue with this mod)

```[14:58:44 ERROR] [C2ME worker #2]: [CheckedThreadLocalRandom] ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #2)
This is usually NOT a bug in C2ME, but a bug in another mod or in vanilla code. 
Possible solutions: 
  - Find possible causes in the stack trace below and 
    - if caused by another mod, report this to the corresponding mod authors 
    - if no other mods are involved, report this to C2ME 

java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #2)
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:55) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.next(CheckedThreadLocalRandom.java:86) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at net.minecraft.world.level.levelgen.BitRandomSource.nextInt(BitRandomSource.java:33) ~[?:?]
        at net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal.<init>(Bee.java:848) ~[?:?]
        at net.minecraft.world.entity.animal.Bee.registerGoals(net/minecraft/class_4466.java:215) ~[?:?]
        at net.minecraft.world.entity.Mob.<init>(net/minecraft/class_1308.java:148) ~[?:?]
        at net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:14) ~[?:?]
        at net.minecraft.world.entity.AgeableMob.<init>(net/minecraft/class_1296.java:29) ~[?:?]
        at net.minecraft.world.entity.animal.Animal.<init>(net/minecraft/class_1429.java:43) ~[?:?]
        at net.minecraft.world.entity.animal.Bee.<init>(net/minecraft/class_4466.java:174) ~[?:?]
        at net.minecraft.world.entity.EntityType.create(net/minecraft/class_1299.java:544) ~[?:?]
        at net.minecraft.world.entity.EntityType.lambda$create$4(net/minecraft/class_1299.java:548) ~[?:?]
        at java.util.Optional.map(Optional.java:260) ~[?:?]
        at net.minecraft.world.entity.EntityType.create(net/minecraft/class_1299.java:548) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.friendsandfoes_getEntity(com/faboslav/friendsandfoes/mixin/fabric/StructureEntityProcessorMixin.java [friendsandfoes.mixins.json]:220) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.handler$bnc000$friendsandfoes$processEntities(com/faboslav/friendsandfoes/mixin/fabric/StructureEntityProcessorMixin.java [friendsandfoes.mixins.json]:95) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.placeInWorld(net/minecraft/class_3499.java:347) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.pools.SinglePoolElement.place(net/minecraft/class_3781.java:124) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.place(net/minecraft/class_3790.java:89) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.postProcess(net/minecraft/class_3790.java:85) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.StructureStart.placeInChunk(net/minecraft/class_3449.java:100) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkGenerator.lambda$applyBiomeDecoration$8(net/minecraft/class_2794.java:320) ~[?:?]
        at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.1-jre.jar:?]
        at net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(net/minecraft/class_2794.java:319) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus.lambda$static$11(net/minecraft/class_2806.java:108) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.doWork(ChunkStatus.java:309) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus.mddc2fcc$c2me-threading-worldgen$lambda$runGenerationTask$0$5(com/ishland/c2me/threading/worldgen/mixin/MixinChunkStatus.java [c2me-threading-worldgen.mixins.json]:108) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[14:58:44 ERROR] [C2ME worker #2]: [CheckedThreadLocalRandom] ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #2)
This is usually NOT a bug in C2ME, but a bug in another mod or in vanilla code. 
Possible solutions: 
  - Find possible causes in the stack trace below and 
    - if caused by another mod, report this to the corresponding mod authors 
    - if no other mods are involved, report this to C2ME 

java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #2)
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:55) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.next(CheckedThreadLocalRandom.java:86) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at net.minecraft.world.level.levelgen.BitRandomSource.nextInt(BitRandomSource.java:33) ~[?:?]
        at net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal.<init>(Bee.java:848) ~[?:?]
        at net.minecraft.world.entity.animal.Bee.registerGoals(net/minecraft/class_4466.java:215) ~[?:?]
        at net.minecraft.world.entity.Mob.<init>(net/minecraft/class_1308.java:148) ~[?:?]
        at net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:14) ~[?:?]
        at net.minecraft.world.entity.AgeableMob.<init>(net/minecraft/class_1296.java:29) ~[?:?]
        at net.minecraft.world.entity.animal.Animal.<init>(net/minecraft/class_1429.java:43) ~[?:?]
        at net.minecraft.world.entity.animal.Bee.<init>(net/minecraft/class_4466.java:174) ~[?:?]
        at net.minecraft.world.entity.EntityType.create(net/minecraft/class_1299.java:544) ~[?:?]
        at net.minecraft.world.entity.EntityType.lambda$create$4(net/minecraft/class_1299.java:548) ~[?:?]
        at java.util.Optional.map(Optional.java:260) ~[?:?]
        at net.minecraft.world.entity.EntityType.create(net/minecraft/class_1299.java:548) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.friendsandfoes_getEntity(com/faboslav/friendsandfoes/mixin/fabric/StructureEntityProcessorMixin.java [friendsandfoes.mixins.json]:220) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.handler$bnc000$friendsandfoes$processEntities(com/faboslav/friendsandfoes/mixin/fabric/StructureEntityProcessorMixin.java [friendsandfoes.mixins.json]:95) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.placeInWorld(net/minecraft/class_3499.java:347) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.pools.SinglePoolElement.place(net/minecraft/class_3781.java:124) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.place(net/minecraft/class_3790.java:89) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.postProcess(net/minecraft/class_3790.java:85) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.StructureStart.placeInChunk(net/minecraft/class_3449.java:100) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkGenerator.lambda$applyBiomeDecoration$8(net/minecraft/class_2794.java:320) ~[?:?]
        at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.1-jre.jar:?]
        at net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(net/minecraft/class_2794.java:319) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus.lambda$static$11(net/minecraft/class_2806.java:108) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.doWork(ChunkStatus.java:309) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus.mddc2fcc$c2me-threading-worldgen$lambda$runGenerationTask$0$5(com/ishland/c2me/threading/worldgen/mixin/MixinChunkStatus.java [c2me-threading-worldgen.mixins.json]:108) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[14:58:44 ERROR] [C2ME worker #2]: [CheckedThreadLocalRandom] ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #2)
This is usually NOT a bug in C2ME, but a bug in another mod or in vanilla code. 
Possible solutions: 
  - Find possible causes in the stack trace below and 
    - if caused by another mod, report this to the corresponding mod authors 
    - if no other mods are involved, report this to C2ME 

java.util.ConcurrentModificationException: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #2)
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:55) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.next(CheckedThreadLocalRandom.java:86) ~[c2me-fixes-worldgen-threading-islpha.10.108-f9936f9886f48fd7.jar:?]
        at net.minecraft.world.level.levelgen.BitRandomSource.nextInt(BitRandomSource.java:33) ~[?:?]
        at net.minecraft.world.entity.animal.Bee$BeeGoToHiveGoal.<init>(Bee.java:848) ~[?:?]
        at net.minecraft.world.entity.animal.Bee.registerGoals(net/minecraft/class_4466.java:215) ~[?:?]
        at net.minecraft.world.entity.Mob.<init>(net/minecraft/class_1308.java:148) ~[?:?]
        at net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:14) ~[?:?]
        at net.minecraft.world.entity.AgeableMob.<init>(net/minecraft/class_1296.java:29) ~[?:?]
        at net.minecraft.world.entity.animal.Animal.<init>(net/minecraft/class_1429.java:43) ~[?:?]
        at net.minecraft.world.entity.animal.Bee.<init>(net/minecraft/class_4466.java:174) ~[?:?]
        at net.minecraft.world.entity.EntityType.create(net/minecraft/class_1299.java:544) ~[?:?]
        at net.minecraft.world.entity.EntityType.lambda$create$4(net/minecraft/class_1299.java:548) ~[?:?]
        at java.util.Optional.map(Optional.java:260) ~[?:?]
        at net.minecraft.world.entity.EntityType.create(net/minecraft/class_1299.java:548) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.friendsandfoes_getEntity(com/faboslav/friendsandfoes/mixin/fabric/StructureEntityProcessorMixin.java [friendsandfoes.mixins.json]:220) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.handler$bnc000$friendsandfoes$processEntities(com/faboslav/friendsandfoes/mixin/fabric/StructureEntityProcessorMixin.java [friendsandfoes.mixins.json]:95) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.placeInWorld(net/minecraft/class_3499.java:347) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.pools.SinglePoolElement.place(net/minecraft/class_3781.java:124) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.place(net/minecraft/class_3790.java:89) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.postProcess(net/minecraft/class_3790.java:85) ~[?:?]
        at net.minecraft.world.level.levelgen.structure.StructureStart.placeInChunk(net/minecraft/class_3449.java:100) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkGenerator.lambda$applyBiomeDecoration$8(net/minecraft/class_2794.java:320) ~[?:?]
        at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[guava-31.1-jre.jar:?]
        at net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(net/minecraft/class_2794.java:319) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus.lambda$static$11(net/minecraft/class_2806.java:108) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus$SimpleGenerationTask.doWork(ChunkStatus.java:309) ~[?:?]
        at net.minecraft.world.level.chunk.ChunkStatus.mddc2fcc$c2me-threading-worldgen$lambda$runGenerationTask$0$5(com/ishland/c2me/threading/worldgen/mixin/MixinChunkStatus.java [c2me-threading-worldgen.mixins.json]:108) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
commented

Hello there, will release a fix probably tomorrrow.

commented

Ok thanks !

commented

Should be resolved with this version https://github.com/Faboslav/friends-and-foes/releases/tag/mc1.20.1-1.9.6, you can also find it on curseforge and modrinth, in case of anything weird, let me know for sure :)!