NucleoidMC / NucleoidMC/fantasy
ServerboundMovePlayerPacket error when using changeDimension to fantasy dimensions, chunks do not generate
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 143
- Forks
- 48
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 2
Description
As title. Trying the lib by using a simple command that creates a temporary dimension and moves the player there, but I just get the classic pre-loading empty world on the client side as chunks never generate, with the error at the bottom of the issue post in the log.
The command code (in Kotlin, mojmap, fabric) is this:
object Commands {
val worldConfig = { server: MinecraftServer ->
RuntimeWorldConfig()
.setDimensionType(BuiltinDimensionTypes.OVERWORLD)
.setDifficulty(Difficulty.HARD)
.setGameRule(GameRules.RULE_DAYLIGHT, false)
.setGenerator(server.overworld().chunkSource.generator)
.setSeed(1234L)
}
fun register(dispatcher: CommandDispatcher<CommandSourceStack>, registryAccess: CommandBuildContext, environment: Commands.CommandSelection) {
//tmpdim: move to temporary dim
dispatcher.register(literal("tmpdim").requires{ it.hasPermission(2) }
.executes { ctx ->
val fantasy = Fantasy.get(ctx.source.server)
val worldHandle:= fantasy.openTemporaryWorld(worldConfig(ctx.source.server))
val level = worldHandle.asWorld()
ctx.source.playerOrException.changeDimension(level)
1
}
)
}
}
Am I doing something wrong?
[20:54:42] [Server thread/ERROR] (Minecraft) Failed to handle packet net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot@380fc290, suppressing error
java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "objectSet" is null
at net.minecraft.server.level.DistanceManager.removePlayer(DistanceManager.java:225) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.level.ChunkMap.move(ChunkMap.java:1093) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.level.ServerChunkCache.move(ServerChunkCache.java:477) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:928) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:31) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$PosRot.handle(ServerboundMovePlayerPacket.java:90) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.network.protocol.PacketUtils.method_11072(PacketUtils.java:34) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.TickTask.run(TickTask.java:20) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:143) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:797) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:189) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:114) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:780) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:774) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:103) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:760) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:696) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:252) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[20:54:42] [Server thread/ERROR] (Minecraft) Failed to handle packet net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos@5f723ccf, suppressing error
java.lang.NullPointerException: Cannot invoke "it.unimi.dsi.fastutil.objects.ObjectSet.remove(Object)" because "objectSet" is null
at net.minecraft.server.level.DistanceManager.removePlayer(DistanceManager.java:225) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.level.ChunkMap.move(ChunkMap.java:1093) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.level.ServerChunkCache.move(ServerChunkCache.java:477) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleMovePlayer(ServerGamePacketListenerImpl.java:928) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.handle(ServerboundMovePlayerPacket.java:31) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.network.protocol.game.ServerboundMovePlayerPacket$Pos.handle(ServerboundMovePlayerPacket.java:68) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.network.protocol.PacketUtils.method_11072(PacketUtils.java:34) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.TickTask.run(TickTask.java:20) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:143) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:797) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:189) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:114) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:780) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:774) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:103) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:760) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:696) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:252) ~[minecraft-common-c4cba8cea8-1.20.2-loom.mappings.1_20_2.layered+hash.405084424-v2.jar:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the Kotlin command using Fantasy.openTemporaryWorld and changeDimension. Start by tracing the reported path through ServerGamePacketListenerImpl.handleMovePlayer, ServerChunkCache.move, ChunkMap.move, and DistanceManager.removePlayer. Done means temporary fantasy dimensions generate chunks after teleporting without the ServerboundMovePlayerPacket error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100