AnOpenSauceDev / FastRandom

An optimized rewrite of Minecraft's RNG system, for Fabric!
Apache License 2.0
48 stars 3 forks source link

[BUG]: Slime Chunks do not have parity with vanilla. #54

Closed owadisaaaa closed 4 months ago

owadisaaaa commented 4 months ago

Does an issue already cover this?

Does your system support Faster Random?

Issue description.

史莱姆区块不生成史莱姆

Issue replication.

找到一个史莱姆区块等待史莱姆刷新

Log File / Crash Report (if applicable)

No response

AnOpenSauceDev commented 4 months ago

I cannot replicate this on a brand new normal world with Faster Random 4.1.0. Slimes spawn perfectly fine, but I do notice that slime chunk finders don't line up with what Faster Random generates, so Faster Random probably moves slime chunks a bit.

Veradra commented 4 months ago

The original issue wasn't about slimes not spawning, they do fine. It was the inconsistent behavior with vanilla - slime chunks.

All tools that currently exist assume that this is not completely borked, which means online seed finder tools as well as mods will not work and you must resort to manually looking for slime chunks, which may change in the future given how it seems the answer to this issue has been "[it] probably moves slime chunks a bit".

It's a big enough issue to completely invalidate any performance improvements the mod may bring, in my opinion.

AnOpenSauceDev commented 4 months ago

Mods work perfectly fine? As long as a mod checks through minecraft's code and not the copy of the algorithm, it should always spot a slime chunk.

And the random generator used in Faster Random will still produce the same result for every seed compared to other Faster Random instances, so it's not like everything is being completely redone.

Veradra commented 4 months ago

Mods work perfectly fine? As long as a mod checks through minecraft's code and not the copy of the algorithm, it should always spot a slime chunk.

And the random generator used in Faster Random will still produce the same result for every seed compared to other Faster Random instances, so it's not like everything is being completely redone.

Within the context of everyone using FasterRandom, sure. Unfortunately, a mod like this may be present on a server without knowledge of the players, and if the server owner gives away the seed for other players to play around with, this can result in someone building a slime farm that works in singleplayer but fails on the server, or even a server operator later deciding to install the mod to help with performance, inadvertently breaking most non-swamp based slime farms.

If you generate a world with a seed (for instance, -7649949940957896961) in Vanilla and make a slime spawning platform within the chunk -4 11 (X-48, Z176 to X-64, Z192), without the mod installed, it will spawn slimes.

As soon as you do the same on a server with FasterRandom installed, it will no longer spawn slimes.

Mods (ex, MiniHud, Xaero's minimap), as well as online tools (Chunkbase) show this chunk as being a slime chunk in both instances.

Additionally, a wholly unrelated chunk (-8 8) becomes a slime chunk, which all of the above say is not a slime chunk.

AnOpenSauceDev commented 4 months ago

I think at the very least MiniHud and Xaero's minimap both approximate slime chunks this way (they're closed-source so I can't tell without doing questionable decompilation), because server-side it seems fine to me. I could also probably work on a patch to revert this behaviour later, but working around already existing worlds is going to be difficult.

AnOpenSauceDev commented 4 months ago

Fixed in 5.0.0.