What Are They Up To (Watut)

What Are They Up To (Watut)

40M Downloads

FakePlayerHelper has poor performance

katietheqt opened this issue ยท 0 comments

commented

Describe the bug
The FakePlayerHelper class almost always attempts a class load using Class.forName, as failed class loads return null which computeIfAbsent ignores. The only case where a class load is not attempted is if you are on fabric and the player is in fact a fakeplayer.

Expected behavior
I would expect the null variant to be cached. This should probably just use two static final fields anyway.

Mod and Minecraft version:
Issue is present in current tree.