EMI Loot

EMI Loot

5M Downloads

Potential issue with c2me

coco875 opened this issue ยท 2 comments

commented

In log I have this issue appear and emi don't load

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: Render thread, current: Thread-105)
	at TRANSFORMER/[email protected]/com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.handleNotOwner(CheckedThreadLocalRandom.java:55) ~[c2me-fabric-mc1.21.1-0.3.0+alpha.0.150$c2me-fixes-worldgen-threading-issues-mc1.21.1-0.3.0+alpha.0.150_mapped_moj_1.21.1.jar%231872!/:?]
	at TRANSFORMER/[email protected]/com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.isSafe(CheckedThreadLocalRandom.java:38) ~[c2me-fabric-mc1.21.1-0.3.0+alpha.0.150$c2me-fixes-worldgen-threading-issues-mc1.21.1-0.3.0+alpha.0.150_mapped_moj_1.21.1.jar%231872!/:?]
	at TRANSFORMER/[email protected]/com.ishland.c2me.fixes.worldgen.threading_issues.common.CheckedThreadLocalRandom.next(CheckedThreadLocalRandom.java:86) ~[c2me-fabric-mc1.21.1-0.3.0+alpha.0.150$c2me-fixes-worldgen-threading-issues-mc1.21.1-0.3.0+alpha.0.150_mapped_moj_1.21.1.jar%231872!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.BitRandomSource.nextInt(BitRandomSource.java:33) ~[client-1.21.1-20240808.144430-srg.jar%23529!/:?]
	at TRANSFORMER/[email protected]/net.minecraft.util.Mth.nextInt(net/minecraft/util/Mth.java:160) ~[client-1.21.1-20240808.144430-srg.jar%23529!/:?]
	at TRANSFORMER/[email protected]/org.cyclops.evilcraft.entity.monster.EntityVengeanceSpirit.<init>(EntityVengeanceSpirit.java:140) ~[EvilCraft-1.21.1-neoforge-1.2.57.jar%23654!/:1.2.57]
	at TRANSFORMER/[email protected]/org.cyclops.evilcraft.entity.monster.EntityVengeanceSpirit.<init>(EntityVengeanceSpirit.java:126) ~[EvilCraft-1.21.1-neoforge-1.2.57.jar%23654!/:1.2.57]
	at TRANSFORMER/[email protected]/net.minecraft.world.entity.EntityType.create(net/minecraft/world/entity/EntityType.java:1097) ~[client-1.21.1-20240808.144430-srg.jar%23529!/:?]
	at TRANSFORMER/[email protected]+1.21+neoforge/fzzyhmstrs.emi_loot.emi.MobLootRecipe.<init>(MobLootRecipe.java:61) ~[emi_loot-0.7.3+1.21+neoforge.jar%23642!/:?]
	at TRANSFORMER/[email protected]+1.21+neoforge/fzzyhmstrs.emi_loot.emi.EmiClientPlugin.lambda$register$0(EmiClientPlugin.java:50) ~[emi_loot-0.7.3+1.21+neoforge.jar%23642!/:?]
	at java.base/java.lang.Iterable.forEach(Unknown Source) ~[?:?]
	at TRANSFORMER/[email protected]+1.21+neoforge/fzzyhmstrs.emi_loot.emi.EmiClientPlugin.register(EmiClientPlugin.java:41) ~[emi_loot-0.7.3+1.21+neoforge.jar%23642!/:?]
	at TRANSFORMER/[email protected]+1.21.1+neoforge/dev.emi.emi.runtime.EmiReloadManager$ReloadWorker.run(EmiReloadManager.java:185) ~[emi-1.1.13+1.21.1+neoforge.jar%23640!/:?]
	at java.base/java.lang.Thread.run(Unknown Source) [?:?]
commented

thanks for the answer I will report to them so

commented

The root of this issue is cyclops.evilcraft.entity.monster.EntityVengeanceSpirit using the world random in the class constructor. I would recommend that they use their own Random instance for this sort of thing.

EMI Loot has no control over this random usage.

You can also change this to a fatal warning rather than a crash in C2ME, if you haven't already.