Skip to content

Piranha Crash 1.20.1 Forge #143

@KarnivaleFool

Description

@KarnivaleFool

I had a crash when a creature died while being the target of a Piranha (sully's mod 3.2.1 for Forge 1.20.1)

This is the critical line:

at TRANSFORMER/[email protected]/com.uraneptus.sullysmod.common.entities.Piranha.m_8107_(Piranha.java:194)
This crash occurs inside the Piranha entity's tick() or goal-related method (m_8107_ is likely obfuscated for tick() or a behavior update method), and the immediate cause is:

java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:756)

What's Happening?
A ConcurrentModificationException means the Piranha entity (or a goal it uses) is trying to modify a collection (likely the goal list or similar structure) while iterating over it, which Java does not allow unless done safely (e.g., using Iterator.remove() or CopyOnWriteArrayList).

This seems to be in the AI goal selector loop (GoalSelector.m_25373_), which means:

A goal is modifying the goal list (addGoal, removeGoal, etc.) during ticking/iteration, which is unsafe.

The crash stack shows it's very likely inside Piranha.java:194

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmWe need confirmation for this issueFixA bug or crash that needs to be fixed

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions