Skip to content

Crashes from missing structure components (vanilla bug in 1.7, maybe 1.8) #1686

@Player3324

Description

@Player3324

In StructureStart.func_143020_a:

this.components.add(MapGenStructureIO.func_143032_b(nbttaglist.getCompoundTagAt(i), p_143020_1_));

func_143032_b will return null if a component id doesn't reference anything anymore, presumably due to the mod originally providing it no longer exististing or having removed that feature. This will end up with null entries in the components list, causing NPEs in various other methods not expecting null entries.

See http://forum.industrial-craft.net/index.php?page=Thread&postID=179881#post179881 for an example list containing several null entries. It'll then crash in generateStructure().

I propose altering func_143020_a to silently skip components without valid IDs, i.e. not adding to the components list if func_143032_b returned null. Minecraft should already log that they were missing.

The issue is persistently world corrupting, fixing it in 1.7 is quite important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions