Villager throws IllegalStateException: World mismatch when entering Nether Portal on Folia #431

Open
opened 2026-01-15 02:02:00 +01:00 by Pstar233 · 2 comments
Pstar233 commented 2026-01-15 02:02:00 +01:00 (Migrated from github.com)

Expected behavior

The Villager should safely teleport to the Nether, similar to other entities or players.

Observed/Actual behavior

The server throws an exception and the Villager fails to teleport:

Error Log
java.lang.IllegalStateException: World mismatch: expected world_nether but got world
at net.minecraft.world.level.Level.getCurrentWorldData(Level.java:830)
at net.minecraft.world.level.Level.getDayTime(Level.java:1914)
at net.minecraft.world.timeline.AttributeTrackSampler.applyTimeBased(AttributeTrackSampler.java:35)
at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.computeValueNotPositional(EnvironmentAttributeSystem.java:257)
at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.getDimensionValue(EnvironmentAttributeSystem.java:224)
at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.getValue(EnvironmentAttributeSystem.java:231)
at net.minecraft.world.attribute.EnvironmentAttributeSystem.getValue(EnvironmentAttributeSystem.java:117)
at net.minecraft.world.attribute.EnvironmentAttributeReader.getValue(EnvironmentAttributeReader.java:27)
at net.minecraft.world.entity.ai.Brain.updateActivityFromSchedule(Brain.java:313)
at net.minecraft.world.entity.npc.villager.Villager.registerBrainGoals(Villager.java:253)
at net.minecraft.world.entity.npc.villager.Villager.makeBrain(Villager.java:213)
at net.minecraft.world.entity.LivingEntity.(LivingEntity.java:326)
at net.minecraft.world.entity.Mob.(Mob.java:155)
at net.minecraft.world.entity.PathfinderMob.(PathfinderMob.java:17)
at net.minecraft.world.entity.AgeableMob.(AgeableMob.java:29)
at net.minecraft.world.entity.npc.villager.AbstractVillager.(AbstractVillager.java:49)
at net.minecraft.world.entity.npc.villager.Villager.(Villager.java:192)
at net.minecraft.world.entity.EntityType.create(EntityType.java:1523)
at net.minecraft.world.entity.Entity.transformForAsyncTeleport(Entity.java:4346)
at net.minecraft.world.entity.Entity.portalToAsync(Entity.java:4739)
at net.minecraft.world.entity.Entity.netherPortalLogicAsync(Entity.java:4491)
at net.minecraft.world.level.block.NetherPortalBlock.portalAsync(NetherPortalBlock.java:186)
at net.minecraft.world.entity.PortalProcessor.portalAsync(PortalProcessor.java:37)
at net.minecraft.world.entity.Entity.handlePortal(Entity.java:3524)
...

Steps/models to reproduce

Run a Folia server.
Create an Overworld (world) and Nether (world_nether).
Spawn a Villager in the Overworld.
Push the Villager into a Nether Portal.
Observe the server console.

Plugin and Datapack List

pl
[08:58:01 INFO]: ℹ Server Plugins (2):
[08:58:01 INFO]: Bukkit Plugins:
[08:58:01 INFO]: - ViaBackwards, ViaVersion

Folia version

Folia Version: 1.21.11 (build 1.21.11-10-1aa7055)

Other

No response

### Expected behavior The Villager should safely teleport to the Nether, similar to other entities or players. ### Observed/Actual behavior The server throws an exception and the Villager fails to teleport: **Error Log** java.lang.IllegalStateException: World mismatch: expected world_nether but got world at net.minecraft.world.level.Level.getCurrentWorldData(Level.java:830) at net.minecraft.world.level.Level.getDayTime(Level.java:1914) at net.minecraft.world.timeline.AttributeTrackSampler.applyTimeBased(AttributeTrackSampler.java:35) at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.computeValueNotPositional(EnvironmentAttributeSystem.java:257) at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.getDimensionValue(EnvironmentAttributeSystem.java:224) at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.getValue(EnvironmentAttributeSystem.java:231) at net.minecraft.world.attribute.EnvironmentAttributeSystem.getValue(EnvironmentAttributeSystem.java:117) at net.minecraft.world.attribute.EnvironmentAttributeReader.getValue(EnvironmentAttributeReader.java:27) at net.minecraft.world.entity.ai.Brain.updateActivityFromSchedule(Brain.java:313) at net.minecraft.world.entity.npc.villager.Villager.registerBrainGoals(Villager.java:253) at net.minecraft.world.entity.npc.villager.Villager.makeBrain(Villager.java:213) at net.minecraft.world.entity.LivingEntity.<init>(LivingEntity.java:326) at net.minecraft.world.entity.Mob.<init>(Mob.java:155) at net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:17) at net.minecraft.world.entity.AgeableMob.<init>(AgeableMob.java:29) at net.minecraft.world.entity.npc.villager.AbstractVillager.<init>(AbstractVillager.java:49) at net.minecraft.world.entity.npc.villager.Villager.<init>(Villager.java:192) at net.minecraft.world.entity.EntityType.create(EntityType.java:1523) at net.minecraft.world.entity.Entity.transformForAsyncTeleport(Entity.java:4346) at net.minecraft.world.entity.Entity.portalToAsync(Entity.java:4739) at net.minecraft.world.entity.Entity.netherPortalLogicAsync(Entity.java:4491) at net.minecraft.world.level.block.NetherPortalBlock.portalAsync(NetherPortalBlock.java:186) at net.minecraft.world.entity.PortalProcessor.portalAsync(PortalProcessor.java:37) at net.minecraft.world.entity.Entity.handlePortal(Entity.java:3524) ... ### Steps/models to reproduce Run a Folia server. Create an Overworld (world) and Nether (world_nether). Spawn a Villager in the Overworld. Push the Villager into a Nether Portal. Observe the server console. ### Plugin and Datapack List > pl [08:58:01 INFO]: ℹ Server Plugins (2): [08:58:01 INFO]: Bukkit Plugins: [08:58:01 INFO]: - ViaBackwards, ViaVersion > ### Folia version Folia Version: 1.21.11 (build 1.21.11-10-1aa7055) ### Other _No response_
RitaSister commented 2026-02-16 20:12:20 +01:00 (Migrated from github.com)

I got this bug too:
This server is running Folia version 1.21.11-13-ver/1.21.11@e9e85fd (2026-02-15T20:15:31Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-12-6d795a8 (MC: 1.21.11)

I got this bug too: This server is running Folia version 1.21.11-13-ver/1.21.11@e9e85fd (2026-02-15T20:15:31Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT) You are running the latest version Previous version: 1.21.11-12-6d795a8 (MC: 1.21.11)
kitovoi111 commented 2026-04-01 00:33:29 +02:00 (Migrated from github.com)
https://mclo.gs/LDOidtK
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#431
No description provided.