Skip to content

Server Crash: IllegalStateException in AbstractGolemEntity.getSoundVolume() #108

@VinaMod

Description

@VinaMod

In versions 3.1.35 and 3.1.36 for NeoForge 1.21.1, dedicated servers instantly crash when a golem takes damage.

In AbstractGolemEntity.java, the getSoundVolume() method attempts to read from MGConfig.CLIENT to determine the volume factor. Because dedicated servers do not load Client configurations, this throws an IllegalStateException: Cannot get config value before config is loaded.

A potential fix would be to move these sound volume factors to the COMMON config, or add a check to only apply the volume factor if Level.isClientSide() is true.

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