Repository navigation
Conversation
|
To note, also: |
| } | ||
|
|
||
| final var saveDataPath = storageSource.getDimensionPath(registryKey).resolve("data"); | ||
| final var saveDataStorage = new SavedDataStorage(saveDataPath, this.server.getFixerUpper(), this.server.registryAccess()); |
There was a problem hiding this comment.
Not thrilled about how I build this SavedDataStorage, but it mimics what Level does, I believe, and I cannot get it from the world before it's built (for obvious reasons). What do you think?
| if (levelData instanceof PrimaryLevelDataBridge bridge) { | ||
| final WorldOptions options = bridge.bridge$spongeData().worldGenOptions(); | ||
| cir.setReturnValue(options.seed()); | ||
| if (options != null) { |
There was a problem hiding this comment.
IntelliJ thinks this null check is always true, which is why I removed it before opening the PR, but IntelliJ is wrong. Maybe because bridge$spongeData always has a value, even if default? Unsure. Either way, I got an exception when trying to run it without this check.
|
Tests should be good to pass now. If they keep failing, let me know. I'll try to get this PR merged anyways soon. |
Hello!
First time contributor, and Mixin novice. An attempt at #4315
This PR does three things (one just a typo fix):
@InjectforgetSeedinServerLevelMixin.javaso the seed is retrieved from the custom world generation options.world_gen_settings.datincreateNonDefaultLevels(SpongeWorldManager.java). I do not know where else this might need to happen; some guidance would be appreciated!SpongeWorldManager.createLevel. I was in that method a lot while trying to figure out how everything works, and IntelliJ flagged it.Please let me know if you want any changes, tests, or just have comments.