Skip to content

Server refuses connection due to Appache Compress being referenced on server (NoClassDefFoundError) #454

Description

@SilverDavidMC

Minecraft Version: 1.20.4

NeoForge Version: 20.4.70-beta

Logs:

Steps to Reproduce:

  1. Set up and run a NeoForge 20.4.70-beta client and dedicated server without any mods installed on either.
  2. Attempt to connect to the server.
  3. Client is refused connection due to java.lang.NoClassDefFoundError: org/apache/commons/compress/utils/Lists.

image

Description of issue:

When connecting to a server, NeoForge references org/apache/commons/compress/utils/Lists in several networking classes, causing a NoClassDefFoundError because the Apache Compress library isn't available on dedicated servers. This bug only occurs in a live environment, not in userdev.

The following classes are affected:

final List<NegotiatedNetworkComponent> result = Lists.newArrayList();

final List<Packet<? super ClientGamePacketListener>> packets = Lists.newArrayList();

It's possible other classes are referencing the library, but this is all I could find for now. 20.4.69, before the networking rewrite, works as expected.

Metadata

Metadata

Labels

1.20Targeted at Minecraft 1.20bugA bug or errorregressionWorked previously but doesn't anymore

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions