All Mods Resource Packs Data Packs Shaders Modpacks Plugins
iafdragonfix

iafdragonfix

by yuuka0desu • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

IAF Dragon Den Fix A lightweight Forge mixin mod that fixes a server/client crash caused by Ice and Fire's Dragon Dens and Dragon Roosts generating outside the available chunk region.

The Problem Ice and Fire's dragon dens and roosts place blocks across a large radius (30+ blocks for caves, 20+ for roosts) during world generation. When these structures generate near the world border or chunk loading boundary, the generation code attempts to access chunks that are not loaded in the WorldGenRegion cache, throwing RuntimeException: We are asking a region for a chunk out of bound and corrupting the save.

How It Works This mod uses Mixin to intercept two methods in WorldGenRegion:

getBlockState — Returns air instead of crashing when a feature tries to read a block from a chunk outside the region's cache. addFreshEntity — Silently cancels entity spawning (e.g. the dragon itself) when the target position is outside the available chunks. Dragon dens and roosts still generate normally. Only the portions that extend beyond the loaded region are gracefully truncated. No structures are skipped, and normal world generation (trees, ores, etc.) is completely unaffected.

Installation Drop iafdragonfix-1.0.0.jar into your mods folder.

Requirements Minecraft 1.20.1 Forge 47+ Compatibility Tested with Ice and Fire 2.1.13-1.20.1-beta-5 Does not modify Ice and Fire itself — compatible with other IAF addons Safe to add or remove at any time

How to Install iafdragonfix (Mod)

iafdragonfix by yuuka0desu is verified for Forge across Minecraft versions 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6 (latest release: 2.0.5, file size: 32 KB). Follow the steps below to install it safely from ModCraft.tv:

  1. Click the Download button above and select your Minecraft version (1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6) and platform (Forge).
  2. Make sure you have the compatible loader or environment installed for Forge.
  3. Move the downloaded iafdragonfix file into your Minecraft .minecraft/mods folder and launch the game.

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.20.1
Forge
2mo ago 1
1.20.1
Forge
3mo ago 1
1.20.x
Forge
3mo ago 1
1.20.1
Forge
5mo ago 1
1.20.1
Forge
5mo ago 1
[2.0.5] iafdragonfix 2.0.5 by yuuka0desu on Sep 23, 2026
Download
Changelog
2.0.5
Changed
•
Dragon roosts now require land. A candidate whose ocean-floor height is at or below sea level is rejected, so roosts no longer spawn on open water.
•
Dragon caves are unaffected and still generate underground.
•
The first-use /locate predictor applies the same land rule, so it never reports a roost that generation would later discard.
Notes
•
The land check uses OCEAN_FLOOR_WG, which ignores water, so ocean columns correctly read as sea level or lower.
[2.0.2] iafdragonfix 2.0.2 by yuuka0desu on Aug 24, 2026
Download
# Changelog

## 2.0.2 - 2026-08-24

### Performance
  • Moved dragon roost surface-height resolution out of findGenerationPoint() so /locate structure iafdragonfix:*_dragon_roost no longer performs terrain-height queries for every scanned candidate chunk.
  • Moved dragon cave depth resolution out of findGenerationPoint() as well, removing the previous 20x20 OCEAN_FLOOR_WG scan from the /locate hot path.
  • Added lazy, deterministic Y resolution in DragonDenPiece.postProcess() so actual world generation still uses the same terrain-derived placement logic when the target chunks are being generated.

### Fixed
  • Replaced the custom dragon den geometry implementation with Ice and Fire's native dragon cave and dragon roost generation methods.
  • Added ChunkBoundLevel to safely replay Ice and Fire's feature generators inside structure-piece chunk bounds, preventing cross-chunk block writes from being dropped as far-chunk writes.
  • Ensured dragons are spawned only by the structure pass that owns the resolved den center, preventing duplicate dragons while multi-chunk structure pieces replay generation.
  • Added fallback handling for unusable surface heightmap results so surface roost dragons stay at the resolved roost height instead of dropping to the world bottom.
  • Moved the spawn-distance check into findGenerationPoint() so /locate does not report structures rejected later during postProcess().
  • Removed the broken MixinRandomSpreadPlacement, which crashed during startup because constructor variable injection targeted a record constructor before initialization was valid.

### Changed
  • Dragon den pieces now persist deterministic den parameters through DenParams, including radius, cave dragon age, gender, lazy height state, cave depth offset and per-den generation seed.
  • Dragon den pieces now persist center X/Z independently from their bounding box so lazy Y resolution does not affect structure scheduling.
  • Lazy-Y pieces use a broad vertical bounding box while preserving the original X/Z generation radius, allowing the resolved roost or cave height to generate correctly later.
  • Fire dragon cave and roost biome tags now include desert biomes plus explicit warm plains entries: minecraft:plains, minecraft:sunflower_plains and minecraft:meadow.
  • Structure-set defaults now match the server config defaults: dragon roosts use spacing=24, separation=6, frequency=0.6; dragon caves use spacing=32, separation=8, frequency=0.6.

### Removed
  • Removed unused custom geometry helpers after switching den shape generation back to Ice and Fire's native implementation.
  • Removed unused helper methods and imports from the dragon type, feature and mixin classes.

## 2.0.1 - 2026-08-07

  • Initial structure-based dragon den registration with server-configurable placement.
[2.0.1] iafdragonfix 2.0.1 by yuuka0desu on Aug 07, 2026
Download
Replaced IAF dragon den/roost Features with Structures — /locate no longer crashes near world border
Per-dragon biome tags: Fire→Desert+Plains, Ice→Cold, Lightning→Savanna+Badlands+Jungle
Added server config iafdragonfix-server.toml for spawn distance, spacing, separation, and frequency
Fixed "setBlock in far chunk" log spam caused by undersized BoundingBox during generation

[2.0.0] iafdragonfix 2.0.0 by yuuka0desu on Jun 14, 2026
Download
iafdragonfix v2.0.0 Changelog
Major Rewrite
Dragon dens and rosts are now registered as proper vanilla Structures instead of Features, fully resolving the inaccurate /locate issue.

Changes
Dragon dens/roosts are real Structures: Registered using the vanilla Structure system. /locate structure iafdragonfix:fire_dragon_cave and similar commands now point to exact locations
Disabled IAF's original Feature generation: Controlled via Mixin + ThreadLocal flag. Dragon dens/roosts no longer spawn at unpredictable random positions
Content generated during Structure postProcess: Directly invokes IAF's generation methods (public API for caves, reflection for roosts), guaranteeing that located positions always contain the actual structure
Retained out-of-bounds crash protection: MixinWorldGenRegion still intercepts block reads and entity spawns beyond chunk boundaries
Supported Structures
Command Description
/locate structure iafdragonfix:fire_dragon_cave Fire Dragon Cave
/locate structure iafdragonfix:ice_dragon_cave Ice Dragon Cave
/locate structure iafdragonfix:lightning_dragon_cave Lightning Dragon Cave
/locate structure iafdragonfix:fire_dragon_roost Fire Dragon Roost
/locate structure iafdragonfix:ice_dragon_roost Ice Dragon Roost
/locate structure iafdragonfix:lightning_dragon_rost Lightning Dragon Roost
Generation Parameters
Caves: spacing 32 chunks, separation 8 chunks, 60% frequency
Roosts: spacing 24 chunks, separation 6 chunks, 60% frequency
Notes
Requires a new world to take effect (already generated chunks are unaffected)
Existing dragon dens in old saves will not be removed, but no new Feature-based dens will generate
Requires Ice and Fire 2.1.13+ and Forge 47+

iafdragonfix Icon
Download iafdragonfix
Select game version
Select platform