Sky Island Generator
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.
Features
Overworld
- Generates a 5×5×1 grass block platform at (8, 64, 8)
- An oak tree planted at the platform center
- Spawn point fixed directly above the platform center at (8, 65, 8)
- All vanilla structures preserved (Strongholds, End Portals, Ancient City portals, spawners, etc.)
- Ruined Portals filtered out
- Multiple biomes distributed normally
Nether
- Generates a 5×5×3 netherrack platform at (8, 64, 8) (top layer + 2 support layers)
- Nether Fortresses only generate Blaze spawner rooms (MonsterThrone)
- Bastion Remnants generate unchanged
- Multiple biomes distributed normally
The End
- Vanilla obsidian platform preserved (auto-generated by vanilla when entering the End)
- Dragon pool (exit portal) position adjusted to "equivalent terrain" height to avoid generating in void
- Obsidian pillars (end crystals) generate normally
- End Cities generate normally
- Exit gateway generates correctly after defeating the Ender Dragon
Technical Principles
Core Generator Architecture
The mod core is AbstractSkyIslandChunkGenerator, extending NoiseBasedChunkGenerator:
- Why extend:
ChunkMap.createRandomStatechecksinstanceof NoiseBasedChunkGenerator. Only by extending this class canRandomStatebe created correctly, enablingMultiNoiseBiomeSourceto work properly for multi-biome distribution. - Override strategy:
fillFromNoise: Does not callsuper, 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: ReturnsplatformY(minimum 63) to prevent structures from generating at Y=-64createState: Not overridden, uses vanilla method to ensure End Cities and other structures calculate correctly
Dragon Pool Position Fix
Through Mixin injection into EndDragonFight.spawnExitPortal, sets portalLocation before vanilla heightmap lookup:
- Calls
getBaseHeightInEquivalentNoiseWorldto calculate the height "if terrain existed" - Generates the dragon pool at equivalent terrain height, not at Y=0 in void
- Referenced from CarpetSkyAdditions implementation
Nether Fortress Modification
Through Mixin intercepting NetherFortressStructure.findGenerationPoint, replaces vanilla multi-component generation logic to only generate the MonsterThrone room containing Blaze spawners.
World Type Registration
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.
Spawn Point Setting
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.
Mixin Notes
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'smethodspecifies both Mojang name and SRG name@Shadowusesaliasesattribute for SRG name- Set
remap = falseto disable auto-mapping
Platform Coordinate Configuration
Platform coordinates are controlled by the sky_island.json world preset file and saved independently per save:
- When the world is created, generator parameters are serialized to the save's
level.datfile via Codec - When loading the world later, parameters are deserialized directly from
level.datwithout re-reading the JSON - Modifying the JSON only affects newly created worlds; existing worlds are unaffected
To 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.
Installation
- Install Minecraft 1.20.1
- Install Forge 47.x.x
- Place
skyisland-1.0.0.jarinto the.minecraft/modsfolder - Launch the game and select "Sky Island" world type when creating a new world
Development
# 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:
- JDK 17
- Gradle 8.8+
Project Structure
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
Acknowledgments
- CarpetSkyAdditions — Referenced for sky island generator implementation approach
License
This project is licensed under the MIT License.
Authors
- Yifei
- ZhangXaohan

