Villager Names (Fabric)

Villager Names (Fabric)

7M Downloads

Conflict with Minecraft Comes Alive 7.2.1+ (and possibly earlier)

UntalentedAmateur opened this issue ยท 1 comments

commented

When this mod is present alongside Minecraft Comes Alive (MCA)(at least version 7.2.1 and later - I didn't load either mod prior to 1.18.2), the game crashes at the "loading terrain" stage when locally loading a save, and just flat out refuses to work remotely.

If the mod is not present when a world is generated, MCA appears to run correctly, including generating villager names. When VilagerNames is loaded back in and the world reloaded, all villagers in that village disappear, and attempting to enter a new village crashes the server.

Whenever a crash is encountered due to this clash, there is very little in any log or user message to indicate what the source problem might have been, but there is an enormous amount of log spam.

Removing MCA allows VillagerNames to function appropriately, but the two do not play nicely together. Other Villager Name mods handle MCA without any apparent issue, but also don't cover the added range of mob naming (i.e Piglins and Golems, which is a FANTASTIC addition!).

While the other mods talk about extending a Villager Class, the net.minecraft class mappings seem to differ significantly between the mods, so I'm not sure where the issue is. Even the mixin names between MCA and VillagerNames are different, so they shouldn't be clashing.

Slice of log in village after visiting with MCA active and then reloading with VillagerNames active. This seems to be consistent across every villager that had been previously loaded, and looks similar to log slices from attempting to load new worlds with both mods active:

[19:35:23] [Server thread/WARN]: Exception loading entity: java.lang.NullPointerException: null at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?] at java.util.Optional.of(Optional.java:113) ~[?:?] at mca.entity.ai.relationship.EntityRelationship.of(EntityRelationship.java:92) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.VillagerLike.setName(VillagerLike.java:105) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.VillagerEntityMCA.method_5665(VillagerEntityMCA.java:267) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at io.github.overlordsiii.villagernames.util.VillagerUtil.createVillagerNames(VillagerUtil.java:118) ~[villagernames-1.18.2-4.0.3.jar:?] at net.minecraft.class_1646.handler$efm000$changeText(class_1646.java:3674) ~[client-intermediary.jar:?] at net.minecraft.class_1646.method_7195(class_1646.java:602) ~[client-intermediary.jar:?] at mca.entity.VillagerEntityMCA.method_7195(VillagerEntityMCA.java:250) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at net.minecraft.class_1646.<init>(class_1646.java:203) ~[client-intermediary.jar:?] at net.minecraft.class_1646.<init>(class_1646.java:195) ~[client-intermediary.jar:?] at mca.entity.VillagerEntityMCA.<init>(VillagerEntityMCA.java:127) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.EntitiesMCA.lambda$static$1(EntitiesMCA.java:30) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at net.minecraft.class_1299.method_5883(class_1299.java:478) ~[client-intermediary.jar:?] at net.minecraft.class_1299.method_17846(class_1299.java:487) ~[client-intermediary.jar:?] at java.util.Optional.map(Optional.java:260) ~[?:?] at net.minecraft.class_1299.method_5892(class_1299.java:487) ~[client-intermediary.jar:?] at net.minecraft.class_1299.method_17848(class_1299.java:580) ~[client-intermediary.jar:?] at net.minecraft.class_1299.method_17842(class_1299.java:531) ~[client-intermediary.jar:?] at net.minecraft.class_1299$1.method_31490(class_1299.java:554) ~[client-intermediary.jar:?] at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1856) ~[?:?] at net.minecraft.class_1299$1.tryAdvance(class_1299.java:553) ~[client-intermediary.jar:?] at java.util.Spliterator.forEachRemaining(Spliterator.java:332) ~[?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?] at net.minecraft.class_5565.method_31731(class_5565.java:77) ~[client-intermediary.jar:?] at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] at net.minecraft.class_3846.method_16907(class_3846.java:91) ~[client-intermediary.jar:?] at net.minecraft.class_3846.method_16900(class_3846.java:146) ~[client-intermediary.jar:?] at net.minecraft.class_3846.run(class_3846.java:102) ~[client-intermediary.jar:?] at net.minecraft.class_3738.run(class_3738.java:18) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_18859(class_1255.java:157) ~[client-intermediary.jar:?] at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:808) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:165) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_16075(class_1255.java:131) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:790) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:784) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_18857(class_1255.java:140) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:769) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:701) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:273) ~[client-intermediary.jar:?] at java.lang.Thread.run(Thread.java:833) [?:?]

Slice of log at crash time when /tp to new village with both mods active

[19:37:11] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.class_148: Exception ticking world at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:911) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:851) ~[client-intermediary.jar:?] at net.minecraft.class_1132.method_3748(class_1132.java:97) ~[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:273) ~[client-intermediary.jar:?] at java.lang.Thread.run(Thread.java:833) [?:?] Caused by: java.lang.NullPointerException at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?] at java.util.Optional.of(Optional.java:113) ~[?:?] at mca.entity.ai.relationship.EntityRelationship.of(EntityRelationship.java:92) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.VillagerLike.setName(VillagerLike.java:105) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.VillagerEntityMCA.method_5665(VillagerEntityMCA.java:267) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at io.github.overlordsiii.villagernames.util.VillagerUtil.createVillagerNames(VillagerUtil.java:118) ~[villagernames-1.18.2-4.0.3.jar:?] at net.minecraft.class_1646.handler$efm000$changeText(class_1646.java:3674) ~[client-intermediary.jar:?] at net.minecraft.class_1646.method_7195(class_1646.java:602) ~[client-intermediary.jar:?] at mca.entity.VillagerEntityMCA.method_7195(VillagerEntityMCA.java:250) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at net.minecraft.class_1646.<init>(class_1646.java:203) ~[client-intermediary.jar:?] at net.minecraft.class_1646.<init>(class_1646.java:195) ~[client-intermediary.jar:?] at mca.entity.VillagerEntityMCA.<init>(VillagerEntityMCA.java:127) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.EntitiesMCA.lambda$static$1(EntitiesMCA.java:30) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at net.minecraft.class_1299.method_5883(class_1299.java:478) ~[client-intermediary.jar:?] at mca.entity.VillagerFactory.build(VillagerFactory.java:108) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.entity.VillagerFactory.spawn(VillagerFactory.java:102) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.server.SpawnQueue.tick(SpawnQueue.java:40) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.server.world.data.VillageManager.tick(VillageManager.java:181) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at mca.fabric.MCAFabric.lambda$onInitialize$0(MCAFabric.java:44) ~[minecraft-comes-alive-7.2.1+1.18.2-fabric.jar:?] at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) ~[fabric-lifecycle-events-v1-2.0.3+2d83e92c60-9b014c802997cc2d.jar:?] at net.minecraft.class_1937.handler$bic000$tickWorldAfterBlockEntities(class_1937.java:1610) ~[client-intermediary.jar:?] at net.minecraft.class_1937.method_18471(class_1937.java:481) ~[client-intermediary.jar:?] at net.minecraft.class_3218.method_18765(class_3218.java:368) ~[client-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:907) ~[client-intermediary.jar:?]

commented

If I understand correctly, MCA replaces normal villagers for a new entity. I've never tested both mods together, since MCA already give the new villagers names. I'll take a look when I have some free time.