Anuken/Mindustry · error · IOException
Failed to read tile entity of block:
Error message
Failed to read tile entity of block:
What it means
ShortChunkSaveVersion (the older 'short chunk' save format) reads building data via readLegacyShortChunk then tile.build.readAll(in, revision). Any Throwable from that read is wrapped in an IOException naming the block. Same pattern as LegacySaveVersion but for the short-chunk format.
Source
Thrown at core/src/mindustry/io/versions/ShortChunkSaveVersion.java:127
//must be assigned after setBlock, because that can reset data
if(hadDataNew){
tile.data = data;
tile.floorData = floorData;
tile.overlayData = overlayData;
tile.extraData = extraData;
context.onReadTileData();
}
if(hadEntity){
if(isCenter){ //only read entity for center blocks
if(block.hasBuilding()){
try{
readLegacyShortChunk(stream, (in, len) -> {
byte revision = in.b();
tile.build.readAll(in, revision);
});
}catch(Throwable e){
throw new IOException("Failed to read tile entity of block: " + block, e);
}
}else{
//skip the entity region, as the entity and its IO code are now gone
skipLegacyShortChunk(stream);
}
context.onReadBuilding();
}
}else if(hadDataOld || hadDataNew){ //never read consecutive blocks if there's any kind of data
if(hadDataOld){
tile.setBlock(block);
//the old data format was only read in the case where there is no building, and only contained a single byte
tile.data = stream.readByte();
}
}else{
int consecutives = stream.readUnsignedByte();
for(int j = i + 1; j < i + 1 + consecutives; j++){View on GitHub (pinned to f695ad7e60)
Solutions
- Inspect the wrapped cause (e.getCause()) for the real failure.
- If the save is too old, start fresh.
- Align mods to the versions that wrote the save.
Defensive patterns
Strategy: try-catch
Try / catch
try {
shortChunkVersion.read(stream, context);
} catch(IOException e) {
Log.err("Save load failed for block: " + e.getMessage(), e.getCause());
// e.getMessage() names the block; e.getCause() is the real failure
} Prevention
- Keep mods aligned with the saves you load.
- For short-chunk-era saves, prefer starting fresh if load fails.
- Log the wrapped cause (getCause) to find the real read failure.
When it happens
Trigger: Loading a short-chunk legacy save whose building data for a block is corrupt or unreadable by the current build.readAll.
Common situations: Old short-chunk saves; block class changes since the save; partial corruption.
Related errors
- Failed to read tile entity of block:
- Unknown save version: {}. Are you trying to load a save from
- Error reading region "{}".
- Error reading region "{}": read length mismatch. Expected: {
- Error writing region "{}".
AI-assisted analysis of Anuken/Mindustry@f695ad7e60 (2026-08-14).
Data as JSON: /api/errors/96921fd70ae062ac.
Report an issue: GitHub.