English | 中文
A Minecraft 1.20.1 Forge mod that adds a "Sky Island" world type. When selected during world creation, all three dimensions generate small starting platforms surrounded by void, while preserving vanilla special structures (End Portals, Ancient City portals, spawners, etc.) and normal biome distribution.
The mod core is AbstractSkyIslandChunkGenerator, extending NoiseBasedChunkGenerator:
ChunkMap.createRandomState checks instanceof NoiseBasedChunkGenerator. Only by extending this class can RandomState be created correctly, enabling MultiNoiseBiomeSource to work properly for multi-biome distribution.fillFromNoise: Does not call super, only places platform blocks to avoid noise terrain generationbuildSurface / applyCarvers: Empty implementations, no surface layers or cavesapplyBiomeDecoration: Overridden to only generate structure blocks, filter Ruined Portals, and specially allow obsidian pillarsgetBaseHeight: Returns platformY (minimum 63) to prevent structures from generating at Y=-64createState: Not overridden, uses vanilla method to ensure End Cities and other structures calculate correctlyThrough Mixin injection into EndDragonFight.spawnExitPortal, sets portalLocation before vanilla heightmap lookup:
getBaseHeightInEquivalentNoiseWorld to calculate the height "if terrain existed"Through Mixin intercepting NetherFortressStructure.findGenerationPoint, replaces vanilla multi-component generation logic to only generate the MonsterThrone room containing Blaze spawners.
Through data-driven world_preset JSON files defining the sky island world preset, appended to vanilla normal and extended world type tags, without modifying the world creation UI code.
Listens to LevelEvent.CreateSpawnPosition event. When the overworld uses the sky island generator, forcibly sets the spawn point to the platform center and cancels default search.
Since Forge 1.20.1 projects do not auto-generate refmap, Mixin requires manual mapping handling between production environment (SRG mappings) and development environment (Mojang mappings):
@Inject's method specifies both Mojang name and SRG name@Shadow uses aliases attribute for SRG nameremap = false to disable auto-mappingPlatform coordinates are controlled by the sky_island.json world preset file and saved independently per save:
level.dat file via Codeclevel.dat without re-reading the JSONTo modify platform position for an existing world, use an NBT editor to modify Data⟶WorldGenSettings⟶dimensions⟶minecraft:overworld⟶generator fields platform_x/y/z in level.dat.
skyisland-1.0.0.jar into the .minecraft/mods folder# Clone the repository
git clone https://github.com/19136644525lxy/Sky-Island-Generator.git
cd Sky-Island-Generator
# Build the project
./gradlew build
# Launch test client
./gradlew runClient
Requirements:
src/main/java/com/skyisland/
├── SkyIslandMod.java # Mod main class
├── core/
│ ├── registry/
│ │ └── SkyRegistries.java # Registries
│ └── worldgen/
│ ├── AbstractSkyIslandChunkGenerator.java # Generator base class
│ ├── OverworldSkyIslandGenerator.java # Overworld generator
│ ├── NetherSkyIslandGenerator.java # Nether generator
│ └── EndSkyIslandGenerator.java # End generator
└── mixin/
├── MixinEndDragonFight.java # Dragon pool position fix
└── MixinNetherFortressStructure.java # Nether fortress modification
This project is licensed under the MIT License.