Origins (Forge)

Origins (Forge)

7M Downloads

[1.19.2 Bug] start location doesn't actually set spawn location...?

Darkmega18 opened this issue ยท 9 comments

commented

Me again...

origins: origins-forge-1.19.2-1.7.1.1-all.jar
forge: 43.2.21
1.19.2
Same modpack as before basically.

I'm using the spawn location power to set the player to spawn in certain biomes or at certain structures to start off with.

However I'm noticing, compared to when I used it in 1.16.5 when I die it doesn't immediately send me back to the location specified like it should. it yeets me to the normal world spawn... hangs the server (in singleplayer) for a little, then finally teleports me to the spot I should be at once it wakes up.

Shouldn't it have had the chance to gen the spawn when loading in for the first time etc and the spot I had just been at should've been loaded, so I'm not sure about what this big lag is about.

commented

welp. guess using a bed before dieing or suffering a server lag to tell you "you're bad at the video game" will suffice then. Since that has generally stopped it. if I remember. But if you can fix it in the future. I guess cue it up for later then so this is the last version it's gotta be dealt with in.

commented

I'll probably end up making the check handled on a separate thread to the server one, for optimisation purposes, as well as having a cache for spawns so the check will only happen once.

commented

But this'll happen later, as I want a break.

commented

The best thing I could probably do here is to cache the spawn whenever you respawn. MPS is a really janky power in the Fabric version too, so I'm probably best to avoid making major changes to it.

commented

The issue here is that the spawn finding logic is expensive in both versions, there's a PR for Origins Fabric that pretty much makes the power check less area, although that's an upcoming 1.20 feature, so I doubt I'd be able to backport it here.

commented

I just don't think I'm able to do a proper fix unfortunately. At most, I could replicate Fabric logic by changing it so you're stuck in the player respawn screen for an amount of time, however, that still doesn't solve the issue of hanging the server.

Tl;dr, I feel like no amount of bandaid fixes we can do here would fix this fundamentally broken power type.

commented

cache could be good. if thats what you can do. just so it doesn't yeet me back to start then lag the world for an equivalent amount of time as if it was regenerating the land, then sending me back after hanging the server.
although I can realistically just sleep to set a spawn... but what kind of panzies skip the night anyways? That's when all the fun is!

Somewhat related but: is there anything at all you can do, maybe in a side addon for making players who're set to spawn at structures spawn somewhere "near" the structure. like detecting the structure's perimeter, then giving the player a "near" spawn that places them some blocks away from it's actual spawning/interior area and still places them at the surface?

Cause it's kinda janky how they usually end up with you on the roof of said structure or deep in the ground/inside it somewhere...

commented

cache could be good. if thats what you can do. just so it doesn't yeet me back to start then lag the world for an equivalent amount of time as if it was regenerating the land, then sending me back after hanging the server. although I can realistically just sleep to set a spawn... but what kind of panzies skip the night anyways? That's when all the fun is!

Somewhat related but: is there anything at all you can do, maybe in a side addon for making players who're set to spawn at structures spawn somewhere "near" the structure. like detecting the structure's perimeter, then giving the player a "near" spawn that places them some blocks away from it's actual spawning/interior area and still places them at the surface?

Cause it's kinda janky how they usually end up with you on the roof of said structure or deep in the ground/inside it somewhere...

That'd ultimately require a rewrite to the Modify Player Spawn power, which is out of scope for Origins Forge.
I don't think I'd be equipped to make this rewrite in something of my own, I guess I could contact my friend who has since left the community about his old Modify Player Spawn rewrite.

commented

A rewrite will be something I do for Origins Fabric sometime in the future, my friend suggested to avoid his code and to look at how vanilla handles spawning the player in a safe place.