Skyblock Builder

Skyblock Builder

6M Downloads

Generate Custom Dimensions for Varying Skyblock Types (Stoneblock, Hellblock)

Freedbot opened this issue · 5 comments

commented

Describe your idea

I feel like all the needed functionality is there except for 2 options. I'm working on a pack where I hope to implement several different starting islands, but SOME would have different world generation. I'm working with 1.19.2 so excuse me if I'm missing out on features from newer versions. Currently, if I wanted to have a normal void Skyblock in the overworld, but also make (for instance) a HellBlock option involving spawning in the nether with a lava lake, then it involves the player messing with the configs and then only being able to load worlds that match these settings. In a server, if one player wants to play Stoneblock, then EVERY player has to play stoneblock.

I would like to be able to use the "common-config" "surfaceSettings" to add new entries for custom dimensions with different generation. Perhaps move the setting to "templates" or add a new one there. In my case, Stoneblock(overworld biomes and behavior), Hellblock(nether), and Seablock(overworld). "common-config" "Spawn" still controls initial world spawn dimension. In the "templates" file I'd like to have a new option in each template for choosing which dimension to generate this island in.

The intended result for me: A new player spawns in the void overworld on the protected spawn island before choosing which island to start. If they choose "Classic" (the default included with the mod), the island is generated in the same dimension and their spawn is set there as normal, but if they choose "Hellblock", then the island generates in a new dimension that follows Nether rules (including exploding beds), and their spawn is set there. The whole dimension is set to generate as a lava lake.

Portals are a bit of an issue in the Hellblock example, but I can probably figure something out with other mods. The ideal would be that overworld skyblock players using nether portals would go to the configured default nether, but Hellblock player nether portals would teleport to the vanilla skyblock overworld. The coordinate ratio for teleporting would be 1:1 instead of the vanilla 8:1 coordinate ratio so that there's no Hellblock players bumping into overworld islands. Once an island is made at a location, no islands should be at that location in any other dimension. For my uses, Any other dimension would follow overworld rules and nether portals in those dimensions would just lead to the default nether dimension. I see no reason to teleport to the overworld in those cases except to leave a team or visit spawn or other teams. I have no plans on messing with the End or how those portals work other than the ability to craft and break them, which I've already handled.

My alternatives without these options: Using current functionality, I can "fake" Stoneblock by using the surrounding blocks option, but having a large margin is equivalent to setting off a nuke on the server. If set too high, it suffers an OoM error and hangs at 100% system usage. The "best" work around I have in my head right now is to make some datapacked custom dimensions, Use Custom Portal Builder to put portals to these dimensions in the templates, and then somehow (I have no idea), generate the actual intended island as part of the structure in the other dimension.

Sorry for the text wall, and thank you for all your active work and solid documentation. This is a very intuitive mod to work with.

commented

That's above my paygrade, I'll have to get some serious help, but thanks for the tip and letting me know that some solution should be possible.

commented

The few other members I grabbed in the Minecraft Pack Dev discord have no idea how your terrain generation snippet could could be called and interfered with in a datapack. Getting the flatworld generation in a datapack and making dimensions is not really an issue. I am probably misinterpreting what you're saying, but it seems you're implying that I could tweak Skyblock Builder's behavior to have it generate islands in other dimensions and the commands would work fine? Could I bug you to clarify a bit? As you saw, I've joined your discord if that's preferable. @ me whatever.

commented

Well, I don't need it if it's not for the pack I'm making, but I do hope it helps someone. I don't see it breaking existing worlds as long as the config settings migrate with proper defaults. I also wouldn't describe this as niche. I was looking at Create on a Potato PC: Ultimate as a base, and it suffers from the same problem. The author decided to get around it by making alternate config options for Stoneblock and comment them out, then added instructions and a button to the New World menu via FancyMenu. The button just opens the config files. The instructions are plastered with warnings on how this will break saves if used when opening the wrong world. Needless to say, I'm not very comfortable with that implementation.

This is a bit of a bit complex in terms of implimenting safely. I respect if you decide against implimenting it on the current code base, but if so, I don't suppose you have any ideas how I would apply island structures to custom portals generated in custom dimensions? KubeJS's documentation is a meme, and I haven't dealt with dimensions or structures in data packs yet.

commented

Thanks for the idea. I need some time to think about it. However, this would be something that would not be in 1.19.2, not even 1.20.1. The first possible version would be 1.21 since this would result in a few breaking changes with existing worlds.
This is still not a yes to this feature. I really need to think about possible solutions for that. This seems like a very niche feature, which is a reason against it.

With this comment, I just wanted to let you know that it would be 1.21+ at earliest.

And thanks for the end words :)

commented

It breaks internal meta data stuff I guess. I didn’t dive deep enough in this issue. But I only add new features to the newest versions of my mods.
At the moment:

  • 1.20 -> new features + bug fixes
  • 1.19 -> bug fixes
  • 1.18 -> critical bug fixes

With introducing 1.21, this list would shift by one, 1.18 would be dropped.

I’m not sure if existing worlds really would break, even if one of stoneblock and one isn’t… different starting dimensions, yes. But the layer settings are stored in the level.dat. Because of that, you should be able to create custom dimensions with nearly all settings using data packs. This may help with that:

BiomeSource.CODEC.fieldOf("biome_source").forGetter(generator -> generator.biomeSource),
NoiseGeneratorSettings.CODEC.fieldOf("settings").forGetter(generator -> generator.generatorSettings),
Level.RESOURCE_KEY_CODEC.fieldOf("dimension").forGetter(generator -> generator.dimension),
FlatLayerInfo.CODEC.listOf().optionalFieldOf("layers").forGetter(generator -> Optional.ofNullable(generator.layerInfos)) // todo 1.20 change to #fieldOf

And islands in custom dimensions, even non-Skyblock, should work fine, too.