Skip to content

TrunkShellBlock crashes when querying coredir property on non-DynamicTrees blocks #1174

@Griffenders-source

Description

@Griffenders-source

Description

TrunkShellBlock.getHardness() crashes with an IllegalArgumentException
when it tries to access the coredir EnumProperty on a vanilla block
(minecraft:deepslate) that doesn't have this property. There is no
null/property check before accessing the property via getValue().

Expected behavior

TrunkShellBlock should check if the block state has the coredir
property before trying to access it, and return a default value if not.

Actual behavior

java.lang.IllegalArgumentException: Cannot get property
EnumProperty{name=coredir, clazz=class
com.dtteam.dynamictrees.utility.CoordUtils$Surround, values=[N, NW, W,
SW, S, SE, E, NE]} as it does not exist in Block{minecraft:deepslate}

Stack trace (key lines)

at TrunkShellBlock.getMuseDir(TrunkShellBlock.java:143)
at TrunkShellBlock.getMuseUnchecked(TrunkShellBlock.java:158)
at TrunkShellBlock.getMuseUnchecked(TrunkShellBlock.java:153)
at TrunkShellBlock.getMuse(TrunkShellBlock.java:185)
at TrunkShellBlock.getHardness(TrunkShellBlock.java:112)

Suggested fix

Add a hasProperty() check before getValue() in TrunkShellBlock.java
around line 143:
if (blockState.hasProperty(CORE_DIR)) {
// existing logic
} else {
return defaultValue;
}

Mods involved

  • Dynamic Trees 1.7.0 (NeoForge 1.21.1)
  • Sable 1.2.2 (triggers the hardness query via physics recalculation)
  • Confluence: Otherworld 1.2.4 (triggers the initial block change)

Environment

  • NeoForge 21.1.230
  • Minecraft 1.21.1
  • Dedicated server

Crash report

[crash-2026-05-25_18_10_25-server.txt attached]

Additional context

Crash chain:
DynamicLeavesBlock.randomTick (Dynamic Trees)
→ Sable physics recalculation (RapierVoxelColliderBakery)
→ TrunkShellBlock.getHardness()
→ IllegalArgumentException on minecraft:deepslate

crash-2026-05-25_18.10.25-server.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions