Skip to content

1.21.4 - Minecart dropping on water-logged rails causes crash #86

@DiJA-sudo

Description

@DiJA-sudo

I encountered a crash when a hopper minecart entity was being ticked. The crash appears to be triggered by the Particular mod when it calls Collections.max on an empty LinkedList in the waterParticles method. The crash produces a NoSuchElementException.

Steps to Reproduce:

Launch Minecraft 1.21.4 with Fabric Loader (version 0.16.10) and the Particular mod installed (version 1.1.1+1.21.4, if applicable).
Play until a hopper minecart entity is ticked (e.g., by moving or interacting with it).
The game crashes with the following error.
Crash Log (Excerpt):

    at java.base/java.util.LinkedList$ListItr.next(LinkedList.java:901)
    at java.base/java.util.Collections.max(Collections.java:698)
    at knot//net.minecraft.class_1297.handler$ebm000$particular$waterParticles(class_1297.java:15219)
    at knot//net.minecraft.class_1297.method_5746(class_1297.java:1599)
    at knot//net.minecraft.class_1297.method_5713(class_1297.java:1542)
    ... (rest of the log)

Environment Information:

Minecraft Version: 1.21.4
Fabric Loader: 0.16.10
Particular Mod Version: 1.1.1+1.21.4
Operating System: Windows 11 (64-bit)
Java Version: 21.0.3 (Microsoft OpenJDK)
Additional Notes:
It appears that the crash is due to the mod attempting to calculate the maximum value of an empty collection within the water particle handling routine. This might be an edge case that isn't currently handled.
I’m happy to provide further details or logs if needed.

Steps Taken:

Verified that the crash log points to the Particular mod's injected code.
Cross-checked the environment and confirmed the issue occurs consistently when a hopper minecart is ticked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions