Vetpetmon-Labs / Wyrms-of-Nyrus-Hub

Issue tracker, license, and API for Wyrms of Nyrus
Other
0 stars 0 forks source link

[NOT WON] Pathfinding crash with VintageFix #4

Open Vetpetmon opened 10 months ago

Vetpetmon commented 10 months ago

https://github.com/embeddedt/VintageFix - Patches blockstate code, but fails to patch pathing nodes to use the new blockstate code. Blaming start of the stacktrace: https://github.com/embeddedt/VintageFix/blob/main/src/main/java/org/embeddedt/vintagefix/mixin/blockstates/FastMapStateHolderMixin.java Other present mixin: https://github.com/Red-Studio-Ragnarok/Alfheim/blob/main/src/main/java/dev/redstudio/alfheim/mixin/BlockStateContainerMixin.java

Issue crashes servers from hanging the server thread, because getMaterial can't function properly. No know details on the inner workings of this issue. WoN changes no vanilla functions and does not use patches (mixins) and the issue cannot be replicated without VintageFix also present.

Log:

java.lang.Error: ServerHangWatchdog detected that a single server tick took 60.00 seconds (should be max 0.05)
    at net.minecraft.block.state.BlockStateContainer$StateImplementation.getMaterial(BlockStateContainer.java:294)
    at net.minecraft.pathfinding.WalkNodeProcessor.getPathNodeTypeRaw(WalkNodeProcessor.java:452)
    at net.minecraft.pathfinding.WalkNodeProcessor.getPathNodeType(WalkNodeProcessor.java:388)
    at net.minecraft.pathfinding.WalkNodeProcessor.getPathNodeType(WalkNodeProcessor.java:346)
    at net.minecraft.pathfinding.WalkNodeProcessor.getPathNodeType(WalkNodeProcessor.java:300)
    at net.minecraft.pathfinding.PathNavigateGround.isSafeToStandAt(SourceFile:205)
    at net.minecraft.pathfinding.PathNavigateGround.isDirectPathBetweenPoints(SourceFile:131)
    at net.minecraft.pathfinding.PathNavigate.pathFollow(SourceFile:254)
    at net.minecraft.pathfinding.PathNavigate.onUpdateNavigation(SourceFile:188)
    at net.minecraft.entity.EntityLiving.updateEntityActionState(EntityLiving.java:766)
    at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2359)
    at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:577)
    at net.minecraft.entity.monster.EntityMob.onLivingUpdate(EntityMob.java:45)
    at com.vetpetmon.wyrmsofnyrus.entity.MobEntityBase.onLivingUpdate(MobEntityBase.java:201)
    at com.vetpetmon.wyrmsofnyrus.entity.EntityWyrm.onLivingUpdate(EntityWyrm.java:409)
    at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2179)
    at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:295)
    at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:50)
    at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:1996)
    at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:832)
    at net.minecraft.world.World.updateEntity(World.java:1958)
    at net.minecraft.world.World.updateEntities(World.java:1762)
    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:613)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:767)
    at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:397)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Thread.java:748)

The issue is NOT from WoN, WoN just increased the chance for the issue to occur due to raising the number of entities trying to use pathfinding functions. This issue does not occur in environments without VintageFix. I have urged the server owner to immediately remove VintageFix to resolve the issue, this is being submitted for public reference in case the issue pops up again for a different server or player.