TelepathicGrunt / Bumblezone

A bee dimension just for fun!
https://www.curseforge.com/minecraft/mc-mods/the-bumblezone-forge
GNU Lesser General Public License v3.0
181 stars 37 forks source link

[1.21] Bumblezone teleporting breaks with C2ME #401

Closed makumaku1974 closed 3 months ago

makumaku1974 commented 3 months ago

2024-06-21_13 32 24

makumaku1974 commented 3 months ago

Log : 2024-06-21-3.log.gz

TelepathicGrunt commented 3 months ago

Entry from log for reference

[13:29:29] [bumblezone_locator_and_teleportation-1-thread-1/ERROR]: Bumblezone: Failed to teleport entity. Error:
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Chunk not there when requested: Unloaded chunk
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2179) ~[?:?]
    at net.minecraft.class_9761.method_60452(class_9761.java:215) ~[client-intermediary.jar:?]
    at net.minecraft.class_9761.method_60460(class_9761.java:206) ~[client-intermediary.jar:?]
    at net.minecraft.class_9761.method_60454(class_9761.java:119) ~[client-intermediary.jar:?]
    at net.minecraft.class_3204.method_60451(class_3204.java:127) ~[client-intermediary.jar:?]
    at net.minecraft.class_3204.redirect$zka000$c2me-fixes-general-threading-issues$replaceIterationForHolderTicking(class_3204.java:1019) ~[client-intermediary.jar:?]
    at net.minecraft.class_3204.method_15892(class_3204.java:127) ~[client-intermediary.jar:?]
    at net.minecraft.class_3215.method_16155(class_3215.java:267) ~[client-intermediary.jar:?]
    at net.minecraft.class_3215.method_12127(class_3215.java:307) ~[client-intermediary.jar:?]
    at net.minecraft.class_3218.method_18765(class_3218.java:350) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1021) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:912) ~[client-intermediary.jar:?]
    at net.minecraft.class_1132.method_3748(class_1132.java:114) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[client-intermediary.jar:?]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.IllegalStateException: Chunk not there when requested: Unloaded chunk
    at net.minecraft.class_3215.mda667e0$c2me-opts-chunk-access$lambda$c2me$getChunkFutureOffThread$1$3(class_3215.java:4188) ~[client-intermediary.jar:?]
    at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
    ... 17 more
[13:29:29] [Server thread/ERROR]: Bumblezone: Failed to teleport entity. Aborting teleportation. Please retry. Entity: class_3222-literal{Amoamogus} Pos: (-570.4787513501669, 102.0, 154.52751450400635) Destination: ResourceKey[minecraft:dimension / the_bumblezone:the_bumblezone]
[13:29:29] [Render thread/INFO]: [System] [CHAT] Failed to teleport entity. Aborting teleportation. Please retry.
TelepathicGrunt commented 3 months ago

Working for me with Bumblezone alone. Maybe be C2ME issue. image

@ishland do you have any idea what might be going on here? I do run a destination check on the off thread so servers don't get stuck waiting for me to find a valid position to teleport players to. Log seems to show c2me angry at the idea https://github.com/TelepathicGrunt/Bumblezone/blob/dbb4ac62eb255ec3c80245ae017a8da2a6608aa3/common/src/main/java/com/telepathicgrunt/the_bumblezone/utils/ThreadExecutor.java#L153

TelepathicGrunt commented 3 months ago

Issue is reproducible only with C2ME on. Definitely seems like something going wrong over there. Not sure what I can do until Ishland can take a look

makumaku1974 commented 3 months ago

imma try remove C2M

TelepathicGrunt commented 3 months ago

Looks like if you turn generalOptimizations.optimizeAsyncChunkRequest to false in C2ME's config, teleporting work work again

makumaku1974 commented 3 months ago

Looks like if you turn generalOptimizations.optimizeAsyncChunkRequest to false in C2ME's config, teleporting work work again

thanks. Is the crash with Bee Sentry fixed? I was using 7.6.2 version of bumblezone testing some other bugs and I thought it would be funny to run into the bee sentry when it's angry... turns out i crashed after. Now im using 7.6.4 bumblezone

TelepathicGrunt commented 3 months ago

@makumaku1974 No one reported any crash with the Sentry Watcher. Can you please give me the latest.log file after getting the crash?

TelepathicGrunt commented 3 months ago

Yeah I am not crashing with Sentry Watcher image

Likely you have another mod on that is conflicting. The latest.log file with crash will tell me which mod hopefully

makumaku1974 commented 3 months ago

@makumaku1974 No one reported any crash with the Sentry Watcher. Can you please give me the latest.log file after getting the crash?

ill be attempting the crash now.

makumaku1974 commented 3 months ago

CRASH REPORT: [Uploading crash-2024-06-23_01.33.43-server.txt…]()

LOG: latest.log

makumaku1974 commented 3 months ago

It does look like Contagion is at fault?

TelepathicGrunt commented 3 months ago

@makumaku1974 yep. Contagion is trying to cast my Sentry Watcher as a LivingEntity except it is not a LivingEntity. You’ll have to contact the dev for Contagion and ask them to do an instanceof check before trying to do unsafe casts. They should be making sure the entity is an actual LivingEntity first

makumaku1974 commented 3 months ago

@makumaku1974 yep. Contagion is trying to cast my Sentry Watcher as a LivingEntity except it is not a LivingEntity. You’ll have to contact the dev for Contagion and ask them to do an instanceof check before trying to do unsafe casts. They should be making sure the entity is an actual LivingEntity first

I see. This is quite helpful. Thanks

makumaku1974 commented 3 months ago

generalOptimizations.optimizeAsyncChunkRequest

There is a problem somehow... It does not show on this config though Screenshot 2024-06-23 031136

TelepathicGrunt commented 3 months ago

The entry to set to false is this one:

image

makumaku1974 commented 3 months ago

Fully worked im closhing this again.